@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.
Files changed (359) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/RNFBFirestore.podspec +2 -1
  3. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCollectionModule.java +17 -4
  4. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreDocumentModule.java +2 -2
  5. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineExecutor.java +1243 -0
  6. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineNodeBuilder.java +3919 -0
  7. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestorePipelineParser.java +1735 -0
  8. package/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreSerialize.java +1 -1
  9. package/dist/module/FieldPath.js +59 -0
  10. package/dist/module/FieldPath.js.map +1 -0
  11. package/dist/module/FieldValue.js +82 -0
  12. package/dist/module/FieldValue.js.map +1 -0
  13. package/{lib → dist/module}/FirestoreAggregate.js +31 -43
  14. package/dist/module/FirestoreAggregate.js.map +1 -0
  15. package/dist/module/FirestoreBlob.js +56 -0
  16. package/dist/module/FirestoreBlob.js.map +1 -0
  17. package/dist/module/FirestoreCollectionReference.js +70 -0
  18. package/dist/module/FirestoreCollectionReference.js.map +1 -0
  19. package/{lib → dist/module}/FirestoreDocumentChange.js +12 -15
  20. package/dist/module/FirestoreDocumentChange.js.map +1 -0
  21. package/dist/module/FirestoreDocumentReference.js +170 -0
  22. package/dist/module/FirestoreDocumentReference.js.map +1 -0
  23. package/dist/module/FirestoreDocumentSnapshot.js +88 -0
  24. package/dist/module/FirestoreDocumentSnapshot.js.map +1 -0
  25. package/dist/module/FirestoreFilter.js +146 -0
  26. package/dist/module/FirestoreFilter.js.map +1 -0
  27. package/dist/module/FirestoreGeoPoint.js +80 -0
  28. package/dist/module/FirestoreGeoPoint.js.map +1 -0
  29. package/{lib → dist/module}/FirestorePath.js +5 -12
  30. package/dist/module/FirestorePath.js.map +1 -0
  31. package/{lib → dist/module}/FirestorePersistentCacheIndexManager.js +11 -4
  32. package/dist/module/FirestorePersistentCacheIndexManager.js.map +1 -0
  33. package/dist/module/FirestoreQuery.js +298 -0
  34. package/dist/module/FirestoreQuery.js.map +1 -0
  35. package/{lib → dist/module}/FirestoreQueryModifiers.js +25 -136
  36. package/dist/module/FirestoreQueryModifiers.js.map +1 -0
  37. package/dist/module/FirestoreQuerySnapshot.js +98 -0
  38. package/dist/module/FirestoreQuerySnapshot.js.map +1 -0
  39. package/dist/module/FirestoreSnapshotMetadata.js +38 -0
  40. package/dist/module/FirestoreSnapshotMetadata.js.map +1 -0
  41. package/dist/module/FirestoreStatics.js +50 -0
  42. package/dist/module/FirestoreStatics.js.map +1 -0
  43. package/{lib → dist/module}/FirestoreTimestamp.js +39 -39
  44. package/dist/module/FirestoreTimestamp.js.map +1 -0
  45. package/dist/module/FirestoreTransaction.js +113 -0
  46. package/dist/module/FirestoreTransaction.js.map +1 -0
  47. package/dist/module/FirestoreTransactionHandler.js +137 -0
  48. package/dist/module/FirestoreTransactionHandler.js.map +1 -0
  49. package/dist/module/FirestoreVectorValue.js +75 -0
  50. package/dist/module/FirestoreVectorValue.js.map +1 -0
  51. package/dist/module/FirestoreWriteBatch.js +113 -0
  52. package/dist/module/FirestoreWriteBatch.js.map +1 -0
  53. package/dist/module/LoadBundleTask.js +70 -0
  54. package/dist/module/LoadBundleTask.js.map +1 -0
  55. package/dist/module/index.js +31 -0
  56. package/dist/module/index.js.map +1 -0
  57. package/dist/module/modular/Bytes.js +67 -0
  58. package/dist/module/modular/Bytes.js.map +1 -0
  59. package/dist/module/modular/FieldPath.js +25 -0
  60. package/dist/module/modular/FieldPath.js.map +1 -0
  61. package/dist/module/modular/FieldValue.js +37 -0
  62. package/dist/module/modular/FieldValue.js.map +1 -0
  63. package/dist/module/modular/GeoPoint.js +22 -0
  64. package/dist/module/modular/GeoPoint.js.map +1 -0
  65. package/dist/module/modular/Timestamp.js +22 -0
  66. package/dist/module/modular/Timestamp.js.map +1 -0
  67. package/dist/module/modular/VectorValue.js +25 -0
  68. package/dist/module/modular/VectorValue.js.map +1 -0
  69. package/dist/module/modular/query.js +222 -0
  70. package/dist/module/modular/query.js.map +1 -0
  71. package/dist/module/modular/snapshot.js +32 -0
  72. package/dist/module/modular/snapshot.js.map +1 -0
  73. package/dist/module/modular.js +229 -0
  74. package/dist/module/modular.js.map +1 -0
  75. package/dist/module/namespaced.js +298 -0
  76. package/dist/module/namespaced.js.map +1 -0
  77. package/dist/module/package.json +1 -0
  78. package/dist/module/pipelines/expressions.js +1273 -0
  79. package/dist/module/pipelines/expressions.js.map +1 -0
  80. package/dist/module/pipelines/index.js +32 -0
  81. package/dist/module/pipelines/index.js.map +1 -0
  82. package/dist/module/pipelines/pipeline-result.js +58 -0
  83. package/dist/module/pipelines/pipeline-result.js.map +1 -0
  84. package/dist/module/pipelines/pipeline-source.js +4 -0
  85. package/dist/module/pipelines/pipeline-source.js.map +1 -0
  86. package/dist/module/pipelines/pipeline.js +4 -0
  87. package/dist/module/pipelines/pipeline.js.map +1 -0
  88. package/dist/module/pipelines/pipeline_impl.js +42 -0
  89. package/dist/module/pipelines/pipeline_impl.js.map +1 -0
  90. package/dist/module/pipelines/pipeline_options.js +4 -0
  91. package/dist/module/pipelines/pipeline_options.js.map +1 -0
  92. package/dist/module/pipelines/pipeline_runtime.js +526 -0
  93. package/dist/module/pipelines/pipeline_runtime.js.map +1 -0
  94. package/dist/module/pipelines/pipeline_support.js +71 -0
  95. package/dist/module/pipelines/pipeline_support.js.map +1 -0
  96. package/dist/module/pipelines/pipeline_validate.js +183 -0
  97. package/dist/module/pipelines/pipeline_validate.js.map +1 -0
  98. package/dist/module/pipelines/stage_options.js +4 -0
  99. package/dist/module/pipelines/stage_options.js.map +1 -0
  100. package/dist/module/pipelines/types.js +2 -0
  101. package/dist/module/pipelines/types.js.map +1 -0
  102. package/dist/module/types/firestore.js +4 -0
  103. package/dist/module/types/firestore.js.map +1 -0
  104. package/dist/module/types/internal.js +4 -0
  105. package/dist/module/types/internal.js.map +1 -0
  106. package/dist/module/types/namespaced.js +338 -0
  107. package/dist/module/types/namespaced.js.map +1 -0
  108. package/{lib → dist/module}/utils/index.js +59 -114
  109. package/dist/module/utils/index.js.map +1 -0
  110. package/{lib → dist/module}/utils/serialize.js +58 -116
  111. package/dist/module/utils/serialize.js.map +1 -0
  112. package/{lib → dist/module}/utils/typemap.js +6 -20
  113. package/dist/module/utils/typemap.js.map +1 -0
  114. package/dist/module/version.js +5 -0
  115. package/dist/module/version.js.map +1 -0
  116. package/dist/module/web/RNFBFirestoreModule.android.js +5 -0
  117. package/dist/module/web/RNFBFirestoreModule.android.js.map +1 -0
  118. package/dist/module/web/RNFBFirestoreModule.ios.js +5 -0
  119. package/dist/module/web/RNFBFirestoreModule.ios.js.map +1 -0
  120. package/dist/module/web/RNFBFirestoreModule.js +387 -0
  121. package/dist/module/web/RNFBFirestoreModule.js.map +1 -0
  122. package/{lib → dist/module}/web/convert.js +60 -94
  123. package/dist/module/web/convert.js.map +1 -0
  124. package/dist/module/web/pipelines/pipeline.js +34 -0
  125. package/dist/module/web/pipelines/pipeline.js.map +1 -0
  126. package/dist/module/web/pipelines/pipeline_bridge_factory.js +217 -0
  127. package/dist/module/web/pipelines/pipeline_bridge_factory.js.map +1 -0
  128. package/dist/module/web/pipelines/pipeline_node_builder.js +294 -0
  129. package/dist/module/web/pipelines/pipeline_node_builder.js.map +1 -0
  130. package/dist/module/web/pipelines/pipeline_parser.js +21 -0
  131. package/dist/module/web/pipelines/pipeline_parser.js.map +1 -0
  132. package/dist/module/web/pipelines/pipeline_snapshot_serializer.js +89 -0
  133. package/dist/module/web/pipelines/pipeline_snapshot_serializer.js.map +1 -0
  134. package/dist/module/web/query.js +95 -0
  135. package/dist/module/web/query.js.map +1 -0
  136. package/dist/typescript/lib/FieldPath.d.ts +10 -0
  137. package/dist/typescript/lib/FieldPath.d.ts.map +1 -0
  138. package/dist/typescript/lib/FieldValue.d.ts +17 -0
  139. package/dist/typescript/lib/FieldValue.d.ts.map +1 -0
  140. package/dist/typescript/lib/FirestoreAggregate.d.ts +40 -0
  141. package/dist/typescript/lib/FirestoreAggregate.d.ts.map +1 -0
  142. package/dist/typescript/lib/FirestoreBlob.d.ts +11 -0
  143. package/dist/typescript/lib/FirestoreBlob.d.ts.map +1 -0
  144. package/dist/typescript/lib/FirestoreCollectionReference.d.ts +15 -0
  145. package/dist/typescript/lib/FirestoreCollectionReference.d.ts.map +1 -0
  146. package/dist/typescript/lib/FirestoreDocumentChange.d.ts +27 -0
  147. package/dist/typescript/lib/FirestoreDocumentChange.d.ts.map +1 -0
  148. package/dist/typescript/lib/FirestoreDocumentReference.d.ts +30 -0
  149. package/dist/typescript/lib/FirestoreDocumentReference.d.ts.map +1 -0
  150. package/dist/typescript/lib/FirestoreDocumentSnapshot.d.ts +30 -0
  151. package/dist/typescript/lib/FirestoreDocumentSnapshot.d.ts.map +1 -0
  152. package/dist/typescript/lib/FirestoreFilter.d.ts +52 -0
  153. package/dist/typescript/lib/FirestoreFilter.d.ts.map +1 -0
  154. package/dist/typescript/lib/FirestoreGeoPoint.d.ts +22 -0
  155. package/dist/typescript/lib/FirestoreGeoPoint.d.ts.map +1 -0
  156. package/dist/typescript/lib/FirestorePath.d.ts +12 -0
  157. package/dist/typescript/lib/FirestorePath.d.ts.map +1 -0
  158. package/dist/typescript/lib/FirestorePersistentCacheIndexManager.d.ts +16 -0
  159. package/dist/typescript/lib/FirestorePersistentCacheIndexManager.d.ts.map +1 -0
  160. package/dist/typescript/lib/FirestoreQuery.d.ts +39 -0
  161. package/dist/typescript/lib/FirestoreQuery.d.ts.map +1 -0
  162. package/dist/typescript/lib/FirestoreQueryModifiers.d.ts +59 -0
  163. package/dist/typescript/lib/FirestoreQueryModifiers.d.ts.map +1 -0
  164. package/dist/typescript/lib/FirestoreQuerySnapshot.d.ts +49 -0
  165. package/dist/typescript/lib/FirestoreQuerySnapshot.d.ts.map +1 -0
  166. package/dist/typescript/lib/FirestoreSnapshotMetadata.d.ts +8 -0
  167. package/dist/typescript/lib/FirestoreSnapshotMetadata.d.ts.map +1 -0
  168. package/dist/typescript/lib/FirestoreStatics.d.ts +23 -0
  169. package/dist/typescript/lib/FirestoreStatics.d.ts.map +1 -0
  170. package/dist/typescript/lib/FirestoreTimestamp.d.ts +33 -0
  171. package/dist/typescript/lib/FirestoreTimestamp.d.ts.map +1 -0
  172. package/dist/typescript/lib/FirestoreTransaction.d.ts +42 -0
  173. package/dist/typescript/lib/FirestoreTransaction.d.ts.map +1 -0
  174. package/dist/typescript/lib/FirestoreTransactionHandler.d.ts +26 -0
  175. package/dist/typescript/lib/FirestoreTransactionHandler.d.ts.map +1 -0
  176. package/dist/typescript/lib/FirestoreVectorValue.d.ts +17 -0
  177. package/dist/typescript/lib/FirestoreVectorValue.d.ts.map +1 -0
  178. package/dist/typescript/lib/FirestoreWriteBatch.d.ts +21 -0
  179. package/dist/typescript/lib/FirestoreWriteBatch.d.ts.map +1 -0
  180. package/dist/typescript/lib/LoadBundleTask.d.ts +16 -0
  181. package/dist/typescript/lib/LoadBundleTask.d.ts.map +1 -0
  182. package/dist/typescript/lib/index.d.ts +6 -0
  183. package/dist/typescript/lib/index.d.ts.map +1 -0
  184. package/dist/typescript/lib/modular/Bytes.d.ts +22 -0
  185. package/dist/typescript/lib/modular/Bytes.d.ts.map +1 -0
  186. package/dist/typescript/lib/modular/FieldPath.d.ts +4 -0
  187. package/dist/typescript/lib/modular/FieldPath.d.ts.map +1 -0
  188. package/dist/typescript/lib/modular/FieldValue.d.ts +8 -0
  189. package/dist/typescript/lib/modular/FieldValue.d.ts.map +1 -0
  190. package/dist/typescript/lib/modular/GeoPoint.d.ts +3 -0
  191. package/dist/typescript/lib/modular/GeoPoint.d.ts.map +1 -0
  192. package/dist/typescript/lib/modular/Timestamp.d.ts +3 -0
  193. package/dist/typescript/lib/modular/Timestamp.d.ts.map +1 -0
  194. package/dist/typescript/lib/modular/VectorValue.d.ts +4 -0
  195. package/dist/typescript/lib/modular/VectorValue.d.ts.map +1 -0
  196. package/dist/typescript/lib/modular/query.d.ts +93 -0
  197. package/dist/typescript/lib/modular/query.d.ts.map +1 -0
  198. package/dist/typescript/lib/modular/snapshot.d.ts +30 -0
  199. package/dist/typescript/lib/modular/snapshot.d.ts.map +1 -0
  200. package/dist/typescript/lib/modular.d.ts +69 -0
  201. package/dist/typescript/lib/modular.d.ts.map +1 -0
  202. package/dist/typescript/lib/namespaced.d.ts +13 -0
  203. package/dist/typescript/lib/namespaced.d.ts.map +1 -0
  204. package/dist/typescript/lib/pipelines/expressions.d.ts +723 -0
  205. package/dist/typescript/lib/pipelines/expressions.d.ts.map +1 -0
  206. package/dist/typescript/lib/pipelines/index.d.ts +31 -0
  207. package/dist/typescript/lib/pipelines/index.d.ts.map +1 -0
  208. package/dist/typescript/lib/pipelines/pipeline-result.d.ts +30 -0
  209. package/dist/typescript/lib/pipelines/pipeline-result.d.ts.map +1 -0
  210. package/dist/typescript/lib/pipelines/pipeline-source.d.ts +64 -0
  211. package/dist/typescript/lib/pipelines/pipeline-source.d.ts.map +1 -0
  212. package/dist/typescript/lib/pipelines/pipeline.d.ts +61 -0
  213. package/dist/typescript/lib/pipelines/pipeline.d.ts.map +1 -0
  214. package/dist/typescript/lib/pipelines/pipeline_impl.d.ts +21 -0
  215. package/dist/typescript/lib/pipelines/pipeline_impl.d.ts.map +1 -0
  216. package/dist/typescript/lib/pipelines/pipeline_options.d.ts +17 -0
  217. package/dist/typescript/lib/pipelines/pipeline_options.d.ts.map +1 -0
  218. package/dist/typescript/lib/pipelines/pipeline_runtime.d.ts +10 -0
  219. package/dist/typescript/lib/pipelines/pipeline_runtime.d.ts.map +1 -0
  220. package/dist/typescript/lib/pipelines/pipeline_support.d.ts +7 -0
  221. package/dist/typescript/lib/pipelines/pipeline_support.d.ts.map +1 -0
  222. package/dist/typescript/lib/pipelines/pipeline_validate.d.ts +9 -0
  223. package/dist/typescript/lib/pipelines/pipeline_validate.d.ts.map +1 -0
  224. package/dist/typescript/lib/pipelines/stage_options.d.ts +326 -0
  225. package/dist/typescript/lib/pipelines/stage_options.d.ts.map +1 -0
  226. package/dist/typescript/lib/pipelines/types.d.ts +10 -0
  227. package/dist/typescript/lib/pipelines/types.d.ts.map +1 -0
  228. package/dist/typescript/lib/types/firestore.d.ts +263 -0
  229. package/dist/typescript/lib/types/firestore.d.ts.map +1 -0
  230. package/dist/typescript/lib/types/internal.d.ts +483 -0
  231. package/dist/typescript/lib/types/internal.d.ts.map +1 -0
  232. package/dist/typescript/lib/types/namespaced.d.ts +2285 -0
  233. package/dist/typescript/lib/types/namespaced.d.ts.map +1 -0
  234. package/dist/typescript/lib/utils/index.d.ts +15 -0
  235. package/dist/typescript/lib/utils/index.d.ts.map +1 -0
  236. package/dist/typescript/lib/utils/serialize.d.ts +17 -0
  237. package/dist/typescript/lib/utils/serialize.d.ts.map +1 -0
  238. package/dist/typescript/lib/utils/typemap.d.ts +3 -0
  239. package/dist/typescript/lib/utils/typemap.d.ts.map +1 -0
  240. package/dist/typescript/lib/version.d.ts +2 -0
  241. package/dist/typescript/lib/version.d.ts.map +1 -0
  242. package/dist/typescript/lib/web/RNFBFirestoreModule.android.d.ts +3 -0
  243. package/dist/typescript/lib/web/RNFBFirestoreModule.android.d.ts.map +1 -0
  244. package/dist/typescript/lib/web/RNFBFirestoreModule.d.ts +75 -0
  245. package/dist/typescript/lib/web/RNFBFirestoreModule.d.ts.map +1 -0
  246. package/dist/typescript/lib/web/RNFBFirestoreModule.ios.d.ts +3 -0
  247. package/dist/typescript/lib/web/RNFBFirestoreModule.ios.d.ts.map +1 -0
  248. package/dist/typescript/lib/web/convert.d.ts +14 -0
  249. package/dist/typescript/lib/web/convert.d.ts.map +1 -0
  250. package/dist/typescript/lib/web/pipelines/pipeline.d.ts +4 -0
  251. package/dist/typescript/lib/web/pipelines/pipeline.d.ts.map +1 -0
  252. package/dist/typescript/lib/web/pipelines/pipeline_bridge_factory.d.ts +5 -0
  253. package/dist/typescript/lib/web/pipelines/pipeline_bridge_factory.d.ts.map +1 -0
  254. package/dist/typescript/lib/web/pipelines/pipeline_node_builder.d.ts +5 -0
  255. package/dist/typescript/lib/web/pipelines/pipeline_node_builder.d.ts.map +1 -0
  256. package/dist/typescript/lib/web/pipelines/pipeline_parser.d.ts +3 -0
  257. package/dist/typescript/lib/web/pipelines/pipeline_parser.d.ts.map +1 -0
  258. package/dist/typescript/lib/web/pipelines/pipeline_snapshot_serializer.d.ts +4 -0
  259. package/dist/typescript/lib/web/pipelines/pipeline_snapshot_serializer.d.ts.map +1 -0
  260. package/dist/typescript/lib/web/query.d.ts +23 -0
  261. package/dist/typescript/lib/web/query.d.ts.map +1 -0
  262. package/dist/typescript/package.json +1 -0
  263. package/ios/RNFBFirestore/RNFBFirestoreCollectionModule.m +52 -2
  264. package/ios/RNFBFirestore/RNFBFirestorePipelineBridgeFactory.swift +384 -0
  265. package/ios/RNFBFirestore/RNFBFirestorePipelineCallHandler.swift +86 -0
  266. package/ios/RNFBFirestore/RNFBFirestorePipelineNodeBuilder.swift +1500 -0
  267. package/ios/RNFBFirestore/RNFBFirestorePipelineParser.swift +1352 -0
  268. package/ios/RNFBFirestore/RNFBFirestorePipelineSnapshotSerializer.swift +98 -0
  269. package/lib/{FirestoreFieldPath.js → FieldPath.ts} +10 -12
  270. package/lib/{FirestoreFieldValue.js → FieldValue.ts} +22 -19
  271. package/lib/FirestoreAggregate.ts +124 -0
  272. package/lib/FirestoreBlob.ts +73 -0
  273. package/lib/FirestoreCollectionReference.ts +99 -0
  274. package/lib/FirestoreDocumentChange.ts +71 -0
  275. package/lib/FirestoreDocumentReference.ts +310 -0
  276. package/lib/FirestoreDocumentSnapshot.ts +149 -0
  277. package/lib/FirestoreFilter.ts +232 -0
  278. package/lib/{FirestoreGeoPoint.js → FirestoreGeoPoint.ts} +48 -8
  279. package/lib/FirestorePath.ts +54 -0
  280. package/lib/FirestorePersistentCacheIndexManager.ts +46 -0
  281. package/lib/{FirestoreQuery.js → FirestoreQuery.ts} +208 -100
  282. package/lib/FirestoreQueryModifiers.ts +411 -0
  283. package/lib/{FirestoreQuerySnapshot.js → FirestoreQuerySnapshot.ts} +61 -32
  284. package/lib/{FirestoreSnapshotMetadata.js → FirestoreSnapshotMetadata.ts} +8 -6
  285. package/lib/{FirestoreStatics.js → FirestoreStatics.ts} +18 -11
  286. package/lib/FirestoreTimestamp.ts +161 -0
  287. package/lib/{FirestoreTransaction.js → FirestoreTransaction.ts} +64 -27
  288. package/lib/{FirestoreTransactionHandler.js → FirestoreTransactionHandler.ts} +54 -75
  289. package/lib/{FirestoreVectorValue.js → FirestoreVectorValue.ts} +36 -15
  290. package/lib/{FirestoreWriteBatch.js → FirestoreWriteBatch.ts} +45 -21
  291. package/lib/LoadBundleTask.ts +85 -0
  292. package/lib/index.ts +71 -0
  293. package/lib/modular/Bytes.ts +81 -0
  294. package/lib/modular/FieldPath.ts +24 -0
  295. package/lib/modular/FieldValue.ts +40 -0
  296. package/lib/modular/GeoPoint.ts +20 -0
  297. package/lib/modular/Timestamp.ts +20 -0
  298. package/lib/modular/VectorValue.ts +24 -0
  299. package/lib/modular/query.ts +368 -0
  300. package/lib/modular/snapshot.ts +137 -0
  301. package/lib/modular.ts +552 -0
  302. package/lib/{index.js → namespaced.ts} +170 -80
  303. package/lib/pipelines/expressions.ts +2321 -0
  304. package/lib/pipelines/index.ts +203 -0
  305. package/lib/pipelines/pipeline-result.ts +78 -0
  306. package/lib/pipelines/pipeline-source.ts +83 -0
  307. package/lib/pipelines/pipeline.ts +99 -0
  308. package/lib/pipelines/pipeline_impl.ts +46 -0
  309. package/lib/pipelines/pipeline_options.ts +32 -0
  310. package/lib/pipelines/pipeline_runtime.ts +863 -0
  311. package/lib/pipelines/pipeline_support.ts +134 -0
  312. package/lib/pipelines/pipeline_validate.ts +242 -0
  313. package/lib/pipelines/stage_options.ts +376 -0
  314. package/lib/pipelines/types.ts +26 -0
  315. package/lib/types/firestore.ts +477 -0
  316. package/lib/types/internal.ts +747 -0
  317. package/lib/{index.d.ts → types/namespaced.ts} +280 -79
  318. package/lib/utils/index.ts +244 -0
  319. package/lib/utils/serialize.ts +314 -0
  320. package/lib/utils/typemap.ts +65 -0
  321. package/lib/version.ts +2 -0
  322. package/lib/web/{RNFBFirestoreModule.js → RNFBFirestoreModule.ts} +222 -234
  323. package/lib/web/convert.ts +287 -0
  324. package/lib/web/pipelines/pipeline.ts +47 -0
  325. package/lib/web/pipelines/pipeline_bridge_factory.ts +377 -0
  326. package/lib/web/pipelines/pipeline_node_builder.ts +413 -0
  327. package/lib/web/pipelines/pipeline_parser.ts +23 -0
  328. package/lib/web/pipelines/pipeline_snapshot_serializer.ts +133 -0
  329. package/lib/web/query.ts +150 -0
  330. package/package.json +46 -7
  331. package/tsconfig.json +35 -0
  332. package/lib/FirestoreBlob.js +0 -107
  333. package/lib/FirestoreCollectionReference.js +0 -70
  334. package/lib/FirestoreDocumentReference.js +0 -222
  335. package/lib/FirestoreDocumentSnapshot.js +0 -132
  336. package/lib/FirestoreFilter.js +0 -156
  337. package/lib/modular/Bytes.d.ts +0 -11
  338. package/lib/modular/Bytes.js +0 -62
  339. package/lib/modular/FieldPath.d.ts +0 -20
  340. package/lib/modular/FieldPath.js +0 -7
  341. package/lib/modular/FieldValue.d.ts +0 -67
  342. package/lib/modular/FieldValue.js +0 -41
  343. package/lib/modular/GeoPoint.d.ts +0 -17
  344. package/lib/modular/GeoPoint.js +0 -3
  345. package/lib/modular/Timestamp.d.ts +0 -85
  346. package/lib/modular/Timestamp.js +0 -3
  347. package/lib/modular/VectorValue.d.ts +0 -30
  348. package/lib/modular/VectorValue.js +0 -11
  349. package/lib/modular/index.d.ts +0 -788
  350. package/lib/modular/index.js +0 -410
  351. package/lib/modular/query.d.ts +0 -370
  352. package/lib/modular/query.js +0 -233
  353. package/lib/modular/snapshot.d.ts +0 -256
  354. package/lib/modular/snapshot.js +0 -33
  355. package/lib/modular/utils/observer.js +0 -16
  356. package/lib/version.js +0 -2
  357. package/lib/web/query.js +0 -112
  358. /package/lib/web/{RNFBFirestoreModule.android.js → RNFBFirestoreModule.android.ts} +0 -0
  359. /package/lib/web/{RNFBFirestoreModule.ios.js → RNFBFirestoreModule.ios.ts} +0 -0
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  /*
2
4
  * Copyright (c) 2016-present Invertase Limited & Contributors
3
5
  *
@@ -16,13 +18,12 @@
16
18
  */
17
19
 
18
20
  import { hasOwnProperty } from '@react-native-firebase/app/dist/module/common';
19
-
20
21
  const MAP = {
21
22
  nan: 0,
22
23
  '-infinity': 1,
23
24
  infinity: 2,
24
25
  null: 3,
25
- documentid: 4, // to native only
26
+ documentid: 4,
26
27
  booleanTrue: 5,
27
28
  booleanFalse: 6,
28
29
  double: 7,
@@ -38,18 +39,10 @@ const MAP = {
38
39
  integer: 17,
39
40
  negativeZero: 18,
40
41
  vector: 19,
41
- unknown: -999,
42
+ unknown: -999
42
43
  };
43
-
44
44
  const MAP_ENTRIES = Object.entries(MAP);
45
-
46
- /**
47
- * Returns the array map with value for a given type
48
- * @param type
49
- * @param value
50
- * @returns {null|*[]}
51
- */
52
- export function getTypeMapInt(type, value = undefined) {
45
+ export function getTypeMapInt(type, value) {
53
46
  if (hasOwnProperty(MAP, type)) {
54
47
  const array = [MAP[type]];
55
48
  if (value !== undefined) {
@@ -57,15 +50,8 @@ export function getTypeMapInt(type, value = undefined) {
57
50
  }
58
51
  return array;
59
52
  }
60
-
61
53
  return null;
62
54
  }
63
-
64
- /**
65
- * Returns the type of a given int value
66
- * @param value
67
- * @returns {null}
68
- */
69
55
  export function getTypeMapName(value) {
70
56
  for (let i = 0; i < MAP_ENTRIES.length; i++) {
71
57
  const [name, int] = MAP_ENTRIES[i];
@@ -73,6 +59,6 @@ export function getTypeMapName(value) {
73
59
  return name;
74
60
  }
75
61
  }
76
-
77
62
  return null;
78
63
  }
64
+ //# sourceMappingURL=typemap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hasOwnProperty","MAP","nan","infinity","null","documentid","booleanTrue","booleanFalse","double","string","stringEmpty","array","reference","geopoint","timestamp","blob","fieldvalue","object","integer","negativeZero","vector","unknown","MAP_ENTRIES","Object","entries","getTypeMapInt","type","value","undefined","push","getTypeMapName","i","length","name","int"],"sourceRoot":"../../../lib","sources":["utils/typemap.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,+CAA+C;AAE9E,MAAMC,GAA2B,GAAG;EAClCC,GAAG,EAAE,CAAC;EACN,WAAW,EAAE,CAAC;EACdC,QAAQ,EAAE,CAAC;EACXC,IAAI,EAAE,CAAC;EACPC,UAAU,EAAE,CAAC;EACbC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,CAAC;EACTC,WAAW,EAAE,CAAC;EACdC,KAAK,EAAE,EAAE;EACTC,SAAS,EAAE,EAAE;EACbC,QAAQ,EAAE,EAAE;EACZC,SAAS,EAAE,EAAE;EACbC,IAAI,EAAE,EAAE;EACRC,UAAU,EAAE,EAAE;EACdC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE,EAAE;EACXC,YAAY,EAAE,EAAE;EAChBC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAMC,WAAW,GAAGC,MAAM,CAACC,OAAO,CAACvB,GAAG,CAAC;AAEvC,OAAO,SAASwB,aAAaA,CAACC,IAAY,EAAEC,KAAe,EAA6B;EACtF,IAAI3B,cAAc,CAACC,GAAG,EAAEyB,IAAI,CAAC,EAAE;IAC7B,MAAMf,KAAyB,GAAG,CAACV,GAAG,CAACyB,IAAI,CAAC,CAAE;IAC9C,IAAIC,KAAK,KAAKC,SAAS,EAAE;MACvBjB,KAAK,CAACkB,IAAI,CAACF,KAAK,CAAC;IACnB;IACA,OAAOhB,KAAK;EACd;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASmB,cAAcA,CAACH,KAAa,EAAiB;EAC3D,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,WAAW,CAACU,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3C,MAAM,CAACE,IAAI,EAAEC,GAAG,CAAC,GAAGZ,WAAW,CAACS,CAAC,CAAE;IACnC,IAAIJ,KAAK,KAAKO,GAAG,EAAE;MACjB,OAAOD,IAAI;IACb;EACF;EACA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ // Generated by genversion.
4
+ export const version = '24.0.0';
5
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["version"],"sourceRoot":"../../lib","sources":["version.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,QAAQ","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ // No-op for android.
4
+ export default {};
5
+ //# sourceMappingURL=RNFBFirestoreModule.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["web/RNFBFirestoreModule.android.ts"],"mappings":";;AAAA;AACA,eAAe,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ // No-op for ios.
4
+ export default {};
5
+ //# sourceMappingURL=RNFBFirestoreModule.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["web/RNFBFirestoreModule.ios.ts"],"mappings":";;AAAA;AACA,eAAe,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,387 @@
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 { setLogLevel, connectFirestoreEmulator, initializeFirestore, runTransaction, getApp, getFirestore, collection, collectionGroup, doc, getDoc, getDocs, getCount, getAggregate, count, average, sum, deleteDoc, setDoc, updateDoc, writeBatch, terminate } from '@react-native-firebase/app/dist/module/internal/web/firebaseFirestore';
21
+ import { guard, getWebError, emitEvent } from '@react-native-firebase/app/dist/module/internal/web/utils';
22
+ import { objectToWriteable, readableToObject, parseDocumentBatches } from "./convert.js";
23
+ import { buildQuery } from "./query.js";
24
+ import { executeWebSdkPipeline } from "./pipelines/pipeline.js";
25
+ function rejectWithCodeAndMessage(code, message) {
26
+ return Promise.reject(getWebError({
27
+ code,
28
+ message
29
+ }));
30
+ }
31
+ function documentSnapshotToObject(snapshot) {
32
+ const exists = snapshot.exists();
33
+ const out = {
34
+ metadata: [false, false],
35
+ path: snapshot.ref.path,
36
+ exists
37
+ };
38
+ if (exists) {
39
+ out.data = objectToWriteable(snapshot.data() ?? {});
40
+ }
41
+ return out;
42
+ }
43
+ function querySnapshotToObject(snapshot) {
44
+ return {
45
+ source: 'get',
46
+ excludesMetadataChanges: true,
47
+ changes: [],
48
+ metadata: [false, false],
49
+ documents: snapshot.docs.map(documentSnapshotToObject)
50
+ };
51
+ }
52
+ const emulatorForApp = {};
53
+ const firestoreInstances = {};
54
+ const appInstances = {};
55
+ const transactionHandler = {};
56
+ const transactionBuffer = {};
57
+ function getCachedAppInstance(appName) {
58
+ return appInstances[appName] ??= getApp(appName);
59
+ }
60
+ function createFirestoreKey(appName, databaseId) {
61
+ return `${appName}:${databaseId}`;
62
+ }
63
+ function getCachedFirestoreInstance(appName, databaseId) {
64
+ const firestoreKey = createFirestoreKey(appName, databaseId);
65
+ let instance = firestoreInstances[firestoreKey];
66
+ if (!instance) {
67
+ instance = getFirestore(getCachedAppInstance(appName), databaseId);
68
+ if (emulatorForApp[firestoreKey]) {
69
+ connectFirestoreEmulator(instance, emulatorForApp[firestoreKey].host, emulatorForApp[firestoreKey].port);
70
+ }
71
+ firestoreInstances[firestoreKey] = instance;
72
+ }
73
+ return instance;
74
+ }
75
+ export default {
76
+ async setLogLevel(logLevel) {
77
+ if (logLevel === 'debug' || logLevel === 'error') {
78
+ setLogLevel(logLevel);
79
+ } else {
80
+ setLogLevel('silent');
81
+ }
82
+ },
83
+ loadBundle() {
84
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
85
+ },
86
+ clearPersistence() {
87
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
88
+ },
89
+ async waitForPendingWrites() {
90
+ return null;
91
+ },
92
+ disableNetwork() {
93
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
94
+ },
95
+ enableNetwork() {
96
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
97
+ },
98
+ addSnapshotsInSync() {
99
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
100
+ },
101
+ removeSnapshotsInSync() {
102
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
103
+ },
104
+ useEmulator(appName, databaseId, host, port) {
105
+ return guard(async () => {
106
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
107
+ connectFirestoreEmulator(firestore, host, port);
108
+ const firestoreKey = createFirestoreKey(appName, databaseId);
109
+ emulatorForApp[firestoreKey] = {
110
+ host,
111
+ port
112
+ };
113
+ return null;
114
+ });
115
+ },
116
+ settings(appName, databaseId, settings) {
117
+ return guard(async () => {
118
+ const instance = initializeFirestore(getCachedAppInstance(appName), settings, databaseId);
119
+ firestoreInstances[appName] = instance;
120
+ return null;
121
+ });
122
+ },
123
+ terminate(appName, databaseId) {
124
+ return guard(async () => {
125
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
126
+ await terminate(firestore);
127
+ return null;
128
+ });
129
+ },
130
+ namedQueryOnSnapshot() {
131
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
132
+ },
133
+ collectionOnSnapshot() {
134
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
135
+ },
136
+ collectionOffSnapshot() {
137
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
138
+ },
139
+ namedQueryGet() {
140
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
141
+ },
142
+ collectionCount(appName, databaseId, path, type, filters, orders, options) {
143
+ return guard(async () => {
144
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
145
+ const queryRef = type === 'collectionGroup' ? collectionGroup(firestore, path) : collection(firestore, path);
146
+ const query = buildQuery(queryRef, filters, orders, options);
147
+ const snapshot = await getCount(query);
148
+ return {
149
+ count: snapshot.data().count
150
+ };
151
+ });
152
+ },
153
+ aggregateQuery(appName, databaseId, path, type, filters, orders, options, aggregateQueries) {
154
+ return guard(async () => {
155
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
156
+ const queryRef = type === 'collectionGroup' ? collectionGroup(firestore, path) : collection(firestore, path);
157
+ const query = buildQuery(queryRef, filters, orders, options);
158
+ const aggregateSpec = {};
159
+ for (let i = 0; i < aggregateQueries.length; i++) {
160
+ const aggregateQuery = aggregateQueries[i];
161
+ const {
162
+ aggregateType,
163
+ field,
164
+ key
165
+ } = aggregateQuery;
166
+ switch (aggregateType) {
167
+ case 'count':
168
+ aggregateSpec[key] = count();
169
+ break;
170
+ case 'avg':
171
+ aggregateSpec[key] = average(field);
172
+ break;
173
+ case 'sum':
174
+ aggregateSpec[key] = sum(field);
175
+ break;
176
+ }
177
+ }
178
+ const result = await getAggregate(query, aggregateSpec);
179
+ const data = result.data();
180
+ const response = {};
181
+ for (let i = 0; i < aggregateQueries.length; i++) {
182
+ const aggregateQuery = aggregateQueries[i];
183
+ response[aggregateQuery.key] = data[aggregateQuery.key];
184
+ }
185
+ return response;
186
+ });
187
+ },
188
+ pipelineExecute(appName, databaseId, pipeline, options) {
189
+ return guard(async () => {
190
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
191
+ return executeWebSdkPipeline(firestore, pipeline, options);
192
+ });
193
+ },
194
+ collectionGet(appName, databaseId, path, type, filters, orders, options, getOptions) {
195
+ if (getOptions?.source === 'cache') {
196
+ return rejectWithCodeAndMessage('unsupported', 'The source cache is not supported in the lite SDK.');
197
+ }
198
+ return guard(async () => {
199
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
200
+ const queryRef = type === 'collectionGroup' ? collectionGroup(firestore, path) : collection(firestore, path);
201
+ const query = buildQuery(queryRef, filters, orders, options);
202
+ const snapshot = await getDocs(query);
203
+ return querySnapshotToObject(snapshot);
204
+ });
205
+ },
206
+ documentOnSnapshot() {
207
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
208
+ },
209
+ documentOffSnapshot() {
210
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
211
+ },
212
+ persistenceCacheIndexManager() {
213
+ return rejectWithCodeAndMessage('unsupported', 'Not supported in the lite SDK.');
214
+ },
215
+ documentGet(appName, databaseId, path, getOptions) {
216
+ return guard(async () => {
217
+ if (getOptions?.source === 'cache') {
218
+ return rejectWithCodeAndMessage('unsupported', 'The source cache is not supported in the lite SDK.');
219
+ }
220
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
221
+ const ref = doc(firestore, path);
222
+ const snapshot = await getDoc(ref);
223
+ return documentSnapshotToObject(snapshot);
224
+ });
225
+ },
226
+ documentDelete(appName, databaseId, path) {
227
+ return guard(async () => {
228
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
229
+ const ref = doc(firestore, path);
230
+ await deleteDoc(ref);
231
+ return null;
232
+ });
233
+ },
234
+ documentSet(appName, databaseId, path, data, options) {
235
+ return guard(async () => {
236
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
237
+ const ref = doc(firestore, path);
238
+ const setOptions = {};
239
+ if (options && 'merge' in options) {
240
+ setOptions.merge = options.merge;
241
+ } else if (options && 'mergeFields' in options) {
242
+ setOptions.mergeFields = options.mergeFields;
243
+ }
244
+ await setDoc(ref, readableToObject(firestore, data), setOptions);
245
+ });
246
+ },
247
+ documentUpdate(appName, databaseId, path, data) {
248
+ return guard(async () => {
249
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
250
+ const ref = doc(firestore, path);
251
+ await updateDoc(ref, readableToObject(firestore, data));
252
+ });
253
+ },
254
+ documentBatch(appName, databaseId, writes) {
255
+ return guard(async () => {
256
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
257
+ const batch = writeBatch(firestore);
258
+ const writesArray = parseDocumentBatches(firestore, writes);
259
+ for (const parsed of writesArray) {
260
+ const {
261
+ type,
262
+ path
263
+ } = parsed;
264
+ const ref = doc(firestore, path);
265
+ switch (type) {
266
+ case 'DELETE':
267
+ batch.delete(ref);
268
+ break;
269
+ case 'UPDATE':
270
+ batch.update(ref, parsed.data);
271
+ break;
272
+ case 'SET':
273
+ {
274
+ const options = parsed.options ?? {};
275
+ const setOptions = {};
276
+ if ('merge' in options) {
277
+ setOptions.merge = options.merge;
278
+ } else if ('mergeFields' in options) {
279
+ setOptions.mergeFields = options.mergeFields;
280
+ }
281
+ batch.set(ref, parsed.data, setOptions);
282
+ break;
283
+ }
284
+ }
285
+ }
286
+ await batch.commit();
287
+ });
288
+ },
289
+ transactionGetDocument(appName, databaseId, transactionId, path) {
290
+ if (!transactionHandler[transactionId]) {
291
+ return rejectWithCodeAndMessage('internal-error', 'An internal error occurred whilst attempting to find a native transaction by id.');
292
+ }
293
+ return guard(async () => {
294
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
295
+ const docRef = doc(firestore, path);
296
+ const tsx = transactionHandler[transactionId];
297
+ const snapshot = await tsx.get(docRef);
298
+ return documentSnapshotToObject(snapshot);
299
+ });
300
+ },
301
+ transactionDispose(_appName, _databaseId, transactionId) {
302
+ delete transactionHandler[transactionId];
303
+ },
304
+ transactionApplyBuffer(_appName, _databaseId, transactionId, commandBuffer) {
305
+ if (transactionHandler[transactionId]) {
306
+ transactionBuffer[transactionId] = commandBuffer;
307
+ }
308
+ },
309
+ transactionBegin(appName, databaseId, transactionId) {
310
+ return guard(async () => {
311
+ const firestore = getCachedFirestoreInstance(appName, databaseId);
312
+ try {
313
+ await runTransaction(firestore, async tsx => {
314
+ transactionHandler[transactionId] = tsx;
315
+ emitEvent('firestore_transaction_event', {
316
+ eventName: 'firestore_transaction_event',
317
+ body: {
318
+ type: 'update'
319
+ },
320
+ appName,
321
+ databaseId,
322
+ listenerId: transactionId
323
+ });
324
+ const getBuffer = () => transactionBuffer[transactionId];
325
+ const buffer = await new Promise(resolve => {
326
+ const interval = setInterval(() => {
327
+ const b = getBuffer();
328
+ if (b) {
329
+ clearInterval(interval);
330
+ resolve(b);
331
+ }
332
+ }, 100);
333
+ });
334
+ for (const serialized of buffer) {
335
+ const {
336
+ path: docPath,
337
+ type,
338
+ data
339
+ } = serialized;
340
+ const docRef = doc(firestore, docPath);
341
+ switch (type) {
342
+ case 'DELETE':
343
+ tsx.delete(docRef);
344
+ break;
345
+ case 'UPDATE':
346
+ tsx.update(docRef, readableToObject(firestore, data ?? {}));
347
+ break;
348
+ case 'SET':
349
+ {
350
+ const options = serialized.options ?? {};
351
+ const setOptions = {};
352
+ if ('merge' in options) {
353
+ setOptions.merge = options.merge;
354
+ } else if ('mergeFields' in options) {
355
+ setOptions.mergeFields = options.mergeFields;
356
+ }
357
+ tsx.set(docRef, readableToObject(firestore, data ?? {}), setOptions);
358
+ break;
359
+ }
360
+ }
361
+ }
362
+ });
363
+ emitEvent('firestore_transaction_event', {
364
+ eventName: 'firestore_transaction_event',
365
+ body: {
366
+ type: 'complete'
367
+ },
368
+ appName,
369
+ databaseId,
370
+ listenerId: transactionId
371
+ });
372
+ } catch (e) {
373
+ emitEvent('firestore_transaction_event', {
374
+ eventName: 'firestore_transaction_event',
375
+ body: {
376
+ type: 'error',
377
+ error: getWebError(e)
378
+ },
379
+ appName,
380
+ databaseId,
381
+ listenerId: transactionId
382
+ });
383
+ }
384
+ });
385
+ }
386
+ };
387
+ //# sourceMappingURL=RNFBFirestoreModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["setLogLevel","connectFirestoreEmulator","initializeFirestore","runTransaction","getApp","getFirestore","collection","collectionGroup","doc","getDoc","getDocs","getCount","getAggregate","count","average","sum","deleteDoc","setDoc","updateDoc","writeBatch","terminate","guard","getWebError","emitEvent","objectToWriteable","readableToObject","parseDocumentBatches","buildQuery","executeWebSdkPipeline","rejectWithCodeAndMessage","code","message","Promise","reject","documentSnapshotToObject","snapshot","exists","out","metadata","path","ref","data","querySnapshotToObject","source","excludesMetadataChanges","changes","documents","docs","map","emulatorForApp","firestoreInstances","appInstances","transactionHandler","transactionBuffer","getCachedAppInstance","appName","createFirestoreKey","databaseId","getCachedFirestoreInstance","firestoreKey","instance","host","port","logLevel","loadBundle","clearPersistence","waitForPendingWrites","disableNetwork","enableNetwork","addSnapshotsInSync","removeSnapshotsInSync","useEmulator","firestore","settings","namedQueryOnSnapshot","collectionOnSnapshot","collectionOffSnapshot","namedQueryGet","collectionCount","type","filters","orders","options","queryRef","query","aggregateQuery","aggregateQueries","aggregateSpec","i","length","aggregateType","field","key","result","response","pipelineExecute","pipeline","collectionGet","getOptions","documentOnSnapshot","documentOffSnapshot","persistenceCacheIndexManager","documentGet","documentDelete","documentSet","setOptions","merge","mergeFields","documentUpdate","documentBatch","writes","batch","writesArray","parsed","delete","update","set","commit","transactionGetDocument","transactionId","docRef","tsx","get","transactionDispose","_appName","_databaseId","transactionApplyBuffer","commandBuffer","transactionBegin","eventName","body","listenerId","getBuffer","buffer","resolve","interval","setInterval","b","clearInterval","serialized","docPath","e","error"],"sourceRoot":"../../../lib","sources":["web/RNFBFirestoreModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,WAAW,EACXC,wBAAwB,EACxBC,mBAAmB,EACnBC,cAAc,EACdC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,eAAe,EACfC,GAAG,EACHC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,YAAY,EACZC,KAAK,EACLC,OAAO,EACPC,GAAG,EACHC,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,SAAS,QACJ,uEAAuE;AAM9E,SACEC,KAAK,EACLC,WAAW,EACXC,SAAS,QACJ,2DAA2D;AAClE,SAASC,iBAAiB,EAAEC,gBAAgB,EAAEC,oBAAoB,QAAQ,cAAW;AACrF,SAASC,UAAU,QAAQ,YAAS;AAOpC,SAASC,qBAAqB,QAAQ,yBAAsB;AAE5D,SAASC,wBAAwBA,CAACC,IAAY,EAAEC,OAAe,EAAkB;EAC/E,OAAOC,OAAO,CAACC,MAAM,CAACX,WAAW,CAAC;IAAEQ,IAAI;IAAEC;EAAQ,CAA6B,CAAC,CAAC;AACnF;AAQA,SAASG,wBAAwBA,CAACC,QAA8B,EAK9D;EACA,MAAMC,MAAM,GAAGD,QAAQ,CAACC,MAAM,CAAC,CAAC;EAChC,MAAMC,GAKL,GAAG;IACFC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACxBC,IAAI,EAAEJ,QAAQ,CAACK,GAAG,CAACD,IAAI;IACvBH;EACF,CAAC;EACD,IAAIA,MAAM,EAAE;IACVC,GAAG,CAACI,IAAI,GAAGjB,iBAAiB,CAACW,QAA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