export type DeleteApiApiV1betaClientsNameGroupsGroupArgs = {name: string, group: string}; export type DeleteApiApiV1betaClientsNameGroupsGroupOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Unregister a client from a specific group * * DELETE /api/v1beta/clients/{name}/groups/{group} */ export const deleteApiApiV1betaClientsNameGroupsGroup = async (args: DeleteApiApiV1betaClientsNameGroupsGroupArgs, options: DeleteApiApiV1betaClientsNameGroupsGroupOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1beta/clients/${encodeURIComponent(String(args.name))}/groups/${encodeURIComponent(String(args.group))}${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 };