export type DeleteApiUsersUserIdBundlesOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a bundle rule with the specified bundle for the user (owner) who calls this endpoint * * DELETE /users/{user_id}/bundles * * Also accepts auth: API-Key */ export const deleteApiUsersUserIdBundles = async (options: DeleteApiUsersUserIdBundlesOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/users/${encodeURIComponent(String(args.user_id))}/bundles${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 };