export type DeleteApiApiUmbrellaV1AdminGroupsIdOptions = {baseUrl: string, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete the admin group * * DELETE /api-umbrella/v1/admin_groups/{id} * * Also accepts auth: admin_auth_token */ export const deleteApiApiUmbrellaV1AdminGroupsId = async (options: DeleteApiApiUmbrellaV1AdminGroupsIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set("X-Api-Key", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api-umbrella/v1/admin_groups/${encodeURIComponent(String(args.id))}${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 };