Files
tabungin/apps/api/dist/admin/admin-users.controller.d.ts
dwindown 89f881e7cf feat: reorganize admin settings with tabbed interface and documentation
- Reorganized admin settings into tabbed interface (General, Security, Payment Methods)
- Vertical tabs on desktop, horizontal scrollable on mobile
- Moved Payment Methods from separate menu to Settings tab
- Fixed admin profile reuse and dashboard blocking
- Fixed maintenance mode guard to use AppConfig model
- Added admin auto-redirect after login (admins → /admin, users → /)
- Reorganized documentation into docs/ folder structure
- Created comprehensive README and documentation index
- Added PWA and Web Push notifications to to-do list
2025-10-13 09:28:12 +07:00

209 lines
6.0 KiB
TypeScript

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;
emailVerified: boolean;
name: string | null;
role: string;
suspendedAt: Date | null;
lastLoginAt: 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;
})[];
_count: {
transactions: number;
wallets: number;
payments: number;
};
} & {
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>;
updateRole(id: string, body: {
role: string;
}): 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;
}>;
suspend(id: string, body: {
reason: string;
}): 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;
}>;
unsuspend(id: string): 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;
}>;
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;
emailVerified: boolean;
name: string | null;
role: string;
}>;
update(id: string, body: {
email?: string;
name?: string;
role?: string;
}): Promise<{
id: string;
email: string;
createdAt: Date;
emailVerified: boolean;
name: string | null;
role: string;
}>;
delete(id: string): Promise<{
message: string;
}>;
}