export interface AxioDBCloudOptions { timeout?: number; reconnectAttempts?: number; reconnectDelay?: number; heartbeatInterval?: number; username?: string; password?: string; maxPoolSize?: number; /** Encrypt the connection with TLS instead of plaintext. Must match the server's own TLS setting. Defaults to false. */ tls?: boolean; /** Path to a CA certificate (or the server's own cert, for a self-signed deployment) to validate the server's certificate against. Only relevant when `tls: true`. */ tlsCAPath?: string; /** Defaults to true. Set to false only for local/dev testing against an unverified self-signed certificate - never in production, since it disables all server-identity verification. */ tlsRejectUnauthorized?: boolean; } /** Public shape returned by a successful AUTHENTICATE command. */ export interface AuthenticatedUser { username: string; role: string; mustChangePassword: boolean; } /** * Emitted by `connect()` when the pool comes up smaller than `maxPoolSize` requested - * e.g. some members hit the server's per-IP connection cap, or a transient network error. * `connect()` still resolves as long as at least one pool member connected; this event is * how the app finds out it's running under capacity instead of silently getting fewer * connections than it asked for. */ export interface PoolDegradedEvent { requested: number; connected: number; failed: number; errors: Error[]; } export declare enum ConnectionState { DISCONNECTED = "DISCONNECTED", CONNECTING = "CONNECTING", CONNECTED = "CONNECTED", RECONNECTING = "RECONNECTING", FAILED = "FAILED" } /** Parsed form of an `axiodb://host:port` connection string. */ export interface ParsedConnectionString { host: string; port: number; }