export type GetApiApiPublicV1ZootpayArgs = {Token: string}; export type GetApiApiPublicV1ZootpayOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * ikcSubmit * * GET /api/public/v1/zootpay */ export const getApiApiPublicV1Zootpay = async (args: GetApiApiPublicV1ZootpayArgs, options: GetApiApiPublicV1ZootpayOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.Token != null) query.append("Token", String(args.Token)) const url = `${baseUrl.replace(/\/+$/, '')}/api/public/v1/zootpay${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() };