Sanity Library Reference Docs
    Preparing search index...
    interface operations {
        applyIssues: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { issueIds: string[] } } };
            responses: {
                "202": {
                    content: { "application/json": { jobId: string } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        buildKnowledgeBase: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: { "application/json": { jobId: string } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        cancelKnowledgeBaseBuild: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { cancelled: boolean } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        classifyConversation: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        classificationError?: string;
                        coreMetrics?: {
                            contentGaps: string[];
                            sentiment: "positive"
                            | "neutral"
                            | "negative";
                            successScore: number;
                        };
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            classificationError: string
                            | null;
                            classifiedAt: string | null;
                            coreMetrics:
                                | {
                                    contentGaps?: string[];
                                    sentiment?: "positive"
                                    | "neutral"
                                    | "negative";
                                    successScore?: number;
                                }
                                | null;
                            createdAt: string;
                            id: string;
                            messages: {
                                content: string
                                | null;
                                error: string | null;
                                role: "user" | "assistant" | "system" | "tool";
                                timestamp: string | null;
                                toolName: string | null;
                                toolType: "result" | "call" | null;
                            }[];
                            messagesUpdatedAt: string;
                            metadata: { [key: string]: string | string[] }
                            | null;
                            modelId: string | null;
                            modelProvider: string | null;
                            sharing:
                                | { contact?: string; conversations?: boolean; metrics?: boolean }
                                | null;
                            startedAt: string;
                            threadId: string;
                            tokenUsage:
                                | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        confirmSync: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        createInstruction: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        rebuildPaths?: string[];
                        scopeDocumentIds: string[];
                        statement: string;
                        verified?: boolean;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            instruction: {
                                archivedAt: string
                                | null;
                                archivedReason: string | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null } | null;
                                id: string;
                                knowledgeBaseId: string;
                                origin: "conflict" | "human";
                                scopeDocumentIds: string[];
                                sourceIssueId: string | null;
                                statement: string;
                                status: "active" | "archived";
                                updatedAt: string | null;
                                updatedBy: { displayName: string | null; id: string | null } | null;
                            };
                            rebuildJobId: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        createKnowledgeBase: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        description?: string;
                        draft?: boolean;
                        organizationId: string;
                        title?: string;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: "pending"
                                        | "running"
                                        | "done"
                                        | "failed";
                                        units?: { done: ...; total?: ...; unit: ... };
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        createMcpEndpoint: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        groqFilter?: string;
                        instructions?: string;
                        name: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective?: "published" | "drafts" | "raw" | null;
                                semanticSearch?: boolean | null;
                                type: "dataset";
                                workspace?: string | null;
                            }
                        )[];
                        title: string;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            groqFilter: string
                            | null;
                            id: string;
                            instructions: string | null;
                            lastUsedAt: string | null;
                            name: string;
                            organizationId: string;
                            sources: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective: "published" | "drafts" | "raw" | null;
                                    semanticSearch: boolean | null;
                                    type: "dataset";
                                    workspace: string | null;
                                }
                            )[];
                            title: string;
                            updatedAt: string;
                            url: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        createSource: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": | {
                        crawlOptions?: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        dryRun?: boolean;
                        type: "web";
                        url: string;
                    }
                    | {
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        type: "sanity-dataset";
                    }
                    | {
                        content?: string;
                        contentType?: "text/markdown"
                        | "text/plain";
                        title: string;
                        type: "files";
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            groups: { count: number; prefix: string }[];
                            otherCount: number;
                            totalPages: number;
                            truncated: boolean;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "201": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteConversation: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteDocument: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteInstruction: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    instructionId: string;
                    knowledgeBaseId: string;
                };
                query?: { rebuild?: "true"
                | "false" };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { rebuildJobId: string
                    | null } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteKnowledgeBase: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteMcpEndpoint: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        deleteSource: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        discardSync: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        dismissIssue: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            content: | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: "primary" | "secondary" | "community";
                                    citations?: (...)[];
                                    claim: string;
                                    documentIds?: (...)[];
                                    entryPaths?: (...)[];
                                    value?: string;
                                    where?: string;
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getDocument: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            chunks: {
                                headingPath: string[];
                                id: string;
                                lineEnd: number;
                                lineStart: number;
                            }[];
                            conversion: | "pending"
                            | "failed"
                            | "converted"
                            | "unsupported"
                            | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getDocumentContent: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: {
                    chunk?: string;
                    format?: "json" | "raw" | "markdown" | "plain";
                    lines?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            chunkId: string
                            | null;
                            content: string;
                            documentId: string;
                            slice: { end: number; start: number };
                            totalLines: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getJob: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "build";
                            knowledgeBaseId: string;
                            result?: {
                                criticalIssueCount: number;
                                entryCount: number;
                                issuesCreated: number;
                                revisionId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "update";
                            knowledgeBaseId: string;
                            result?: { entriesRewritten: number; revisionId: string | null };
                            startedAt: string | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "sync";
                            knowledgeBaseId: string;
                            result?: {
                                heldDeletions: number | null;
                                sourceId: string;
                                status: "completed" | "held";
                                syncId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getKnowledgeBase: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: "pending"
                                        | "running"
                                        | "done"
                                        | "failed";
                                        units?: { done: ...; total?: ...; unit: ... };
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getMcpEndpointInitialContext: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    heading_offset?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": { content?: undefined; headers: { [name: string]: unknown } };
                default: {
                    content: {
                        "application/json": {
                            code:
                                | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getMcpEndpointStatus: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            checks: {
                                access: | { ok: true }
                                | { denied: string[]; error: string; ok: false }
                                | null;
                                knowledgeBases:
                                    | { ok: true; resolved: string[] }
                                    | {
                                        error: string;
                                        missing: string[];
                                        ok: false;
                                        resolved: string[];
                                        unbuilt: string[];
                                    }
                                    | null;
                                schema: | { documentTypes: number; ok: true; perspective: string }
                                | { error: string; ok: false }
                                | null;
                                semanticSearch:
                                    | {
                                        active: boolean;
                                        inactiveReason: | "turnedOff"
                                        | "datasetEmbeddingsNotReady"
                                        | "usageLimitReached"
                                        | null;
                                        ok: true;
                                        status: string
                                        | null;
                                        withinUsageLimit: boolean | null;
                                    }
                                    | { error: string; ok: false }
                                    | null;
                                studio:
                                    | {
                                        availableWorkspaces: { name: string; title: string }[];
                                        ok: true;
                                        workspace: string;
                                        workspaceAutoSelected: boolean;
                                        workspaceTitle: string;
                                    }
                                    | { error: string; ok: false }
                                    | null;
                            };
                            ready: boolean;
                            requiredOk: boolean;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getSource: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        getSync: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        listDocuments: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: {
                    cursor?: string;
                    ids?: string;
                    limit?: number;
                    source?: string;
                    state?: "active" | "missing" | "deleted";
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                conversion: | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                                conversionError: string
                                | null;
                                createdAt: string;
                                documentUpdatedAt: string | null;
                                excludedAt: string | null;
                                externalId: string;
                                id: string;
                                lastSeenAt: string;
                                mime: string | null;
                                sizeBytes: number | null;
                                sourceId: string;
                                sourceType: "files" | "web" | "sanity-dataset";
                                state: "active" | "missing" | "deleted";
                                title: string;
                                updatedAt: string;
                                url: string | null;
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        listKnowledgeBases: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string };
                query: {
                    cursor?: string;
                    includeDrafts?: "true" | "false";
                    limit?: number;
                    organizationId: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                activeJobId: string
                                | null;
                                buildRestriction: { code: string; message: string } | null;
                                buildStageState:
                                    | {
                                        jobId: string;
                                        stages: { id: ...; status: ...; units?: ...; weight: ... }[];
                                    }
                                    | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null }
                                | null;
                                description: string;
                                excludedSourceChunks: number;
                                hasDatasetSource: boolean;
                                hasFileSource: boolean;
                                hasPendingChanges: boolean;
                                hasWebSource: boolean;
                                id: string;
                                instructionCount: number;
                                isBuilding: boolean;
                                lastChangedAt: string | null;
                                lastCheckedAt: string | null;
                                openIssueCount: number;
                                organizationId: string;
                                pendingChanges:
                                    | { added: number; changed: number; removed: number }
                                    | null;
                                pipelineOutdated: boolean;
                                publicId: string;
                                rebuildRecommended: { at: string; reason: string } | null;
                                refreshInFlight: boolean;
                                sourceChunks: number;
                                sourceUsage: { used: number } | null;
                                state: "draft" | "created" | "ready";
                                title: string;
                                updatedAt: string;
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        listSources: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: { cursor?: string; limit?: number };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: (
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    crawlOptions: {
                                        excludePaths?: (...)[];
                                        ignoreQueryParameters?: boolean;
                                        includePaths?: (...)[];
                                        maxDepth?: number;
                                        pageLimit?: number;
                                        sitemapOnly?: boolean;
                                    };
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string
                                    | null;
                                    latestSync:
                                        | {
                                            createdAt: string;
                                            documentsDeleted: number;
                                            documentsMissing: number;
                                            documentsSeen: number;
                                            documentsUnchanged: number;
                                            documentsUpserted: number;
                                            error: (...)
                                            | (...);
                                            finishedAt: (...) | (...);
                                            heldDeletions: (...) | (...);
                                            id: string;
                                            mode: (...) | (...);
                                            partialReason: (...) | (...) | (...) | (...);
                                            sourceId: string;
                                            status: (...) | (...) | (...) | (...) | (...);
                                            trigger: (...) | (...) | (...) | (...) | (...);
                                        }
                                        | null;
                                    skippedDocumentCount: number;
                                    syncFrequency: "weekly"
                                    | "monthly"
                                    | null;
                                    title: string;
                                    type: "web";
                                    updatedAt: string;
                                    url: string;
                                }
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string
                                    | null;
                                    latestSync:
                                        | {
                                            createdAt: string;
                                            documentsDeleted: number;
                                            documentsMissing: number;
                                            documentsSeen: number;
                                            documentsUnchanged: number;
                                            documentsUpserted: number;
                                            error: (...)
                                            | (...);
                                            finishedAt: (...) | (...);
                                            heldDeletions: (...) | (...);
                                            id: string;
                                            mode: (...) | (...);
                                            partialReason: (...) | (...) | (...) | (...);
                                            sourceId: string;
                                            status: (...) | (...) | (...) | (...) | (...);
                                            trigger: (...) | (...) | (...) | (...) | (...);
                                        }
                                        | null;
                                    query: string;
                                    sanityDatasetId: string;
                                    sanityProjectId: string;
                                    skippedDocumentCount: number;
                                    syncFrequency: "weekly"
                                    | "monthly"
                                    | null;
                                    title: string;
                                    type: "sanity-dataset";
                                    updatedAt: string;
                                }
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    filename: string
                                    | null;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string | null;
                                    latestSync:
                                        | {
                                            createdAt: string;
                                            documentsDeleted: number;
                                            documentsMissing: number;
                                            documentsSeen: number;
                                            documentsUnchanged: number;
                                            documentsUpserted: number;
                                            error: (...)
                                            | (...);
                                            finishedAt: (...) | (...);
                                            heldDeletions: (...) | (...);
                                            id: string;
                                            mode: (...) | (...);
                                            partialReason: (...) | (...) | (...) | (...);
                                            sourceId: string;
                                            status: (...) | (...) | (...) | (...) | (...);
                                            trigger: (...) | (...) | (...) | (...) | (...);
                                        }
                                        | null;
                                    sizeBytes: number
                                    | null;
                                    skippedDocumentCount: number;
                                    title: string;
                                    type: "files";
                                    updatedAt: string;
                                }
                            )[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        listSyncs: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: { cursor?: string; limit?: number };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        rebuildEntry: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: {
                        "application/json": {
                            affectedEntries: { id: string; path: string; title: string }[];
                            jobId: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        reopenIssue: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            content: | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: "primary" | "secondary" | "community";
                                    citations?: (...)[];
                                    claim: string;
                                    documentIds?: (...)[];
                                    entryPaths?: (...)[];
                                    value?: string;
                                    where?: string;
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        resolveIssue: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { resolution: number } } };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            issue: {
                                content:
                                    | {
                                        claimKey: string;
                                        context?: string;
                                        issue: string;
                                        kind: "conflict";
                                        scopePath: string;
                                        severity: "critical"
                                        | "suggestion";
                                        sides: {
                                            authority?: (...) | (...) | (...) | (...);
                                            citations?: (...) | (...);
                                            claim: string;
                                            documentIds?: (...) | (...);
                                            entryPaths?: (...) | (...);
                                            value?: (...) | (...);
                                            where?: (...) | (...);
                                        }[];
                                        suggested?: number;
                                        suggestedFix: string;
                                    }
                                    | {
                                        citedDocumentIds?: string[];
                                        claimKey?: string;
                                        involvedScopes?: string[];
                                        issue: string;
                                        kind: "update_required";
                                        scopePath: string;
                                        severity: "critical"
                                        | "suggestion";
                                        suggestedFix: string;
                                    };
                                createdAt: string;
                                id: string;
                                knowledgeBaseId: string;
                                resolution: number
                                | null;
                                resolvedAt: string | null;
                                resolvedBy: { id: string; kind: "user" | "robot" } | null;
                                status: "open" | "accepted" | "rejected";
                            };
                            jobId: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        saveConversation: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        messages: {
                            content?: string
                            | null;
                            error?: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            toolName?: string | null;
                            toolType?: "result" | "call" | null;
                        }[];
                        metadata?: { [key: string]: string
                        | string[] };
                        modelId?: string;
                        modelProvider?: string;
                        sharing?: {
                            contact?: string;
                            conversations?: boolean;
                            metrics?: boolean;
                        };
                        tokenUsage?: {
                            inputTokens?: number;
                            outputTokens?: number;
                            totalTokens?: number;
                        };
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            classificationError: string
                            | null;
                            classifiedAt: string | null;
                            coreMetrics:
                                | {
                                    contentGaps?: string[];
                                    sentiment?: "positive"
                                    | "neutral"
                                    | "negative";
                                    successScore?: number;
                                }
                                | null;
                            createdAt: string;
                            id: string;
                            messages: {
                                content: string
                                | null;
                                error: string | null;
                                role: "user" | "assistant" | "system" | "tool";
                                timestamp: string | null;
                                toolName: string | null;
                                toolType: "result" | "call" | null;
                            }[];
                            messagesUpdatedAt: string;
                            metadata: { [key: string]: string | string[] }
                            | null;
                            modelId: string | null;
                            modelProvider: string | null;
                            sharing:
                                | { contact?: string; conversations?: boolean; metrics?: boolean }
                                | null;
                            startedAt: string;
                            threadId: string;
                            tokenUsage:
                                | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        serveMcpEndpoint: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": { content?: undefined; headers: { [name: string]: unknown } };
            };
        };
        startSourceUpload: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": { contentType?: string; filename: string };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": { uploadId: string; uploadUrl: string };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        startSync: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: { "application/json": { uploadId?: string }
                | null };
            };
            responses: {
                "202": {
                    content: {
                        "application/json": { jobId: string
                        | null; sourceId: string };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        syncAllSources: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: { "application/json": { sourceIds: string[] } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        updateDocument: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { state: "active" } } };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            conversion:
                                | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        updateInstruction: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    instructionId: string;
                    knowledgeBaseId: string;
                };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        scopeDocumentIds?: string[];
                        statement?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            archivedAt: string
                            | null;
                            archivedReason: string | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null } | null;
                            id: string;
                            knowledgeBaseId: string;
                            origin: "conflict" | "human";
                            scopeDocumentIds: string[];
                            sourceIssueId: string | null;
                            statement: string;
                            status: "active" | "archived";
                            updatedAt: string | null;
                            updatedBy: { displayName: string | null; id: string | null } | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        updateKnowledgeBase: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        description?: string;
                        draft?: false;
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: "pending"
                                        | "running"
                                        | "done"
                                        | "failed";
                                        units?: { done: ...; total?: ...; unit: ... };
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        updateMcpEndpoint: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        groqFilter?: string
                        | null;
                        instructions?: string | null;
                        sources?: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective?: "published" | "drafts" | "raw" | null;
                                semanticSearch?: boolean | null;
                                type: "dataset";
                                workspace?: string | null;
                            }
                        )[];
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            groqFilter: string
                            | null;
                            id: string;
                            instructions: string | null;
                            lastUsedAt: string | null;
                            name: string;
                            organizationId: string;
                            sources: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective: "published" | "drafts" | "raw" | null;
                                    semanticSearch: boolean | null;
                                    type: "dataset";
                                    workspace: string | null;
                                }
                            )[];
                            title: string;
                            updatedAt: string;
                            url: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        updateSource: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        confirmDeletions?: boolean;
                        crawlOptions?: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        query?: string;
                        syncFrequency?: "weekly"
                        | "monthly"
                        | null;
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
    }
    Index

    Properties

    applyIssues: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: { content: { "application/json": { issueIds: string[] } } };
        responses: {
            "202": {
                content: { "application/json": { jobId: string } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    buildKnowledgeBase: {
        parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "202": {
                content: { "application/json": { jobId: string } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    cancelKnowledgeBaseBuild: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: { "application/json": { cancelled: boolean } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    classifyConversation: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    classificationError?: string;
                    coreMetrics?: {
                        contentGaps: string[];
                        sentiment: "positive"
                        | "neutral"
                        | "negative";
                        successScore: number;
                    };
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        classificationError: string
                        | null;
                        classifiedAt: string | null;
                        coreMetrics:
                            | {
                                contentGaps?: string[];
                                sentiment?: "positive"
                                | "neutral"
                                | "negative";
                                successScore?: number;
                            }
                            | null;
                        createdAt: string;
                        id: string;
                        messages: {
                            content: string
                            | null;
                            error: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            timestamp: string | null;
                            toolName: string | null;
                            toolType: "result" | "call" | null;
                        }[];
                        messagesUpdatedAt: string;
                        metadata: { [key: string]: string | string[] }
                        | null;
                        modelId: string | null;
                        modelProvider: string | null;
                        sharing:
                            | { contact?: string; conversations?: boolean; metrics?: boolean }
                            | null;
                        startedAt: string;
                        threadId: string;
                        tokenUsage:
                            | {
                                inputTokens?: number;
                                outputTokens?: number;
                                totalTokens?: number;
                            }
                            | null;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; organizationId: string; threadId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; organizationId: string; threadId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • organizationId: string

          The ID of the organization.

        • threadId: string

          Your ID for the conversation thread, unique within your organization. Up to 200 characters.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  classificationError?: string;
                  coreMetrics?: {
                      contentGaps: string[];
                      sentiment: "positive" | "neutral" | "negative";
                      successScore: number;
                  };
              };
          };
      }

      A classification result or failure for one conversation. Send exactly one of coreMetrics or classificationError.

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      classificationError: string | null;
                      classifiedAt: string | null;
                      coreMetrics:
                          | {
                              contentGaps?: string[];
                              sentiment?: "positive"
                              | "neutral"
                              | "negative";
                              successScore?: number;
                          }
                          | null;
                      createdAt: string;
                      id: string;
                      messages: {
                          content: string
                          | null;
                          error: string | null;
                          role: "user" | "assistant" | "system" | "tool";
                          timestamp: string | null;
                          toolName: string | null;
                          toolType: "result" | "call" | null;
                      }[];
                      messagesUpdatedAt: string;
                      metadata: { [key: string]: string | string[] }
                      | null;
                      modelId: string | null;
                      modelProvider: string | null;
                      sharing:
                          | { contact?: string; conversations?: boolean; metrics?: boolean }
                          | null;
                      startedAt: string;
                      threadId: string;
                      tokenUsage:
                          | {
                              inputTokens?: number;
                              outputTokens?: number;
                              totalTokens?: number;
                          }
                          | null;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    classificationError: string | null;
                    classifiedAt: string | null;
                    coreMetrics:
                        | {
                            contentGaps?: string[];
                            sentiment?: "positive"
                            | "neutral"
                            | "negative";
                            successScore?: number;
                        }
                        | null;
                    createdAt: string;
                    id: string;
                    messages: {
                        content: string
                        | null;
                        error: string | null;
                        role: "user" | "assistant" | "system" | "tool";
                        timestamp: string | null;
                        toolName: string | null;
                        toolType: "result" | "call" | null;
                    }[];
                    messagesUpdatedAt: string;
                    metadata: { [key: string]: string | string[] }
                    | null;
                    modelId: string | null;
                    modelProvider: string | null;
                    sharing:
                        | { contact?: string; conversations?: boolean; metrics?: boolean }
                        | null;
                    startedAt: string;
                    threadId: string;
                    tokenUsage:
                        | {
                            inputTokens?: number;
                            outputTokens?: number;
                            totalTokens?: number;
                        }
                        | null;
                    updatedAt: string;
                };
            };
            headers: { [name: string]: unknown };
        }

        A recorded agent conversation: its transcript, metadata, token usage, and classification.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    confirmSync: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string
                        | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    createInstruction: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    rebuildPaths?: string[];
                    scopeDocumentIds: string[];
                    statement: string;
                    verified?: boolean;
                };
            };
        };
        responses: {
            "201": {
                content: {
                    "application/json": {
                        instruction: {
                            archivedAt: string
                            | null;
                            archivedReason: string | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null } | null;
                            id: string;
                            knowledgeBaseId: string;
                            origin: "conflict" | "human";
                            scopeDocumentIds: string[];
                            sourceIssueId: string | null;
                            statement: string;
                            status: "active" | "archived";
                            updatedAt: string | null;
                            updatedBy: { displayName: string | null; id: string | null } | null;
                        };
                        rebuildJobId: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; knowledgeBaseId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; knowledgeBaseId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  rebuildPaths?: string[];
                  scopeDocumentIds: string[];
                  statement: string;
                  verified?: boolean;
              };
          };
      }

      The instruction to create, and any entries to rebuild under it.

    • responses: {
          "201": {
              content: {
                  "application/json": {
                      instruction: {
                          archivedAt: string | null;
                          archivedReason: string | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null } | null;
                          id: string;
                          knowledgeBaseId: string;
                          origin: "conflict" | "human";
                          scopeDocumentIds: string[];
                          sourceIssueId: string | null;
                          statement: string;
                          status: "active" | "archived";
                          updatedAt: string | null;
                          updatedBy: { displayName: string | null; id: string | null } | null;
                      };
                      rebuildJobId: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 201: {
            content: {
                "application/json": {
                    instruction: {
                        archivedAt: string | null;
                        archivedReason: string | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null } | null;
                        id: string;
                        knowledgeBaseId: string;
                        origin: "conflict" | "human";
                        scopeDocumentIds: string[];
                        sourceIssueId: string | null;
                        statement: string;
                        status: "active" | "archived";
                        updatedAt: string | null;
                        updatedBy: { displayName: string | null; id: string | null } | null;
                    };
                    rebuildJobId: string
                    | null;
                };
            };
            headers: { [name: string]: unknown };
        }

        The created instruction, and the rebuild it started.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    createKnowledgeBase: {
        parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    description?: string;
                    draft?: boolean;
                    organizationId: string;
                    title?: string;
                };
            };
        };
        responses: {
            "201": {
                content: {
                    "application/json": {
                        activeJobId: string
                        | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: "pending"
                                    | "running"
                                    | "done"
                                    | "failed";
                                    units?: { done: ...; total?: ...; unit: ... };
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    createMcpEndpoint: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    groqFilter?: string;
                    instructions?: string;
                    name: string;
                    sources: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective?: "published" | "drafts" | "raw" | null;
                            semanticSearch?: boolean | null;
                            type: "dataset";
                            workspace?: string | null;
                        }
                    )[];
                    title: string;
                };
            };
        };
        responses: {
            "201": {
                content: {
                    "application/json": {
                        createdAt: string;
                        groqFilter: string
                        | null;
                        id: string;
                        instructions: string | null;
                        lastUsedAt: string | null;
                        name: string;
                        organizationId: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective: "published" | "drafts" | "raw" | null;
                                semanticSearch: boolean | null;
                                type: "dataset";
                                workspace: string | null;
                            }
                        )[];
                        title: string;
                        updatedAt: string;
                        url: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; organizationId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; organizationId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • organizationId: string

          The ID of the organization.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  groqFilter?: string;
                  instructions?: string;
                  name: string;
                  sources: (
                      | { id: string; type: "knowledge-base" }
                      | {
                          id: string;
                          perspective?: "published" | "drafts" | "raw" | null;
                          semanticSearch?: boolean | null;
                          type: "dataset";
                          workspace?: string | null;
                      }
                  )[];
                  title: string;
              };
          };
      }

      CreateMcpEndpointInput

    • responses: {
          "201": {
              content: {
                  "application/json": {
                      createdAt: string;
                      groqFilter: string | null;
                      id: string;
                      instructions: string | null;
                      lastUsedAt: string | null;
                      name: string;
                      organizationId: string;
                      sources: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective: "published" | "drafts" | "raw" | null;
                              semanticSearch: boolean | null;
                              type: "dataset";
                              workspace: string | null;
                          }
                      )[];
                      title: string;
                      updatedAt: string;
                      url: string;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 201: {
            content: {
                "application/json": {
                    createdAt: string;
                    groqFilter: string | null;
                    id: string;
                    instructions: string | null;
                    lastUsedAt: string | null;
                    name: string;
                    organizationId: string;
                    sources: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective: "published" | "drafts" | "raw" | null;
                            semanticSearch: boolean | null;
                            type: "dataset";
                            workspace: string | null;
                        }
                    )[];
                    title: string;
                    updatedAt: string;
                    url: string;
                };
            };
            headers: { [name: string]: unknown };
        }

        McpEndpoint

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    createSource: {
        parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": | {
                    crawlOptions?: {
                        excludePaths?: string[];
                        ignoreQueryParameters?: boolean;
                        includePaths?: string[];
                        maxDepth?: number;
                        pageLimit?: number;
                        sitemapOnly?: boolean;
                    };
                    dryRun?: boolean;
                    type: "web";
                    url: string;
                }
                | {
                    query: string;
                    sanityDatasetId: string;
                    sanityProjectId: string;
                    type: "sanity-dataset";
                }
                | {
                    content?: string;
                    contentType?: "text/markdown"
                    | "text/plain";
                    title: string;
                    type: "files";
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        groups: { count: number; prefix: string }[];
                        otherCount: number;
                        totalPages: number;
                        truncated: boolean;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "201": {
                content: {
                    "application/json": | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: { "Idempotency-Key"?: string };
          path: { apiVersion: string; knowledgeBaseId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: { "Idempotency-Key"?: string }
        • OptionalIdempotency-Key?: string

          A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

      • path: { apiVersion: string; knowledgeBaseId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json":
                  | {
                      crawlOptions?: {
                          excludePaths?: string[];
                          ignoreQueryParameters?: boolean;
                          includePaths?: string[];
                          maxDepth?: number;
                          pageLimit?: number;
                          sitemapOnly?: boolean;
                      };
                      dryRun?: boolean;
                      type: "web";
                      url: string;
                  }
                  | {
                      query: string;
                      sanityDatasetId: string;
                      sanityProjectId: string;
                      type: "sanity-dataset";
                  }
                  | {
                      content?: string;
                      contentType?: "text/markdown"
                      | "text/plain";
                      title: string;
                      type: "files";
                  };
          };
      }

      The source to add. The type field sets its kind.

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      groups: { count: number; prefix: string }[];
                      otherCount: number;
                      totalPages: number;
                      truncated: boolean;
                  };
              };
              headers: { [name: string]: unknown };
          };
          "201": {
              content: {
                  "application/json": | {
                      chunkCount: number;
                      convertedDocumentCount: number;
                      crawlOptions: {
                          excludePaths?: string[];
                          ignoreQueryParameters?: boolean;
                          includePaths?: string[];
                          maxDepth?: number;
                          pageLimit?: number;
                          sitemapOnly?: boolean;
                      };
                      createdAt: string;
                      documentCount: number;
                      failedDocumentCount: number;
                      id: string;
                      knowledgeBaseId: string;
                      lastSyncedAt: string
                      | null;
                      latestSync:
                          | {
                              createdAt: string;
                              documentsDeleted: number;
                              documentsMissing: number;
                              documentsSeen: number;
                              documentsUnchanged: number;
                              documentsUpserted: number;
                              error: string
                              | null;
                              finishedAt: string | null;
                              heldDeletions: number | null;
                              id: string;
                              mode: "full" | "incremental";
                              partialReason: "page-limit" | "source-limit" | "stalled" | null;
                              sourceId: string;
                              status: "running" | "failed" | "cancelled" | "completed" | "held";
                              trigger: "upload" | "schedule" | "manual" | "event" | "push";
                          }
                          | null;
                      skippedDocumentCount: number;
                      syncFrequency: "weekly"
                      | "monthly"
                      | null;
                      title: string;
                      type: "web";
                      updatedAt: string;
                      url: string;
                  }
                  | {
                      chunkCount: number;
                      convertedDocumentCount: number;
                      createdAt: string;
                      documentCount: number;
                      failedDocumentCount: number;
                      id: string;
                      knowledgeBaseId: string;
                      lastSyncedAt: string
                      | null;
                      latestSync:
                          | {
                              createdAt: string;
                              documentsDeleted: number;
                              documentsMissing: number;
                              documentsSeen: number;
                              documentsUnchanged: number;
                              documentsUpserted: number;
                              error: string
                              | null;
                              finishedAt: string | null;
                              heldDeletions: number | null;
                              id: string;
                              mode: "full" | "incremental";
                              partialReason: "page-limit" | "source-limit" | "stalled" | null;
                              sourceId: string;
                              status: "running" | "failed" | "cancelled" | "completed" | "held";
                              trigger: "upload" | "schedule" | "manual" | "event" | "push";
                          }
                          | null;
                      query: string;
                      sanityDatasetId: string;
                      sanityProjectId: string;
                      skippedDocumentCount: number;
                      syncFrequency: "weekly"
                      | "monthly"
                      | null;
                      title: string;
                      type: "sanity-dataset";
                      updatedAt: string;
                  }
                  | {
                      chunkCount: number;
                      convertedDocumentCount: number;
                      createdAt: string;
                      documentCount: number;
                      failedDocumentCount: number;
                      filename: string
                      | null;
                      id: string;
                      knowledgeBaseId: string;
                      lastSyncedAt: string | null;
                      latestSync:
                          | {
                              createdAt: string;
                              documentsDeleted: number;
                              documentsMissing: number;
                              documentsSeen: number;
                              documentsUnchanged: number;
                              documentsUpserted: number;
                              error: string
                              | null;
                              finishedAt: string | null;
                              heldDeletions: number | null;
                              id: string;
                              mode: "full" | "incremental";
                              partialReason: "page-limit" | "source-limit" | "stalled" | null;
                              sourceId: string;
                              status: "running" | "failed" | "cancelled" | "completed" | "held";
                              trigger: "upload" | "schedule" | "manual" | "event" | "push";
                          }
                          | null;
                      sizeBytes: number
                      | null;
                      skippedDocumentCount: number;
                      title: string;
                      type: "files";
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    groups: { count: number; prefix: string }[];
                    otherCount: number;
                    totalPages: number;
                    truncated: boolean;
                };
            };
            headers: { [name: string]: unknown };
        }

        The preview of a crawl, when dryRun is true.

      • 201: {
            content: {
                "application/json":
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
            };
            headers: { [name: string]: unknown };
        }

        Something that yields documents for a knowledge base: a website, a dataset or files.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    deleteConversation: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    deleteDocument: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    deleteInstruction: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                instructionId: string;
                knowledgeBaseId: string;
            };
            query?: { rebuild?: "true"
            | "false" };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: { "application/json": { rebuildJobId: string
                | null } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    deleteKnowledgeBase: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    deleteMcpEndpoint: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    deleteSource: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    discardSync: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string
                        | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    dismissIssue: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        content: | {
                            claimKey: string;
                            context?: string;
                            issue: string;
                            kind: "conflict";
                            scopePath: string;
                            severity: "critical"
                            | "suggestion";
                            sides: {
                                authority?: "primary" | "secondary" | "community";
                                citations?: (...)[];
                                claim: string;
                                documentIds?: (...)[];
                                entryPaths?: (...)[];
                                value?: string;
                                where?: string;
                            }[];
                            suggested?: number;
                            suggestedFix: string;
                        }
                        | {
                            citedDocumentIds?: string[];
                            claimKey?: string;
                            involvedScopes?: string[];
                            issue: string;
                            kind: "update_required";
                            scopePath: string;
                            severity: "critical"
                            | "suggestion";
                            suggestedFix: string;
                        };
                        createdAt: string;
                        id: string;
                        knowledgeBaseId: string;
                        resolution: number
                        | null;
                        resolvedAt: string | null;
                        resolvedBy: { id: string; kind: "user" | "robot" } | null;
                        status: "open" | "accepted" | "rejected";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getDocument: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        chunks: {
                            headingPath: string[];
                            id: string;
                            lineEnd: number;
                            lineStart: number;
                        }[];
                        conversion: | "pending"
                        | "failed"
                        | "converted"
                        | "unsupported"
                        | "oversized";
                        conversionError: string
                        | null;
                        createdAt: string;
                        documentUpdatedAt: string | null;
                        excludedAt: string | null;
                        externalId: string;
                        id: string;
                        lastSeenAt: string;
                        mime: string | null;
                        sizeBytes: number | null;
                        sourceId: string;
                        sourceType: "files" | "web" | "sanity-dataset";
                        state: "active" | "missing" | "deleted";
                        title: string;
                        updatedAt: string;
                        url: string | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getDocumentContent: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: {
                chunk?: string;
                format?: "json" | "raw" | "markdown" | "plain";
                lines?: string;
            };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        chunkId: string
                        | null;
                        content: string;
                        documentId: string;
                        slice: { end: number; start: number };
                        totalLines: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getJob: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": | {
                        completedAt: string
                        | null;
                        error?: string | null;
                        id: string;
                        kind: "build";
                        knowledgeBaseId: string;
                        result?: {
                            criticalIssueCount: number;
                            entryCount: number;
                            issuesCreated: number;
                            revisionId: string;
                        };
                        startedAt: string
                        | null;
                        status:
                            | "pending"
                            | "running"
                            | "failed"
                            | "queued"
                            | "succeeded"
                            | "cancelled";
                    }
                    | {
                        completedAt: string
                        | null;
                        error?: string | null;
                        id: string;
                        kind: "update";
                        knowledgeBaseId: string;
                        result?: { entriesRewritten: number; revisionId: string | null };
                        startedAt: string | null;
                        status:
                            | "pending"
                            | "running"
                            | "failed"
                            | "queued"
                            | "succeeded"
                            | "cancelled";
                    }
                    | {
                        completedAt: string
                        | null;
                        error?: string | null;
                        id: string;
                        kind: "sync";
                        knowledgeBaseId: string;
                        result?: {
                            heldDeletions: number | null;
                            sourceId: string;
                            status: "completed" | "held";
                            syncId: string;
                        };
                        startedAt: string
                        | null;
                        status:
                            | "pending"
                            | "running"
                            | "failed"
                            | "queued"
                            | "succeeded"
                            | "cancelled";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getKnowledgeBase: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        activeJobId: string
                        | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: "pending"
                                    | "running"
                                    | "done"
                                    | "failed";
                                    units?: { done: ...; total?: ...; unit: ... };
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getMcpEndpointInitialContext: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                heading_offset?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        };
        requestBody?: undefined;
        responses: {
            "200": { content?: undefined; headers: { [name: string]: unknown } };
            default: {
                content: {
                    "application/json": {
                        code:
                            | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getMcpEndpointStatus: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        checks: {
                            access: | { ok: true }
                            | { denied: string[]; error: string; ok: false }
                            | null;
                            knowledgeBases:
                                | { ok: true; resolved: string[] }
                                | {
                                    error: string;
                                    missing: string[];
                                    ok: false;
                                    resolved: string[];
                                    unbuilt: string[];
                                }
                                | null;
                            schema: | { documentTypes: number; ok: true; perspective: string }
                            | { error: string; ok: false }
                            | null;
                            semanticSearch:
                                | {
                                    active: boolean;
                                    inactiveReason: | "turnedOff"
                                    | "datasetEmbeddingsNotReady"
                                    | "usageLimitReached"
                                    | null;
                                    ok: true;
                                    status: string
                                    | null;
                                    withinUsageLimit: boolean | null;
                                }
                                | { error: string; ok: false }
                                | null;
                            studio:
                                | {
                                    availableWorkspaces: { name: string; title: string }[];
                                    ok: true;
                                    workspace: string;
                                    workspaceAutoSelected: boolean;
                                    workspaceTitle: string;
                                }
                                | { error: string; ok: false }
                                | null;
                        };
                        ready: boolean;
                        requiredOk: boolean;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getSource: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    getSync: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string
                        | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    listDocuments: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: {
                cursor?: string;
                ids?: string;
                limit?: number;
                source?: string;
                state?: "active" | "missing" | "deleted";
            };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            conversion: | "pending"
                            | "failed"
                            | "converted"
                            | "unsupported"
                            | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    listKnowledgeBases: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string };
            query: {
                cursor?: string;
                includeDrafts?: "true" | "false";
                limit?: number;
                organizationId: string;
            };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: { id: ...; status: ...; units?: ...; weight: ... }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    listSources: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: { cursor?: string; limit?: number };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        data: (
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                crawlOptions: {
                                    excludePaths?: (...)[];
                                    ignoreQueryParameters?: boolean;
                                    includePaths?: (...)[];
                                    maxDepth?: number;
                                    pageLimit?: number;
                                    sitemapOnly?: boolean;
                                };
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: (...)
                                        | (...);
                                        finishedAt: (...) | (...);
                                        heldDeletions: (...) | (...);
                                        id: string;
                                        mode: (...) | (...);
                                        partialReason: (...) | (...) | (...) | (...);
                                        sourceId: string;
                                        status: (...) | (...) | (...) | (...) | (...);
                                        trigger: (...) | (...) | (...) | (...) | (...);
                                    }
                                    | null;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "web";
                                updatedAt: string;
                                url: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: (...)
                                        | (...);
                                        finishedAt: (...) | (...);
                                        heldDeletions: (...) | (...);
                                        id: string;
                                        mode: (...) | (...);
                                        partialReason: (...) | (...) | (...) | (...);
                                        sourceId: string;
                                        status: (...) | (...) | (...) | (...) | (...);
                                        trigger: (...) | (...) | (...) | (...) | (...);
                                    }
                                    | null;
                                query: string;
                                sanityDatasetId: string;
                                sanityProjectId: string;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "sanity-dataset";
                                updatedAt: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                filename: string
                                | null;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: (...)
                                        | (...);
                                        finishedAt: (...) | (...);
                                        heldDeletions: (...) | (...);
                                        id: string;
                                        mode: (...) | (...);
                                        partialReason: (...) | (...) | (...) | (...);
                                        sourceId: string;
                                        status: (...) | (...) | (...) | (...) | (...);
                                        trigger: (...) | (...) | (...) | (...) | (...);
                                    }
                                    | null;
                                sizeBytes: number
                                | null;
                                skippedDocumentCount: number;
                                title: string;
                                type: "files";
                                updatedAt: string;
                            }
                        )[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    listSyncs: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: { cursor?: string; limit?: number };
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    rebuildEntry: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "202": {
                content: {
                    "application/json": {
                        affectedEntries: { id: string; path: string; title: string }[];
                        jobId: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    reopenIssue: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "200": {
                content: {
                    "application/json": {
                        content: | {
                            claimKey: string;
                            context?: string;
                            issue: string;
                            kind: "conflict";
                            scopePath: string;
                            severity: "critical"
                            | "suggestion";
                            sides: {
                                authority?: "primary" | "secondary" | "community";
                                citations?: (...)[];
                                claim: string;
                                documentIds?: (...)[];
                                entryPaths?: (...)[];
                                value?: string;
                                where?: string;
                            }[];
                            suggested?: number;
                            suggestedFix: string;
                        }
                        | {
                            citedDocumentIds?: string[];
                            claimKey?: string;
                            involvedScopes?: string[];
                            issue: string;
                            kind: "update_required";
                            scopePath: string;
                            severity: "critical"
                            | "suggestion";
                            suggestedFix: string;
                        };
                        createdAt: string;
                        id: string;
                        knowledgeBaseId: string;
                        resolution: number
                        | null;
                        resolvedAt: string | null;
                        resolvedBy: { id: string; kind: "user" | "robot" } | null;
                        status: "open" | "accepted" | "rejected";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    resolveIssue: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: { content: { "application/json": { resolution: number } } };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        issue: {
                            content:
                                | {
                                    claimKey: string;
                                    context?: string;
                                    issue: string;
                                    kind: "conflict";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    sides: {
                                        authority?: (...) | (...) | (...) | (...);
                                        citations?: (...) | (...);
                                        claim: string;
                                        documentIds?: (...) | (...);
                                        entryPaths?: (...) | (...);
                                        value?: (...) | (...);
                                        where?: (...) | (...);
                                    }[];
                                    suggested?: number;
                                    suggestedFix: string;
                                }
                                | {
                                    citedDocumentIds?: string[];
                                    claimKey?: string;
                                    involvedScopes?: string[];
                                    issue: string;
                                    kind: "update_required";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    suggestedFix: string;
                                };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                        jobId: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    saveConversation: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    messages: {
                        content?: string
                        | null;
                        error?: string | null;
                        role: "user" | "assistant" | "system" | "tool";
                        toolName?: string | null;
                        toolType?: "result" | "call" | null;
                    }[];
                    metadata?: { [key: string]: string
                    | string[] };
                    modelId?: string;
                    modelProvider?: string;
                    sharing?: {
                        contact?: string;
                        conversations?: boolean;
                        metrics?: boolean;
                    };
                    tokenUsage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        classificationError: string
                        | null;
                        classifiedAt: string | null;
                        coreMetrics:
                            | {
                                contentGaps?: string[];
                                sentiment?: "positive"
                                | "neutral"
                                | "negative";
                                successScore?: number;
                            }
                            | null;
                        createdAt: string;
                        id: string;
                        messages: {
                            content: string
                            | null;
                            error: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            timestamp: string | null;
                            toolName: string | null;
                            toolType: "result" | "call" | null;
                        }[];
                        messagesUpdatedAt: string;
                        metadata: { [key: string]: string | string[] }
                        | null;
                        modelId: string | null;
                        modelProvider: string | null;
                        sharing:
                            | { contact?: string; conversations?: boolean; metrics?: boolean }
                            | null;
                        startedAt: string;
                        threadId: string;
                        tokenUsage:
                            | {
                                inputTokens?: number;
                                outputTokens?: number;
                                totalTokens?: number;
                            }
                            | null;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; organizationId: string; threadId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; organizationId: string; threadId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • organizationId: string

          The ID of the organization.

        • threadId: string

          Your ID for the conversation thread, unique within your organization. Up to 200 characters.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  messages: {
                      content?: string | null;
                      error?: string | null;
                      role: "user" | "assistant" | "system" | "tool";
                      toolName?: string | null;
                      toolType?: "result" | "call" | null;
                  }[];
                  metadata?: { [key: string]: string
                  | string[] };
                  modelId?: string;
                  modelProvider?: string;
                  sharing?: {
                      contact?: string;
                      conversations?: boolean;
                      metrics?: boolean;
                  };
                  tokenUsage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              };
          };
      }

      A conversation transcript to save for one thread.

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      classificationError: string | null;
                      classifiedAt: string | null;
                      coreMetrics:
                          | {
                              contentGaps?: string[];
                              sentiment?: "positive"
                              | "neutral"
                              | "negative";
                              successScore?: number;
                          }
                          | null;
                      createdAt: string;
                      id: string;
                      messages: {
                          content: string
                          | null;
                          error: string | null;
                          role: "user" | "assistant" | "system" | "tool";
                          timestamp: string | null;
                          toolName: string | null;
                          toolType: "result" | "call" | null;
                      }[];
                      messagesUpdatedAt: string;
                      metadata: { [key: string]: string | string[] }
                      | null;
                      modelId: string | null;
                      modelProvider: string | null;
                      sharing:
                          | { contact?: string; conversations?: boolean; metrics?: boolean }
                          | null;
                      startedAt: string;
                      threadId: string;
                      tokenUsage:
                          | {
                              inputTokens?: number;
                              outputTokens?: number;
                              totalTokens?: number;
                          }
                          | null;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    classificationError: string | null;
                    classifiedAt: string | null;
                    coreMetrics:
                        | {
                            contentGaps?: string[];
                            sentiment?: "positive"
                            | "neutral"
                            | "negative";
                            successScore?: number;
                        }
                        | null;
                    createdAt: string;
                    id: string;
                    messages: {
                        content: string
                        | null;
                        error: string | null;
                        role: "user" | "assistant" | "system" | "tool";
                        timestamp: string | null;
                        toolName: string | null;
                        toolType: "result" | "call" | null;
                    }[];
                    messagesUpdatedAt: string;
                    metadata: { [key: string]: string | string[] }
                    | null;
                    modelId: string | null;
                    modelProvider: string | null;
                    sharing:
                        | { contact?: string; conversations?: boolean; metrics?: boolean }
                        | null;
                    startedAt: string;
                    threadId: string;
                    tokenUsage:
                        | {
                            inputTokens?: number;
                            outputTokens?: number;
                            totalTokens?: number;
                        }
                        | null;
                    updatedAt: string;
                };
            };
            headers: { [name: string]: unknown };
        }

        A recorded agent conversation: its transcript, metadata, token usage, and classification.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    serveMcpEndpoint: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        };
        requestBody?: undefined;
        responses: {
            "200": { content?: undefined; headers: { [name: string]: unknown } };
        };
    }
    startSourceUpload: {
        parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": { contentType?: string; filename: string };
            };
        };
        responses: {
            "201": {
                content: {
                    "application/json": { uploadId: string; uploadUrl: string };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: { "Idempotency-Key"?: string };
          path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: { "Idempotency-Key"?: string }
        • OptionalIdempotency-Key?: string

          A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

      • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • sourceId: string

          The source's ID.

      • Optionalquery?: undefined
    • requestBody: { content: { "application/json": { contentType?: string; filename: string } } }

      The file to upload.

    • responses: {
          "201": {
              content: {
                  "application/json": { uploadId: string; uploadUrl: string };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 201: {
            content: { "application/json": { uploadId: string; uploadUrl: string } };
            headers: { [name: string]: unknown };
        }

        Where to upload the file.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    startSync: {
        parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        };
        requestBody: {
            content: { "application/json": { uploadId?: string }
            | null };
        };
        responses: {
            "202": {
                content: {
                    "application/json": { jobId: string
                    | null; sourceId: string };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: { "Idempotency-Key"?: string };
          path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: { "Idempotency-Key"?: string }
        • OptionalIdempotency-Key?: string

          A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

      • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • sourceId: string

          The source's ID.

      • Optionalquery?: undefined
    • requestBody: { content: { "application/json": { uploadId?: string } | null } }

      What a new sync reads.

    • responses: {
          "202": {
              content: {
                  "application/json": { jobId: string | null; sourceId: string };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 202: {
            content: {
                "application/json": { jobId: string | null; sourceId: string };
            };
            headers: { [name: string]: unknown };
        }

        The sync that was started or queued.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    syncAllSources: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody?: undefined;
        responses: {
            "202": {
                content: { "application/json": { sourceIds: string[] } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    updateDocument: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: { content: { "application/json": { state: "active" } } };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        conversion:
                            | "pending"
                            | "failed"
                            | "converted"
                            | "unsupported"
                            | "oversized";
                        conversionError: string
                        | null;
                        createdAt: string;
                        documentUpdatedAt: string | null;
                        excludedAt: string | null;
                        externalId: string;
                        id: string;
                        lastSeenAt: string;
                        mime: string | null;
                        sizeBytes: number | null;
                        sourceId: string;
                        sourceType: "files" | "web" | "sanity-dataset";
                        state: "active" | "missing" | "deleted";
                        title: string;
                        updatedAt: string;
                        url: string | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; documentId: string; knowledgeBaseId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • documentId: string

          The document's ID.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

      • Optionalquery?: undefined
    • requestBody: { content: { "application/json": { state: "active" } } }

      The changes to make to a document.

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      conversion:
                          | "pending"
                          | "failed"
                          | "converted"
                          | "unsupported"
                          | "oversized";
                      conversionError: string
                      | null;
                      createdAt: string;
                      documentUpdatedAt: string | null;
                      excludedAt: string | null;
                      externalId: string;
                      id: string;
                      lastSeenAt: string;
                      mime: string | null;
                      sizeBytes: number | null;
                      sourceId: string;
                      sourceType: "files" | "web" | "sanity-dataset";
                      state: "active" | "missing" | "deleted";
                      title: string;
                      updatedAt: string;
                      url: string | null;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    conversion:
                        | "pending"
                        | "failed"
                        | "converted"
                        | "unsupported"
                        | "oversized";
                    conversionError: string
                    | null;
                    createdAt: string;
                    documentUpdatedAt: string | null;
                    excludedAt: string | null;
                    externalId: string;
                    id: string;
                    lastSeenAt: string;
                    mime: string | null;
                    sizeBytes: number | null;
                    sourceId: string;
                    sourceType: "files" | "web" | "sanity-dataset";
                    state: "active" | "missing" | "deleted";
                    title: string;
                    updatedAt: string;
                    url: string | null;
                };
            };
            headers: { [name: string]: unknown };
        }

        One page, dataset document or file that a source yields.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    updateInstruction: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                instructionId: string;
                knowledgeBaseId: string;
            };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    scopeDocumentIds?: string[];
                    statement?: string;
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        archivedAt: string
                        | null;
                        archivedReason: string | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null } | null;
                        id: string;
                        knowledgeBaseId: string;
                        origin: "conflict" | "human";
                        scopeDocumentIds: string[];
                        sourceIssueId: string | null;
                        statement: string;
                        status: "active" | "archived";
                        updatedAt: string | null;
                        updatedBy: { displayName: string | null; id: string | null } | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: {
              apiVersion: string;
              instructionId: string;
              knowledgeBaseId: string;
          };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; instructionId: string; knowledgeBaseId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • instructionId: string

          The instruction's ID.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": { scopeDocumentIds?: string[]; statement?: string };
          };
      }

      The changes to make to an instruction. Set statement, scopeDocumentIds, or both. Any update also reactivates an archived instruction.

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      archivedAt: string | null;
                      archivedReason: string | null;
                      createdAt: string;
                      createdBy: { displayName: string | null; id: string | null } | null;
                      id: string;
                      knowledgeBaseId: string;
                      origin: "conflict" | "human";
                      scopeDocumentIds: string[];
                      sourceIssueId: string | null;
                      statement: string;
                      status: "active" | "archived";
                      updatedAt: string | null;
                      updatedBy: { displayName: string | null; id: string | null } | null;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    archivedAt: string | null;
                    archivedReason: string | null;
                    createdAt: string;
                    createdBy: { displayName: string | null; id: string | null } | null;
                    id: string;
                    knowledgeBaseId: string;
                    origin: "conflict" | "human";
                    scopeDocumentIds: string[];
                    sourceIssueId: string | null;
                    statement: string;
                    status: "active" | "archived";
                    updatedAt: string | null;
                    updatedBy: { displayName: string | null; id: string | null } | null;
                };
            };
            headers: { [name: string]: unknown };
        }

        A standing instruction that shapes how entries built from its documents are written.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    updateKnowledgeBase: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    description?: string;
                    draft?: false;
                    title?: string;
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        activeJobId: string
                        | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: "pending"
                                    | "running"
                                    | "done"
                                    | "failed";
                                    units?: { done: ...; total?: ...; unit: ... };
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }
    updateMcpEndpoint: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    groqFilter?: string
                    | null;
                    instructions?: string | null;
                    sources?: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective?: "published" | "drafts" | "raw" | null;
                            semanticSearch?: boolean | null;
                            type: "dataset";
                            workspace?: string | null;
                        }
                    )[];
                    title?: string;
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        groqFilter: string
                        | null;
                        id: string;
                        instructions: string | null;
                        lastUsedAt: string | null;
                        name: string;
                        organizationId: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective: "published" | "drafts" | "raw" | null;
                                semanticSearch: boolean | null;
                                type: "dataset";
                                workspace: string | null;
                            }
                        )[];
                        title: string;
                        updatedAt: string;
                        url: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • mcpEndpoint: string

          The MCP endpoint's name, as in its URL, or its ID (mcp…). Names can't take the shape of an ID, so either one identifies the endpoint.

        • organizationId: string

          The ID of the organization.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  groqFilter?: string | null;
                  instructions?: string | null;
                  sources?: (
                      | { id: string; type: "knowledge-base" }
                      | {
                          id: string;
                          perspective?: "published" | "drafts" | "raw" | null;
                          semanticSearch?: boolean | null;
                          type: "dataset";
                          workspace?: string | null;
                      }
                  )[];
                  title?: string;
              };
          };
      }

      UpdateMcpEndpointInput

    • responses: {
          "200": {
              content: {
                  "application/json": {
                      createdAt: string;
                      groqFilter: string | null;
                      id: string;
                      instructions: string | null;
                      lastUsedAt: string | null;
                      name: string;
                      organizationId: string;
                      sources: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective: "published" | "drafts" | "raw" | null;
                              semanticSearch: boolean | null;
                              type: "dataset";
                              workspace: string | null;
                          }
                      )[];
                      title: string;
                      updatedAt: string;
                      url: string;
                  };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json": {
                    createdAt: string;
                    groqFilter: string | null;
                    id: string;
                    instructions: string | null;
                    lastUsedAt: string | null;
                    name: string;
                    organizationId: string;
                    sources: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective: "published" | "drafts" | "raw" | null;
                            semanticSearch: boolean | null;
                            type: "dataset";
                            workspace: string | null;
                        }
                    )[];
                    title: string;
                    updatedAt: string;
                    url: string;
                };
            };
            headers: { [name: string]: unknown };
        }

        McpEndpoint

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error

    updateSource: {
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        };
        requestBody: {
            content: {
                "application/json": {
                    confirmDeletions?: boolean;
                    crawlOptions?: {
                        excludePaths?: string[];
                        ignoreQueryParameters?: boolean;
                        includePaths?: string[];
                        maxDepth?: number;
                        pageLimit?: number;
                        sitemapOnly?: boolean;
                    };
                    query?: string;
                    syncFrequency?: "weekly"
                    | "monthly"
                    | null;
                    title?: string;
                };
            };
        };
        responses: {
            "200": {
                content: {
                    "application/json": | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        };
    }

    Type declaration

    • parameters: {
          cookie?: undefined;
          header?: undefined;
          path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
          query?: undefined;
      }
      • Optionalcookie?: undefined
      • Optionalheader?: undefined
      • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
        • apiVersion: string

          The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • knowledgeBaseId: string

          The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • sourceId: string

          The source's ID.

      • Optionalquery?: undefined
    • requestBody: {
          content: {
              "application/json": {
                  confirmDeletions?: boolean;
                  crawlOptions?: {
                      excludePaths?: string[];
                      ignoreQueryParameters?: boolean;
                      includePaths?: string[];
                      maxDepth?: number;
                      pageLimit?: number;
                      sitemapOnly?: boolean;
                  };
                  query?: string;
                  syncFrequency?: "weekly"
                  | "monthly"
                  | null;
                  title?: string;
              };
          };
      }

      The changes to make to a source.

    • responses: {
          "200": {
              content: {
                  "application/json":
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
              };
              headers: { [name: string]: unknown };
          };
          default: {
              content: {
                  "application/json": {
                      code: | "knowledgeBaseNotFound"
                      | "jobNotFound"
                      | "sourceNotFound"
                      | "documentNotFound"
                      | "syncNotFound"
                      | "uploadNotFound"
                      | "chunkNotFound"
                      | "entryNotFound"
                      | "entryDocumentInvalid"
                      | "revisionNotFound"
                      | "revisionNotBrowsable"
                      | "revisionNotRestorable"
                      | "buildDecisionsNotFound"
                      | "issueNotFound"
                      | "instructionNotFound"
                      | "routeNotFound"
                      | "buildInFlight"
                      | "knowledgeBaseIsDraft"
                      | "webSourceRootConflict"
                      | "webSourceRootLimitExceeded"
                      | "preferenceLimitExceeded"
                      | "syncInProgress"
                      | "syncNotHeld"
                      | "sourceDeletionsUnconfirmed"
                      | "documentNotConverted"
                      | "documentNotStored"
                      | "documentInvalidState"
                      | "uploadTooLarge"
                      | "payloadTooLarge"
                      | "validationError"
                      | "unsupportedMediaType"
                      | "sourceTypeMismatch"
                      | "issueNotResolvable"
                      | "issueNotAutoApplicable"
                      | "issueDocumentInvalid"
                      | "issueTransitionConflict"
                      | "draftTitleRequired"
                      | "datasetSourceEmpty"
                      | "datasetAlreadyBound"
                      | "datasetSourceNotBound"
                      | "datasetReadAccessDenied"
                      | "invalidGroqFilter"
                      | "mcpEndpointNotFound"
                      | "mcpEndpointNameConflict"
                      | "mcpEndpointEditConflict"
                      | "mcpSourceKnowledgeBaseNotFound"
                      | "mcpEndpointNotServable"
                      | "conversationNotFound"
                      | "missingCredential"
                      | "invalidCredential"
                      | "missingOrganization"
                      | "organizationAccessDenied"
                      | "knowledgeBaseAccessDenied"
                      | "contextGrantRequired"
                      | "knowledgeBaseCreateAccessDenied"
                      | "mcpEndpointManageAccessDenied"
                      | "insightsWriteAccessDenied"
                      | "sharedOrgPreferencesWriteAccessDenied"
                      | "projectAdminRequired"
                      | "accessCheckFailed"
                      | "planLimitReached"
                      | "featureNotInPlan"
                      | "buildCapReached"
                      | "tooManyConnections"
                      | "jobsUnavailable"
                      | "contextStoreUnavailable"
                      | "crawlingUnavailable"
                      | "crawlPreviewUnavailable"
                      | "instructionDraftFailed"
                      | "instructionScopeVanished"
                      | "purposeDraftFailed"
                      | "noPurposeEvidence"
                      | "idempotencyKeyReused"
                      | "idempotencyRequestInFlight"
                      | "idempotencyParamsMismatch"
                      | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          };
      }
      • 200: {
            content: {
                "application/json":
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
            };
            headers: { [name: string]: unknown };
        }

        Something that yields documents for a knowledge base: a website, a dataset or files.

      • default: {
            content: {
                "application/json": {
                    code:
                        | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                    error: string;
                    fields?: { [key: string]: unknown };
                    message: string;
                    statusCode: number;
                };
            };
            headers: { [name: string]: unknown };
        }

        Error