export type DeleteApiUsersMeLowBalanceWebhookOptions = {baseUrl: string, JwtAccessBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Low Balance Webhook * * DELETE /users/me/low-balance-webhook * * Also accepts auth: APIKeyHeader */ export const deleteApiUsersMeLowBalanceWebhook = async (options: DeleteApiUsersMeLowBalanceWebhookOptions) => { const {baseUrl, fetch: fetchFn = fetch, JwtAccessBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JwtAccessBearer !== undefined) headers.set('authorization', `Bearer ${JwtAccessBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/users/me/low-balance-webhook${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 };