export type DeleteApiSubscriptionsUuidArgs = {uuid: string}; export type DeleteApiSubscriptionsUuidOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes an existing subscription by uuid * * DELETE /subscriptions/{uuid} */ export const deleteApiSubscriptionsUuid = async (args: DeleteApiSubscriptionsUuidArgs, options?: DeleteApiSubscriptionsUuidOptions) => { const {baseUrl = "https://api.quivo.co", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/subscriptions/${encodeURIComponent(String(args.uuid))}${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 };