import { DatabaseManager } from "./database/DatabaseManager"; import { TypeDBOptions } from "./TypeDBOptions"; import { SessionType, TypeDBSession } from "./TypeDBSession"; import { UserManager } from "./user/UserManager"; import { User } from "./user/User"; export interface TypeDBDriver { /** * Checks whether this connection is presently open. * * ### Examples * * ```ts * driver.isOpen() * ``` */ isOpen(): boolean; /** The DatabaseManager for this connection, providing access to database management methods. */ readonly databases: DatabaseManager; session(database: string, type: SessionType, options?: TypeDBOptions): Promise; /** * Closes the driver. Before instantiating a new driver, the driver that’s currently open should first be closed. * * ### Examples * * ```ts * driver.close() * ``` */ close(): Promise; /** * The UserManager instance for this connection, providing access to user management methods. * Only for TypeDB Cloud. */ readonly users: UserManager; /** * Returns the logged-in user for the connection. Only for TypeDB Cloud. * * ### Examples * * ```ts * driver.user() * ``` */ user(): Promise; }