export type GetApiApiUserCardsAddCardInvoiceAmountArgs = {amount: number}; export type GetApiApiUserCardsAddCardInvoiceAmountOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * addCard * * GET /api/user/cards/add-card-invoice/{amount} */ export const getApiApiUserCardsAddCardInvoiceAmount = async (args: GetApiApiUserCardsAddCardInvoiceAmountArgs, options: GetApiApiUserCardsAddCardInvoiceAmountOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/user/cards/add-card-invoice/${encodeURIComponent(String(args.amount))}${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() };