/** * Connects to the centralized MongoDB database * Uses connection pooling and retry logic for optimal performance * This connects to the package owner's database - users don't need to provide MongoDB URI * * @returns Promise that resolves when connection is established * @throws Error if connection fails after retries */ export declare function connectDB(): Promise; /** * Disconnects from MongoDB gracefully * @returns Promise that resolves when disconnected */ export declare function disconnectDB(): Promise; /** * Gets the current MongoDB connection status * @returns Connection state: 0 = disconnected, 1 = connected, 2 = connecting, 3 = disconnecting */ export declare function getConnectionStatus(): number; /** * Checks if MongoDB is connected * @returns True if connected, false otherwise */ export declare function isConnected(): boolean; /** * Wait for connection to be ready * Useful for ensuring connection before operations * @param timeoutMs - Maximum time to wait in milliseconds (default: 5000) * @returns Promise that resolves when connected, rejects on timeout */ export declare function waitForConnection(timeoutMs?: number): Promise;