/** * @fileoverview Shared schema definitions for Glean MCP server tools. * * This module contains schema definitions that are used across multiple tools, * particularly between search and chat functionality. */ import { z } from 'zod'; /** * Schema for document content in search requests. */ export declare const DocumentContentSchema: z.ZodObject<{ fullTextList: z.ZodOptional>; }, "strip", z.ZodTypeAny, { fullTextList?: string[] | undefined; }, { fullTextList?: string[] | undefined; }>; /** * Schema for document metadata in search requests. */ export declare const DocumentMetadataSchema: z.ZodObject<{ customData: z.ZodOptional>; }, "strip", z.ZodTypeAny, { customData?: Record | undefined; }, { customData?: Record | undefined; }>; /** * Schema for document section in search requests. */ export declare const DocumentSectionSchema: z.ZodObject<{ title: z.ZodOptional; content: z.ZodOptional; startIndex: z.ZodOptional; endIndex: z.ZodOptional; level: z.ZodOptional; type: z.ZodOptional; }, "strip", z.ZodTypeAny, { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }, { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }>; /** * Schema for simplified document references to avoid circular dependencies. */ export declare const DocumentReferenceSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodOptional; url: z.ZodOptional; datasource: z.ZodOptional; docType: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; }, { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; }>; /** * Schema for document in search requests. */ export type DocumentSchemaType = z.ZodObject<{ id: z.ZodString; datasource: z.ZodOptional; connectorType: z.ZodOptional>; docType: z.ZodOptional; content: z.ZodOptional; containerDocument: z.ZodOptional; parentDocument: z.ZodOptional; title: z.ZodOptional; url: z.ZodOptional; metadata: z.ZodOptional; sections: z.ZodOptional>; }>; export declare const DocumentSchema: DocumentSchemaType; /** * Schema for text range in search requests. */ export declare const TextRangeSchema: z.ZodObject<{ startIndex: z.ZodNumber; endIndex: z.ZodNumber; type: z.ZodEnum<["BOLD", "CITATION", "LINK"]>; url: z.ZodOptional; document: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }, { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }>; /** * Schema for search result snippet in search requests. */ export declare const SearchResultSnippetSchema: z.ZodObject<{ snippet: z.ZodString; mimeType: z.ZodOptional; text: z.ZodOptional; snippetTextOrdering: z.ZodOptional; ranges: z.ZodOptional; url: z.ZodOptional; document: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }, { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }>, "many">>; url: z.ZodOptional; }, "strip", z.ZodTypeAny, { snippet: string; url?: string | undefined; mimeType?: string | undefined; text?: string | undefined; snippetTextOrdering?: number | undefined; ranges?: { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }[] | undefined; }, { snippet: string; url?: string | undefined; mimeType?: string | undefined; text?: string | undefined; snippetTextOrdering?: number | undefined; ranges?: { type: "BOLD" | "CITATION" | "LINK"; startIndex: number; endIndex: number; url?: string | undefined; document?: { id: string; title?: string | undefined; content?: { fullTextList?: string[] | undefined; } | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; connectorType?: "API_CRAWL" | "BROWSER_CRAWL" | "BROWSER_HISTORY" | "BUILTIN" | "FEDERATED_SEARCH" | "PUSH_API" | "WEB_CRAWL" | "NATIVE_HISTORY" | undefined; containerDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; parentDocument?: { id: string; title?: string | undefined; url?: string | undefined; datasource?: string | undefined; docType?: string | undefined; } | undefined; metadata?: { customData?: Record | undefined; } | undefined; sections?: { type?: string | undefined; title?: string | undefined; content?: string | undefined; startIndex?: number | undefined; endIndex?: number | undefined; level?: number | undefined; }[] | undefined; } | undefined; }[] | undefined; }>; /** * Schema for query suggestion in search requests. */ export declare const QuerySuggestionSchema: z.ZodObject<{ query: z.ZodString; label: z.ZodOptional; datasource: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; datasource?: string | undefined; label?: string | undefined; }, { query: string; datasource?: string | undefined; label?: string | undefined; }>; /** * Schema for document spec in search requests. */ export declare const DocumentSpecSchema: z.ZodUnion<[z.ZodObject<{ url: z.ZodOptional; }, "strip", z.ZodTypeAny, { url?: string | undefined; }, { url?: string | undefined; }>, z.ZodObject<{ id: z.ZodOptional; }, "strip", z.ZodTypeAny, { id?: string | undefined; }, { id?: string | undefined; }>, z.ZodObject<{ ugcType: z.ZodOptional>; contentId: z.ZodOptional; docType: z.ZodOptional; }, "strip", z.ZodTypeAny, { docType?: string | undefined; ugcType?: "ANNOUNCEMENTS" | "ANSWERS" | "COLLECTIONS" | "SHORTCUTS" | undefined; contentId?: number | undefined; }, { docType?: string | undefined; ugcType?: "ANNOUNCEMENTS" | "ANSWERS" | "COLLECTIONS" | "SHORTCUTS" | undefined; contentId?: number | undefined; }>]>; //# sourceMappingURL=schemas.d.ts.map