- 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
91 lines
2.6 KiB
TypeScript
91 lines
2.6 KiB
TypeScript
import { PrismaService } from '../prisma/prisma.service';
|
|
import { Prisma } from '@prisma/client';
|
|
import type { TransactionUpdateDto } from './transaction.dto';
|
|
export declare class TransactionsService {
|
|
private prisma;
|
|
constructor(prisma: PrismaService);
|
|
list(userId: string, walletId: string): Prisma.PrismaPromise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}[]>;
|
|
listAll(userId: string): Prisma.PrismaPromise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}[]>;
|
|
listWithFilters(userId: string, walletId: string, filters: {
|
|
from?: string;
|
|
to?: string;
|
|
category?: string;
|
|
direction?: 'in' | 'out';
|
|
}): Prisma.PrismaPromise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}[]>;
|
|
create(userId: string, walletId: string, input: {
|
|
amount: string | number;
|
|
direction: 'in' | 'out';
|
|
date?: string;
|
|
category?: string;
|
|
memo?: string;
|
|
}): Promise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}>;
|
|
update(userId: string, walletId: string, id: string, dto: TransactionUpdateDto): Promise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}>;
|
|
delete(userId: string, walletId: string, id: string): Promise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
amount: Prisma.Decimal;
|
|
direction: string;
|
|
date: Date;
|
|
memo: string | null;
|
|
walletId: string;
|
|
recurrenceId: string | null;
|
|
}>;
|
|
}
|