/** Main CortexDB client */ import { CollectionsAPI } from "../collections/api"; import { RecordsFacade } from "../records/api"; import { DatabasesAPI } from "../databases/api"; import { EmbeddingProvidersAPI } from "../providers/api"; import { AIProvidersAPI } from "../ai-providers/api"; import { SearchAPI } from "../search/api"; import { DefaultGeneratedSchema, GeneratedSchema } from "../types"; export interface CortexClientOptions { baseUrl?: string; apiKey?: string; timeout?: number; database?: string; waitUntilComplete?: boolean; } export interface ObservabilityConfig { baseUrl: string; apiKey: string; database: string; } export declare class CortexClient { private http; collections: CollectionsAPI; records: RecordsFacade; databases: DatabasesAPI; embeddingProviders: EmbeddingProvidersAPI; aiProviders: AIProvidersAPI; search: SearchAPI; private defaultDatabase?; private observabilityConfig?; /** * Create a new CortexDB client * * @param options - Configuration options or connection string. If not provided, reads from CORTEXDB_CONNECTION env var. * @param observabilityConnection - Optional connection string for observability database (ai_toolkit type) * * @example * ```typescript * // Auto-detect from environment (like Prisma) * const client = new CortexClient(); * // Reads from process.env.CORTEXDB_CONNECTION * * // Using options object * const client = new CortexClient({ * baseUrl: 'http://localhost:8000', * apiKey: 'my-key' * }); * * // Using connection string * const client = new CortexClient('cortexdb://my-key@localhost:8000/database'); * * // With observability tracking (embedding costs, etc) * const client = new CortexClient( * 'cortexdb://key@host:8000/main_db', * 'cortexdb://key@host:8000/observability_db' * ); * ``` */ constructor(options?: CortexClientOptions | string, observabilityConnection?: string); /** * Check if the connection to CortexDB is working */ health(): Promise<{ status: string; }>; /** * Shorthand for health check that returns boolean */ healthcheck(): Promise; /** * Close the client (cleanup if needed) */ close(): Promise; /** * Get the database that will be used by default when não especificado. */ getDefaultDatabase(): string | undefined; /** * Override the default database at runtime (affects future calls). */ setDefaultDatabase(database?: string): void; private resolveEmbeddingProviderId; } //# sourceMappingURL=index.d.ts.map