- 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
94 lines
3.4 KiB
TypeScript
94 lines
3.4 KiB
TypeScript
import { WalletsService } from './wallets.service';
|
|
import { TransactionsService } from '../transactions/transactions.service';
|
|
interface RequestWithUser {
|
|
user: {
|
|
userId: string;
|
|
};
|
|
}
|
|
export declare class WalletsController {
|
|
private readonly wallets;
|
|
private readonly transactions;
|
|
constructor(wallets: WalletsService, transactions: TransactionsService);
|
|
list(req: RequestWithUser): import("@prisma/client").Prisma.PrismaPromise<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
userId: string;
|
|
kind: string;
|
|
currency: string | null;
|
|
unit: string | null;
|
|
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
pricePerUnit: import("@prisma/client/runtime/library").Decimal | null;
|
|
deletedAt: Date | null;
|
|
}[]>;
|
|
getAllTransactions(req: RequestWithUser): Promise<{
|
|
category: string | null;
|
|
id: string;
|
|
createdAt: Date;
|
|
userId: string;
|
|
walletId: string;
|
|
date: Date;
|
|
amount: import("@prisma/client/runtime/library").Decimal;
|
|
direction: string;
|
|
memo: string | null;
|
|
recurrenceId: string | null;
|
|
}[]>;
|
|
create(req: RequestWithUser, body: {
|
|
name: string;
|
|
currency?: string;
|
|
kind?: 'money' | 'asset';
|
|
unit?: string;
|
|
initialAmount?: number;
|
|
pricePerUnit?: number;
|
|
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
userId: string;
|
|
kind: string;
|
|
currency: string | null;
|
|
unit: string | null;
|
|
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
pricePerUnit: import("@prisma/client/runtime/library").Decimal | null;
|
|
deletedAt: Date | null;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import("@prisma/client").Prisma.PrismaClientOptions> | {
|
|
error: string;
|
|
};
|
|
update(req: RequestWithUser, id: string, body: {
|
|
name?: string;
|
|
currency?: string;
|
|
kind?: 'money' | 'asset';
|
|
unit?: string;
|
|
initialAmount?: number;
|
|
pricePerUnit?: number;
|
|
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
userId: string;
|
|
kind: string;
|
|
currency: string | null;
|
|
unit: string | null;
|
|
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
pricePerUnit: import("@prisma/client/runtime/library").Decimal | null;
|
|
deletedAt: Date | null;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import("@prisma/client").Prisma.PrismaClientOptions>;
|
|
delete(req: RequestWithUser, id: string): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
userId: string;
|
|
kind: string;
|
|
currency: string | null;
|
|
unit: string | null;
|
|
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
pricePerUnit: import("@prisma/client/runtime/library").Decimal | null;
|
|
deletedAt: Date | null;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import("@prisma/client").Prisma.PrismaClientOptions>;
|
|
}
|
|
export {};
|