export type ArtifactRef = {ArtifactID?: number | undefined, Guids?: Array | undefined}; export type ConceptualIndex = {ArtifactID?: number | undefined, Guids?: Array | undefined, AnalyticsServer?: ArtifactRef | undefined, ConceptStopWords?: string | undefined, Dimensions?: number | undefined, EmailNotificationRecipients?: Array | undefined, Name?: string | undefined, OptimizeTrainingSet?: boolean | undefined, Order?: number | undefined, RemoveEngSignaturesAndFooters?: boolean | undefined, EnableEmailHeaderFilter?: boolean | undefined, RepeatedContentFilters?: Array | undefined, SearchableSet?: ArtifactRef | undefined, TrainingSet?: ArtifactRef | undefined, Active?: boolean | undefined, RemoveDocumentErrors?: boolean | undefined, ContinueIndexStepsToCompletion?: boolean | undefined, LastErrorMessage?: string | undefined, IndexLastUsedOn?: string | undefined, InUseByCategorizationSet?: boolean | undefined}; export type UpdateApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDArgs = {workspaceID: number, indexID: number, body: ConceptualIndex}; export type UpdateApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * [Public] IConceptualIndexService * * PUT /conceptual-analytics/v1/workspaces/{workspaceID}/indexes/{indexID} */ export const updateApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexID = async (args: UpdateApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDArgs, options: UpdateApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/conceptual-analytics/v1/workspaces/${encodeURIComponent(String(args.workspaceID))}/indexes/${encodeURIComponent(String(args.indexID))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 };