import Replica = Database.Replica; export interface Database { /** The database name as a string. */ readonly name: string; /** The Replica instances for this database. _Only works in TypeDB Cloud_ */ readonly replicas: Replica[]; /** The primary replica for this database. _Only works in TypeDB Cloud_*/ readonly primaryReplica: Replica; /** The preferred replica for this database. Operations which can be run on any replica will prefer to use this replica. _Only works in TypeDB Cloud_ */ readonly preferredReplica: Replica; /** * Deletes this database. * * ### Examples * * ```ts * database.delete() * ``` */ delete(): Promise; /** * Returns a full schema text as a valid TypeQL define query string. * * ### Examples * * ```ts * database.schema() * ``` */ schema(): Promise; } export declare namespace Database { /** The metadata and state of an individual raft replica of a database.*/ interface Replica { /** The database for which this is a replica. */ readonly databaseName: string; /** The raft protocol ‘term’ of this replica. */ readonly term: number; /** Checks whether this is the primary replica of the raft cluster.*/ readonly primary: boolean; /** * Checks whether this is the preferred replica of the raft cluster. * If true, Operations which can be run on any replica will prefer to use this replica. */ readonly preferred: boolean; /** The server hosting this replica */ readonly server: string; } }