Files
tabungin/apps/api/dist/users/users.service.d.ts
dwindown c3bc181063 feat: add admin dashboard schema and seeder
- Add Plan, Subscription, Payment, PaymentMethod, Coupon models
- Add ApiKey, Webhook models for API access
- Add AppConfig model for dynamic configuration
- Add role, suspendedAt fields to User model
- Create comprehensive seeder with:
  - Admin user (dwindi.ramadhana@gmail.com)
  - Default plans (Free, Pro Monthly, Pro Yearly)
  - Payment methods (BCA, Mandiri, GoPay)
  - App config (maintenance mode)
- Zero data loss migration strategy
2025-10-11 14:06:55 +07:00

50 lines
1.4 KiB
TypeScript

import { PrismaService } from '../prisma/prisma.service';
export declare class UsersService {
private prisma;
constructor(prisma: PrismaService);
me(): Promise<{
id: string;
email: string;
phone: string | null;
createdAt: Date;
updatedAt: Date;
status: string;
emailVerified: boolean;
passwordHash: string | null;
name: string | null;
avatarUrl: string | null;
defaultCurrency: string | null;
timeZone: string | null;
otpEmailEnabled: boolean;
otpWhatsappEnabled: boolean;
otpTotpEnabled: boolean;
otpTotpSecret: string | null;
role: string;
suspendedAt: Date | null;
suspendedReason: string | null;
lastLoginAt: Date | null;
} | null>;
updateProfile(userId: string, data: {
name?: string;
phone?: string;
}): Promise<{
success: boolean;
message: string;
user: {
id: string;
email: string;
phone: string | null;
name: string | null;
avatarUrl: string | null;
};
}>;
getAuthInfo(userId: string): Promise<{
hasGoogleAuth: boolean;
hasPassword: boolean;
}>;
deleteAccount(userId: string, password: string): Promise<{
success: boolean;
message: string;
}>;
}