export type DeleteApiApiV2TeamsTeamIdArgs = {team_id: number}; export type DeleteApiApiV2TeamsTeamIdOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Team * * DELETE /api/v2/teams/{team_id} */ export const deleteApiApiV2TeamsTeamId = async (args: DeleteApiApiV2TeamsTeamIdArgs, options?: DeleteApiApiV2TeamsTeamIdOptions) => { const {baseUrl = "https://public-api.linearb.io", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("x-api-key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/api/v2/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 };