view models

This commit is contained in:
2025-12-18 13:48:35 +01:00
parent cc2553876a
commit 91adbb9c83
71 changed files with 3119 additions and 359 deletions

View File

@@ -1,17 +1,45 @@
import { BaseApiClient } from '../base/BaseApiClient';
import type {
GetPaymentsOutputDto,
CreatePaymentInputDto,
CreatePaymentOutputDto,
GetMembershipFeesOutputDto,
GetPrizesOutputDto,
GetWalletOutputDto,
ProcessWalletTransactionInputDto,
ProcessWalletTransactionOutputDto,
UpdateMemberPaymentInputDto,
UpdateMemberPaymentOutputDto,
GetWalletTransactionsOutputDto,
} from '../../dtos';
// TODO: Import these types from apps/website/lib/types/generated when available
type GetPaymentsOutputDto = { payments: import('../types/generated').PaymentDto[] };
type CreatePaymentInputDto = {
type: 'sponsorship' | 'membership_fee';
amount: number;
payerId: string;
payerType: 'sponsor' | 'driver';
leagueId: string;
seasonId?: string;
};
type CreatePaymentOutputDto = { payment: import('../types/generated').PaymentDto };
type GetMembershipFeesOutputDto = {
fee: import('../types/generated').MembershipFeeDto | null;
payments: import('../types/generated').MemberPaymentDto[]
};
type GetPrizesOutputDto = { prizes: import('../types/generated').PrizeDto[] };
type GetWalletOutputDto = {
wallet: import('../types/generated').WalletDto;
transactions: import('../types/generated').TransactionDto[]
};
type ProcessWalletTransactionInputDto = {
leagueId: string;
type: 'deposit' | 'withdrawal' | 'platform_fee';
amount: number;
description: string;
referenceId?: string;
referenceType?: 'sponsorship' | 'membership_fee' | 'prize';
};
type ProcessWalletTransactionOutputDto = {
wallet: import('../types/generated').WalletDto;
transaction: import('../types/generated').TransactionDto
};
type UpdateMemberPaymentInputDto = {
feeId: string;
driverId: string;
status?: 'pending' | 'paid' | 'overdue';
paidAt?: Date | string;
};
type UpdateMemberPaymentOutputDto = { payment: import('../types/generated').MemberPaymentDto };
type GetWalletTransactionsOutputDto = { transactions: import('../types/generated').TransactionDto[] };
/**
* Payments API Client