export type DeleteApiIntegrationsApnsArgs = {id?: string | undefined}; export type DeleteApiIntegrationsApnsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an APNs integration * * DELETE /integrations/apns */ export const deleteApiIntegrationsApns = async (args: DeleteApiIntegrationsApnsArgs, options?: DeleteApiIntegrationsApnsOptions) => { const {baseUrl = "https://api.magicbell.com/v2", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.id != null) query.append("id", String(args.id)) const url = `${baseUrl.replace(/\/+$/, '')}/integrations/apns${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 };