import * as firebase from "firebase/app"; import 'firebase/firestore'; import { BaseModel } from "./base.model"; import { ModelInterface } from "./interfaces/model.interface"; import { ElasticSqlResponse } from "./interfaces/elastic.sql.response.interface"; export declare class FirestoreOrmRepository { protected firestore: firebase.firestore.Firestore; static globalFirestores: {}; static globalPaths: {}; static documentsRequiredFields: {}; static DEFAULT_KEY_NAME: string; static ormFieldsStructure: {}; static elasticSearchConnections: {}; static globalFirebaseStoages: {}; constructor(firestore: firebase.firestore.Firestore); static initGlobalConnection(firestore: firebase.firestore.Firestore, key?: string): void; static initGlobalStorage(storage: firebase.storage.Storage, key?: string): void; static initGlobalElasticsearchConnection(url: string, key?: string): void; static getGlobalStorage(key?: string): firebase.storage.Storage; static getGlobalElasticsearchConnection(key?: string): any; static getGlobalConnection(key?: string): any; static initGlobalPath(pathIdKey: string, pathIdValue: string): void; static getGlobalPath(pathIdKey: string): any; getCollectionReferenceByModel(object: any): any; getFirestore(): firebase.firestore.Firestore; getModel(model: { new (): T; }): T & BaseModel; sql(sql: string): Promise>; /** * Listen to sql query result * @param sql - sql query * @param callback - running callback */ onSql(sql: string, callback: CallableFunction): void; /** * Load model object by id * @param object - class * @param id -string id * @param params - path params * @return model object */ load(object: any, id: string, params?: { [key: string]: string; }): Promise; /** * Save the model object * @param model */ save(model: any): Promise; static elasticSql(this: { new (): T; }, sql?: string, limit?: number, filters?: any, cursor?: any, columns?: any): Promise; }