import type { ConnectionConfig } from '../types'; /** * Managed connection to a SpacetimeDB database * Wraps the generated DbConnection with lifecycle management */ export declare class ManagedConnection { private readonly config; private readonly connection; private connected; private subscribed; private connectionPromise; constructor(config: ConnectionConfig, connection: unknown); /** * Connect to the database and subscribe to all tables */ connect(): Promise; private performConnect; /** * Subscribe to all tables for full database export */ subscribeAll(): Promise; /** * Subscribe to specific tables */ subscribeTables(tables: string[]): Promise; /** * Get the underlying connection * Only available after connect() completes */ getConnection(): unknown; /** * Close the connection */ close(): Promise; /** * Check if connected */ isConnected(): boolean; /** * Check if subscribed */ isSubscribed(): boolean; } /** * Connection factory */ export declare class ConnectionFactory { /** * Create a managed connection from config */ static create(config: ConnectionConfig): Promise; /** * Create a managed connection from an existing connection */ static fromExisting(connection: unknown, config: ConnectionConfig): ManagedConnection; } //# sourceMappingURL=connection.d.ts.map