@react-native-firebase/firestore 23.8.6 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/RNFBFirestore.podspec +2 -1
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCollectionModule.java +17 -4
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreDocumentModule.java +2 -2
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineExecutor.java +1243 -0
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineNodeBuilder.java +3919 -0
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineParser.java +1735 -0
- package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreSerialize.java +1 -1
- package/dist/module/FieldPath.js +59 -0
- package/dist/module/FieldPath.js.map +1 -0
- package/dist/module/FieldValue.js +82 -0
- package/dist/module/FieldValue.js.map +1 -0
- package/{lib → dist/module}/FirestoreAggregate.js +31 -43
- package/dist/module/FirestoreAggregate.js.map +1 -0
- package/dist/module/FirestoreBlob.js +56 -0
- package/dist/module/FirestoreBlob.js.map +1 -0
- package/dist/module/FirestoreCollectionReference.js +70 -0
- package/dist/module/FirestoreCollectionReference.js.map +1 -0
- package/{lib → dist/module}/FirestoreDocumentChange.js +12 -15
- package/dist/module/FirestoreDocumentChange.js.map +1 -0
- package/dist/module/FirestoreDocumentReference.js +170 -0
- package/dist/module/FirestoreDocumentReference.js.map +1 -0
- package/dist/module/FirestoreDocumentSnapshot.js +88 -0
- package/dist/module/FirestoreDocumentSnapshot.js.map +1 -0
- package/dist/module/FirestoreFilter.js +146 -0
- package/dist/module/FirestoreFilter.js.map +1 -0
- package/dist/module/FirestoreGeoPoint.js +80 -0
- package/dist/module/FirestoreGeoPoint.js.map +1 -0
- package/{lib → dist/module}/FirestorePath.js +5 -12
- package/dist/module/FirestorePath.js.map +1 -0
- package/{lib → dist/module}/FirestorePersistentCacheIndexManager.js +11 -4
- package/dist/module/FirestorePersistentCacheIndexManager.js.map +1 -0
- package/dist/module/FirestoreQuery.js +298 -0
- package/dist/module/FirestoreQuery.js.map +1 -0
- package/{lib → dist/module}/FirestoreQueryModifiers.js +25 -136
- package/dist/module/FirestoreQueryModifiers.js.map +1 -0
- package/dist/module/FirestoreQuerySnapshot.js +98 -0
- package/dist/module/FirestoreQuerySnapshot.js.map +1 -0
- package/dist/module/FirestoreSnapshotMetadata.js +38 -0
- package/dist/module/FirestoreSnapshotMetadata.js.map +1 -0
- package/dist/module/FirestoreStatics.js +50 -0
- package/dist/module/FirestoreStatics.js.map +1 -0
- package/{lib → dist/module}/FirestoreTimestamp.js +39 -39
- package/dist/module/FirestoreTimestamp.js.map +1 -0
- package/dist/module/FirestoreTransaction.js +113 -0
- package/dist/module/FirestoreTransaction.js.map +1 -0
- package/dist/module/FirestoreTransactionHandler.js +137 -0
- package/dist/module/FirestoreTransactionHandler.js.map +1 -0
- package/dist/module/FirestoreVectorValue.js +75 -0
- package/dist/module/FirestoreVectorValue.js.map +1 -0
- package/dist/module/FirestoreWriteBatch.js +113 -0
- package/dist/module/FirestoreWriteBatch.js.map +1 -0
- package/dist/module/LoadBundleTask.js +70 -0
- package/dist/module/LoadBundleTask.js.map +1 -0
- package/dist/module/index.js +31 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/modular/Bytes.js +67 -0
- package/dist/module/modular/Bytes.js.map +1 -0
- package/dist/module/modular/FieldPath.js +25 -0
- package/dist/module/modular/FieldPath.js.map +1 -0
- package/dist/module/modular/FieldValue.js +37 -0
- package/dist/module/modular/FieldValue.js.map +1 -0
- package/dist/module/modular/GeoPoint.js +22 -0
- package/dist/module/modular/GeoPoint.js.map +1 -0
- package/dist/module/modular/Timestamp.js +22 -0
- package/dist/module/modular/Timestamp.js.map +1 -0
- package/dist/module/modular/VectorValue.js +25 -0
- package/dist/module/modular/VectorValue.js.map +1 -0
- package/dist/module/modular/query.js +222 -0
- package/dist/module/modular/query.js.map +1 -0
- package/dist/module/modular/snapshot.js +32 -0
- package/dist/module/modular/snapshot.js.map +1 -0
- package/dist/module/modular.js +229 -0
- package/dist/module/modular.js.map +1 -0
- package/dist/module/namespaced.js +298 -0
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/pipelines/expressions.js +1273 -0
- package/dist/module/pipelines/expressions.js.map +1 -0
- package/dist/module/pipelines/index.js +32 -0
- package/dist/module/pipelines/index.js.map +1 -0
- package/dist/module/pipelines/pipeline-result.js +58 -0
- package/dist/module/pipelines/pipeline-result.js.map +1 -0
- package/dist/module/pipelines/pipeline-source.js +4 -0
- package/dist/module/pipelines/pipeline-source.js.map +1 -0
- package/dist/module/pipelines/pipeline.js +4 -0
- package/dist/module/pipelines/pipeline.js.map +1 -0
- package/dist/module/pipelines/pipeline_impl.js +42 -0
- package/dist/module/pipelines/pipeline_impl.js.map +1 -0
- package/dist/module/pipelines/pipeline_options.js +4 -0
- package/dist/module/pipelines/pipeline_options.js.map +1 -0
- package/dist/module/pipelines/pipeline_runtime.js +526 -0
- package/dist/module/pipelines/pipeline_runtime.js.map +1 -0
- package/dist/module/pipelines/pipeline_support.js +71 -0
- package/dist/module/pipelines/pipeline_support.js.map +1 -0
- package/dist/module/pipelines/pipeline_validate.js +183 -0
- package/dist/module/pipelines/pipeline_validate.js.map +1 -0
- package/dist/module/pipelines/stage_options.js +4 -0
- package/dist/module/pipelines/stage_options.js.map +1 -0
- package/dist/module/pipelines/types.js +2 -0
- package/dist/module/pipelines/types.js.map +1 -0
- package/dist/module/types/firestore.js +4 -0
- package/dist/module/types/firestore.js.map +1 -0
- package/dist/module/types/internal.js +4 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/types/namespaced.js +338 -0
- package/dist/module/types/namespaced.js.map +1 -0
- package/{lib → dist/module}/utils/index.js +59 -114
- package/dist/module/utils/index.js.map +1 -0
- package/{lib → dist/module}/utils/serialize.js +58 -116
- package/dist/module/utils/serialize.js.map +1 -0
- package/{lib → dist/module}/utils/typemap.js +6 -20
- package/dist/module/utils/typemap.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/module/web/RNFBFirestoreModule.android.js +5 -0
- package/dist/module/web/RNFBFirestoreModule.android.js.map +1 -0
- package/dist/module/web/RNFBFirestoreModule.ios.js +5 -0
- package/dist/module/web/RNFBFirestoreModule.ios.js.map +1 -0
- package/dist/module/web/RNFBFirestoreModule.js +387 -0
- package/dist/module/web/RNFBFirestoreModule.js.map +1 -0
- package/{lib → dist/module}/web/convert.js +60 -94
- package/dist/module/web/convert.js.map +1 -0
- package/dist/module/web/pipelines/pipeline.js +34 -0
- package/dist/module/web/pipelines/pipeline.js.map +1 -0
- package/dist/module/web/pipelines/pipeline_bridge_factory.js +217 -0
- package/dist/module/web/pipelines/pipeline_bridge_factory.js.map +1 -0
- package/dist/module/web/pipelines/pipeline_node_builder.js +294 -0
- package/dist/module/web/pipelines/pipeline_node_builder.js.map +1 -0
- package/dist/module/web/pipelines/pipeline_parser.js +21 -0
- package/dist/module/web/pipelines/pipeline_parser.js.map +1 -0
- package/dist/module/web/pipelines/pipeline_snapshot_serializer.js +89 -0
- package/dist/module/web/pipelines/pipeline_snapshot_serializer.js.map +1 -0
- package/dist/module/web/query.js +95 -0
- package/dist/module/web/query.js.map +1 -0
- package/dist/typescript/lib/FieldPath.d.ts +10 -0
- package/dist/typescript/lib/FieldPath.d.ts.map +1 -0
- package/dist/typescript/lib/FieldValue.d.ts +17 -0
- package/dist/typescript/lib/FieldValue.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreAggregate.d.ts +40 -0
- package/dist/typescript/lib/FirestoreAggregate.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreBlob.d.ts +11 -0
- package/dist/typescript/lib/FirestoreBlob.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreCollectionReference.d.ts +15 -0
- package/dist/typescript/lib/FirestoreCollectionReference.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreDocumentChange.d.ts +27 -0
- package/dist/typescript/lib/FirestoreDocumentChange.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreDocumentReference.d.ts +30 -0
- package/dist/typescript/lib/FirestoreDocumentReference.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreDocumentSnapshot.d.ts +30 -0
- package/dist/typescript/lib/FirestoreDocumentSnapshot.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreFilter.d.ts +52 -0
- package/dist/typescript/lib/FirestoreFilter.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreGeoPoint.d.ts +22 -0
- package/dist/typescript/lib/FirestoreGeoPoint.d.ts.map +1 -0
- package/dist/typescript/lib/FirestorePath.d.ts +12 -0
- package/dist/typescript/lib/FirestorePath.d.ts.map +1 -0
- package/dist/typescript/lib/FirestorePersistentCacheIndexManager.d.ts +16 -0
- package/dist/typescript/lib/FirestorePersistentCacheIndexManager.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreQuery.d.ts +39 -0
- package/dist/typescript/lib/FirestoreQuery.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreQueryModifiers.d.ts +59 -0
- package/dist/typescript/lib/FirestoreQueryModifiers.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreQuerySnapshot.d.ts +49 -0
- package/dist/typescript/lib/FirestoreQuerySnapshot.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreSnapshotMetadata.d.ts +8 -0
- package/dist/typescript/lib/FirestoreSnapshotMetadata.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreStatics.d.ts +23 -0
- package/dist/typescript/lib/FirestoreStatics.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreTimestamp.d.ts +33 -0
- package/dist/typescript/lib/FirestoreTimestamp.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreTransaction.d.ts +42 -0
- package/dist/typescript/lib/FirestoreTransaction.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreTransactionHandler.d.ts +26 -0
- package/dist/typescript/lib/FirestoreTransactionHandler.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreVectorValue.d.ts +17 -0
- package/dist/typescript/lib/FirestoreVectorValue.d.ts.map +1 -0
- package/dist/typescript/lib/FirestoreWriteBatch.d.ts +21 -0
- package/dist/typescript/lib/FirestoreWriteBatch.d.ts.map +1 -0
- package/dist/typescript/lib/LoadBundleTask.d.ts +16 -0
- package/dist/typescript/lib/LoadBundleTask.d.ts.map +1 -0
- package/dist/typescript/lib/index.d.ts +6 -0
- package/dist/typescript/lib/index.d.ts.map +1 -0
- package/dist/typescript/lib/modular/Bytes.d.ts +22 -0
- package/dist/typescript/lib/modular/Bytes.d.ts.map +1 -0
- package/dist/typescript/lib/modular/FieldPath.d.ts +4 -0
- package/dist/typescript/lib/modular/FieldPath.d.ts.map +1 -0
- package/dist/typescript/lib/modular/FieldValue.d.ts +8 -0
- package/dist/typescript/lib/modular/FieldValue.d.ts.map +1 -0
- package/dist/typescript/lib/modular/GeoPoint.d.ts +3 -0
- package/dist/typescript/lib/modular/GeoPoint.d.ts.map +1 -0
- package/dist/typescript/lib/modular/Timestamp.d.ts +3 -0
- package/dist/typescript/lib/modular/Timestamp.d.ts.map +1 -0
- package/dist/typescript/lib/modular/VectorValue.d.ts +4 -0
- package/dist/typescript/lib/modular/VectorValue.d.ts.map +1 -0
- package/dist/typescript/lib/modular/query.d.ts +93 -0
- package/dist/typescript/lib/modular/query.d.ts.map +1 -0
- package/dist/typescript/lib/modular/snapshot.d.ts +30 -0
- package/dist/typescript/lib/modular/snapshot.d.ts.map +1 -0
- package/dist/typescript/lib/modular.d.ts +69 -0
- package/dist/typescript/lib/modular.d.ts.map +1 -0
- package/dist/typescript/lib/namespaced.d.ts +13 -0
- package/dist/typescript/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/expressions.d.ts +723 -0
- package/dist/typescript/lib/pipelines/expressions.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/index.d.ts +31 -0
- package/dist/typescript/lib/pipelines/index.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline-result.d.ts +30 -0
- package/dist/typescript/lib/pipelines/pipeline-result.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline-source.d.ts +64 -0
- package/dist/typescript/lib/pipelines/pipeline-source.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline.d.ts +61 -0
- package/dist/typescript/lib/pipelines/pipeline.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline_impl.d.ts +21 -0
- package/dist/typescript/lib/pipelines/pipeline_impl.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline_options.d.ts +17 -0
- package/dist/typescript/lib/pipelines/pipeline_options.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline_runtime.d.ts +10 -0
- package/dist/typescript/lib/pipelines/pipeline_runtime.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline_support.d.ts +7 -0
- package/dist/typescript/lib/pipelines/pipeline_support.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/pipeline_validate.d.ts +9 -0
- package/dist/typescript/lib/pipelines/pipeline_validate.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/stage_options.d.ts +326 -0
- package/dist/typescript/lib/pipelines/stage_options.d.ts.map +1 -0
- package/dist/typescript/lib/pipelines/types.d.ts +10 -0
- package/dist/typescript/lib/pipelines/types.d.ts.map +1 -0
- package/dist/typescript/lib/types/firestore.d.ts +263 -0
- package/dist/typescript/lib/types/firestore.d.ts.map +1 -0
- package/dist/typescript/lib/types/internal.d.ts +483 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/types/namespaced.d.ts +2285 -0
- package/dist/typescript/lib/types/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/utils/index.d.ts +15 -0
- package/dist/typescript/lib/utils/index.d.ts.map +1 -0
- package/dist/typescript/lib/utils/serialize.d.ts +17 -0
- package/dist/typescript/lib/utils/serialize.d.ts.map +1 -0
- package/dist/typescript/lib/utils/typemap.d.ts +3 -0
- package/dist/typescript/lib/utils/typemap.d.ts.map +1 -0
- package/dist/typescript/lib/version.d.ts +2 -0
- package/dist/typescript/lib/version.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.android.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.android.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.d.ts +75 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.ios.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBFirestoreModule.ios.d.ts.map +1 -0
- package/dist/typescript/lib/web/convert.d.ts +14 -0
- package/dist/typescript/lib/web/convert.d.ts.map +1 -0
- package/dist/typescript/lib/web/pipelines/pipeline.d.ts +4 -0
- package/dist/typescript/lib/web/pipelines/pipeline.d.ts.map +1 -0
- package/dist/typescript/lib/web/pipelines/pipeline_bridge_factory.d.ts +5 -0
- package/dist/typescript/lib/web/pipelines/pipeline_bridge_factory.d.ts.map +1 -0
- package/dist/typescript/lib/web/pipelines/pipeline_node_builder.d.ts +5 -0
- package/dist/typescript/lib/web/pipelines/pipeline_node_builder.d.ts.map +1 -0
- package/dist/typescript/lib/web/pipelines/pipeline_parser.d.ts +3 -0
- package/dist/typescript/lib/web/pipelines/pipeline_parser.d.ts.map +1 -0
- package/dist/typescript/lib/web/pipelines/pipeline_snapshot_serializer.d.ts +4 -0
- package/dist/typescript/lib/web/pipelines/pipeline_snapshot_serializer.d.ts.map +1 -0
- package/dist/typescript/lib/web/query.d.ts +23 -0
- package/dist/typescript/lib/web/query.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/ios/RNFBFirestore/RNFBFirestoreCollectionModule.m +52 -2
- package/ios/RNFBFirestore/RNFBFirestorePipelineBridgeFactory.swift +384 -0
- package/ios/RNFBFirestore/RNFBFirestorePipelineCallHandler.swift +86 -0
- package/ios/RNFBFirestore/RNFBFirestorePipelineNodeBuilder.swift +1500 -0
- package/ios/RNFBFirestore/RNFBFirestorePipelineParser.swift +1352 -0
- package/ios/RNFBFirestore/RNFBFirestorePipelineSnapshotSerializer.swift +98 -0
- package/lib/{FirestoreFieldPath.js → FieldPath.ts} +10 -12
- package/lib/{FirestoreFieldValue.js → FieldValue.ts} +22 -19
- package/lib/FirestoreAggregate.ts +124 -0
- package/lib/FirestoreBlob.ts +73 -0
- package/lib/FirestoreCollectionReference.ts +99 -0
- package/lib/FirestoreDocumentChange.ts +71 -0
- package/lib/FirestoreDocumentReference.ts +310 -0
- package/lib/FirestoreDocumentSnapshot.ts +149 -0
- package/lib/FirestoreFilter.ts +232 -0
- package/lib/{FirestoreGeoPoint.js → FirestoreGeoPoint.ts} +48 -8
- package/lib/FirestorePath.ts +54 -0
- package/lib/FirestorePersistentCacheIndexManager.ts +46 -0
- package/lib/{FirestoreQuery.js → FirestoreQuery.ts} +208 -100
- package/lib/FirestoreQueryModifiers.ts +411 -0
- package/lib/{FirestoreQuerySnapshot.js → FirestoreQuerySnapshot.ts} +61 -32
- package/lib/{FirestoreSnapshotMetadata.js → FirestoreSnapshotMetadata.ts} +8 -6
- package/lib/{FirestoreStatics.js → FirestoreStatics.ts} +18 -11
- package/lib/FirestoreTimestamp.ts +161 -0
- package/lib/{FirestoreTransaction.js → FirestoreTransaction.ts} +64 -27
- package/lib/{FirestoreTransactionHandler.js → FirestoreTransactionHandler.ts} +54 -75
- package/lib/{FirestoreVectorValue.js → FirestoreVectorValue.ts} +36 -15
- package/lib/{FirestoreWriteBatch.js → FirestoreWriteBatch.ts} +45 -21
- package/lib/LoadBundleTask.ts +85 -0
- package/lib/index.ts +71 -0
- package/lib/modular/Bytes.ts +81 -0
- package/lib/modular/FieldPath.ts +24 -0
- package/lib/modular/FieldValue.ts +40 -0
- package/lib/modular/GeoPoint.ts +20 -0
- package/lib/modular/Timestamp.ts +20 -0
- package/lib/modular/VectorValue.ts +24 -0
- package/lib/modular/query.ts +368 -0
- package/lib/modular/snapshot.ts +137 -0
- package/lib/modular.ts +552 -0
- package/lib/{index.js → namespaced.ts} +170 -80
- package/lib/pipelines/expressions.ts +2321 -0
- package/lib/pipelines/index.ts +203 -0
- package/lib/pipelines/pipeline-result.ts +78 -0
- package/lib/pipelines/pipeline-source.ts +83 -0
- package/lib/pipelines/pipeline.ts +99 -0
- package/lib/pipelines/pipeline_impl.ts +46 -0
- package/lib/pipelines/pipeline_options.ts +32 -0
- package/lib/pipelines/pipeline_runtime.ts +863 -0
- package/lib/pipelines/pipeline_support.ts +134 -0
- package/lib/pipelines/pipeline_validate.ts +242 -0
- package/lib/pipelines/stage_options.ts +376 -0
- package/lib/pipelines/types.ts +26 -0
- package/lib/types/firestore.ts +477 -0
- package/lib/types/internal.ts +747 -0
- package/lib/{index.d.ts → types/namespaced.ts} +280 -79
- package/lib/utils/index.ts +244 -0
- package/lib/utils/serialize.ts +314 -0
- package/lib/utils/typemap.ts +65 -0
- package/lib/version.ts +2 -0
- package/lib/web/{RNFBFirestoreModule.js → RNFBFirestoreModule.ts} +222 -234
- package/lib/web/convert.ts +287 -0
- package/lib/web/pipelines/pipeline.ts +47 -0
- package/lib/web/pipelines/pipeline_bridge_factory.ts +377 -0
- package/lib/web/pipelines/pipeline_node_builder.ts +413 -0
- package/lib/web/pipelines/pipeline_parser.ts +23 -0
- package/lib/web/pipelines/pipeline_snapshot_serializer.ts +133 -0
- package/lib/web/query.ts +150 -0
- package/package.json +46 -7
- package/tsconfig.json +35 -0
- package/lib/FirestoreBlob.js +0 -107
- package/lib/FirestoreCollectionReference.js +0 -70
- package/lib/FirestoreDocumentReference.js +0 -222
- package/lib/FirestoreDocumentSnapshot.js +0 -132
- package/lib/FirestoreFilter.js +0 -156
- package/lib/modular/Bytes.d.ts +0 -11
- package/lib/modular/Bytes.js +0 -62
- package/lib/modular/FieldPath.d.ts +0 -20
- package/lib/modular/FieldPath.js +0 -7
- package/lib/modular/FieldValue.d.ts +0 -67
- package/lib/modular/FieldValue.js +0 -41
- package/lib/modular/GeoPoint.d.ts +0 -17
- package/lib/modular/GeoPoint.js +0 -3
- package/lib/modular/Timestamp.d.ts +0 -85
- package/lib/modular/Timestamp.js +0 -3
- package/lib/modular/VectorValue.d.ts +0 -30
- package/lib/modular/VectorValue.js +0 -11
- package/lib/modular/index.d.ts +0 -788
- package/lib/modular/index.js +0 -410
- package/lib/modular/query.d.ts +0 -370
- package/lib/modular/query.js +0 -233
- package/lib/modular/snapshot.d.ts +0 -256
- package/lib/modular/snapshot.js +0 -33
- package/lib/modular/utils/observer.js +0 -16
- package/lib/version.js +0 -2
- package/lib/web/query.js +0 -112
- /package/lib/web/{RNFBFirestoreModule.android.js → RNFBFirestoreModule.android.ts} +0 -0
- /package/lib/web/{RNFBFirestoreModule.ios.js → RNFBFirestoreModule.ios.ts} +0 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
19
|
+
import type { FieldPath } from '../modular/FieldPath';
|
|
20
|
+
import type { FieldValue } from '../modular/FieldValue';
|
|
21
|
+
import type { AggregateField } from '../FirestoreAggregate';
|
|
22
|
+
import type { sum, average, count } from '../modular';
|
|
23
|
+
|
|
24
|
+
// Canonical app/module aliases used by modular declarations.
|
|
25
|
+
export type FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
26
|
+
export declare class Firestore {
|
|
27
|
+
/**
|
|
28
|
+
* Whether it's a Firestore or Firestore Lite instance.
|
|
29
|
+
*/
|
|
30
|
+
type: 'firestore';
|
|
31
|
+
/**
|
|
32
|
+
* The FirebaseApp associated with this Firestore instance.
|
|
33
|
+
*/
|
|
34
|
+
get app(): FirebaseApp;
|
|
35
|
+
/**
|
|
36
|
+
* Returns a JSON-serializable representation of this Firestore instance.
|
|
37
|
+
*/
|
|
38
|
+
toJSON(): object;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type LogLevel = 'debug' | 'error' | 'silent';
|
|
42
|
+
// web/other platform only
|
|
43
|
+
export interface ExperimentalLongPollingOptions {
|
|
44
|
+
timeoutSeconds?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// web/other platform only
|
|
48
|
+
export interface PersistenceSettings {
|
|
49
|
+
forceOwnership?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// web/other platform only
|
|
53
|
+
export type MemoryLocalCache = {
|
|
54
|
+
kind: 'memory';
|
|
55
|
+
_onlineComponentProvider: unknown;
|
|
56
|
+
_offlineComponentProvider: unknown;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// web/other platform only
|
|
60
|
+
export type PersistentLocalCache = {
|
|
61
|
+
kind: 'persistent';
|
|
62
|
+
_onlineComponentProvider: unknown;
|
|
63
|
+
_offlineComponentProvider: unknown;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// web/other platform only
|
|
67
|
+
export type FirestoreLocalCache = MemoryLocalCache | PersistentLocalCache;
|
|
68
|
+
|
|
69
|
+
export interface FirestoreSettings {
|
|
70
|
+
host?: string;
|
|
71
|
+
ssl?: boolean;
|
|
72
|
+
ignoreUndefinedProperties?: boolean;
|
|
73
|
+
cacheSizeBytes?: number;
|
|
74
|
+
// web/other platform only
|
|
75
|
+
localCache?: FirestoreLocalCache;
|
|
76
|
+
// web/other platform only
|
|
77
|
+
experimentalForceLongPolling?: boolean;
|
|
78
|
+
// web/other platform only
|
|
79
|
+
experimentalAutoDetectLongPolling?: boolean;
|
|
80
|
+
// web/other platform only
|
|
81
|
+
experimentalLongPollingOptions?: ExperimentalLongPollingOptions;
|
|
82
|
+
// React Native native SDK-specific settings.
|
|
83
|
+
persistence?: boolean;
|
|
84
|
+
serverTimestampBehavior?: 'estimate' | 'previous' | 'none';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type AggregateType = 'count' | 'avg' | 'sum';
|
|
88
|
+
export type AggregateFieldType =
|
|
89
|
+
| ReturnType<typeof sum>
|
|
90
|
+
| ReturnType<typeof average>
|
|
91
|
+
| ReturnType<typeof count>;
|
|
92
|
+
export interface AggregateSpec {
|
|
93
|
+
[field: string]: AggregateFieldType;
|
|
94
|
+
}
|
|
95
|
+
export type AggregateSpecData<T extends AggregateSpec> = {
|
|
96
|
+
[P in keyof T]: T[P] extends AggregateField<infer U> ? U : never;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Provider identifier for Firebase Auth (from @firebase/util).
|
|
101
|
+
* Must match the union used by EmulatorMockTokenOptions / FirebaseIdToken.
|
|
102
|
+
*/
|
|
103
|
+
export type FirebaseSignInProvider =
|
|
104
|
+
| 'custom'
|
|
105
|
+
| 'email'
|
|
106
|
+
| 'password'
|
|
107
|
+
| 'phone'
|
|
108
|
+
| 'anonymous'
|
|
109
|
+
| 'google.com'
|
|
110
|
+
| 'facebook.com'
|
|
111
|
+
| 'github.com'
|
|
112
|
+
| 'twitter.com'
|
|
113
|
+
| 'microsoft.com'
|
|
114
|
+
| 'apple.com';
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Shape of a decoded Firebase ID token (JWT) used for emulator mock auth.
|
|
118
|
+
* @see https://firebase.google.com/docs/reference/js/auth#firebaseidtoken
|
|
119
|
+
*/
|
|
120
|
+
export interface FirebaseIdToken {
|
|
121
|
+
iss: string;
|
|
122
|
+
aud: string;
|
|
123
|
+
sub: string;
|
|
124
|
+
iat: number;
|
|
125
|
+
exp: number;
|
|
126
|
+
user_id: string;
|
|
127
|
+
auth_time: number;
|
|
128
|
+
provider_id?: 'anonymous';
|
|
129
|
+
email?: string;
|
|
130
|
+
email_verified?: boolean;
|
|
131
|
+
phone_number?: string;
|
|
132
|
+
name?: string;
|
|
133
|
+
picture?: string;
|
|
134
|
+
firebase: {
|
|
135
|
+
sign_in_provider: FirebaseSignInProvider;
|
|
136
|
+
identities?: { [provider in FirebaseSignInProvider]?: string[] };
|
|
137
|
+
};
|
|
138
|
+
[claim: string]: unknown;
|
|
139
|
+
uid?: never;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Options for mock auth token when using the Firestore emulator.
|
|
144
|
+
* Must include either `user_id` or `sub`; may include other partial ID token claims.
|
|
145
|
+
*/
|
|
146
|
+
export type EmulatorMockTokenOptions = ({ user_id: string } | { sub: string }) &
|
|
147
|
+
Partial<FirebaseIdToken>;
|
|
148
|
+
|
|
149
|
+
export type TaskState = 'Error' | 'Running' | 'Success';
|
|
150
|
+
|
|
151
|
+
export interface LoadBundleTaskProgress {
|
|
152
|
+
documentsLoaded: number;
|
|
153
|
+
totalDocuments: number;
|
|
154
|
+
bytesLoaded: number;
|
|
155
|
+
totalBytes: number;
|
|
156
|
+
taskState: TaskState;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export declare class LoadBundleTask implements PromiseLike<LoadBundleTaskProgress> {
|
|
160
|
+
onProgress(
|
|
161
|
+
next?: (progress: LoadBundleTaskProgress) => unknown,
|
|
162
|
+
error?: (err: Error) => unknown,
|
|
163
|
+
complete?: () => void,
|
|
164
|
+
): void;
|
|
165
|
+
catch<R>(onRejected: (a: Error) => R | PromiseLike<R>): Promise<R | LoadBundleTaskProgress>;
|
|
166
|
+
then<T, R>(
|
|
167
|
+
onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike<T>,
|
|
168
|
+
onRejected?: (a: Error) => R | PromiseLike<R>,
|
|
169
|
+
): Promise<T | R>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type SetOptions =
|
|
173
|
+
| {
|
|
174
|
+
readonly merge?: boolean;
|
|
175
|
+
}
|
|
176
|
+
| {
|
|
177
|
+
readonly mergeFields?: Array<string | FieldPath>;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export type WhereFilterOp =
|
|
181
|
+
| '<'
|
|
182
|
+
| '<='
|
|
183
|
+
| '=='
|
|
184
|
+
| '!='
|
|
185
|
+
| '>='
|
|
186
|
+
| '>'
|
|
187
|
+
| 'array-contains'
|
|
188
|
+
| 'in'
|
|
189
|
+
| 'array-contains-any'
|
|
190
|
+
| 'not-in';
|
|
191
|
+
|
|
192
|
+
export type OrderByDirection = 'desc' | 'asc';
|
|
193
|
+
|
|
194
|
+
export type QueryConstraintType =
|
|
195
|
+
| 'where'
|
|
196
|
+
| 'orderBy'
|
|
197
|
+
| 'limit'
|
|
198
|
+
| 'limitToLast'
|
|
199
|
+
| 'startAt'
|
|
200
|
+
| 'startAfter'
|
|
201
|
+
| 'endAt'
|
|
202
|
+
| 'endBefore';
|
|
203
|
+
|
|
204
|
+
export interface SnapshotListenOptions {
|
|
205
|
+
readonly includeMetadataChanges?: boolean;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Options that configure how data is retrieved from a `DocumentSnapshot` (for
|
|
210
|
+
* example the desired behavior for server timestamps that have not yet been set
|
|
211
|
+
* to their final value).
|
|
212
|
+
*/
|
|
213
|
+
export declare interface SnapshotOptions {
|
|
214
|
+
/**
|
|
215
|
+
* If set, controls the return value for server timestamps that have not yet
|
|
216
|
+
* been set to their final value.
|
|
217
|
+
*
|
|
218
|
+
* By specifying 'estimate', pending server timestamps return an estimate
|
|
219
|
+
* based on the local clock. This estimate will differ from the final value
|
|
220
|
+
* and cause these values to change once the server result becomes available.
|
|
221
|
+
*
|
|
222
|
+
* By specifying 'previous', pending timestamps will be ignored and return
|
|
223
|
+
* their previous value instead.
|
|
224
|
+
*
|
|
225
|
+
* If omitted or set to 'none', `null` will be returned by default until the
|
|
226
|
+
* server value becomes available.
|
|
227
|
+
*/
|
|
228
|
+
readonly serverTimestamps?: 'estimate' | 'previous' | 'none';
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export declare class SnapshotMetadata {
|
|
232
|
+
readonly fromCache: boolean;
|
|
233
|
+
readonly hasPendingWrites: boolean;
|
|
234
|
+
isEqual(other: SnapshotMetadata): boolean;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type DocumentChangeType = 'added' | 'removed' | 'modified';
|
|
238
|
+
|
|
239
|
+
export type FirestoreError = Error;
|
|
240
|
+
|
|
241
|
+
export interface Unsubscribe {
|
|
242
|
+
(): void;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface DocumentChange<
|
|
246
|
+
AppModelType = DocumentData,
|
|
247
|
+
DbModelType extends DocumentData = DocumentData,
|
|
248
|
+
> {
|
|
249
|
+
readonly type: DocumentChangeType;
|
|
250
|
+
readonly doc: QueryDocumentSnapshot<AppModelType, DbModelType>;
|
|
251
|
+
readonly oldIndex: number;
|
|
252
|
+
readonly newIndex: number;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Re-exported helpers mirrored from modular declarations.
|
|
256
|
+
export type Primitive = string | number | boolean | undefined | null;
|
|
257
|
+
|
|
258
|
+
export interface DocumentData {
|
|
259
|
+
[key: string]: any;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type PartialWithFieldValue<T> =
|
|
263
|
+
| Partial<T>
|
|
264
|
+
| (T extends Primitive
|
|
265
|
+
? T
|
|
266
|
+
: T extends {}
|
|
267
|
+
? { [K in keyof T]?: PartialWithFieldValue<T[K]> | FieldValue }
|
|
268
|
+
: never);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Given a union type `U = T1 | T2 | ...`, returns an intersected type
|
|
272
|
+
* `(T1 & T2 & ...)`.
|
|
273
|
+
*
|
|
274
|
+
* Uses distributive conditional types and inference from conditional types.
|
|
275
|
+
* This works because multiple candidates for the same type variable in
|
|
276
|
+
* contra-variant positions causes an intersection type to be inferred.
|
|
277
|
+
* https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-inference-in-conditional-types
|
|
278
|
+
* https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type
|
|
279
|
+
*/
|
|
280
|
+
export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (
|
|
281
|
+
k: infer I,
|
|
282
|
+
) => void
|
|
283
|
+
? I
|
|
284
|
+
: never;
|
|
285
|
+
|
|
286
|
+
export type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
|
|
287
|
+
// `string extends K` detects index signatures (e.g. `{[key: string]: bool}`).
|
|
288
|
+
// A field path like `foo.[string]` matches `foo.bar` or any sub-path, so we
|
|
289
|
+
// must widen to `any` to allow arbitrary sub-path property types.
|
|
290
|
+
[K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export type ChildUpdateFields<K extends string, V> =
|
|
294
|
+
V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
|
|
295
|
+
|
|
296
|
+
export type NestedUpdateFields<T extends {}> = UnionToIntersection<
|
|
297
|
+
{
|
|
298
|
+
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
299
|
+
}[keyof T & string]
|
|
300
|
+
>;
|
|
301
|
+
|
|
302
|
+
export type UpdateData<T> = T extends Primitive
|
|
303
|
+
? T
|
|
304
|
+
: T extends {}
|
|
305
|
+
? {
|
|
306
|
+
[K in keyof T]?: UpdateData<T[K]> | FieldValue;
|
|
307
|
+
} & NestedUpdateFields<T>
|
|
308
|
+
: Partial<T>;
|
|
309
|
+
|
|
310
|
+
export type WithFieldValue<T> =
|
|
311
|
+
| T
|
|
312
|
+
| (T extends Primitive
|
|
313
|
+
? T
|
|
314
|
+
: T extends {}
|
|
315
|
+
? { [K in keyof T]: WithFieldValue<T[K]> | FieldValue }
|
|
316
|
+
: never);
|
|
317
|
+
|
|
318
|
+
export interface FirestoreDataConverter<
|
|
319
|
+
AppModelType,
|
|
320
|
+
DbModelType extends DocumentData = DocumentData,
|
|
321
|
+
> {
|
|
322
|
+
toFirestore(modelObject: WithFieldValue<AppModelType>): WithFieldValue<DbModelType>;
|
|
323
|
+
toFirestore(
|
|
324
|
+
modelObject: PartialWithFieldValue<AppModelType>,
|
|
325
|
+
options: SetOptions,
|
|
326
|
+
): PartialWithFieldValue<DbModelType>;
|
|
327
|
+
fromFirestore(
|
|
328
|
+
snapshot: QueryDocumentSnapshot<DocumentData, DocumentData>,
|
|
329
|
+
options?: SnapshotOptions,
|
|
330
|
+
): AppModelType;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export declare class Query<
|
|
334
|
+
AppModelType = DocumentData,
|
|
335
|
+
DbModelType extends DocumentData = DocumentData,
|
|
336
|
+
> {
|
|
337
|
+
readonly converter: FirestoreDataConverter<AppModelType, DbModelType> | null;
|
|
338
|
+
readonly type: 'query' | 'collection';
|
|
339
|
+
readonly firestore: Firestore;
|
|
340
|
+
withConverter(converter: null): Query<DocumentData, DocumentData>;
|
|
341
|
+
withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(
|
|
342
|
+
converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>,
|
|
343
|
+
): Query<NewAppModelType, NewDbModelType>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export declare class CollectionReference<
|
|
347
|
+
AppModelType = DocumentData,
|
|
348
|
+
DbModelType extends DocumentData = DocumentData,
|
|
349
|
+
> extends Query<AppModelType, DbModelType> {
|
|
350
|
+
readonly type: 'collection';
|
|
351
|
+
id: string;
|
|
352
|
+
parent: DocumentReference<DocumentData, DocumentData> | null;
|
|
353
|
+
path: string;
|
|
354
|
+
withConverter(converter: null): CollectionReference<DocumentData, DocumentData>;
|
|
355
|
+
withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(
|
|
356
|
+
converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>,
|
|
357
|
+
): CollectionReference<NewAppModelType, NewDbModelType>;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export declare class DocumentReference<
|
|
361
|
+
AppModelType = DocumentData,
|
|
362
|
+
DbModelType extends DocumentData = DocumentData,
|
|
363
|
+
> {
|
|
364
|
+
readonly type: 'document';
|
|
365
|
+
firestore: Firestore;
|
|
366
|
+
converter: FirestoreDataConverter<AppModelType, DbModelType> | null;
|
|
367
|
+
id: string;
|
|
368
|
+
parent: CollectionReference<AppModelType, DbModelType>;
|
|
369
|
+
path: string;
|
|
370
|
+
withConverter(converter: null): DocumentReference<DocumentData, DocumentData>;
|
|
371
|
+
withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(
|
|
372
|
+
converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>,
|
|
373
|
+
): DocumentReference<NewAppModelType, NewDbModelType>;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export declare class WriteBatch {
|
|
377
|
+
set<AppModelType, DbModelType extends DocumentData>(
|
|
378
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
379
|
+
data: WithFieldValue<AppModelType>,
|
|
380
|
+
): WriteBatch;
|
|
381
|
+
set<AppModelType, DbModelType extends DocumentData>(
|
|
382
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
383
|
+
data: PartialWithFieldValue<AppModelType>,
|
|
384
|
+
options: SetOptions,
|
|
385
|
+
): WriteBatch;
|
|
386
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
387
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
388
|
+
data: UpdateData<DbModelType>,
|
|
389
|
+
): WriteBatch;
|
|
390
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
391
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
392
|
+
field: string | FieldPath,
|
|
393
|
+
value: unknown,
|
|
394
|
+
...moreFieldsAndValues: unknown[]
|
|
395
|
+
): WriteBatch;
|
|
396
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
397
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
398
|
+
fieldOrUpdateData: string | FieldPath | UpdateData<DbModelType>,
|
|
399
|
+
value?: unknown,
|
|
400
|
+
...moreFieldsAndValues: unknown[]
|
|
401
|
+
): WriteBatch;
|
|
402
|
+
delete<AppModelType, DbModelType extends DocumentData>(
|
|
403
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
404
|
+
): WriteBatch;
|
|
405
|
+
commit(): Promise<void>;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export declare class LiteTransaction {}
|
|
409
|
+
|
|
410
|
+
export declare class Transaction extends LiteTransaction {
|
|
411
|
+
get<AppModelType, DbModelType extends DocumentData>(
|
|
412
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
413
|
+
): Promise<DocumentSnapshot<AppModelType, DbModelType>>;
|
|
414
|
+
set<AppModelType, DbModelType extends DocumentData>(
|
|
415
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
416
|
+
data: WithFieldValue<AppModelType>,
|
|
417
|
+
): this;
|
|
418
|
+
set<AppModelType, DbModelType extends DocumentData>(
|
|
419
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
420
|
+
data: PartialWithFieldValue<AppModelType>,
|
|
421
|
+
options: SetOptions,
|
|
422
|
+
): this;
|
|
423
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
424
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
425
|
+
data: UpdateData<DbModelType>,
|
|
426
|
+
): this;
|
|
427
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
428
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
429
|
+
field: string | FieldPath,
|
|
430
|
+
value: unknown,
|
|
431
|
+
...moreFieldsAndValues: unknown[]
|
|
432
|
+
): this;
|
|
433
|
+
update<AppModelType, DbModelType extends DocumentData>(
|
|
434
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
435
|
+
fieldOrUpdateData: string | FieldPath | UpdateData<DbModelType>,
|
|
436
|
+
value?: unknown,
|
|
437
|
+
...moreFieldsAndValues: unknown[]
|
|
438
|
+
): this;
|
|
439
|
+
delete<AppModelType, DbModelType extends DocumentData>(
|
|
440
|
+
documentRef: DocumentReference<AppModelType, DbModelType>,
|
|
441
|
+
): this;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export declare class DocumentSnapshot<
|
|
445
|
+
AppModelType = DocumentData,
|
|
446
|
+
DbModelType extends DocumentData = DocumentData,
|
|
447
|
+
> {
|
|
448
|
+
readonly metadata: SnapshotMetadata;
|
|
449
|
+
exists(): this is QueryDocumentSnapshot<AppModelType, DbModelType>;
|
|
450
|
+
data(options?: SnapshotOptions): AppModelType | undefined;
|
|
451
|
+
get(fieldPath: string | FieldPath, options?: SnapshotOptions): any;
|
|
452
|
+
get id(): string;
|
|
453
|
+
get ref(): DocumentReference<AppModelType, DbModelType>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export declare class QueryDocumentSnapshot<
|
|
457
|
+
AppModelType = DocumentData,
|
|
458
|
+
DbModelType extends DocumentData = DocumentData,
|
|
459
|
+
> extends DocumentSnapshot<AppModelType, DbModelType> {
|
|
460
|
+
data(options?: SnapshotOptions): AppModelType;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export declare class QuerySnapshot<
|
|
464
|
+
AppModelType = DocumentData,
|
|
465
|
+
DbModelType extends DocumentData = DocumentData,
|
|
466
|
+
> {
|
|
467
|
+
readonly metadata: SnapshotMetadata;
|
|
468
|
+
readonly query: Query<AppModelType, DbModelType>;
|
|
469
|
+
get docs(): Array<QueryDocumentSnapshot<AppModelType, DbModelType>>;
|
|
470
|
+
get size(): number;
|
|
471
|
+
get empty(): boolean;
|
|
472
|
+
forEach(
|
|
473
|
+
callback: (result: QueryDocumentSnapshot<AppModelType, DbModelType>) => void,
|
|
474
|
+
thisArg?: unknown,
|
|
475
|
+
): void;
|
|
476
|
+
docChanges(options?: SnapshotListenOptions): Array<DocumentChange<AppModelType, DbModelType>>;
|
|
477
|
+
}
|