export type Pageable = {page?: number | undefined, size?: number | undefined, sort?: Array | undefined}; export type GetApiV1TransactionsSentArgs = {pageable: Pageable}; export type GetApiV1TransactionsSentOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * List transactions sent by the calling application * * GET /v1/transactions/sent */ export const getApiV1TransactionsSent = async (args: GetApiV1TransactionsSentArgs, options?: GetApiV1TransactionsSentOptions) => { const {baseUrl = "https://idaas.yourflexpay.com/api", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.pageable != null) query.append("pageable", JSON.stringify(args.pageable)) if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/transactions/sent${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };