@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,203 @@
|
|
|
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 { PipelineSource } from './pipeline-source';
|
|
19
|
+
import type { Pipeline } from './pipeline';
|
|
20
|
+
import { installPipelineRuntime, registerPipelineRuntimeInstaller } from './pipeline_runtime';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @beta
|
|
24
|
+
* Pipeline type for Firestore pipelines API.
|
|
25
|
+
*/
|
|
26
|
+
export type { PipelineResult, PipelineSnapshot } from './pipeline-result';
|
|
27
|
+
export type { Pipeline } from './pipeline';
|
|
28
|
+
export type { PipelineSource } from './pipeline-source';
|
|
29
|
+
|
|
30
|
+
export type {
|
|
31
|
+
BooleanExpression,
|
|
32
|
+
Selectable,
|
|
33
|
+
Field,
|
|
34
|
+
Expression,
|
|
35
|
+
FunctionExpression,
|
|
36
|
+
AggregateFunction,
|
|
37
|
+
ExpressionType,
|
|
38
|
+
Type,
|
|
39
|
+
TimeGranularity,
|
|
40
|
+
AliasedAggregate,
|
|
41
|
+
AliasedExpression,
|
|
42
|
+
} from './expressions';
|
|
43
|
+
export type {
|
|
44
|
+
StageOptions,
|
|
45
|
+
AddFieldsStageOptions,
|
|
46
|
+
AggregateStageOptions,
|
|
47
|
+
CollectionGroupStageOptions,
|
|
48
|
+
CollectionStageOptions,
|
|
49
|
+
DatabaseStageOptions,
|
|
50
|
+
DistinctStageOptions,
|
|
51
|
+
DocumentsStageOptions,
|
|
52
|
+
FindNearestStageOptions,
|
|
53
|
+
LimitStageOptions,
|
|
54
|
+
OffsetStageOptions,
|
|
55
|
+
RemoveFieldsStageOptions,
|
|
56
|
+
ReplaceWithStageOptions,
|
|
57
|
+
SampleStageOptions,
|
|
58
|
+
SelectStageOptions,
|
|
59
|
+
SortStageOptions,
|
|
60
|
+
UnionStageOptions,
|
|
61
|
+
UnnestStageOptions,
|
|
62
|
+
WhereStageOptions,
|
|
63
|
+
} from './stage_options';
|
|
64
|
+
export type { PipelineExecuteOptions } from './pipeline_options';
|
|
65
|
+
export type { OneOf } from './types';
|
|
66
|
+
|
|
67
|
+
export { execute } from './pipeline_impl';
|
|
68
|
+
export {
|
|
69
|
+
field,
|
|
70
|
+
and,
|
|
71
|
+
or,
|
|
72
|
+
greaterThan,
|
|
73
|
+
equal,
|
|
74
|
+
notEqual,
|
|
75
|
+
greaterThanOrEqual,
|
|
76
|
+
lessThan,
|
|
77
|
+
lessThanOrEqual,
|
|
78
|
+
exists,
|
|
79
|
+
arrayContains,
|
|
80
|
+
arrayContainsAny,
|
|
81
|
+
arrayContainsAll,
|
|
82
|
+
startsWith,
|
|
83
|
+
endsWith,
|
|
84
|
+
OrderingHelper as Ordering,
|
|
85
|
+
ascending,
|
|
86
|
+
descending,
|
|
87
|
+
countAll,
|
|
88
|
+
map,
|
|
89
|
+
array,
|
|
90
|
+
constant,
|
|
91
|
+
add,
|
|
92
|
+
subtract,
|
|
93
|
+
divide,
|
|
94
|
+
multiply,
|
|
95
|
+
documentId,
|
|
96
|
+
sum,
|
|
97
|
+
count,
|
|
98
|
+
average,
|
|
99
|
+
abs,
|
|
100
|
+
ceil,
|
|
101
|
+
floor,
|
|
102
|
+
mod,
|
|
103
|
+
round,
|
|
104
|
+
conditional,
|
|
105
|
+
countDistinct,
|
|
106
|
+
first,
|
|
107
|
+
last,
|
|
108
|
+
arrayAgg,
|
|
109
|
+
concat,
|
|
110
|
+
sqrt,
|
|
111
|
+
currentTimestamp,
|
|
112
|
+
not,
|
|
113
|
+
ifAbsent,
|
|
114
|
+
ifError,
|
|
115
|
+
toLower,
|
|
116
|
+
toUpper,
|
|
117
|
+
trim,
|
|
118
|
+
substring,
|
|
119
|
+
arrayAggDistinct,
|
|
120
|
+
arrayConcat,
|
|
121
|
+
arrayGet,
|
|
122
|
+
arrayLength,
|
|
123
|
+
arraySum,
|
|
124
|
+
byteLength,
|
|
125
|
+
charLength,
|
|
126
|
+
collectionId,
|
|
127
|
+
countIf,
|
|
128
|
+
exp,
|
|
129
|
+
join,
|
|
130
|
+
like,
|
|
131
|
+
ln,
|
|
132
|
+
log,
|
|
133
|
+
log10,
|
|
134
|
+
maximum,
|
|
135
|
+
minimum,
|
|
136
|
+
pow,
|
|
137
|
+
reverse,
|
|
138
|
+
split,
|
|
139
|
+
cosineDistance,
|
|
140
|
+
dotProduct,
|
|
141
|
+
equalAny,
|
|
142
|
+
euclideanDistance,
|
|
143
|
+
isAbsent,
|
|
144
|
+
isError,
|
|
145
|
+
isType,
|
|
146
|
+
logicalMaximum,
|
|
147
|
+
logicalMinimum,
|
|
148
|
+
ltrim,
|
|
149
|
+
notEqualAny,
|
|
150
|
+
rand,
|
|
151
|
+
rtrim,
|
|
152
|
+
stringConcat,
|
|
153
|
+
mapEntries,
|
|
154
|
+
mapGet,
|
|
155
|
+
mapKeys,
|
|
156
|
+
mapMerge,
|
|
157
|
+
mapRemove,
|
|
158
|
+
mapSet,
|
|
159
|
+
mapValues,
|
|
160
|
+
regexContains,
|
|
161
|
+
regexFind,
|
|
162
|
+
regexFindAll,
|
|
163
|
+
regexMatch,
|
|
164
|
+
stringContains,
|
|
165
|
+
stringIndexOf,
|
|
166
|
+
stringRepeat,
|
|
167
|
+
stringReplaceAll,
|
|
168
|
+
stringReplaceOne,
|
|
169
|
+
stringReverse,
|
|
170
|
+
timestampAdd,
|
|
171
|
+
timestampSubtract,
|
|
172
|
+
timestampToUnixMicros,
|
|
173
|
+
timestampToUnixMillis,
|
|
174
|
+
timestampToUnixSeconds,
|
|
175
|
+
timestampTruncate,
|
|
176
|
+
trunc,
|
|
177
|
+
type,
|
|
178
|
+
unixMicrosToTimestamp,
|
|
179
|
+
unixMillisToTimestamp,
|
|
180
|
+
unixSecondsToTimestamp,
|
|
181
|
+
vectorLength,
|
|
182
|
+
xor,
|
|
183
|
+
length,
|
|
184
|
+
} from './expressions';
|
|
185
|
+
export { pipelineResultEqual } from './pipeline-result';
|
|
186
|
+
|
|
187
|
+
registerPipelineRuntimeInstaller();
|
|
188
|
+
installPipelineRuntime();
|
|
189
|
+
|
|
190
|
+
declare module '../types/firestore' {
|
|
191
|
+
/**
|
|
192
|
+
* @beta
|
|
193
|
+
* Creates and returns a new PipelineSource, which allows specifying the source stage of a `Pipeline`.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```
|
|
197
|
+
* const myPipeline = firestore.pipeline().collection('books');
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
interface Firestore {
|
|
201
|
+
pipeline(): PipelineSource<Pipeline>;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { DocumentData, DocumentReference } from '../types/firestore';
|
|
19
|
+
import type Timestamp from '../FirestoreTimestamp';
|
|
20
|
+
import type { FieldPath } from '../modular/FieldPath';
|
|
21
|
+
import type { Field } from './expressions';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @beta
|
|
25
|
+
* Result of running a pipeline. One per document (or per group with aggregation, or single for global aggregation).
|
|
26
|
+
*/
|
|
27
|
+
export interface PipelineResult<T = DocumentData> {
|
|
28
|
+
data(): T;
|
|
29
|
+
get(fieldPath: string | FieldPath | Field): unknown;
|
|
30
|
+
readonly ref?: DocumentReference;
|
|
31
|
+
readonly id?: string;
|
|
32
|
+
readonly createTime?: Timestamp;
|
|
33
|
+
readonly updateTime?: Timestamp;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @beta
|
|
38
|
+
* Snapshot returned from `execute(pipeline)`.
|
|
39
|
+
*/
|
|
40
|
+
export interface PipelineSnapshot<T = DocumentData> {
|
|
41
|
+
readonly results: PipelineResult<T>[];
|
|
42
|
+
readonly executionTime: Timestamp;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @beta
|
|
47
|
+
* Compares two pipeline results for equality.
|
|
48
|
+
*/
|
|
49
|
+
export function pipelineResultEqual(left: PipelineResult, right: PipelineResult): boolean {
|
|
50
|
+
if (left === right) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const leftRefPath = left.ref?.path;
|
|
55
|
+
const rightRefPath = right.ref?.path;
|
|
56
|
+
|
|
57
|
+
if (leftRefPath !== rightRefPath) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (left.id !== right.id) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const leftCreateTime = left.createTime?.toMillis();
|
|
66
|
+
const rightCreateTime = right.createTime?.toMillis();
|
|
67
|
+
if (leftCreateTime !== rightCreateTime) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const leftUpdateTime = left.updateTime?.toMillis();
|
|
72
|
+
const rightUpdateTime = right.updateTime?.toMillis();
|
|
73
|
+
if (leftUpdateTime !== rightUpdateTime) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return JSON.stringify(left.data()) === JSON.stringify(right.data());
|
|
78
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { CollectionReference, DocumentReference, Query } from '../types/firestore';
|
|
19
|
+
import type { Pipeline } from './pipeline';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* Source stage options for collection.
|
|
24
|
+
*
|
|
25
|
+
* Note: `rawOptions` are currently applied on Android and web only. iOS rejects them because the
|
|
26
|
+
* native Firestore pipeline SDK does not yet expose collection source options.
|
|
27
|
+
*/
|
|
28
|
+
export interface PipelineCollectionSourceOptions {
|
|
29
|
+
path?: string;
|
|
30
|
+
collectionRef?: CollectionReference;
|
|
31
|
+
rawOptions?: { [name: string]: unknown };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @beta
|
|
36
|
+
* Source stage options for collectionGroup.
|
|
37
|
+
*
|
|
38
|
+
* Note: `rawOptions` are currently applied on Android and web only. iOS rejects them because the
|
|
39
|
+
* native Firestore pipeline SDK does not yet expose collection group source options.
|
|
40
|
+
*/
|
|
41
|
+
export interface PipelineCollectionGroupSourceOptions {
|
|
42
|
+
collectionId?: string;
|
|
43
|
+
rawOptions?: { [name: string]: unknown };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @beta
|
|
48
|
+
* Source stage options for database.
|
|
49
|
+
*
|
|
50
|
+
* Note: `rawOptions` are currently applied on Android and web only. iOS rejects them because the
|
|
51
|
+
* native Firestore pipeline SDK does not yet expose database source options.
|
|
52
|
+
*/
|
|
53
|
+
export interface PipelineDatabaseSourceOptions {
|
|
54
|
+
rawOptions?: { [name: string]: unknown };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @beta
|
|
59
|
+
* Source stage options for documents.
|
|
60
|
+
*/
|
|
61
|
+
export interface PipelineDocumentsSourceOptions {
|
|
62
|
+
docs?: Array<string | DocumentReference>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @beta
|
|
67
|
+
* PipelineSource defines the input for a pipeline. Call exactly one of collection, collectionGroup, database, documents, or createFrom.
|
|
68
|
+
*/
|
|
69
|
+
export interface PipelineSource<TPipeline extends Pipeline = Pipeline> {
|
|
70
|
+
collection(path: string): TPipeline;
|
|
71
|
+
collection(collectionRef: CollectionReference): TPipeline;
|
|
72
|
+
collection(options: PipelineCollectionSourceOptions): TPipeline;
|
|
73
|
+
|
|
74
|
+
collectionGroup(collectionId: string): TPipeline;
|
|
75
|
+
collectionGroup(options: PipelineCollectionGroupSourceOptions): TPipeline;
|
|
76
|
+
|
|
77
|
+
database(options?: PipelineDatabaseSourceOptions): TPipeline;
|
|
78
|
+
|
|
79
|
+
documents(docs: Array<string | DocumentReference>): TPipeline;
|
|
80
|
+
documents(options: PipelineDocumentsSourceOptions): TPipeline;
|
|
81
|
+
|
|
82
|
+
createFrom(query: Query): TPipeline;
|
|
83
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 {
|
|
19
|
+
PipelineAggregateOptions,
|
|
20
|
+
PipelineDistinctOptions,
|
|
21
|
+
PipelineFindNearestOptions,
|
|
22
|
+
PipelineReplaceWithOptions,
|
|
23
|
+
PipelineSampleOptions,
|
|
24
|
+
PipelineUnionOptions,
|
|
25
|
+
PipelineUnnestOptions,
|
|
26
|
+
PipelineRawStageOptions,
|
|
27
|
+
} from './stage_options';
|
|
28
|
+
import type {
|
|
29
|
+
BooleanExpression,
|
|
30
|
+
Selectable,
|
|
31
|
+
Field,
|
|
32
|
+
Ordering,
|
|
33
|
+
AliasedAggregate,
|
|
34
|
+
} from './expressions';
|
|
35
|
+
import type { DocumentData } from '../types/firestore';
|
|
36
|
+
import type { FirestorePipelineSerializedInternal } from '../types/internal';
|
|
37
|
+
|
|
38
|
+
/** @internal Serialized pipeline payload shape forwarded to native/web executors. */
|
|
39
|
+
export type SerializedPipeline = FirestorePipelineSerializedInternal;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @beta
|
|
43
|
+
* Pipeline with chained stages. Each stage returns a new Pipeline (immutable chain).
|
|
44
|
+
*/
|
|
45
|
+
export interface Pipeline<T = DocumentData> {
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* Serializes the source + stage chain to the wire format.
|
|
49
|
+
*/
|
|
50
|
+
serialize(): SerializedPipeline;
|
|
51
|
+
|
|
52
|
+
where(condition: BooleanExpression): Pipeline<T>;
|
|
53
|
+
where(options: { condition: BooleanExpression }): Pipeline<T>;
|
|
54
|
+
|
|
55
|
+
select(...selection: (Selectable | string)[]): Pipeline<T>;
|
|
56
|
+
select(options: { selection: (Selectable | string)[] }): Pipeline<T>;
|
|
57
|
+
|
|
58
|
+
addFields(...field: Selectable[]): Pipeline<T>;
|
|
59
|
+
addFields(options: { field: Selectable[] }): Pipeline<T>;
|
|
60
|
+
|
|
61
|
+
removeFields(...field: (Field | string)[]): Pipeline<T>;
|
|
62
|
+
removeFields(options: { field: (Field | string)[] }): Pipeline<T>;
|
|
63
|
+
|
|
64
|
+
sort(...ordering: Ordering[]): Pipeline<T>;
|
|
65
|
+
sort(options: { ordering: Ordering[] }): Pipeline<T>;
|
|
66
|
+
|
|
67
|
+
limit(n: number): Pipeline<T>;
|
|
68
|
+
limit(options: { n: number }): Pipeline<T>;
|
|
69
|
+
|
|
70
|
+
offset(n: number): Pipeline<T>;
|
|
71
|
+
offset(options: { n: number }): Pipeline<T>;
|
|
72
|
+
|
|
73
|
+
aggregate(...accumulator: AliasedAggregate[]): Pipeline<T>;
|
|
74
|
+
aggregate(options: PipelineAggregateOptions): Pipeline<T>;
|
|
75
|
+
|
|
76
|
+
distinct(...group: (Field | string)[]): Pipeline<T>;
|
|
77
|
+
distinct(options: PipelineDistinctOptions): Pipeline<T>;
|
|
78
|
+
|
|
79
|
+
findNearest(options: PipelineFindNearestOptions): Pipeline<T>;
|
|
80
|
+
|
|
81
|
+
replaceWith(fieldName: string): Pipeline<T>;
|
|
82
|
+
replaceWith(expr: Selectable): Pipeline<T>;
|
|
83
|
+
replaceWith(options: PipelineReplaceWithOptions): Pipeline<T>;
|
|
84
|
+
|
|
85
|
+
sample(n: number): Pipeline<T>;
|
|
86
|
+
sample(options: PipelineSampleOptions): Pipeline<T>;
|
|
87
|
+
|
|
88
|
+
union(otherPipeline: Pipeline<T>): Pipeline<T>;
|
|
89
|
+
union(options: PipelineUnionOptions<T>): Pipeline<T>;
|
|
90
|
+
|
|
91
|
+
unnest(selectable: Selectable, indexField?: string): Pipeline<T>;
|
|
92
|
+
unnest(options: PipelineUnnestOptions): Pipeline<T>;
|
|
93
|
+
|
|
94
|
+
rawStage(
|
|
95
|
+
name: string,
|
|
96
|
+
params: Record<string, unknown>,
|
|
97
|
+
options?: PipelineRawStageOptions,
|
|
98
|
+
): Pipeline<T>;
|
|
99
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Pipeline } from './pipeline';
|
|
19
|
+
import type { PipelineSnapshot } from './pipeline-result';
|
|
20
|
+
import type { PipelineExecuteOptions } from './pipeline_options';
|
|
21
|
+
import { executeRuntimePipeline } from './pipeline_runtime';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @beta
|
|
25
|
+
* Executes a pipeline and returns a Promise that resolves to the pipeline snapshot.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```
|
|
29
|
+
* const snapshot = await execute(
|
|
30
|
+
* firestore.pipeline().collection('books').where(gt(field('rating'), 4.5)).select('title', 'author', 'rating')
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export function execute(pipeline: Pipeline): Promise<PipelineSnapshot>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @beta
|
|
38
|
+
* Executes a pipeline with options.
|
|
39
|
+
*/
|
|
40
|
+
export function execute(options: PipelineExecuteOptions): Promise<PipelineSnapshot>;
|
|
41
|
+
|
|
42
|
+
export function execute(
|
|
43
|
+
pipelineOrOptions: Pipeline | PipelineExecuteOptions,
|
|
44
|
+
): Promise<PipelineSnapshot> {
|
|
45
|
+
return executeRuntimePipeline(pipelineOrOptions);
|
|
46
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { Pipeline } from './pipeline';
|
|
19
|
+
import type { StageOptions } from './stage_options';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* Options for pipeline execute().
|
|
24
|
+
*
|
|
25
|
+
* Note: `indexMode` and `rawOptions` are currently applied on Android and web only. iOS rejects
|
|
26
|
+
* them because the native Firestore pipeline SDK does not yet expose execute options.
|
|
27
|
+
*/
|
|
28
|
+
export interface PipelineExecuteOptions extends StageOptions {
|
|
29
|
+
pipeline: Pipeline;
|
|
30
|
+
indexMode?: 'recommended';
|
|
31
|
+
rawOptions?: { [name: string]: unknown };
|
|
32
|
+
}
|