export type DeleteApiV1OrgsOrgIdGroupGroupIdArgs = {org_id: string, group_id: string}; export type DeleteApiV1OrgsOrgIdGroupGroupIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the group with given id * * DELETE /v1/orgs/{org_id}/group/{group_id} */ export const deleteApiV1OrgsOrgIdGroupGroupId = async (args: DeleteApiV1OrgsOrgIdGroupGroupIdArgs, options?: DeleteApiV1OrgsOrgIdGroupGroupIdOptions) => { const {baseUrl = "https://api.edgedelta.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-ED-API-Token", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/orgs/${encodeURIComponent(String(args.org_id))}/group/${encodeURIComponent(String(args.group_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 };