export type DeleteApiCustomersExternalCustomerIdWalletsWalletCodeAlertsOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete all wallet alerts * * DELETE /customers/{external_customer_id}/wallets/{wallet_code}/alerts */ export const deleteApiCustomersExternalCustomerIdWalletsWalletCodeAlerts = async (options?: DeleteApiCustomersExternalCustomerIdWalletsWalletCodeAlertsOptions) => { const {baseUrl = "https://api.getlago.com/api/v1", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/customers/${encodeURIComponent(String(args.external_customer_id))}/wallets/${encodeURIComponent(String(args.wallet_code))}/alerts${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };