import { Response, WriteOptions, UpdateOptions, JoinType, OrderDirection, OperatorType } from "./types"; declare class Database { private _database; private _collection; private _idFieldName?; private _id; private _query; private _includedFields; private _excludedFields; constructor(); private requestBody; database: (database: string) => Database; /** * * @returns {Database} Returns a new database reference * */ initializeRef: () => Database; /** * * @param {string} collection The name of the collection * @returns {Database} Returns a database reference * */ collection: (collection: string) => Database; /** * * @param {string} table The name of the table * @returns {Database} Returns a database reference * */ table: (table: string) => Database; /** * * @param {string} id The id of a document/record * @param {string} idFieldName The name of id field. Only required for SQL databases * @returns {Database} Returns a database reference * */ id: (id: string, idFieldName?: string | undefined) => Database; /** * * @param {string[]} includedFields The fields that should be returned * @returns {Database} Returns a database reference * */ include: (includedFields: string[]) => Database; /** * * @param {string[]} excludedFields The fields that should not be returned * @returns {Database} Returns a database reference * */ exclude: (excludedFields: string[]) => Database; /** * * @param {string} field Field Name * @param {OperatorType} operatorType Equalty operator * @param {object} value Any object * @returns {Database} Returns a database reference * */ where: (field: string, operatorType: OperatorType, value: object) => Database; /** * * @param {number} limitNumber Limit the number of documents/records returned. Default 50 * @returns {Database} Returns a database reference * */ limit: (limitNumber: number) => Database; /** * * @param {number} startAfter Use in conjunction with limit * @returns {Database} Returns a database reference * */ startAfter: (startAfter: number) => Database; /** * * @param {string} field Field Name * @param {OrderDirection} orderDirection Default Ascending * @returns {Database} Returns a database reference * */ orderBy: (field: string, orderDirection: OrderDirection) => Database; /** * * @param {string} sourceField Field name of source table * @param {string} destinationTable Name of destination table * @param {string} destinationField Field name of destination table * @param {JoinType} joinType Join Type * @returns {Database} Returns a database reference * */ join: (sourceField: string, destinationTable: string, destinationField: string, joinType?: JoinType) => Database; insert: (data: any, options?: WriteOptions | undefined) => Promise; update: (data: object, options?: UpdateOptions | undefined) => Promise; get: () => Promise; delete: (options?: WriteOptions | undefined) => Promise; } export = Database;