import { type SSEEvent } from './lib/event-stream.js'; export type ApiKeyPosition = 'header' | 'query-params'; export type ClientRequestInit = Omit; type ReadWriteAuth = { readerURL?: string; writerURL?: string; }; type ApiKeyAuth = { type: 'apiKey'; apiKey: string; }; type JwtAuth = { type: 'jwt'; authJwtURL: string; collectionID: string; privateApiKey: string; }; type AuthConfig = ReadWriteAuth & (ApiKeyAuth | JwtAuth); export declare class Auth { private config; constructor(config: AuthConfig); getRef(target: ClientRequest['target'], init?: ClientRequestInit): Promise<{ bearer: string; baseURL: string; }>; } export type ClientRequest = { target: 'reader' | 'writer'; method: 'GET' | 'POST' | 'PUT'; path: string; body?: object; params?: Record; init?: ClientRequestInit; apiKeyPosition: ApiKeyPosition; }; export interface ClientConfig { auth: Auth; } export declare class Client { private config; constructor(config: ClientConfig); request(req: ClientRequest): Promise; requestStream(req: ClientRequest): Promise>; eventSource(req: ClientRequest): Promise; getResponse({ method, path, body, params, apiKeyPosition, init, target, }: ClientRequest): Promise; } export declare function safeJSONParse(data: string, silent?: boolean): T; export type TrainingSet = typeof TRAINING_SETS[number]; export declare const TRAINING_SETS: readonly ["query_optimizer", "query_planner", "query_filtering"]; export {}; //# sourceMappingURL=common.d.ts.map