games_app/backend/dist/repositories/testWalletRepository.d.ts
2026-06-29 15:01:23 +02:00

47 lines
1.4 KiB
TypeScript

/**
* Test wallet settings and credit request history.
*/
export type TestWalletSettingsRow = {
id: number;
enabled: boolean;
credit_amount_raw: string;
max_requests_per_user: number;
cooldown_hours: number;
wallet_type_id: number;
updated_at: Date;
};
export type TestWalletCreditRow = {
id: string;
user_id: string;
wallet_type_id: number;
amount_raw: string;
created_at: Date;
};
export type TestWalletCreditListRow = TestWalletCreditRow & {
user_email: string | null;
wallet_code: string;
};
export declare function getSettings(): Promise<TestWalletSettingsRow>;
export declare function updateSettings(input: {
enabled?: boolean;
creditAmountRaw?: string;
maxRequestsPerUser?: number;
cooldownHours?: number;
walletTypeId?: number;
}): Promise<TestWalletSettingsRow>;
export declare function countUserCredits(userId: string): Promise<number>;
export declare function getLastCreditAt(userId: string): Promise<Date | null>;
export declare function createCreditRecord(input: {
userId: string;
walletTypeId: number;
amountRaw: string;
}): Promise<TestWalletCreditRow>;
export declare function listCredits(options: {
userId?: string;
limit: number;
offset: number;
}): Promise<{
items: TestWalletCreditListRow[];
total: number;
}>;
//# sourceMappingURL=testWalletRepository.d.ts.map