@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
@@ -0,0 +1,229 @@
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 { getApp, setLogLevel as appSetLogLevel } from '@react-native-firebase/app';
21
+ import { isObject, MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
22
+ import { AggregateField, fieldPathFromArgument, AggregateQuerySnapshot } from "./FirestoreAggregate.js";
23
+ import QueryImpl from "./FirestoreQuery.js";
24
+ import { LoadBundleTask } from "./LoadBundleTask.js";
25
+ export { AggregateField, AggregateQuerySnapshot } from "./FirestoreAggregate.js";
26
+ export const CACHE_SIZE_UNLIMITED = -1;
27
+ const PIPELINE_RUNTIME_INSTALLER_SYMBOL = Symbol.for('RNFBFirestorePipelineRuntimeInstaller');
28
+ export function getFirestore(appOrDatabaseId, databaseId) {
29
+ const app = name => getApp(name);
30
+ let firestore;
31
+ if (typeof appOrDatabaseId === 'string') {
32
+ firestore = app().firestore(appOrDatabaseId);
33
+ } else if (appOrDatabaseId) {
34
+ if (databaseId) {
35
+ firestore = app(appOrDatabaseId.name).firestore(databaseId);
36
+ } else {
37
+ firestore = app(appOrDatabaseId.name).firestore();
38
+ }
39
+ } else if (databaseId) {
40
+ firestore = app().firestore(databaseId);
41
+ } else {
42
+ firestore = app().firestore();
43
+ }
44
+ const runtimeGlobal = globalThis;
45
+ const installPipelineRuntime = runtimeGlobal[PIPELINE_RUNTIME_INSTALLER_SYMBOL];
46
+ if (typeof installPipelineRuntime === 'function') {
47
+ try {
48
+ installPipelineRuntime(firestore);
49
+ } catch {
50
+ // Avoid changing getFirestore behavior if optional pipeline runtime install fails.
51
+ }
52
+ }
53
+ return firestore;
54
+ }
55
+ export function doc(parent, path, ...pathSegments) {
56
+ let resolvedPath = path;
57
+ if (pathSegments.length) {
58
+ resolvedPath = (resolvedPath ?? '') + '/' + pathSegments.map(segment => segment.replace(/^\/|\/$/g, '')).join('/');
59
+ }
60
+ return parent.doc.call(parent, resolvedPath, MODULAR_DEPRECATION_ARG);
61
+ }
62
+ export function collection(parent, path, ...pathSegments) {
63
+ let resolvedPath = path;
64
+ if (pathSegments.length) {
65
+ resolvedPath = `${resolvedPath}/${pathSegments.map(segment => segment.replace(/^\/|\/$/g, '')).join('/')}`;
66
+ }
67
+ return parent.collection.call(parent, resolvedPath, MODULAR_DEPRECATION_ARG);
68
+ }
69
+ export function refEqual(left, right) {
70
+ return left.isEqual.call(left, right, MODULAR_DEPRECATION_ARG);
71
+ }
72
+ export function collectionGroup(firestore, collectionId) {
73
+ return firestore.collectionGroup.call(firestore, collectionId, MODULAR_DEPRECATION_ARG);
74
+ }
75
+ let snapshotInSyncListenerId = 0;
76
+ export function onSnapshotsInSync(firestore, callback) {
77
+ const listenerId = snapshotInSyncListenerId++;
78
+ const syncFirestore = firestore;
79
+ syncFirestore.native.addSnapshotsInSync(listenerId);
80
+ const subscription = syncFirestore.emitter.addListener(syncFirestore.eventNameForApp(`firestore_snapshots_in_sync_event:${listenerId}`), () => {
81
+ if (typeof callback === 'function') {
82
+ callback();
83
+ } else {
84
+ callback.next?.();
85
+ }
86
+ });
87
+ return () => {
88
+ subscription.remove();
89
+ syncFirestore.native.removeSnapshotsInSync(listenerId);
90
+ };
91
+ }
92
+ export function setDoc(reference, data, options) {
93
+ return reference.set.call(reference, data, options, MODULAR_DEPRECATION_ARG);
94
+ }
95
+ export function updateDoc(reference, fieldOrUpdateData, value, ...moreFieldsAndValues) {
96
+ const ref = reference;
97
+ if (!fieldOrUpdateData) {
98
+ return ref.update.call(reference, MODULAR_DEPRECATION_ARG);
99
+ }
100
+ if (!value) {
101
+ return ref.update.call(reference, fieldOrUpdateData, MODULAR_DEPRECATION_ARG);
102
+ }
103
+ if (!Array.isArray(moreFieldsAndValues)) {
104
+ return ref.update.call(reference, fieldOrUpdateData, value, MODULAR_DEPRECATION_ARG);
105
+ }
106
+ return ref.update.call(reference, fieldOrUpdateData, value, ...moreFieldsAndValues, MODULAR_DEPRECATION_ARG);
107
+ }
108
+ export function addDoc(reference, data) {
109
+ return reference.add.call(reference, data, MODULAR_DEPRECATION_ARG);
110
+ }
111
+ export function enableNetwork(firestore) {
112
+ return firestore.enableNetwork.call(firestore, MODULAR_DEPRECATION_ARG);
113
+ }
114
+ export function disableNetwork(firestore) {
115
+ return firestore.disableNetwork.call(firestore, MODULAR_DEPRECATION_ARG);
116
+ }
117
+ export function clearPersistence(firestore) {
118
+ // this will call deprecation warning as it isn't part of firebase-js-sdk API
119
+ return firestore.clearPersistence();
120
+ }
121
+ export function clearIndexedDbPersistence(firestore) {
122
+ return firestore.clearPersistence.call(firestore, MODULAR_DEPRECATION_ARG);
123
+ }
124
+ export function terminate(firestore) {
125
+ return firestore.terminate.call(firestore, MODULAR_DEPRECATION_ARG);
126
+ }
127
+ export function waitForPendingWrites(firestore) {
128
+ return firestore.waitForPendingWrites.call(firestore, MODULAR_DEPRECATION_ARG);
129
+ }
130
+ export async function initializeFirestore(app, settings, databaseId) {
131
+ const firebase = getApp(app.name);
132
+ const firestore = firebase.firestore(databaseId);
133
+ await firestore.settings.call(firestore, settings, MODULAR_DEPRECATION_ARG);
134
+ return firestore;
135
+ }
136
+ export function connectFirestoreEmulator(firestore, host, port, options) {
137
+ return firestore.useEmulator.call(firestore, host, port, options, MODULAR_DEPRECATION_ARG);
138
+ }
139
+ export function setLogLevel(logLevel) {
140
+ return appSetLogLevel(logLevel);
141
+ }
142
+ export function runTransaction(firestore, updateFunction) {
143
+ return firestore.runTransaction.call(firestore, updateFunction, MODULAR_DEPRECATION_ARG);
144
+ }
145
+ export function getCountFromServer(query) {
146
+ return query.count.call(query, MODULAR_DEPRECATION_ARG).get();
147
+ }
148
+ export function getAggregateFromServer(query, aggregateSpec) {
149
+ if (!(query instanceof QueryImpl)) {
150
+ throw new Error('`getAggregateFromServer(*, aggregateSpec)` `query` must be an instance of `FirestoreQuery`');
151
+ }
152
+ if (!isObject(aggregateSpec)) {
153
+ throw new Error('`getAggregateFromServer(query, *)` `aggregateSpec` must be an object');
154
+ }
155
+ const containsOneAggregateField = Object.values(aggregateSpec).find(value => value instanceof AggregateField);
156
+ if (!containsOneAggregateField) {
157
+ throw new Error('`getAggregateFromServer(query, *)` `aggregateSpec` must contain at least one `AggregateField`');
158
+ }
159
+ const aggregateQueries = [];
160
+ for (const key in aggregateSpec) {
161
+ if (!Object.prototype.hasOwnProperty.call(aggregateSpec, key)) {
162
+ continue;
163
+ }
164
+ const aggregateField = aggregateSpec[key];
165
+ if (!(aggregateField instanceof AggregateField)) {
166
+ continue;
167
+ }
168
+ switch (aggregateField.aggregateType) {
169
+ case 'avg':
170
+ case 'sum':
171
+ case 'count':
172
+ aggregateQueries.push({
173
+ aggregateType: aggregateField.aggregateType,
174
+ field: aggregateField._internalFieldPath === undefined ? null : aggregateField._internalFieldPath._toPath(),
175
+ key
176
+ });
177
+ break;
178
+ default:
179
+ throw new Error(`'AggregateField' has an an unknown 'AggregateType' : ${aggregateField.aggregateType}`);
180
+ }
181
+ }
182
+ const queryWithInternals = query;
183
+ return queryWithInternals._firestore.native.aggregateQuery(queryWithInternals._collectionPath.relativeName, queryWithInternals._modifiers.type, queryWithInternals._modifiers.filters, queryWithInternals._modifiers.orders, queryWithInternals._modifiers.options, aggregateQueries).then(data => new AggregateQuerySnapshot(query, data, false));
184
+ }
185
+ export function sum(field) {
186
+ return new AggregateField('sum', fieldPathFromArgument(field));
187
+ }
188
+ export function average(field) {
189
+ return new AggregateField('avg', fieldPathFromArgument(field));
190
+ }
191
+ export function count() {
192
+ return new AggregateField('count');
193
+ }
194
+ export function loadBundle(firestore, bundleData) {
195
+ const task = new LoadBundleTask();
196
+ firestore.loadBundle.call(firestore, bundleData, MODULAR_DEPRECATION_ARG).then(progress => task._completeWith(progress)).catch(error => task._failWith(error));
197
+ return task;
198
+ }
199
+ export function namedQuery(firestore, name) {
200
+ return Promise.resolve(firestore.namedQuery.call(firestore, name, MODULAR_DEPRECATION_ARG));
201
+ }
202
+ export function writeBatch(firestore) {
203
+ return firestore.batch.call(firestore, MODULAR_DEPRECATION_ARG);
204
+ }
205
+ export function getPersistentCacheIndexManager(firestore) {
206
+ return firestore.persistentCacheIndexManager.call(firestore, MODULAR_DEPRECATION_ARG);
207
+ }
208
+ export function enablePersistentCacheIndexAutoCreation(indexManager) {
209
+ return indexManager.enableIndexAutoCreation.call(indexManager, MODULAR_DEPRECATION_ARG);
210
+ }
211
+ export function disablePersistentCacheIndexAutoCreation(indexManager) {
212
+ return indexManager.disableIndexAutoCreation.call(indexManager, MODULAR_DEPRECATION_ARG);
213
+ }
214
+ export function deleteAllPersistentCacheIndexes(indexManager) {
215
+ return indexManager.deleteAllIndexes.call(indexManager, MODULAR_DEPRECATION_ARG);
216
+ }
217
+ export * from "./modular/query.js";
218
+ export * from "./modular/snapshot.js";
219
+ export * from "./modular/Bytes.js";
220
+ export * from "./modular/FieldPath.js";
221
+ export * from "./modular/FieldValue.js";
222
+ export * from "./modular/GeoPoint.js";
223
+ export * from "./modular/Timestamp.js";
224
+ export * from "./modular/VectorValue.js";
225
+ export { LoadBundleTask } from "./LoadBundleTask.js";
226
+ export { default as Transaction } from "./FirestoreTransaction.js";
227
+ export { default as WriteBatch } from "./FirestoreWriteBatch.js";
228
+ export { Filter } from "./FirestoreFilter.js";
229
+ //# sourceMappingURL=modular.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getApp","setLogLevel","appSetLogLevel","isObject","MODULAR_DEPRECATION_ARG","AggregateField","fieldPathFromArgument","AggregateQuerySnapshot","QueryImpl","LoadBundleTask","CACHE_SIZE_UNLIMITED","PIPELINE_RUNTIME_INSTALLER_SYMBOL","Symbol","for","getFirestore","appOrDatabaseId","databaseId","app","name","firestore","runtimeGlobal","globalThis","installPipelineRuntime","doc","parent","path","pathSegments","resolvedPath","length","map","segment","replace","join","call","collection","refEqual","left","right","isEqual","collectionGroup","collectionId","snapshotInSyncListenerId","onSnapshotsInSync","callback","listenerId","syncFirestore","native","addSnapshotsInSync","subscription","emitter","addListener","eventNameForApp","next","remove","removeSnapshotsInSync","setDoc","reference","data","options","set","updateDoc","fieldOrUpdateData","value","moreFieldsAndValues","ref","update","Array","isArray","addDoc","add","enableNetwork","disableNetwork","clearPersistence","clearIndexedDbPersistence","terminate","waitForPendingWrites","initializeFirestore","settings","firebase","connectFirestoreEmulator","host","port","useEmulator","logLevel","runTransaction","updateFunction","getCountFromServer","query","count","get","getAggregateFromServer","aggregateSpec","Error","containsOneAggregateField","Object","values","find","aggregateQueries","key","prototype","hasOwnProperty","aggregateField","aggregateType","push","field","_internalFieldPath","undefined","_toPath","queryWithInternals","_firestore","aggregateQuery","_collectionPath","relativeName","_modifiers","type","filters","orders","then","sum","average","loadBundle","bundleData","task","progress","_completeWith","catch","error","_failWith","namedQuery","Promise","resolve","writeBatch","batch","getPersistentCacheIndexManager","persistentCacheIndexManager","enablePersistentCacheIndexAutoCreation","indexManager","enableIndexAutoCreation","disablePersistentCacheIndexAutoCreation","disableIndexAutoCreation","deleteAllPersistentCacheIndexes","deleteAllIndexes","default","Transaction","WriteBatch","Filter"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,EAAEC,WAAW,IAAIC,cAAc,QAAQ,4BAA4B;AAClF,SAASC,QAAQ,EAAEC,uBAAuB,QAAQ,+CAA+C;AACjG,SACEC,cAAc,EACdC,qBAAqB,EACrBC,sBAAsB,QACjB,yBAAsB;AAC7B,OAAOC,SAAS,MAAM,qBAAkB;AACxC,SAASC,cAAc,QAAQ,qBAAkB;AAqCjD,SAASJ,cAAc,EAAEE,sBAAsB,QAAQ,yBAAsB;AAE7E,OAAO,MAAMG,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAMC,iCAAiC,GAAGC,MAAM,CAACC,GAAG,CAAC,uCAAuC,CAAC;AAS7F,OAAO,SAASC,YAAYA,CAC1BC,eAAsC,EACtCC,UAAmB,EACR;EACX,MAAMC,GAAG,GAAIC,IAAa,IAAKlB,MAAM,CAACkB,IAAI,CAAwC;EAClF,IAAIC,SAAoB;EACxB,IAAI,OAAOJ,eAAe,KAAK,QAAQ,EAAE;IACvCI,SAAS,GAAGF,GAAG,CAAC,CAAC,CAACE,SAAS,CAACJ,eAAe,CAAC;EAC9C,CAAC,MAAM,IAAIA,eAAe,EAAE;IAC1B,IAAIC,UAAU,EAAE;MACdG,SAAS,GAAGF,GAAG,CAACF,eAAe,CAACG,IAAI,CAAC,CAACC,SAAS,CAACH,UAAU,CAAC;IAC7D,CAAC,MAAM;MACLG,SAAS,GAAGF,GAAG,CAACF,eAAe,CAACG,IAAI,CAAC,CAACC,SAAS,CAAC,CAAC;IACnD;EACF,CAAC,MAAM,IAAIH,UAAU,EAAE;IACrBG,SAAS,GAAGF,GAAG,CAAC,CAAC,CAACE,SAAS,CAACH,UAAU,CAAC;EACzC,CAAC,MAAM;IACLG,SAAS,GAAGF,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,SAAS,CAAuB6G,UAAU,CAAC/F,IAAI,CAACd,SAAS,EAAED,IAAI,EAAEd,uBAAuB,CAC3F,CAAC;AACH;AAEA,OAAO,SAAS+H,UAAUA,CAAChH,SAAoB,EAAc;EAC3D,OAAQA,SAAS,CAAuBiH,KAAK,CAACnG,IAAI,CAACd,SAAS,EAAEf,uBAAuB,CAAC;AACxF;AAEA,OAAO,SAASiI,8BAA8BA,CAC5ClH,SAAoB,EACgB;EACpC,OAAQA,SAAS,CAAuBmH,2BAA2B,CAACrG,IAAI,CACtEd,SAAS,EACTf,uBACF,CAAC;AACH;AAEA,OAAO,SAASmI,sCAAsCA,CACpDC,YAAyC,EAC1B;EACf,OAAQA,YAAY,CAAyCC,uBAAuB,CAACxG,IAAI,CACvFuG,YAAY,EACZpI,uBACF,CAAC;AACH;AAEA,OAAO,SAASsI,uCAAuCA,CACrDF,YAAyC,EAC1B;EACf,OAAQA,YAAY,CAAyCG,wBAAwB,CAAC1G,IAAI,CACxFuG,YAAY,EACZpI,uBACF,CAAC;AACH;AAEA,OAAO,SAASwI,+BAA+BA,CAC7CJ,YAAyC,EAC1B;EACf,OAAQA,YAAY,CAAyCK,gBAAgB,CAAC5G,IAAI,CAChFuG,YAAY,EACZpI,uBACF,CAAC;AACH;AAEA,cAAc,oBAAiB;AAC/B,cAAc,uBAAoB;AAClC,cAAc,oBAAiB;AAC/B,cAAc,wBAAqB;AACnC,cAAc,yBAAsB;AACpC,cAAc,uBAAoB;AAClC,cAAc,wBAAqB;AACnC,cAAc,0BAAuB;AACrC,SAASK,cAAc,QAAQ,qBAAkB;AACjD,SAASqI,OAAO,IAAIC,WAAW,QAAQ,2BAAwB;AAC/D,SAASD,OAAO,IAAIE,UAAU,QAAQ,0BAAuB;AAC7D,SAASC,MAAM,QAAQ,sBAAmB","ignoreList":[]}
@@ -0,0 +1,298 @@
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 { createDeprecationProxy, isAndroid, isBoolean, isFunction, isNumber, isObject, isString, isUndefined, isOther } from '@react-native-firebase/app/dist/module/common';
21
+ import { createModuleNamespace, FirebaseModule, getFirebaseRoot } from '@react-native-firebase/app/dist/module/internal';
22
+ import { setReactNativeModule } from '@react-native-firebase/app/dist/module/internal/nativeModule';
23
+ import CollectionReference from "./FirestoreCollectionReference.js";
24
+ import DocumentReference from "./FirestoreDocumentReference.js";
25
+ import FirestorePath from "./FirestorePath.js";
26
+ import FirestorePersistentCacheIndexManager from "./FirestorePersistentCacheIndexManager.js";
27
+ import Query from "./FirestoreQuery.js";
28
+ import QueryModifiers from "./FirestoreQueryModifiers.js";
29
+ import FirestoreStatics from "./FirestoreStatics.js";
30
+ import FirestoreTransactionHandler from "./FirestoreTransactionHandler.js";
31
+ import FirestoreWriteBatch from "./FirestoreWriteBatch.js";
32
+ import { LoadBundleTask } from "./LoadBundleTask.js";
33
+ import { version } from "./version.js";
34
+ import fallBackModule from './web/RNFBFirestoreModule';
35
+
36
+ // react-native at least through 0.77 does not correctly support URL.host, which
37
+ // is needed by firebase-js-sdk. It appears that in 0.80+ it is supported, so this
38
+ // (and the package.json entry for this package) should be removed when the minimum
39
+ // supported version of react-native is 0.80 or higher.
40
+ import 'react-native-url-polyfill/auto';
41
+ const namespace = 'firestore';
42
+ const nativeModuleNames = ['RNFBFirestoreModule', 'RNFBFirestoreCollectionModule', 'RNFBFirestoreDocumentModule', 'RNFBFirestoreTransactionModule'];
43
+ const nativeEvents = ['firestore_collection_sync_event', 'firestore_document_sync_event', 'firestore_transaction_event', 'firestore_snapshots_in_sync_event'];
44
+
45
+ /** Sync event payload from emitter when fanning out collection/document/snapshots-in-sync events. */
46
+
47
+ class FirebaseFirestoreModule extends FirebaseModule {
48
+ type = 'firestore';
49
+ constructor(app, config, databaseId) {
50
+ super(app, config);
51
+ if (isString(databaseId) || databaseId === undefined) {
52
+ this._databaseId = databaseId || '(default)';
53
+ // Kept for backwards compatibility with the modular API
54
+ this._customUrlOrRegion = this._databaseId;
55
+ } else {
56
+ throw new Error('firebase.app().firestore(*) database ID must be a string');
57
+ }
58
+ this._referencePath = new FirestorePath();
59
+ this._transactionHandler = new FirestoreTransactionHandler(this);
60
+
61
+ // Fan out native events
62
+ this.emitter.addListener(this.eventNameForApp('firestore_collection_sync_event'), event => {
63
+ const syncEvent = event;
64
+ this.emitter.emit(this.eventNameForApp(`firestore_collection_sync_event:${syncEvent.listenerId}`), event);
65
+ });
66
+ this.emitter.addListener(this.eventNameForApp('firestore_document_sync_event'), event => {
67
+ const syncEvent = event;
68
+ this.emitter.emit(this.eventNameForApp(`firestore_document_sync_event:${syncEvent.listenerId}`), event);
69
+ });
70
+ this.emitter.addListener(this.eventNameForApp('firestore_snapshots_in_sync_event'), event => {
71
+ const syncEvent = event;
72
+ this.emitter.emit(this.eventNameForApp(`firestore_snapshots_in_sync_event:${syncEvent.listenerId}`), event);
73
+ });
74
+ this._settings = {
75
+ ignoreUndefinedProperties: false,
76
+ persistence: true
77
+ };
78
+ }
79
+ toJSON() {
80
+ return {
81
+ app: this.app,
82
+ databaseId: this._databaseId,
83
+ settings: this._settings
84
+ };
85
+ }
86
+ // Kept for backwards compatibility with the modular API
87
+ get customUrlOrRegion() {
88
+ return this._databaseId;
89
+ }
90
+
91
+ // We override the FirebaseModule's eventNameForApp() method to include the customUrlOrRegion
92
+ eventNameForApp(...args) {
93
+ return `${this.app.name}-${this._databaseId}-${args.join('-')}`;
94
+ }
95
+ batch() {
96
+ return new FirestoreWriteBatch(this);
97
+ }
98
+ loadBundle(bundle) {
99
+ if (!isString(bundle)) {
100
+ throw new Error("firebase.firestore().loadBundle(*) 'bundle' must be a string value.");
101
+ }
102
+ if (bundle === '') {
103
+ throw new Error("firebase.firestore().loadBundle(*) 'bundle' must be a non-empty string.");
104
+ }
105
+ const task = new LoadBundleTask();
106
+ this.native.loadBundle(bundle).then(progress => task._completeWith(progress)).catch(error => task._failWith(error));
107
+ return task;
108
+ }
109
+ namedQuery(queryName) {
110
+ if (!isString(queryName)) {
111
+ throw new Error("firebase.firestore().namedQuery(*) 'queryName' must be a string value.");
112
+ }
113
+ if (queryName === '') {
114
+ throw new Error("firebase.firestore().namedQuery(*) 'queryName' must be a non-empty string.");
115
+ }
116
+ return new Query(this, this._referencePath, new QueryModifiers(), queryName);
117
+ }
118
+ async clearPersistence() {
119
+ await this.native.clearPersistence();
120
+ }
121
+ async waitForPendingWrites() {
122
+ await this.native.waitForPendingWrites();
123
+ }
124
+ async terminate() {
125
+ await this.native.terminate();
126
+ }
127
+ useEmulator(host, port) {
128
+ if (!host || !isString(host) || !port || !isNumber(port)) {
129
+ throw new Error('firebase.firestore().useEmulator() takes a non-empty host and port');
130
+ }
131
+ let mappedHost = host;
132
+ const androidBypassEmulatorUrlRemap = typeof this.firebaseJson.android_bypass_emulator_url_remap === 'boolean' && this.firebaseJson.android_bypass_emulator_url_remap;
133
+ if (!androidBypassEmulatorUrlRemap && isAndroid && mappedHost) {
134
+ if (mappedHost === 'localhost' || mappedHost === '127.0.0.1') {
135
+ mappedHost = '10.0.2.2';
136
+ // eslint-disable-next-line no-console
137
+ console.log('Mapping firestore host to "10.0.2.2" for android emulators. Use real IP on real devices. You can bypass this behaviour with "android_bypass_emulator_url_remap" flag.');
138
+ }
139
+ }
140
+ this.native.useEmulator(mappedHost, port);
141
+ // @ts-ignore - undocumented return, just used to unit test android host remapping
142
+ return [mappedHost, port];
143
+ }
144
+ collection(collectionPath) {
145
+ if (!isString(collectionPath)) {
146
+ throw new Error("firebase.firestore().collection(*) 'collectionPath' must be a string value.");
147
+ }
148
+ if (collectionPath === '') {
149
+ throw new Error("firebase.firestore().collection(*) 'collectionPath' must be a non-empty string.");
150
+ }
151
+ const path = this._referencePath.child(collectionPath);
152
+ if (!path.isCollection) {
153
+ throw new Error("firebase.firestore().collection(*) 'collectionPath' must point to a collection.");
154
+ }
155
+ return createDeprecationProxy(new CollectionReference(this, path));
156
+ }
157
+ collectionGroup(collectionId) {
158
+ if (!isString(collectionId)) {
159
+ throw new Error("firebase.firestore().collectionGroup(*) 'collectionId' must be a string value.");
160
+ }
161
+ if (collectionId === '') {
162
+ throw new Error("firebase.firestore().collectionGroup(*) 'collectionId' must be a non-empty string.");
163
+ }
164
+ if (collectionId.includes('/')) {
165
+ throw new Error("firebase.firestore().collectionGroup(*) 'collectionId' must not contain '/'.");
166
+ }
167
+ return createDeprecationProxy(new Query(this, this._referencePath.child(collectionId), new QueryModifiers().asCollectionGroupQuery(), undefined));
168
+ }
169
+ async disableNetwork() {
170
+ await this.native.disableNetwork();
171
+ }
172
+ doc(documentPath) {
173
+ if (!isString(documentPath)) {
174
+ throw new Error("firebase.firestore().doc(*) 'documentPath' must be a string value.");
175
+ }
176
+ if (documentPath === '') {
177
+ throw new Error("firebase.firestore().doc(*) 'documentPath' must be a non-empty string.");
178
+ }
179
+ const path = this._referencePath.child(documentPath);
180
+ if (!path.isDocument) {
181
+ throw new Error("firebase.firestore().doc(*) 'documentPath' must point to a document.");
182
+ }
183
+ return createDeprecationProxy(new DocumentReference(this, path));
184
+ }
185
+ async enableNetwork() {
186
+ await this.native.enableNetwork();
187
+ }
188
+ runTransaction(updateFunction) {
189
+ if (!isFunction(updateFunction)) {
190
+ return Promise.reject(new Error("firebase.firestore().runTransaction(*) 'updateFunction' must be a function."));
191
+ }
192
+ return this._transactionHandler._add(updateFunction);
193
+ }
194
+ settings(settings) {
195
+ if (!isObject(settings)) {
196
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings' must be an object."));
197
+ }
198
+ const keys = Object.keys(settings);
199
+ const opts = ['cacheSizeBytes', 'host', 'localCache', 'persistence', 'ssl', 'ignoreUndefinedProperties', 'serverTimestampBehavior', 'experimentalForceLongPolling', 'experimentalAutoDetectLongPolling', 'experimentalLongPollingOptions'];
200
+ for (const key of keys) {
201
+ if (!opts.includes(key)) {
202
+ return Promise.reject(new Error(`firebase.firestore().settings(*) 'settings.${key}' is not a valid settings field.`));
203
+ }
204
+ }
205
+ if (!isUndefined(settings.cacheSizeBytes)) {
206
+ if (!isNumber(settings.cacheSizeBytes)) {
207
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.cacheSizeBytes' must be a number value."));
208
+ }
209
+ if (settings.cacheSizeBytes !== FirestoreStatics.CACHE_SIZE_UNLIMITED && settings.cacheSizeBytes < 1048576) {
210
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.cacheSizeBytes' the minimum cache size is 1048576 bytes (1MB)."));
211
+ }
212
+ }
213
+ if (!isUndefined(settings.host)) {
214
+ if (!isString(settings.host)) {
215
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.host' must be a string value."));
216
+ }
217
+ if (settings.host === '') {
218
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.host' must not be an empty string."));
219
+ }
220
+ if (isAndroid) {
221
+ const host = settings.host;
222
+ if (host.startsWith('localhost')) {
223
+ settings.host = host.replace('localhost', '10.0.2.2');
224
+ // eslint-disable-next-line no-console
225
+ console.log('Mapping firestore host "localhost" to "10.0.2.2" for android emulators. Use real IP on real devices.');
226
+ }
227
+ if (settings.host.startsWith('127.0.0.1')) {
228
+ settings.host = settings.host.replace('127.0.0.1', '10.0.2.2');
229
+ // eslint-disable-next-line no-console
230
+ console.log('Mapping firestore host "127.0.0.1" to "10.0.2.2" for android emulators. Use real IP on real devices.');
231
+ }
232
+ }
233
+ }
234
+ if (!isUndefined(settings.persistence) && !isBoolean(settings.persistence)) {
235
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.persistence' must be a boolean value."));
236
+ }
237
+ if (!isUndefined(settings.ssl) && !isBoolean(settings.ssl)) {
238
+ throw new Error("firebase.firestore().settings(*) 'settings.ssl' must be a boolean value.");
239
+ }
240
+ if (!isUndefined(settings.serverTimestampBehavior) && !['estimate', 'previous', 'none'].includes(settings.serverTimestampBehavior)) {
241
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.serverTimestampBehavior' must be one of 'estimate', 'previous', 'none'."));
242
+ }
243
+ if (!isUndefined(settings.ignoreUndefinedProperties)) {
244
+ if (!isBoolean(settings.ignoreUndefinedProperties)) {
245
+ return Promise.reject(new Error("firebase.firestore().settings(*) 'settings.ignoreUndefinedProperties' must be a boolean value."));
246
+ }
247
+ this._settings.ignoreUndefinedProperties = settings.ignoreUndefinedProperties;
248
+ delete settings.ignoreUndefinedProperties;
249
+ }
250
+ if (settings.persistence === false) {
251
+ // Required for persistentCacheIndexManager(), if this setting is `false`, it returns `null`
252
+ this._settings.persistence = false;
253
+ }
254
+ const settingsToApply = isOther ? settings : {
255
+ ...settings
256
+ };
257
+ if (!isOther) {
258
+ delete settingsToApply.localCache;
259
+ delete settingsToApply.experimentalForceLongPolling;
260
+ delete settingsToApply.experimentalAutoDetectLongPolling;
261
+ delete settingsToApply.experimentalLongPollingOptions;
262
+ }
263
+ return this.native.settings(settingsToApply);
264
+ }
265
+ persistentCacheIndexManager() {
266
+ if (this._settings.persistence === false) {
267
+ return null;
268
+ }
269
+ return createDeprecationProxy(new FirestorePersistentCacheIndexManager(this));
270
+ }
271
+ }
272
+
273
+ // import { SDK_VERSION } from '@react-native-firebase/firestore';
274
+ export const SDK_VERSION = version;
275
+ const firestoreNamespace = createModuleNamespace({
276
+ statics: FirestoreStatics,
277
+ version,
278
+ namespace,
279
+ nativeModuleName: [...nativeModuleNames],
280
+ nativeEvents: [...nativeEvents],
281
+ hasMultiAppSupport: true,
282
+ hasCustomUrlOrRegionSupport: true,
283
+ ModuleClass: FirebaseFirestoreModule
284
+ });
285
+ // import firestore from '@react-native-firebase/firestore';
286
+ // firestore().X(...);
287
+ export default firestoreNamespace;
288
+
289
+ // import firestore, { firebase } from '@react-native-firebase/firestore';
290
+ // firestore().X(...);
291
+ // firebase.firestore().X(...);
292
+ export const firebase = getFirebaseRoot();
293
+
294
+ // Register the interop module for non-native platforms.
295
+ for (const moduleName of nativeModuleNames) {
296
+ setReactNativeModule(moduleName, fallBackModule);
297
+ }
298
+ //# sourceMappingURL=namespaced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createDeprecationProxy","isAndroid","isBoolean","isFunction","isNumber","isObject","isString","isUndefined","isOther","createModuleNamespace","FirebaseModule","getFirebaseRoot","setReactNativeModule","CollectionReference","DocumentReference","FirestorePath","FirestorePersistentCacheIndexManager","Query","QueryModifiers","FirestoreStatics","FirestoreTransactionHandler","FirestoreWriteBatch","LoadBundleTask","version","fallBackModule","namespace","nativeModuleNames","nativeEvents","FirebaseFirestoreModule","type","constructor","app","config","databaseId","undefined","_databaseId","_customUrlOrRegion","Error","_referencePath","_transactionHandler","emitter","addListener","eventNameForApp","event","syncEvent","emit","listenerId","_settings","ignoreUndefinedProperties","persistence","toJSON","settings","customUrlOrRegion","args","name","join","batch","loadBundle","bundle","task","native","then","progress","_completeWith","catch","error","_failWith","namedQuery","queryName","clearPersistence","waitForPendingWrites","terminate","useEmulator","host","port","mappedHost","androidBypassEmulatorUrlRemap","firebaseJson","android_bypass_emulator_url_remap","console","log","collection","collectionPath","path","child","isCollection","collectionGroup","collectionId","includes","asCollectionGroupQuery","disableNetwork","doc","documentPath","isDocument","enableNetwork","runTransaction","updateFunction","Promise","reject","_add","keys","Object","opts","key","cacheSizeBytes","CACHE_SIZE_UNLIMITED","startsWith","replace","ssl","serverTimestampBehavior","settingsToApply","localCache","experimentalForceLongPolling","experimentalAutoDetectLongPolling","experimentalLongPollingOptions","persistentCacheIndexManager","SDK_VERSION","firestoreNamespace","statics","nativeModuleName","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","firebase","moduleName"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,sBAAsB,EACtBC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,OAAO,QACF,+CAA+C;AACtD,SACEC,qBAAqB,EACrBC,cAAc,EACdC,eAAe,QAEV,iDAAiD;AACxD,SAASC,oBAAoB,QAAQ,8DAA8D;AAEnG,OAAOC,mBAAmB,MAAM,mCAAgC;AAChE,OAAOC,iBAAiB,MAAM,iCAA8B;AAC5D,OAAOC,aAAa,MAAM,oBAAiB;AAC3C,OAAOC,oCAAoC,MAAM,2CAAwC;AACzF,OAAOC,KAAK,MAAM,qBAAkB;AACpC,OAAOC,cAAc,MAAM,8BAA2B;AACtD,OAAOC,gBAAgB,MAAM,uBAAoB;AACjD,OAAOC,2BAA2B,MAAM,kCAA+B;AACvE,OAAOC,mBAAmB,MAAM,0BAAuB;AACvD,SAASC,cAAc,QAAQ,qBAAkB;AAEjD,SAASC,OAAO,QAAQ,cAAW;AAGnC,OAAOC,cAAc,MAAM,2BAA2B;;AAEtD;AACA;AACA;AACA;AACA,OAAO,gCAAgC;AAEvC,MAAMC,SAAS,GAAG,WAAW;AAE7B,MAAMC,iBAAiB,GAAG,CACxB,qBAAqB,EACrB,+BAA+B,EAC/B,6BAA6B,EAC7B,gCAAgC,CACxB;AAEV,MAAMC,YAAY,GAAG,CACnB,iCAAiC,EACjC,+BAA+B,EAC/B,6BAA6B,EAC7B,mCAAmC,CAC3B;;AAOV;;AAGA,MAAMC,uBAAuB,SAASlB,cAAc,CAAwB;EAC1EmB,IAAI,GAAG,WAAW;EAMlBC,WAAWA,CACTC,GAAwC,EACxCC,MAAoB,EACpBC,UAA0B,EAC1B;IACA,KAA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