Files
tabungin/apps/api/dist/admin/admin-users.controller.d.ts
Dwindi Ramadhana 6a6e74562c checkpoint: goals feature, wallet balance, and goals/wallet detail UI
- Add goals feature (models, migrations, API, web pages)
- Add reserved/centralized wallet balance service
- Add wallet detail page and overview components
- Add new UI components (progress, multi-select, FAB)
- Remove stray empty -H/-d files from working tree
2026-06-17 20:40:00 +07:00

209 lines
6.0 KiB
TypeScript
Executable File

import { AdminUsersService } from './admin-users.service';
export declare class AdminUsersController {
private readonly service;
constructor(service: AdminUsersService);
findAll(search?: string): Promise<{
id: string;
email: string;
createdAt: Date;
name: string | null;
emailVerified: boolean;
lastLoginAt: Date | null;
role: string;
suspendedAt: Date | null;
_count: {
transactions: number;
wallets: number;
};
}[]>;
getStats(): Promise<{
totalUsers: number;
activeSubscriptions: number;
suspendedUsers: number;
}>;
findOne(id: string): Promise<({
subscriptions: ({
plan: {
id: string;
createdAt: Date;
updatedAt: Date;
name: string;
currency: string;
slug: string;
description: string | null;
price: import("@prisma/client/runtime/library").Decimal;
durationType: string;
durationDays: number | null;
trialDays: number;
features: import("@prisma/client/runtime/library").JsonValue;
badge: string | null;
badgeColor: string | null;
highlightColor: string | null;
sortOrder: number;
isActive: boolean;
isVisible: boolean;
isFeatured: boolean;
maxWallets: number | null;
maxGoals: number | null;
maxTeamMembers: number | null;
apiEnabled: boolean;
apiRateLimit: number | null;
};
} & {
id: string;
createdAt: Date;
updatedAt: Date;
status: string;
userId: string;
planId: string;
startDate: Date;
endDate: Date;
isTrialUsed: boolean;
trialEndDate: Date | null;
cancelledAt: Date | null;
cancellationReason: string | null;
}) | null;
_count: {
payments: number;
transactions: number;
wallets: number;
};
} & {
id: string;
email: string;
phone: string | null;
createdAt: Date;
updatedAt: Date;
status: string;
name: string | null;
avatarUrl: string | null;
defaultCurrency: string | null;
timeZone: string | null;
emailVerified: boolean;
otpEmailEnabled: boolean;
otpTotpEnabled: boolean;
otpTotpSecret: string | null;
passwordHash: string | null;
otpWhatsappEnabled: boolean;
lastLoginAt: Date | null;
role: string;
suspendedAt: Date | null;
suspendedReason: string | null;
}) | null>;
updateRole(id: string, body: {
role: string;
}): Promise<{
id: string;
email: string;
phone: string | null;
createdAt: Date;
updatedAt: Date;
status: string;
name: string | null;
avatarUrl: string | null;
defaultCurrency: string | null;
timeZone: string | null;
emailVerified: boolean;
otpEmailEnabled: boolean;
otpTotpEnabled: boolean;
otpTotpSecret: string | null;
passwordHash: string | null;
otpWhatsappEnabled: boolean;
lastLoginAt: Date | null;
role: string;
suspendedAt: Date | null;
suspendedReason: string | null;
}>;
suspend(id: string, body: {
reason: string;
}): Promise<{
id: string;
email: string;
phone: string | null;
createdAt: Date;
updatedAt: Date;
status: string;
name: string | null;
avatarUrl: string | null;
defaultCurrency: string | null;
timeZone: string | null;
emailVerified: boolean;
otpEmailEnabled: boolean;
otpTotpEnabled: boolean;
otpTotpSecret: string | null;
passwordHash: string | null;
otpWhatsappEnabled: boolean;
lastLoginAt: Date | null;
role: string;
suspendedAt: Date | null;
suspendedReason: string | null;
}>;
unsuspend(id: string): Promise<{
id: string;
email: string;
phone: string | null;
createdAt: Date;
updatedAt: Date;
status: string;
name: string | null;
avatarUrl: string | null;
defaultCurrency: string | null;
timeZone: string | null;
emailVerified: boolean;
otpEmailEnabled: boolean;
otpTotpEnabled: boolean;
otpTotpSecret: string | null;
passwordHash: string | null;
otpWhatsappEnabled: boolean;
lastLoginAt: Date | null;
role: string;
suspendedAt: Date | null;
suspendedReason: string | null;
}>;
grantProAccess(id: string, body: {
planSlug: string;
durationDays: number;
}): Promise<{
id: string;
createdAt: Date;
updatedAt: Date;
status: string;
userId: string;
planId: string;
startDate: Date;
endDate: Date;
isTrialUsed: boolean;
trialEndDate: Date | null;
cancelledAt: Date | null;
cancellationReason: string | null;
}>;
create(body: {
email: string;
password: string;
name?: string;
role?: string;
}): Promise<{
id: string;
email: string;
createdAt: Date;
name: string | null;
emailVerified: boolean;
role: string;
}>;
update(id: string, body: {
email?: string;
name?: string;
role?: string;
}): Promise<{
id: string;
email: string;
createdAt: Date;
name: string | null;
emailVerified: boolean;
role: string;
}>;
delete(id: string): Promise<{
message: string;
}>;
}