This commit is contained in:
2026-08-08 18:59:56 +03:30
commit a949fc3766
175 changed files with 16575 additions and 0 deletions

32
src/api/settle-request.ts Normal file
View File

@@ -0,0 +1,32 @@
import { request } from './index';
export type TransactionType = {
id: number;
amount: number;
date: string;
paidFor: string;
};
export type SettleRequestType = {
id: number;
status: boolean;
iban: string;
transaction: TransactionType | null;
created: string;
};
export async function fetchSettleRequests(): Promise<SettleRequestType[]> {
return await request(true, { url: '/introducers/settle-requests' });
}
export type CreateSettleRequestDataType = { iban: string };
export async function createSettleRequest(
data: CreateSettleRequestDataType
): Promise<SettleRequestType> {
return await request(true, {
url: '/introducers/settle-requests',
method: 'POST',
data
});
}