/// import { AqlLiteral, AqlQuery } from "./aql-query"; import { ArangoCollection, DocumentCollection, EdgeCollection } from "./collection"; import { Config } from "./connection"; import { ArrayCursor } from "./cursor"; import { Graph } from "./graph"; import { Route } from "./route"; import { ArangoSearchView, ArangoView, ViewType } from "./view"; export declare type TransactionCollections = string | ArangoCollection | (string | ArangoCollection)[] | { write?: string | ArangoCollection | (string | ArangoCollection)[]; read?: string | ArangoCollection | (string | ArangoCollection)[]; }; export declare type TransactionOptions = { lockTimeout?: number; maxTransactionSize?: number; intermediateCommitCount?: number; intermediateCommitSize?: number; waitForSync?: boolean; }; export declare type ServiceOptions = { [key: string]: any; configuration?: { [key: string]: any; }; dependencies?: { [key: string]: any; }; }; export interface ViewDescription { id: string; name: string; type: ViewType; } export declare class Database { private _connection; constructor(config?: Config); readonly name: string | null; route(path?: string, headers?: Object): Route; acquireHostList(): Promise; close(): void; useDatabase(databaseName: string): this; useBearerAuth(token: string): this; useBasicAuth(username?: string, password?: string): this; get(): Promise; exists(): Promise; createDatabase(databaseName: string, users?: string[]): Promise; listDatabases(): Promise; listUserDatabases(): Promise; dropDatabase(databaseName: string): Promise; collection(collectionName: string): DocumentCollection; edgeCollection(collectionName: string): EdgeCollection; listCollections(excludeSystem?: boolean): Promise; collections(excludeSystem?: boolean): Promise; truncate(excludeSystem?: boolean): Promise<[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]>; arangoSearchView(viewName: string): ArangoSearchView; listViews(): Promise; views(): Promise; graph(graphName: string): Graph; listGraphs(): Promise; graphs(): Promise; transaction(collections: TransactionCollections, action: string): Promise; transaction(collections: TransactionCollections, action: string, params?: Object): Promise; transaction(collections: TransactionCollections, action: string, params?: Object, options?: TransactionOptions): Promise; transaction(collections: TransactionCollections, action: string, lockTimeout?: number): Promise; transaction(collections: TransactionCollections, action: string, params?: Object, lockTimeout?: number): Promise; query(query: string | AqlQuery | AqlLiteral): Promise; query(query: AqlQuery, opts?: any): Promise; query(query: string | AqlLiteral, bindVars?: any, opts?: any): Promise; listFunctions(): Promise; createFunction(name: string, code: string): Promise; dropFunction(name: string, group?: boolean): Promise; listServices(): Promise; installService(mount: string, source: any, opts?: ServiceOptions): Promise; upgradeService(mount: string, source: any, opts?: ServiceOptions): Promise; replaceService(mount: string, source: any, opts?: ServiceOptions): Promise; uninstallService(mount: string, opts?: any): Promise; getService(mount: string): Promise; getServiceConfiguration(mount: string, minimal?: boolean): Promise; updateServiceConfiguration(mount: string, cfg: any, minimal?: boolean): Promise; replaceServiceConfiguration(mount: string, cfg: any, minimal?: boolean): Promise; getServiceDependencies(mount: string, minimal?: boolean): Promise; updateServiceDependencies(mount: string, cfg: any, minimal?: boolean): Promise; replaceServiceDependencies(mount: string, cfg: { [key: string]: string; }, minimal?: boolean): Promise; enableServiceDevelopmentMode(mount: string): Promise; disableServiceDevelopmentMode(mount: string): Promise; listServiceScripts(mount: string): Promise; runServiceScript(mount: string, name: string, args: any): Promise; runServiceTests(mount: string, opts: any): Promise; getServiceReadme(mount: string): Promise; getServiceDocumentation(mount: string): Promise; downloadService(mount: string): Promise; commitLocalServiceState(replace?: boolean): Promise; version(): Promise; login(username?: string, password?: string): Promise; } //# sourceMappingURL=database.d.ts.map