export type Team = {type?: string | undefined, id?: string | undefined, attributes?: ({manageModule?: boolean | undefined, manageProvider?: boolean | undefined, manageTemplate?: boolean | undefined, manageVcs?: boolean | undefined, manageWorkspace?: boolean | undefined, name?: string | undefined}) | undefined, relationships?: ({organization?: ({id?: string | undefined, type?: 'organization' | undefined}) | undefined}) | undefined}; export type PatchApiOrganizationOrganizationIdTeamTeamIdArgs = {body: {data?: Team | undefined}}; export type PatchApiOrganizationOrganizationIdTeamTeamIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Modifies an instance of type team * * PATCH /organization/{organizationId}/team/{teamId} */ export const patchApiOrganizationOrganizationIdTeamTeamId = async (args: PatchApiOrganizationOrganizationIdTeamTeamIdArgs, options: PatchApiOrganizationOrganizationIdTeamTeamIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/vnd.api+json") const url = `${baseUrl.replace(/\/+$/, '')}/organization/${encodeURIComponent(String(args.organizationId))}/team/${encodeURIComponent(String(args.teamId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };