/** Records API for CortexDB */ import { CollectionCreateInput, CollectionName, CollectionRecord, CollectionUpdateInput, CreateRecordOptions, CreateRecordResponse, CreateRecordResult, GeneratedSchema, ProcessingState, QueryParams, QueryRecordsResponse, RecordDetails, SearchResponse, UpdateRecordOptions, UpdateRecordResponse, DefaultGeneratedSchema, RecordsDelegates, AdvancedSearchResponse, RAGStrategy, GetVectorsResponse, KeywordSearchResponse } from "../types"; import { HTTPClient } from "../http/client"; /** * Supported MIME types for file uploads. * Files with unsupported types will be rejected before upload. */ export declare const SUPPORTED_MIME_TYPES: { readonly 'application/pdf': "PDF"; readonly 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': "DOCX"; readonly 'application/msword': "DOC"; readonly 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': "XLSX"; readonly 'application/vnd.ms-excel': "XLS"; readonly 'application/vnd.openxmlformats-officedocument.presentationml.presentation': "PPTX"; readonly 'application/vnd.ms-powerpoint': "PPT"; readonly 'text/html': "HTML"; readonly 'text/markdown': "Markdown"; readonly 'text/x-markdown': "Markdown"; readonly 'text/plain': "Plain Text"; readonly 'application/json': "JSON"; readonly 'application/x-json': "JSON"; readonly 'text/json': "JSON"; readonly 'image/png': "PNG"; readonly 'image/jpeg': "JPEG"; readonly 'image/webp': "WebP"; readonly 'video/mp4': "MP4"; readonly 'video/mpeg': "MPEG"; readonly 'video/quicktime': "MOV"; readonly 'video/x-msvideo': "AVI"; readonly 'video/webm': "WebM"; readonly 'video/x-matroska': "MKV"; readonly 'video/x-flv': "FLV"; readonly 'video/3gpp': "3GP"; readonly 'video/x-ms-wmv': "WMV"; }; /** * MIME types that are NOT supported */ export declare const UNSUPPORTED_MIME_TYPES: { readonly 'image/gif': "GIF - Not supported by Gemini Vision API"; readonly 'image/bmp': "BMP - Not supported"; readonly 'image/tiff': "TIFF - Not supported"; readonly 'image/svg+xml': "SVG - Not supported"; }; interface ObservabilityConfig { baseUrl: string; apiKey: string; database: string; } export declare class RecordsAPI { private http; private getDefaultDatabase?; private observabilityConfig?; private defaultWaitUntilComplete; constructor(http: HTTPClient, getDefaultDatabase?: (() => string | undefined) | undefined, observabilityConfig?: ObservabilityConfig | undefined, defaultWaitUntilComplete?: boolean); private resolveDatabase; private buildBasePath; /** * Send embedding trace to observability database (async, non-blocking) */ private sendEmbeddingTrace; /** * Send image description trace to observability database (async, non-blocking) */ private sendImageDescriptionTrace; private resolveCreateOptions; private awaitProcessingCompletion; private handlePostCreateTraces; private delay; private generateUUID; private attachObservabilityMetadata; /** * Create a new record */ create>(collection: C, data: CollectionCreateInput, files?: Record, databaseOrOptions?: string | CreateRecordOptions, maybeOptions?: CreateRecordOptions): Promise; getStatus>(collection: C, recordId: string, database?: string): Promise; waitForCompletion>(collection: C, recordId: string, options?: CreateRecordOptions & { database?: string; }): Promise; /** * Get a record by ID */ get>(collection: C, id: string, database?: string): Promise>>; /** * List records in a collection */ list>(collection: C, params?: QueryParams, database?: string): Promise>>; /** * Update a record */ update>(collection: C, id: string, data: CollectionUpdateInput, databaseOrOptions?: string | UpdateRecordOptions, maybeOptions?: UpdateRecordOptions): Promise; /** * Delete a record */ delete>(collection: C, id: string, database?: string): Promise; /** * Get all vector chunks for a record (text chunks and image descriptions) */ getVectors>(collection: C, id: string, database?: string): Promise; /** * Semantic search */ search>(collection: C, query: string, filters?: { [key: string]: any; }, limit?: number, database?: string): Promise>>; /** * Advanced semantic search with RAG strategies */ searchAdvanced>(collection: C, options: { query: string; filters?: Record; limit?: number; strategy?: RAGStrategy; minScore?: number; strategyConfig?: Record; aiProviderName?: string; database?: string; }): Promise>>; /** * Full-text keyword search (exact match, not semantic). * Returns all records containing the specified keywords. */ findByKeyword>(collection: C, options: { keywords: string[]; fields?: string[]; matchAll?: boolean; filters?: Record; limit?: number; offset?: number; database?: string; }): Promise>>; /** * Create record with files */ private createWithFiles; } export type RecordsFacade = RecordsAPI & RecordsDelegates; export declare function createRecordsFacade(recordsApi: RecordsAPI): RecordsFacade; export {}; //# sourceMappingURL=api.d.ts.map