import SimpleOrm from "./SimpleOrm"; import Query from "../Query"; import Collection from "../Collection"; import { ISubscription } from "rxjs/Subscription"; import { Entity, EntityClass, MaybeEntityClass } from '../utils'; import { IFieldObject } from '../IFieldObject'; import { FetchOption, FetchOptions } from '../OrmDriver'; export default class FirestoreOrm extends SimpleOrm { private _db; constructor(db: any); observeQuery(model: EntityClass, query: Query, handler: (h: T[]) => void): ISubscription; observeModel(model: Entity, handler?: (h: T) => void): ISubscription; private applyQuery(collection, query); executeQuery(model: EntityClass, query: Query): Promise>; deserialize(model: EntityClass | Entity, data: IFieldObject, load?: FetchOption): Promise>; /** * Removes the model in the ORM */ delete(model: Entity, collection?: Collection): Promise; getAttributesForDB(model: Entity): {}; getChildModels(model: Entity): Entity[]; transactionSave(model: Entity, collection: Collection | undefined, transaction: any, afterCommitTasks: Function[]): Promise>; private selfObserveModel(model); /** * Upserts the model in the ORM */ save(model: Entity, collection?: Collection): Promise; getModelById(model: MaybeEntityClass, id: string | number, options?: FetchOptions): Promise; }