@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,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export class LoadBundleTask {
|
|
21
|
+
_progressObserver = {};
|
|
22
|
+
_lastProgress = {
|
|
23
|
+
taskState: 'Running',
|
|
24
|
+
totalBytes: 0,
|
|
25
|
+
totalDocuments: 0,
|
|
26
|
+
bytesLoaded: 0,
|
|
27
|
+
documentsLoaded: 0
|
|
28
|
+
};
|
|
29
|
+
constructor() {
|
|
30
|
+
this._completionPromise = new Promise((resolve, reject) => {
|
|
31
|
+
this._resolve = resolve;
|
|
32
|
+
this._reject = reject;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
onProgress(next, error, complete) {
|
|
36
|
+
this._progressObserver = {
|
|
37
|
+
next,
|
|
38
|
+
error,
|
|
39
|
+
complete
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch(onRejected) {
|
|
43
|
+
return this._completionPromise.catch(onRejected);
|
|
44
|
+
}
|
|
45
|
+
then(onFulfilled, onRejected) {
|
|
46
|
+
return this._completionPromise.then(onFulfilled, onRejected);
|
|
47
|
+
}
|
|
48
|
+
_completeWith(progress) {
|
|
49
|
+
this._updateProgress(progress);
|
|
50
|
+
this._progressObserver.complete?.();
|
|
51
|
+
this._resolve?.(progress);
|
|
52
|
+
}
|
|
53
|
+
_failWith(error) {
|
|
54
|
+
this._lastProgress = {
|
|
55
|
+
...this._lastProgress,
|
|
56
|
+
taskState: 'Error'
|
|
57
|
+
};
|
|
58
|
+
this._progressObserver.next?.(this._lastProgress);
|
|
59
|
+
this._progressObserver.error?.(error);
|
|
60
|
+
this._reject?.(error);
|
|
61
|
+
}
|
|
62
|
+
_updateProgress(progress) {
|
|
63
|
+
if (this._lastProgress.taskState !== 'Running') {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this._lastProgress = progress;
|
|
67
|
+
this._progressObserver.next?.(progress);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=LoadBundleTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LoadBundleTask","_progressObserver","_lastProgress","taskState","totalBytes","totalDocuments","bytesLoaded","documentsLoaded","constructor","_completionPromise","Promise","resolve","reject","_resolve","_reject","onProgress","next","error","complete","catch","onRejected","then","onFulfilled","_completeWith","progress","_updateProgress","_failWith"],"sourceRoot":"../../lib","sources":["LoadBundleTask.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMA,cAAc,CAAgD;EACjEC,iBAAiB,GAAqB,CAAC,CAAC;EAIxCC,aAAa,GAA2B;IAC9CC,SAAS,EAAE,SAAS;IACpBC,UAAU,EAAE,CAAC;IACbC,cAAc,EAAE,CAAC;IACjBC,WAAW,EAAE,CAAC;IACdC,eAAe,EAAE;EACnB,CAAC;EAEDC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,kBAAkB,GAAG,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACzD,IAAI,CAACC,QAAQ,GAAGF,OAAO;MACvB,IAAI,CAACG,OAAO,GAAGF,MAAM;IACvB,CAAC,CAAC;EACJ;EAEAG,UAAUA,CACRC,IAAoD,EACpDC,KAA+B,EAC/BC,QAAqB,EACf;IACN,IAAI,CAACjB,iBAAiB,GAAG;MAAEe,IAAI;MAAEC,KAAK;MAAEC;IAAS,CAAC;EACpD;EAEAC,KAAKA,CAAIC,UAA4C,EAAuC;IAC1F,OAAO,IAAI,CAACX,kBAAkB,CAACU,KAAK,CAACC,UAAU,CAAC;EAClD;EAEAC,IAAIA,CACFC,WAA+D,EAC/DF,UAA6C,EAC7B;IAChB,OAAO,IAAI,CAACX,kBAAkB,CAACY,IAAI,CAACC,WAAW,EAAEF,UAAU,CAAC;EAC9D;EAEAG,aAAaA,CAACC,QAAgC,EAAQ;IACpD,IAAI,CAACC,eAAe,CAACD,QAAQ,CAAC;IAC9B,IAAI,CAACvB,iBAAiB,CAACiB,QAAQ,GAAG,CAAC;IACnC,IAAI,CAACL,QAAQ,GAAGW,QAAQ,CAAC;EAC3B;EAEAE,SAASA,CAACT,KAAY,EAAQ;IAC5B,IAAI,CAACf,aAAa,GAAG;MAAE,GAAG,IAAI,CAACA,aAAa;MAAEC,SAAS,EAAE;IAAQ,CAAC;IAClE,IAAI,CAACF,iBAAiB,CAACe,IAAI,GAAG,IAAI,CAACd,aAAa,CAAC;IACjD,IAAI,CAACD,iBAAiB,CAACgB,KAAK,GAAGA,KAAK,CAAC;IACrC,IAAI,CAACH,OAAO,GAAGG,KAAK,CAAC;EACvB;EAEAQ,eAAeA,CAACD,QAAgC,EAAQ;IACtD,IAAI,IAAI,CAACtB,aAAa,CAACC,SAAS,KAAK,SAAS,EAAE;MAC9C;IACF;IACA,IAAI,CAACD,aAAa,GAAGsB,QAAQ;IAC7B,IAAI,CAACvB,iBAAiB,CAACe,IAAI,GAAGQ,QAAQ,CAAC;EACzC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
// Export modular API functions
|
|
21
|
+
export * from "./modular.js";
|
|
22
|
+
|
|
23
|
+
// Export modular/public type helpers.
|
|
24
|
+
// DocumentSnapshot, LoadBundleTask, QuerySnapshot, SnapshotMetadata, Transaction, WriteBatch
|
|
25
|
+
// are excluded here because they are already exported as values from './modular'.
|
|
26
|
+
|
|
27
|
+
// Export namespaced API
|
|
28
|
+
|
|
29
|
+
export * from "./namespaced.js";
|
|
30
|
+
export { default } from "./namespaced.js";
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../lib","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAW;;AAEzB;AACA;AACA;;AA4CA;;AAGA,cAAc,iBAAc;AAC5B,SAASA,OAAO,QAAQ,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import Blob from "../FirestoreBlob.js";
|
|
21
|
+
export class Bytes extends Blob {
|
|
22
|
+
constructor(blob) {
|
|
23
|
+
super(true);
|
|
24
|
+
// Binary string was already parsed and created; avoid reparsing.
|
|
25
|
+
this._binaryString = blob._binaryString;
|
|
26
|
+
}
|
|
27
|
+
static fromBase64String(base64) {
|
|
28
|
+
try {
|
|
29
|
+
return new Bytes(Blob.fromBase64String(base64));
|
|
30
|
+
} catch (error) {
|
|
31
|
+
throw new Error(`Failed to construct data from Base64 string: ${error}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
static fromUint8Array(array) {
|
|
35
|
+
return new Bytes(Blob.fromUint8Array(array));
|
|
36
|
+
}
|
|
37
|
+
toBase64() {
|
|
38
|
+
return super.toBase64();
|
|
39
|
+
}
|
|
40
|
+
toUint8Array() {
|
|
41
|
+
return super.toUint8Array();
|
|
42
|
+
}
|
|
43
|
+
toString() {
|
|
44
|
+
return `Bytes(base64: ${this.toBase64()})`;
|
|
45
|
+
}
|
|
46
|
+
isEqual(other) {
|
|
47
|
+
return super.isEqual(other);
|
|
48
|
+
}
|
|
49
|
+
static _jsonSchemaVersion = 'firestore/bytes/1.0';
|
|
50
|
+
static _jsonSchema = {
|
|
51
|
+
type: Bytes._jsonSchemaVersion,
|
|
52
|
+
bytes: 'string'
|
|
53
|
+
};
|
|
54
|
+
toJSON() {
|
|
55
|
+
return {
|
|
56
|
+
type: Bytes._jsonSchemaVersion,
|
|
57
|
+
bytes: this.toBase64()
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static fromJSON(json) {
|
|
61
|
+
if (json && typeof json.type === 'string' && json.type === Bytes._jsonSchemaVersion && typeof json.bytes === 'string') {
|
|
62
|
+
return Bytes.fromBase64String(json.bytes);
|
|
63
|
+
}
|
|
64
|
+
throw new Error('Unexpected error creating Bytes from JSON.');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=Bytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Blob","Bytes","constructor","blob","_binaryString","fromBase64String","base64","error","Error","fromUint8Array","array","toBase64","toUint8Array","toString","isEqual","other","_jsonSchemaVersion","_jsonSchema","type","bytes","toJSON","fromJSON","json"],"source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MAC9BG,KAAK,EAAE,IAAI,CAACR,QAAQ,CAAC;IACvB,CAAC;EACH;EAEA,OAAOU,QAAQA,CAACC,IAAY,EAAS;IACnC,IACEA,IAAI,IACJ,OAAQA,IAAI,CAAwBJ,IAAI,KAAK,QAAQ,IACpDI,IAAI,CAAuBJ,IAAI,KAAKjB,KAAK,CAACe,kBAAkB,IAC7D,OAAQM,IAAI,CAAyBH,KAAK,KAAK,QAAQ,EACvD;MACA,OAAOlB,KAAK,CAACI,gBAAgB,CAAEiB,IAAI,CAAuBH,KAAK,CAAC;IAClE;IAEA,MAAM,IAAIX,KAAK,CAAC,4CAA4C,CAAC;EAC/D;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import FieldPath, { DOCUMENT_ID } from "../FieldPath.js";
|
|
21
|
+
export { FieldPath };
|
|
22
|
+
export function documentId() {
|
|
23
|
+
return DOCUMENT_ID;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=FieldPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FieldPath","DOCUMENT_ID","documentId"],"sourceRoot":"../../../lib","sources":["modular/FieldPath.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,SAAS,IAAIC,WAAW,QAAQ,iBAAc;AAErD,SAASD,SAAS;AAElB,OAAO,SAASE,UAAUA,CAAA,EAAc;EACtC,OAAOD,WAAW;AACpB","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import FieldValue from "../FieldValue.js";
|
|
21
|
+
export { FieldValue };
|
|
22
|
+
export function deleteField() {
|
|
23
|
+
return FieldValue.delete();
|
|
24
|
+
}
|
|
25
|
+
export function serverTimestamp() {
|
|
26
|
+
return FieldValue.serverTimestamp();
|
|
27
|
+
}
|
|
28
|
+
export function arrayUnion(...elements) {
|
|
29
|
+
return FieldValue.arrayUnion(...elements);
|
|
30
|
+
}
|
|
31
|
+
export function arrayRemove(...elements) {
|
|
32
|
+
return FieldValue.arrayRemove(...elements);
|
|
33
|
+
}
|
|
34
|
+
export function increment(n) {
|
|
35
|
+
return FieldValue.increment(n);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=FieldValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FieldValue","deleteField","delete","serverTimestamp","arrayUnion","elements","arrayRemove","increment","n"],"sourceRoot":"../../../lib","sources":["modular/FieldValue.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,kBAAe;AAEtC,SAASA,UAAU;AAEnB,OAAO,SAASC,WAAWA,CAAA,EAAe;EACxC,OAAOD,UAAU,CAACE,MAAM,CAAC,CAAC;AAC5B;AAEA,OAAO,SAASC,eAAeA,CAAA,EAAe;EAC5C,OAAOH,UAAU,CAACG,eAAe,CAAC,CAAC;AACrC;AAEA,OAAO,SAASC,UAAUA,CAAC,GAAGC,QAAmB,EAAc;EAC7D,OAAOL,UAAU,CAACI,UAAU,CAAC,GAAGC,QAAQ,CAAC;AAC3C;AAEA,OAAO,SAASC,WAAWA,CAAC,GAAGD,QAAmB,EAAc;EAC9D,OAAOL,UAAU,CAACM,WAAW,CAAC,GAAGD,QAAQ,CAAC;AAC5C;AAEA,OAAO,SAASE,SAASA,CAACC,CAAS,EAAc;EAC/C,OAAOR,UAAU,CAACO,SAAS,CAACC,CAAC,CAAC;AAChC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import GeoPoint from "../FirestoreGeoPoint.js";
|
|
21
|
+
export { GeoPoint };
|
|
22
|
+
//# sourceMappingURL=GeoPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GeoPoint"],"sourceRoot":"../../../lib","sources":["modular/GeoPoint.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,QAAQ,MAAM,yBAAsB;AAE3C,SAASA,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import Timestamp from "../FirestoreTimestamp.js";
|
|
21
|
+
export { Timestamp };
|
|
22
|
+
//# sourceMappingURL=Timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Timestamp"],"sourceRoot":"../../../lib","sources":["modular/Timestamp.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,SAAS,MAAM,0BAAuB;AAE7C,SAASA,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import VectorValue from "../FirestoreVectorValue.js";
|
|
21
|
+
export { VectorValue };
|
|
22
|
+
export function vector(values) {
|
|
23
|
+
return new VectorValue(values);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=VectorValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VectorValue","vector","values"],"sourceRoot":"../../../lib","sources":["modular/VectorValue.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,WAAW,MAAM,4BAAyB;AAEjD,SAASA,WAAW;AAEpB,OAAO,SAASC,MAAMA,CAACC,MAAiB,EAAe;EACrD,OAAO,IAAIF,WAAW,CAACE,MAAM,CAAC;AAChC","ignoreList":[]}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
|
|
21
|
+
import { Filter } from "../FirestoreFilter.js";
|
|
22
|
+
/**
|
|
23
|
+
* Abstraction of a constraint that can be applied to a Firestore query.
|
|
24
|
+
* Not exported — public API matches firebase-js-sdk ({@link QueryConstraint} only).
|
|
25
|
+
*/
|
|
26
|
+
class AppliableConstraint {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
30
|
+
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
31
|
+
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link endBefore},
|
|
32
|
+
* {@link endAt}, {@link limit}, {@link limitToLast} and can then be passed to
|
|
33
|
+
* {@link query} to create a new query instance that also contains this `QueryConstraint`.
|
|
34
|
+
*/
|
|
35
|
+
export class QueryConstraint extends AppliableConstraint {
|
|
36
|
+
_apply(_queryRef) {
|
|
37
|
+
throw new Error('_apply must be implemented by subclass');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Shared _apply for orderBy/limit/startAt/endAt/where. Not exported — implementation detail.
|
|
43
|
+
*/
|
|
44
|
+
class QueryConstraintBase extends QueryConstraint {
|
|
45
|
+
constructor(...args) {
|
|
46
|
+
super();
|
|
47
|
+
this._args = args;
|
|
48
|
+
}
|
|
49
|
+
_apply(query) {
|
|
50
|
+
const method = query[this.type];
|
|
51
|
+
if (!method) {
|
|
52
|
+
throw new Error(`Query method '${this.type}' is not available on query instance.`);
|
|
53
|
+
}
|
|
54
|
+
return method.call(query, ...this._args, MODULAR_DEPRECATION_ARG);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class QueryCompositeFilterConstraint extends AppliableConstraint {
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
constructor(/** The type of this query constraint */
|
|
62
|
+
type, _queryConstraints) {
|
|
63
|
+
super();
|
|
64
|
+
this.type = type;
|
|
65
|
+
this._queryConstraints = _queryConstraints;
|
|
66
|
+
}
|
|
67
|
+
static _create(type, _queryConstraints) {
|
|
68
|
+
// Validate nested OR filters when creating the constraint
|
|
69
|
+
if (type === 'or') {
|
|
70
|
+
const filters = _queryConstraints.map(constraint => {
|
|
71
|
+
if (constraint instanceof QueryCompositeFilterConstraint) {
|
|
72
|
+
return constraint._filter;
|
|
73
|
+
}
|
|
74
|
+
return constraint._filter;
|
|
75
|
+
});
|
|
76
|
+
// This will throw if nested OR filters are detected
|
|
77
|
+
Filter.or(...filters);
|
|
78
|
+
}
|
|
79
|
+
return new QueryCompositeFilterConstraint(type, _queryConstraints);
|
|
80
|
+
}
|
|
81
|
+
_apply(query) {
|
|
82
|
+
const filters = this._queryConstraints.map(constraint => {
|
|
83
|
+
if (constraint instanceof QueryCompositeFilterConstraint) {
|
|
84
|
+
return constraint._filter;
|
|
85
|
+
}
|
|
86
|
+
return constraint._filter;
|
|
87
|
+
});
|
|
88
|
+
const _filter = this.type === 'or' ? Filter.or(...filters) : Filter.and(...filters);
|
|
89
|
+
const where = query.where;
|
|
90
|
+
return where.call(query, _filter, MODULAR_DEPRECATION_ARG);
|
|
91
|
+
}
|
|
92
|
+
get _filter() {
|
|
93
|
+
const filters = this._queryConstraints.map(constraint => {
|
|
94
|
+
if (constraint instanceof QueryCompositeFilterConstraint) {
|
|
95
|
+
return constraint._filter;
|
|
96
|
+
}
|
|
97
|
+
return constraint._filter;
|
|
98
|
+
});
|
|
99
|
+
return this.type === 'or' ? Filter.or(...filters) : Filter.and(...filters);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export class QueryOrderByConstraint extends QueryConstraintBase {
|
|
103
|
+
type = 'orderBy';
|
|
104
|
+
constructor(fieldPath, directionStr) {
|
|
105
|
+
super(fieldPath, directionStr);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
export class QueryLimitConstraint extends QueryConstraintBase {
|
|
109
|
+
constructor(type, limitValue) {
|
|
110
|
+
super(limitValue);
|
|
111
|
+
this.type = type;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export class QueryStartAtConstraint extends QueryConstraintBase {
|
|
115
|
+
constructor(type, ...docOrFields) {
|
|
116
|
+
super(...docOrFields);
|
|
117
|
+
this.type = type;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export class QueryEndAtConstraint extends QueryConstraintBase {
|
|
121
|
+
constructor(type, ...fieldValues) {
|
|
122
|
+
super(...fieldValues);
|
|
123
|
+
this.type = type;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export class QueryFieldFilterConstraint extends QueryConstraintBase {
|
|
127
|
+
type = 'where';
|
|
128
|
+
constructor(fieldPath, opStr, value) {
|
|
129
|
+
super(fieldPath, opStr, value);
|
|
130
|
+
this._filter = Filter(fieldPath, opStr, value);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export function query(queryRef, queryConstraint, ...additionalQueryConstraints) {
|
|
134
|
+
let queryConstraints = [];
|
|
135
|
+
if (queryConstraint instanceof AppliableConstraint) {
|
|
136
|
+
queryConstraints.push(queryConstraint);
|
|
137
|
+
}
|
|
138
|
+
queryConstraints = queryConstraints.concat(additionalQueryConstraints);
|
|
139
|
+
let constrainedQuery = queryRef;
|
|
140
|
+
for (const constraint of queryConstraints) {
|
|
141
|
+
if (!constraint) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
constrainedQuery = constraint._apply(constrainedQuery);
|
|
145
|
+
}
|
|
146
|
+
return constrainedQuery;
|
|
147
|
+
}
|
|
148
|
+
export function where(fieldPath, opStr, value) {
|
|
149
|
+
return new QueryFieldFilterConstraint(fieldPath, opStr, value);
|
|
150
|
+
}
|
|
151
|
+
export function or(...queryConstraints) {
|
|
152
|
+
return QueryCompositeFilterConstraint._create('or', queryConstraints);
|
|
153
|
+
}
|
|
154
|
+
export function and(...queryConstraints) {
|
|
155
|
+
return QueryCompositeFilterConstraint._create('and', queryConstraints);
|
|
156
|
+
}
|
|
157
|
+
export function orderBy(fieldPath, directionStr) {
|
|
158
|
+
return new QueryOrderByConstraint(fieldPath, directionStr);
|
|
159
|
+
}
|
|
160
|
+
export function startAt(...docOrFields) {
|
|
161
|
+
return new QueryStartAtConstraint('startAt', ...docOrFields);
|
|
162
|
+
}
|
|
163
|
+
export function startAfter(...docOrFields) {
|
|
164
|
+
return new QueryStartAtConstraint('startAfter', ...docOrFields);
|
|
165
|
+
}
|
|
166
|
+
export function endAt(...args) {
|
|
167
|
+
return new QueryEndAtConstraint('endAt', ...args);
|
|
168
|
+
}
|
|
169
|
+
export function endBefore(...fieldValues) {
|
|
170
|
+
return new QueryEndAtConstraint('endBefore', ...fieldValues);
|
|
171
|
+
}
|
|
172
|
+
export function limit(limitValue) {
|
|
173
|
+
return new QueryLimitConstraint('limit', limitValue);
|
|
174
|
+
}
|
|
175
|
+
export function limitToLast(limitValue) {
|
|
176
|
+
return new QueryLimitConstraint('limitToLast', limitValue);
|
|
177
|
+
}
|
|
178
|
+
export function getDoc(reference) {
|
|
179
|
+
const get = reference.get;
|
|
180
|
+
return get.call(reference, {
|
|
181
|
+
source: 'default'
|
|
182
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
183
|
+
}
|
|
184
|
+
export function getDocFromCache(reference) {
|
|
185
|
+
const get = reference.get;
|
|
186
|
+
return get.call(reference, {
|
|
187
|
+
source: 'cache'
|
|
188
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
189
|
+
}
|
|
190
|
+
export function getDocFromServer(reference) {
|
|
191
|
+
const get = reference.get;
|
|
192
|
+
return get.call(reference, {
|
|
193
|
+
source: 'server'
|
|
194
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
195
|
+
}
|
|
196
|
+
export function getDocs(queryRef) {
|
|
197
|
+
const get = queryRef.get;
|
|
198
|
+
return get.call(queryRef, {
|
|
199
|
+
source: 'default'
|
|
200
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
201
|
+
}
|
|
202
|
+
export function getDocsFromCache(queryRef) {
|
|
203
|
+
const get = queryRef.get;
|
|
204
|
+
return get.call(queryRef, {
|
|
205
|
+
source: 'cache'
|
|
206
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
207
|
+
}
|
|
208
|
+
export function getDocsFromServer(queryRef) {
|
|
209
|
+
const get = queryRef.get;
|
|
210
|
+
return get.call(queryRef, {
|
|
211
|
+
source: 'server'
|
|
212
|
+
}, MODULAR_DEPRECATION_ARG);
|
|
213
|
+
}
|
|
214
|
+
export function deleteDoc(reference) {
|
|
215
|
+
const remove = reference.delete;
|
|
216
|
+
return remove.call(reference, MODULAR_DEPRECATION_ARG);
|
|
217
|
+
}
|
|
218
|
+
export function queryEqual(left, right) {
|
|
219
|
+
const isEqual = left.isEqual;
|
|
220
|
+
return isEqual.call(left, right, MODULAR_DEPRECATION_ARG);
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MODULAR_DEPRECATION_ARG","Filter","AppliableConstraint","QueryConstraint","_apply","_queryRef","Error","QueryConstraintBase","constructor","args","_args","query","method","type","call","QueryCompositeFilterConstraint","_queryConstraints","_create","filters","map","constraint","_filter","or","and","where","QueryOrderByConstraint","fieldPath","directionStr","QueryLimitConstraint","limitValue","QueryStartAtConstraint","docOrFields","QueryEndAtConstraint","fieldValues","QueryFieldFilterConstraint","opStr","value","queryRef","queryConstraint","additionalQueryConstraints","queryConstraints","push","concat","constrainedQuery","orderBy","startAt","startAfter","endAt","endBefore","limit","limitToLast","getDoc","reference","get","source","getDocFromCache","getDocFromServer","getDocs","getDocsFromCache","getDocsFromServer","deleteDoc","remove","delete","queryEqual","left","right","isEqual"],"sourceRoot":"../../../lib","sources":["modular/query.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,uBAAuB,QAAQ,+CAA+C;AACvF,SAAkBC,MAAM,QAAQ,uBAAoB;AAsBpD;AACA;AACA;AACA;AACA,MAAeC,mBAAmB,CAAC;;AAMnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAeC,eAAe,SAASD,mBAAmB,CAAC;EAGhEE,MAAMA,CACJC,SAA2C,EACT;IAClC,MAAM,IAAIC,KAAK,CAAC,wCAAwC,CAAC;EAC3D;AACF;;AAEA;AACA;AACA;AACA,MAAeC,mBAAmB,SAASJ,eAAe,CAAC;EAI/CK,WAAWA,CAAC,GAAGC,IAAe,EAAE;IACxC,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,KAAK,GAAGD,IAAI;EACnB;EAEAL,MAAMA,CACJO,KAAuC,EACL;IAClC,MAAMC,MAAM,GAAID,KAAK,CACnB,IAAI,CAACE,IAAI,CACV;IACD,IAAI,CAACD,MAAM,EAAE;MACX,MAAM,IAAIN,KAAK,CAAC,iBAAiB,IAAI,CAACO,IAAI,uCAAuC,CAAC;IACpF;IACA,OAAOD,MAAM,CAACE,IAAI,CAACH,KAAK,EAAE,GAAG,IAAI,CAACD,KAAK,EAAEV,uBAA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
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
|
|
21
|
+
export { default as DocumentSnapshot } from "../FirestoreDocumentSnapshot.js";
|
|
22
|
+
export { default as QuerySnapshot } from "../FirestoreQuerySnapshot.js";
|
|
23
|
+
export { default as SnapshotMetadata } from "../FirestoreSnapshotMetadata.js";
|
|
24
|
+
export function onSnapshot(reference, ...args) {
|
|
25
|
+
const onSnapshotMethod = reference.onSnapshot;
|
|
26
|
+
return onSnapshotMethod.call(reference, ...args, MODULAR_DEPRECATION_ARG);
|
|
27
|
+
}
|
|
28
|
+
export function snapshotEqual(left, right) {
|
|
29
|
+
const isEqual = left.isEqual;
|
|
30
|
+
return isEqual.call(left, right, MODULAR_DEPRECATION_ARG);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MODULAR_DEPRECATION_ARG","default","DocumentSnapshot","QuerySnapshot","SnapshotMetadata","onSnapshot","reference","args","onSnapshotMethod","call","snapshotEqual","left","right","isEqual"],"sourceRoot":"../../../lib","sources":["modular/snapshot.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,uBAAuB,QAAQ,+CAA+C;AAavF,SAASC,OAAO,IAAIC,gBAAgB,QAAQ,iCAA8B;AAC1E,SAASD,OAAO,IAAIE,aAAa,QAAQ,8BAA2B;AACpE,SAASF,OAAO,IAAIG,gBAAgB,QAAQ,iCAA8B;AAsF1E,OAAO,SAASC,UAAUA,CAIxBC,SAA0F,EAC1F,GAAGC,IAAe,EACL;EACb,MAAMC,gBAAgB,GAAIF,SAAS,CAAgDD,UAAU;EAE7F,OAAOG,gBAAgB,CAACC,IAAI,CAACH,SAAS,EAAE,GAAGC,IAAI,EAAEP,uBAAuB,CAAC;AAC3E;AAEA,OAAO,SAASU,aAAaA,CAC3BC,IAA4F,EAC5FC,KAA6F,EACpF;EACT,MAAMC,OAAO,GAAIF,IAAI,CAAyCE,OAAO;EACrE,OAAOA,OAAO,CAACJ,IAAI,CAACE,IAAI,EAAEC,KAAK,EAAEZ,uBAAuB,CAAC;AAC3D","ignoreList":[]}
|