website cleanup
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import { BaseApiClient } from '../base/BaseApiClient';
|
||||
import type { PaymentDto, MembershipFeeDto, MemberPaymentDto, PrizeDto, WalletDto, TransactionDto, UpdatePaymentStatusInputDTO } from '../types/generated';
|
||||
import type { MembershipFeeDTO } from '../../types/generated/MembershipFeeDTO';
|
||||
import type { MemberPaymentDTO } from '../../types/generated/MemberPaymentDTO';
|
||||
import type { PaymentDTO } from '../../types/generated/PaymentDTO';
|
||||
import type { PrizeDTO } from '../../types/generated/PrizeDTO';
|
||||
import type { TransactionDTO } from '../../types/generated/TransactionDTO';
|
||||
import type { UpdatePaymentStatusInputDTO } from '../../types/generated/UpdatePaymentStatusInputDTO';
|
||||
import type { WalletDTO } from '../../types/generated/WalletDTO';
|
||||
|
||||
// Define missing types that are not fully generated
|
||||
type GetPaymentsOutputDto = { payments: PaymentDto[] };
|
||||
type GetPaymentsOutputDto = { payments: PaymentDTO[] };
|
||||
type CreatePaymentInputDto = {
|
||||
type: 'sponsorship' | 'membership_fee';
|
||||
amount: number;
|
||||
@@ -11,15 +17,15 @@ type CreatePaymentInputDto = {
|
||||
leagueId: string;
|
||||
seasonId?: string;
|
||||
};
|
||||
type CreatePaymentOutputDto = { payment: PaymentDto };
|
||||
type CreatePaymentOutputDto = { payment: PaymentDTO };
|
||||
type GetMembershipFeesOutputDto = {
|
||||
fee: MembershipFeeDto | null;
|
||||
payments: MemberPaymentDto[]
|
||||
fee: MembershipFeeDTO | null;
|
||||
payments: MemberPaymentDTO[]
|
||||
};
|
||||
type GetPrizesOutputDto = { prizes: PrizeDto[] };
|
||||
type GetPrizesOutputDto = { prizes: PrizeDTO[] };
|
||||
type GetWalletOutputDto = {
|
||||
wallet: WalletDto;
|
||||
transactions: TransactionDto[]
|
||||
wallet: WalletDTO;
|
||||
transactions: TransactionDTO[]
|
||||
};
|
||||
type ProcessWalletTransactionInputDto = {
|
||||
leagueId: string;
|
||||
@@ -30,8 +36,8 @@ type ProcessWalletTransactionInputDto = {
|
||||
referenceType?: 'sponsorship' | 'membership_fee' | 'prize';
|
||||
};
|
||||
type ProcessWalletTransactionOutputDto = {
|
||||
wallet: WalletDto;
|
||||
transaction: TransactionDto
|
||||
wallet: WalletDTO;
|
||||
transaction: TransactionDTO
|
||||
};
|
||||
type UpdateMemberPaymentInputDto = {
|
||||
feeId: string;
|
||||
@@ -39,16 +45,16 @@ type UpdateMemberPaymentInputDto = {
|
||||
status?: 'pending' | 'paid' | 'overdue';
|
||||
paidAt?: Date | string;
|
||||
};
|
||||
type UpdateMemberPaymentOutputDto = { payment: MemberPaymentDto };
|
||||
type GetWalletTransactionsOutputDto = { transactions: TransactionDto[] };
|
||||
type UpdatePaymentStatusOutputDto = { payment: PaymentDto };
|
||||
type UpdateMemberPaymentOutputDto = { payment: MemberPaymentDTO };
|
||||
type GetWalletTransactionsOutputDto = { transactions: TransactionDTO[] };
|
||||
type UpdatePaymentStatusOutputDto = { payment: PaymentDTO };
|
||||
type UpsertMembershipFeeInputDto = {
|
||||
leagueId: string;
|
||||
seasonId?: string;
|
||||
type: 'season' | 'monthly' | 'per_race';
|
||||
amount: number;
|
||||
};
|
||||
type UpsertMembershipFeeOutputDto = { fee: MembershipFeeDto };
|
||||
type UpsertMembershipFeeOutputDto = { fee: MembershipFeeDTO };
|
||||
type CreatePrizeInputDto = {
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
@@ -58,12 +64,12 @@ type CreatePrizeInputDto = {
|
||||
type: 'cash' | 'merchandise' | 'other';
|
||||
description?: string;
|
||||
};
|
||||
type CreatePrizeOutputDto = { prize: PrizeDto };
|
||||
type CreatePrizeOutputDto = { prize: PrizeDTO };
|
||||
type AwardPrizeInputDto = {
|
||||
prizeId: string;
|
||||
driverId: string;
|
||||
};
|
||||
type AwardPrizeOutputDto = { prize: PrizeDto };
|
||||
type AwardPrizeOutputDto = { prize: PrizeDTO };
|
||||
type DeletePrizeInputDto = { prizeId: string };
|
||||
type DeletePrizeOutputDto = { success: boolean };
|
||||
|
||||
@@ -149,4 +155,4 @@ export class PaymentsApiClient extends BaseApiClient {
|
||||
processWalletTransaction(input: ProcessWalletTransactionInputDto): Promise<ProcessWalletTransactionOutputDto> {
|
||||
return this.post<ProcessWalletTransactionOutputDto>('/payments/wallets/transactions', input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user