import { LoadBundleTask } from './LoadBundleTask'; import { AggregateField, aggregateFieldEqual, aggregateQuerySnapshotEqual, AggregateQuerySnapshot } from './FirestoreAggregate'; import { PersistentCacheIndexManager } from './FirestorePersistentCacheIndexManager'; import type { FirebaseApp } from '@react-native-firebase/app'; import type { CollectionReference, DocumentData, DocumentReference, Firestore, FirestoreSettings, EmulatorMockTokenOptions, Query, SetOptions, Transaction, UpdateData, WithFieldValue, PartialWithFieldValue, WriteBatch, AggregateSpec, LogLevel, Unsubscribe, FirestoreError, TransactionOptions } from './types/firestore'; import type { FieldPath } from './FieldPath'; import 'react-native-url-polyfill/auto'; export declare const SDK_VERSION = "27.1.0"; export declare const CACHE_SIZE_UNLIMITED = -1; export declare function getFirestore(): Firestore; export declare function getFirestore(app: FirebaseApp): Firestore; export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore; export declare function getFirestore(databaseId: string): Firestore; export declare function doc(parent: Firestore, path: string, ...pathSegments: string[]): DocumentReference; export declare function doc(parent: CollectionReference, path?: string, ...pathSegments: string[]): DocumentReference; export declare function doc(parent: DocumentReference, path: string, ...pathSegments: string[]): DocumentReference; export declare function collection(parent: Firestore, path: string, ...pathSegments: string[]): CollectionReference; export declare function collection(parent: CollectionReference, path: string, ...pathSegments: string[]): CollectionReference; export declare function collection(parent: DocumentReference, path: string, ...pathSegments: string[]): CollectionReference; export declare function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; export declare function collectionGroup(firestore: Firestore, collectionId: string): Query; export declare function onSnapshotsInSync(firestore: Firestore, observer: { next?: (value: void) => void; error?: (error: FirestoreError) => void; complete?: () => void; }): Unsubscribe; export declare function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe; export declare function setDoc(reference: DocumentReference, data: WithFieldValue): Promise; export declare function setDoc(reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions): Promise; export declare function updateDoc(reference: DocumentReference, data: UpdateData): Promise; export declare function updateDoc(reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; export declare function addDoc(reference: CollectionReference, data: WithFieldValue): Promise>; export declare function enableNetwork(firestore: Firestore): Promise; export declare function disableNetwork(firestore: Firestore): Promise; export declare function clearPersistence(firestore: Firestore): Promise; /** * Clears IndexedDB persistence for the given Firestore instance. * * @remarks Alias for {@link clearPersistence} on React Native Firebase. IndexedDB APIs are * **web only** — this helper calls the native persistence clear path on iOS/Android. */ export declare function clearIndexedDbPersistence(firestore: Firestore): Promise; export declare function terminate(firestore: Firestore): Promise; export declare function waitForPendingWrites(firestore: Firestore): Promise; /** * Creates a Firestore instance with the given settings. * * @remarks Returns synchronously for firebase-js-sdk parity; settings are applied through the * native bridge in the background. Web-only `settings.localCache` values (`memoryLocalCache`, * `persistentLocalCache`, IndexedDB factories) are **not supported**; persistence is controlled * by the native Firestore SDK. */ export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings, databaseId?: string): Firestore; export declare function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string; }): void; export declare function setLogLevel(logLevel: LogLevel): void; export declare function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions): Promise; export type { TransactionOptions }; export declare function getCountFromServer(query: Query): Promise; }, AppModelType, DbModelType>>; export declare function getAggregateFromServer(query: Query, aggregateSpec: AggregateSpecType): Promise>; export declare function sum(field: string | FieldPath): AggregateField; export declare function average(field: string | FieldPath): AggregateField; export declare function count(): AggregateField; export { aggregateFieldEqual, aggregateQuerySnapshotEqual }; export declare function loadBundle(firestore: Firestore, bundleData: ReadableStream | ArrayBuffer | string): LoadBundleTask; export declare function namedQuery(firestore: Firestore, name: string): Promise; export declare function writeBatch(firestore: Firestore): WriteBatch; export declare function getPersistentCacheIndexManager(firestore: Firestore): PersistentCacheIndexManager | null; export declare function enablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): Promise; export declare function disablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): Promise; export declare function deleteAllPersistentCacheIndexes(indexManager: PersistentCacheIndexManager): Promise; export * from './modular/query'; export * from './modular/snapshot'; export * from './modular/FieldPath'; export * from './modular/FieldValue'; export * from './modular/VectorValue'; export { LoadBundleTask } from './LoadBundleTask'; export { default as Transaction } from './FirestoreTransaction'; export { default as WriteBatch } from './FirestoreWriteBatch'; export { Filter } from './FirestoreFilter'; //# sourceMappingURL=modular.d.ts.map