feat: complete admin backend controllers and services
- AdminPlansController & Service (CRUD, reorder) - AdminPaymentMethodsController & Service (CRUD, reorder) - AdminPaymentsController & Service (verify, reject, pending count) - AdminUsersController & Service (search, suspend, grant pro access, stats) - AdminConfigController & Service (dynamic config management) - Wire all controllers into AdminModule - Import AdminModule in AppModule Admin API Routes: - GET/POST/PUT/DELETE /admin/plans - GET/POST/PUT/DELETE /admin/payment-methods - GET /admin/payments (with status filter) - POST /admin/payments/:id/verify - POST /admin/payments/:id/reject - GET /admin/users (with search) - POST /admin/users/:id/grant-pro - GET/POST/DELETE /admin/config All routes protected by AuthGuard + AdminGuard
This commit is contained in:
147
apps/api/dist/admin/admin-plans.service.d.ts
vendored
147
apps/api/dist/admin/admin-plans.service.d.ts
vendored
@@ -1 +1,146 @@
|
||||
export {};
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
export declare class AdminPlansService {
|
||||
private readonly prisma;
|
||||
constructor(prisma: PrismaService);
|
||||
findAll(): Promise<({
|
||||
_count: {
|
||||
subscriptions: number;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
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;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
_count: {
|
||||
subscriptions: number;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
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;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}) | null>;
|
||||
create(data: any): Promise<{
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
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;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
update(id: string, data: any): Promise<{
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
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;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
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;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
reorder(planIds: string[]): Promise<{
|
||||
success: boolean;
|
||||
}>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user