export type DeleteApiChannelsChannelNameSubchannelsSubchannelNameGroupsGroupIdArgs = {channel_name: string, subchannel_name: string, group_id: string}; export type DeleteApiChannelsChannelNameSubchannelsSubchannelNameGroupsGroupIdOptions = {baseUrl?: string | undefined, jwt?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a group from the subchannel * * DELETE /channels/{channel_name}/subchannels/{subchannel_name}/groups/{group_id} */ export const deleteApiChannelsChannelNameSubchannelsSubchannelNameGroupsGroupId = async (args: DeleteApiChannelsChannelNameSubchannelsSubchannelNameGroupsGroupIdArgs, options?: DeleteApiChannelsChannelNameSubchannelsSubchannelNameGroupsGroupIdOptions) => { const {baseUrl = "https://api.anaconda.cloud/api", fetch: fetchFn = fetch, jwt} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (jwt !== undefined) headers.set('authorization', `Bearer ${jwt}`) const url = `${baseUrl.replace(/\/+$/, '')}/channels/${encodeURIComponent(String(args.channel_name))}/subchannels/${encodeURIComponent(String(args.subchannel_name))}/groups/${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 };