export type DeleteApiApiV1PublicGroupsGroupIdArgs = {groupId: string}; export type DeleteApiApiV1PublicGroupsGroupIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a content group * * DELETE /api/v1/public/groups/{groupId} */ export const deleteApiApiV1PublicGroupsGroupId = async (args: DeleteApiApiV1PublicGroupsGroupIdArgs, options?: DeleteApiApiV1PublicGroupsGroupIdOptions) => { const {baseUrl = "https://eu.phrase.com/control-hub", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/public/groups/${encodeURIComponent(String(args.groupId))}${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 };