import { Storable, Query, Transaction, DataStore, CollectionParams, CollectionChange, DataStoreSentinels } from "@astronautlabs/datastore"; import * as firebase from 'firebase/app'; import 'firebase/firestore'; import { Observable } from "rxjs"; /** * Specify a modifier for a field instead of a direct field value */ export declare class FbSentinels implements DataStoreSentinels { increment(number: number): unknown; serverTimestamp(): unknown; delete(): unknown; arrayUnion(...elements: any[]): unknown; arrayRemove(...elements: any[]): unknown; } export declare class FbTransaction implements Transaction { private store; private txn; constructor(store: FbDataStore, txn: firebase.firestore.Transaction); create(collectionPath: string, data: T): Promise; read(docPath: string): Promise; update(docPath: string, data: T): Promise; set(docPath: string, data: T): Promise; delete(docPath: string): Promise; readAll(docPaths: string[]): Promise; } export declare class FbDataStore implements DataStore { readonly firestore: firebase.firestore.Firestore; constructor(firestore: firebase.firestore.Firestore); sentinels: FbSentinels; set(docPath: string, data: T): Promise; create(collectionPath: string, data: T): Promise; transact(handler: (txn: FbTransaction) => Promise): Promise; read(docPath: string): Promise; query(collectionPath: string): Query; watch(docPath: string): Observable; watchForChanges(collectionPath: string, params?: CollectionParams): Observable[]>; watchAll(collectionPath: string, params?: CollectionParams): Observable; listAll(collectionPath: string, params?: CollectionParams): Promise; update(docPath: string, data: Partial): Promise; delete(docPath: string): Promise; mirrorInTransaction(txn: FbTransaction, primaryKey: string, mirrorKeys: string[], data?: any): Promise; mirror(primaryKey: string, mirrorKeys: string[], data?: any): Promise; createAndMirror(collectionPath: string, data: T, mirrorKeys: string[]): Promise; multiUpdate(docPaths: string[], data: T): Promise; }