import { IDatabase } from '../interfaces'; type TZkDatabaseConfig = { url: string; apiKey: string; inviteCode?: string; }; /** * The ZkDatabase Client class provides methods to interact with the ZkDatabase. * It allows connecting to the database using different authentication methods * and provides access to database and system functionalities. */ export declare class ZkDatabase { private apiClient; /** * Create new instance of ZkDatabase by url * Connect from NodeJS using a api key *```ts * const zkdb = new ZkDatabase('zkdb+https://KEY_ID:API_SECRET@test-serverless.zkdatabase.org/graphql'); * @param url */ constructor(url: string); /** * Create new instance of ZkDatabase by config object * Connect from NodeJS using a api key *```ts * const zkdb = new ZkDatabase({ * userName: 'username', * apiKey: 'zkdb_536aac02a1b7.c001b6b8fbded83a18d47a9c233ab3a2eca16c11da3aa4185d8d2ad07f0ae94aT', * url: 'https://test-serverless.zkdatabase.org/graphql', * }); *``` * Using from browser environment *```ts * const zkdb = new ZkDatabase({ * userName: 'username', * url: 'https://test-serverless.zkdatabase.org/graphql', * }); *``` * @param config */ constructor(config: TZkDatabaseConfig); private static parseConfig; /** * Retrieves an instance of `ZkDatabase` with the specified name. * * @param name - The name of the database to access. * @returns An instance of `ZkDatabase`. * @throws Will throw an error if the server URL is not set and `connect()` has not been called. */ db(databaseName: string): IDatabase; } export default ZkDatabase;