export type Organization = {type?: string | undefined, id?: string | undefined, attributes?: ({description?: string | undefined, disabled?: boolean | undefined, name?: string | undefined}) | undefined, relationships?: ({globalvar?: ({id?: string | undefined, type?: 'globalvar' | undefined}) | undefined, job?: ({id?: string | undefined, type?: 'job' | undefined}) | undefined, module?: ({id?: string | undefined, type?: 'module' | undefined}) | undefined, provider?: ({id?: string | undefined, type?: 'provider' | undefined}) | undefined, ssh?: ({id?: string | undefined, type?: 'ssh' | undefined}) | undefined, team?: ({id?: string | undefined, type?: 'team' | undefined}) | undefined, template?: ({id?: string | undefined, type?: 'template' | undefined}) | undefined, vcs?: ({id?: string | undefined, type?: 'vcs' | undefined}) | undefined, workspace?: ({id?: string | undefined, type?: 'workspace' | undefined}) | undefined}) | undefined}; export type PatchApiWorkspaceWorkspaceIdOrganizationOrganizationIdArgs = {body: {data?: Organization | undefined}}; export type PatchApiWorkspaceWorkspaceIdOrganizationOrganizationIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Modifies an instance of type organization * * PATCH /workspace/{workspaceId}/organization/{organizationId} */ export const patchApiWorkspaceWorkspaceIdOrganizationOrganizationId = async (args: PatchApiWorkspaceWorkspaceIdOrganizationOrganizationIdArgs, options: PatchApiWorkspaceWorkspaceIdOrganizationOrganizationIdOptions) => { 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(/\/+$/, '')}/workspace/${encodeURIComponent(String(args.workspaceId))}/organization/${encodeURIComponent(String(args.organizationId))}${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 };