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

42 lines
1.1 KiB
TypeScript

/**
* Approved manual ledger credits (bonus / admin adjustment).
* Sole authorized path for crediting user balances outside deposits, games, and transfers.
*/
export declare class AdminCreditError extends Error {
constructor(message: string);
}
export type GrantLedgerCreditResult = {
adjustmentId: string;
transactionId: string;
accountKind: 'main' | 'bonus';
availableBalanceRaw: string;
};
export declare function grantLedgerCredit(input: {
userId: string;
walletTypeId: number;
adjustmentType: 'bonus' | 'admin_adjustment';
amountRaw: string;
reason: string;
approvedBy: string;
}): Promise<GrantLedgerCreditResult>;
export declare function listLedgerCredits(opts: {
userId?: string;
limit?: number;
offset?: number;
}): Promise<{
items: {
id: string;
userId: string;
walletTypeId: number;
adjustmentType: "bonus" | "admin_adjustment";
amount: string;
approvedBy: string;
transactionId: string | null;
createdAt: Date;
}[];
total: number;
}>;
//# sourceMappingURL=adminCreditService.d.ts.map