export type DeleteApiV4AdminTeamsTeamIdArgs = {team_id: string | string}; export type DeleteApiV4AdminTeamsTeamIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete a team and all associated resources * * DELETE /v4/admin/teams/{team_id} */ export const deleteApiV4AdminTeamsTeamId = async (args: DeleteApiV4AdminTeamsTeamIdArgs, options: DeleteApiV4AdminTeamsTeamIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v4/admin/teams/${encodeURIComponent(String(args.team_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 };