@react-native-firebase/firestore 23.8.8 → 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 +27 -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,183 @@
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 file 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
+ function isRecord(value) {
21
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
22
+ }
23
+ function isNonEmptyString(value) {
24
+ return typeof value === 'string' && value.length > 0;
25
+ }
26
+ function validateNonEmptyStringArray(value, fieldName) {
27
+ if (!Array.isArray(value) || value.length === 0) {
28
+ throw new Error(`pipelineExecute() expected ${fieldName} to contain at least one value.`);
29
+ }
30
+ if (!value.every(isNonEmptyString)) {
31
+ throw new Error(`pipelineExecute() expected ${fieldName} to contain only non-empty strings.`);
32
+ }
33
+ }
34
+ function validateSource(source, fieldName = 'pipeline.source') {
35
+ if (!isRecord(source)) {
36
+ throw new Error(`pipelineExecute() expected ${fieldName} to be an object.`);
37
+ }
38
+ switch (source.source) {
39
+ case 'collection':
40
+ if (!isNonEmptyString(source.path)) {
41
+ throw new Error(`pipelineExecute() expected ${fieldName}.path to be a non-empty string.`);
42
+ }
43
+ return;
44
+ case 'collectionGroup':
45
+ if (!isNonEmptyString(source.collectionId)) {
46
+ throw new Error(`pipelineExecute() expected ${fieldName}.collectionId to be a non-empty string.`);
47
+ }
48
+ return;
49
+ case 'database':
50
+ return;
51
+ case 'documents':
52
+ validateNonEmptyStringArray(source.documents, `${fieldName}.documents`);
53
+ return;
54
+ case 'query':
55
+ if (!isNonEmptyString(source.path)) {
56
+ throw new Error(`pipelineExecute() expected ${fieldName}.path to be a non-empty string.`);
57
+ }
58
+ if (!isNonEmptyString(source.queryType)) {
59
+ throw new Error(`pipelineExecute() expected ${fieldName}.queryType to be a non-empty string.`);
60
+ }
61
+ if (!Array.isArray(source.filters)) {
62
+ throw new Error(`pipelineExecute() expected ${fieldName}.filters to be an array.`);
63
+ }
64
+ if (!Array.isArray(source.orders)) {
65
+ throw new Error(`pipelineExecute() expected ${fieldName}.orders to be an array.`);
66
+ }
67
+ if (!isRecord(source.options)) {
68
+ throw new Error(`pipelineExecute() expected ${fieldName}.options to be an object.`);
69
+ }
70
+ return;
71
+ default:
72
+ throw new Error('pipelineExecute() received an unknown source type.');
73
+ }
74
+ }
75
+ function validateNonEmptyStageArray(value, fieldName) {
76
+ if (!Array.isArray(value) || value.length === 0) {
77
+ throw new Error(`pipelineExecute() expected ${fieldName} to contain at least one value.`);
78
+ }
79
+ }
80
+ function validateStage(stage, stagePath, optionsPath) {
81
+ if (!isRecord(stage) || typeof stage.stage !== 'string' || !isRecord(stage.options)) {
82
+ throw new Error(`pipelineExecute() expected ${stagePath} to include stage and options.`);
83
+ }
84
+ switch (stage.stage) {
85
+ case 'select':
86
+ validateNonEmptyStageArray(stage.options.selections, `${optionsPath}.selections`);
87
+ return undefined;
88
+ case 'addFields':
89
+ validateNonEmptyStageArray(stage.options.fields, `${optionsPath}.fields`);
90
+ return undefined;
91
+ case 'removeFields':
92
+ validateNonEmptyStageArray(stage.options.fields, `${optionsPath}.fields`);
93
+ return undefined;
94
+ case 'sort':
95
+ validateNonEmptyStageArray(stage.options.orderings, `${optionsPath}.orderings`);
96
+ return undefined;
97
+ case 'aggregate':
98
+ validateNonEmptyStageArray(stage.options.accumulators, `${optionsPath}.accumulators`);
99
+ return undefined;
100
+ case 'distinct':
101
+ validateNonEmptyStageArray(stage.options.groups, `${optionsPath}.groups`);
102
+ return undefined;
103
+ case 'sample':
104
+ {
105
+ const hasDocuments = typeof stage.options.documents === 'number';
106
+ const hasPercentage = typeof stage.options.percentage === 'number';
107
+ if (!hasDocuments && !hasPercentage) {
108
+ throw new Error('pipelineExecute() expected sample stage to include documents or percentage.');
109
+ }
110
+ return undefined;
111
+ }
112
+ case 'union':
113
+ if (!isRecord(stage.options.other) || !isRecord(stage.options.other.source) || !Array.isArray(stage.options.other.stages)) {
114
+ throw new Error('pipelineExecute() expected stage.options.other to be a serialized pipeline object.');
115
+ }
116
+ return stage.options.other;
117
+ case 'where':
118
+ case 'limit':
119
+ case 'offset':
120
+ case 'findNearest':
121
+ case 'replaceWith':
122
+ case 'unnest':
123
+ case 'rawStage':
124
+ return undefined;
125
+ default:
126
+ throw new Error(`pipelineExecute() received an unknown stage: ${stage.stage}.`);
127
+ }
128
+ }
129
+ export function validateSerializedPipeline(pipeline, fieldName = 'pipeline') {
130
+ const pending = [{
131
+ pipeline,
132
+ fieldName
133
+ }];
134
+ for (let index = 0; index < pending.length; index++) {
135
+ const current = pending[index];
136
+ if (!isRecord(current.pipeline)) {
137
+ throw new Error(`pipelineExecute() expected ${current.fieldName} to be an object.`);
138
+ }
139
+ validateSource(current.pipeline.source, `${current.fieldName}.source`);
140
+ if (!Array.isArray(current.pipeline.stages)) {
141
+ throw new Error(`pipelineExecute() expected ${current.fieldName}.stages to be an array.`);
142
+ }
143
+ for (let i = 0; i < current.pipeline.stages.length; i++) {
144
+ const optionsPath = current.fieldName === 'pipeline' ? 'stage.options' : `${current.fieldName}.stages[${i}].options`;
145
+ const nestedPipeline = validateStage(current.pipeline.stages[i], `${current.fieldName}.stages[${i}]`, optionsPath);
146
+ if (nestedPipeline) {
147
+ pending.push({
148
+ pipeline: nestedPipeline,
149
+ fieldName: `${optionsPath}.other`
150
+ });
151
+ }
152
+ }
153
+ }
154
+ }
155
+ export function validateExecuteOptions(options) {
156
+ if (options === undefined) {
157
+ return undefined;
158
+ }
159
+ if (!isRecord(options)) {
160
+ throw new Error('pipelineExecute() expected options to be an object.');
161
+ }
162
+ if (options.indexMode !== undefined && options.indexMode !== 'recommended') {
163
+ throw new Error('pipelineExecute() expected options.indexMode to equal "recommended".');
164
+ }
165
+ if (options.indexMode !== undefined) {
166
+ throw new Error('pipelineExecute() does not support options.indexMode because Firestore pipeline execute options are currently unstable or unavailable.');
167
+ }
168
+ if (options.rawOptions !== undefined && !isRecord(options.rawOptions)) {
169
+ throw new Error('pipelineExecute() expected options.rawOptions to be an object.');
170
+ }
171
+ if (options.rawOptions !== undefined) {
172
+ throw new Error('pipelineExecute() does not support options.rawOptions because Firestore pipeline execute options are currently unstable or unavailable.');
173
+ }
174
+ return options;
175
+ }
176
+ export function validatePipelineExecuteRequest(pipeline, options) {
177
+ validateSerializedPipeline(pipeline);
178
+ return {
179
+ pipeline,
180
+ options: validateExecuteOptions(options)
181
+ };
182
+ }
183
+ //# sourceMappingURL=pipeline_validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isRecord","value","Array","isArray","isNonEmptyString","length","validateNonEmptyStringArray","fieldName","Error","every","validateSource","source","path","collectionId","documents","queryType","filters","orders","options","validateNonEmptyStageArray","validateStage","stage","stagePath","optionsPath","selections","undefined","fields","orderings","accumulators","groups","hasDocuments","hasPercentage","percentage","other","stages","validateSerializedPipeline","pipeline","pending","index","current","i","nestedPipeline","push","validateExecuteOptions","indexMode","rawOptions","validatePipelineExecuteRequest"],"sourceRoot":"../../../lib","sources":["pipelines/pipeline_validate.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AAE;IACpC,MAAM,IAAIjB,KAAK,CACb,yIACF,CAAC;EACH;EAEA,OAAOU,OAAO;AAChB;AAEA,OAAO,SAAS4B,8BAA8BA,CAC5CV,QAAiB,EACjBlB,OAAgB,EACiB;EACjCiB,0BAA0B,CAACC,QAAQ,CAAC;EACpC,OAAO;IACLA,QAAQ;IACRlB,OAAO,EAAEyB,sBAAsB,CAACzB,OAAO;EACzC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=stage_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["pipelines/stage_options.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["pipelines/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=firestore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["types/firestore.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../lib","sources":["types/internal.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,338 @@
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 { ReactNativeFirebase } from '@react-native-firebase/app';
21
+
22
+ /**
23
+ * Firebase Cloud Firestore package for React Native.
24
+ *
25
+ * #### Example: Access the firebase export from the `firestore` package:
26
+ *
27
+ * ```js
28
+ * import { firebase } from '@react-native-firebase/firestore';
29
+ *
30
+ * // firebase.firestore().X
31
+ * ```
32
+ *
33
+ * #### Example: Using the default export from the `firestore` package:
34
+ *
35
+ * ```js
36
+ * import firestore from '@react-native-firebase/firestore';
37
+ *
38
+ * // firestore().X
39
+ * ```
40
+ *
41
+ * #### Example: Using the default export from the `app` package:
42
+ *
43
+ * ```js
44
+ * import firebase from '@react-native-firebase/app';
45
+ * import '@react-native-firebase/firestore';
46
+ *
47
+ * // firebase.firestore().X
48
+ * ```
49
+ *
50
+ * @firebase firestore
51
+ */
52
+ // eslint-disable-next-line @typescript-eslint/no-namespace
53
+ export let FirebaseFirestoreTypes;
54
+ (function (_FirebaseFirestoreTypes) {
55
+ /**
56
+ * An instance of Filter used to generate Firestore Filter queries.
57
+ */
58
+
59
+ /**
60
+ * The Filter functions used to generate an instance of Filter.
61
+ */
62
+
63
+ /**
64
+ * The Filter function used to generate an instance of Filter.
65
+ * e.g. Filter('name', '==', 'Ada')
66
+ */
67
+
68
+ /**
69
+ * An immutable object representing an array of bytes.
70
+ */
71
+
72
+ /**
73
+ * A `DocumentData` object represents the data in a document.
74
+ */
75
+
76
+ /**
77
+ * A `CollectionReference` object can be used for adding documents, getting document references, and querying for
78
+ * documents (using the methods inherited from `Query`).
79
+ */
80
+
81
+ /**
82
+ * A DocumentChange represents a change to the documents matching a query. It contains the document affected and the
83
+ * type of change that occurred.
84
+ */
85
+
86
+ /**
87
+ * The type of a DocumentChange may be 'added', 'removed', or 'modified'.
88
+ */
89
+
90
+ /**
91
+ * An options object that configures how document snapshot data is returned (e.g. server timestamps).
92
+ */
93
+
94
+ /**
95
+ * The types for a DocumentSnapshot field that are supported by Firestore.
96
+ */
97
+
98
+ /**
99
+ * A `DocumentReference` refers to a document location in a Firestore database and can be used to write, read, or listen
100
+ * to the location. The document at the referenced location may or may not exist. A `DocumentReference` can also be used
101
+ * to create a `CollectionReference` to a subcollection.
102
+ */
103
+
104
+ /**
105
+ * A DocumentSnapshot contains data read from a document in your Firestore database. The data can be extracted with
106
+ * .`data()` or `.get(:field)` to get a specific field.
107
+ *
108
+ * For a DocumentSnapshot that points to a non-existing document, any data access will return 'undefined'.
109
+ * You can use the `exists()` method to explicitly verify a document's existence.
110
+ */
111
+
112
+ /**
113
+ * A QueryDocumentSnapshot contains data read from a document in your Firestore database as part of a query.
114
+ * The document is guaranteed to exist and its data can be extracted with .data() or .get(:field) to get a specific field.
115
+ *
116
+ * A QueryDocumentSnapshot offers the same API surface as a DocumentSnapshot.
117
+ * Since query results contain only existing documents, the exists() method will always be true and data() will never return 'undefined'.
118
+ */
119
+
120
+ /**
121
+ * A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a
122
+ * top-level field in the document), or a list of field names (referring to a nested field in the document).
123
+ *
124
+ * Create a FieldPath by providing field names. If more than one field name is provided, the path will point to a nested field in a document.
125
+ *
126
+ * #### Example
127
+ *
128
+ * ```js
129
+ * const user = await firebase.firestore().doc('users/alovelace').get();
130
+ *
131
+ * // Create a new field path
132
+ * const fieldPath = new firebase.firestore.FieldPath('address', 'zip');
133
+ *
134
+ * console.log('Address ZIP Code', user.get(fieldPath));
135
+ * ```
136
+ */
137
+
138
+ /**
139
+ * Sentinel values that can be used when writing document fields with `set()` or `update()`.
140
+ *
141
+ * #### Example
142
+ *
143
+ * ```js
144
+ * const increment = firebase.firestore.FieldValue.increment(1);
145
+ *
146
+ * await firebase.firestore().doc('users/alovelace').update({
147
+ * age: increment, // increment age by 1
148
+ * });
149
+ * ```
150
+ */
151
+
152
+ /**
153
+ * An immutable object representing a geo point in Firestore. The geo point is represented as latitude/longitude pair.
154
+ *
155
+ * Latitude values are in the range of [-90, 90]. Longitude values are in the range of [-180, 180].
156
+ */
157
+
158
+ /**
159
+ * An options object that configures the behavior of get() calls on DocumentReference and Query.
160
+ * By providing a GetOptions object, these methods can be configured to fetch results only from the
161
+ * server, only from the local cache or attempt to fetch results from the server and fall back to the
162
+ * cache (which is the default).
163
+ */
164
+
165
+ /**
166
+ * Represents an aggregation that can be performed by Firestore.
167
+ */
168
+ class AggregateField {
169
+ /** A type string to uniquely identify instances of this class. */
170
+ type = 'AggregateField';
171
+ }
172
+ _FirebaseFirestoreTypes.AggregateField = AggregateField;
173
+ /**
174
+ * The union of all `AggregateField` types that are supported by Firestore.
175
+ */
176
+ /**
177
+ * A type whose property values are all `AggregateField` objects.
178
+ */
179
+ /**
180
+ * A type whose keys are taken from an `AggregateSpec`, and whose values are the
181
+ * result of the aggregation performed by the corresponding `AggregateField`
182
+ * from the input `AggregateSpec`.
183
+ */
184
+ /**
185
+ * The results of executing an aggregation query.
186
+ */
187
+ /**
188
+ * The results of requesting an aggregated query.
189
+ */
190
+ /**
191
+ * A Query refers to a `Query` which you can read or listen to. You can also construct refined `Query` objects by
192
+ * adding filters and ordering.
193
+ */
194
+ /**
195
+ * Filter conditions in a `Query.where()` clause are specified using the strings '<', '<=', '==', '>=', '>', 'array-contains', 'array-contains-any' or 'in'.
196
+ */
197
+ /**
198
+ * A `QuerySnapshot` contains zero or more `QueryDocumentSnapshot` objects representing the results of a query. The documents
199
+ * can be accessed as an array via the `docs` property or enumerated using the `forEach` method. The number of documents
200
+ * can be determined via the `empty` and `size` properties.
201
+ */
202
+ /**
203
+ * An options object that configures the behavior of set() calls in `DocumentReference`, `WriteBatch` and `Transaction`.
204
+ * These calls can be configured to perform granular merges instead of overwriting the target documents in their entirety
205
+ * by providing a `SetOptions` with `merge: true`.
206
+ *
207
+ * Using both `merge` and `mergeFields` together will throw an error.
208
+ */
209
+ /**
210
+ * Specifies custom configurations for your Cloud Firestore instance. You must set these before invoking any other methods.
211
+ *
212
+ * Used with `firebase.firestore().settings()`.
213
+ */
214
+ /**
215
+ * An options object that can be passed to `DocumentReference.onSnapshot()`, `Query.onSnapshot()` and `QuerySnapshot.docChanges()`
216
+ * to control which types of changes to include in the result set.
217
+ */
218
+ /**
219
+ * Metadata about a snapshot, describing the state of the snapshot.
220
+ */
221
+ /**
222
+ * A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and
223
+ * fractions of seconds at nanosecond resolution in UTC Epoch time.
224
+ *
225
+ * It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one.
226
+ * It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table
227
+ * is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
228
+ */
229
+ /**
230
+ * A reference to a transaction. The `Transaction` object passed to a transaction's updateFunction provides the methods to
231
+ * read and write data within the transaction context. See `Firestore.runTransaction()`.
232
+ *
233
+ * A transaction consists of any number of `get()` operations followed by any number of write operations such as `set()`,
234
+ * `update()`, or `delete()`. In the case of a concurrent edit, Cloud Firestore runs the entire transaction again. For example,
235
+ * if a transaction reads documents and another client modifies any of those documents, Cloud Firestore retries the transaction.
236
+ * This feature ensures that the transaction runs on up-to-date and consistent data.
237
+ *
238
+ * Transactions never partially apply writes. All writes execute at the end of a successful transaction.
239
+ *
240
+ * When using transactions, note that:
241
+ * - Read operations must come before write operations.
242
+ * - A function calling a transaction (transaction function) might run more than once if a concurrent edit affects a document that the transaction reads.
243
+ * - Transaction functions should not directly modify application state (return a value from the `updateFunction`).
244
+ * - Transactions will fail when the client is offline.
245
+ */
246
+ /**
247
+ * A write batch, used to perform multiple writes as a single atomic unit.
248
+ *
249
+ * A WriteBatch object can be acquired by calling `firestore.batch()`. It provides methods for adding
250
+ * writes to the write batch. None of the writes will be committed (or visible locally) until
251
+ * `WriteBatch.commit()` is called.
252
+ *
253
+ * Unlike transactions, write batches are persisted offline and therefore are preferable when you don't need to
254
+ * condition your writes on read data.
255
+ */
256
+ /**
257
+ * Returns the PersistentCache Index Manager used by the given Firestore object.
258
+ * The PersistentCacheIndexManager instance, or null if local persistent storage is not in use.
259
+ */
260
+ /**
261
+ * Represents the state of bundle loading tasks.
262
+ *
263
+ * Both 'Error' and 'Success' are sinking state: task will abort or complete and there will be no more
264
+ * updates after they are reported.
265
+ */
266
+ /**
267
+ * Represents a progress update or a final state from loading bundles.
268
+ */
269
+ /**
270
+ * `firebase.firestore.X`
271
+ */
272
+ /**
273
+ * Converter used by `withConverter()` to transform user objects of type T
274
+ * into Firestore data.
275
+ *
276
+ * Using the converter allows you to specify generic type arguments when
277
+ * storing and retrieving objects from Firestore.
278
+ *
279
+ * @example
280
+ * ```typescript
281
+ * class Post {
282
+ * constructor(readonly title: string, readonly author: string) {}
283
+ *
284
+ * toString(): string {
285
+ * return this.title + ', by ' + this.author;
286
+ * }
287
+ * }
288
+ *
289
+ * const postConverter = {
290
+ * toFirestore(post: Post): firebase.firestore.DocumentData {
291
+ * return {title: post.title, author: post.author};
292
+ * },
293
+ * fromFirestore(
294
+ * snapshot: firebase.firestore.QueryDocumentSnapshot,
295
+ * options: firebase.firestore.SnapshotOptions
296
+ * ): Post {
297
+ * const data = snapshot.data(options)!;
298
+ * return new Post(data.title, data.author);
299
+ * }
300
+ * };
301
+ *
302
+ * const postSnap = await firebase.firestore()
303
+ * .collection('posts')
304
+ * .withConverter(postConverter)
305
+ * .doc().get();
306
+ * const post = postSnap.data();
307
+ * if (post !== undefined) {
308
+ * post.title; // string
309
+ * post.toString(); // Should be defined
310
+ * post.someNonExistentProperty; // TS error
311
+ * }
312
+ * ```
313
+ */
314
+ /**
315
+ * The Firebase Cloud Firestore service is available for the default app or a given app.
316
+ *
317
+ * #### Example: Get the firestore instance for the **default app**:
318
+ *
319
+ * ```js
320
+ * const firestoreForDefaultApp = firebase.firestore();
321
+ * ```
322
+ *
323
+ * #### Example: Get the firestore instance for a **secondary app**:
324
+ *
325
+ * ```js
326
+ * const otherApp = firebase.app('otherApp');
327
+ * const firestoreForOtherApp = firebase.firestore(otherApp);
328
+ * ```
329
+ *
330
+ */
331
+ /**
332
+ * Utility type to allow FieldValue and to allow Date in place of Timestamp objects.
333
+ */
334
+ })(FirebaseFirestoreTypes || (FirebaseFirestoreTypes = {}));
335
+ /**
336
+ * Attach namespace to `firebase.` and `FirebaseApp.`.
337
+ */
338
+ //# sourceMappingURL=namespaced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ReactNativeFirebase","FirebaseFirestoreTypes","_FirebaseFirestoreTypes","AggregateField","type"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,4BAA4B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,WACiBC,sBAAsB;AAAA,WAAAC,uBAAA;EAErC;AACF;AACA;;EAmBE;AACF;AACA;;EAsBE;AACF;AACA;AACA;;EAGE;AACF;AACA;;EAkCE;AACF;AACA;;EAKE;AACF;AACA;AACA;;EA0FE;AACF;AACA;AACA;;EA6BE;AACF;AACA;;EAGE;AACF;AACA;;EAKE;AACF;AACA;;EAgBE;AACF;AACA;AACA;AACA;;EA0SE;AACF;AACA;AACA;AACA;AACA;AACA;;EAyEE;AACF;AACA;AACA;AACA;AACA;AACA;;EA0BE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAsCE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EA0HE;AACF;AACA;AACA;AACA;;EAiDE;AACF;AACA;AACA;AACA;AACA;;EAoBE;AACF;AACA;EACS,MAAMC,cAAc,CAAK;IAC9B;IACAC,IAAI,GAAG,gBAAgB;EACzB;EAACF,uBAAA,CAAAC,cAAA,GAAAA,cAAA;EAED;AACF;AACA;EAGE;AACF;AACA;EAKE;AACF;AACA;AACA;AACA;EAKE;AACF;AACA;EA0BE;AACF;AACA;EAyBE;AACF;AACA;AACA;EA8eE;AACF;AACA;EAaE;AACF;AACA;AACA;AACA;EAqGE;AACF;AACA;AACA;AACA;AACA;AACA;EAeE;AACF;AACA;AACA;AACA;EAoDE;AACF;AACA;AACA;EAQE;AACF;AACA;EAwBE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAgFE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA+HE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAgHE;AACF;AACA;AACA;EAoBE;AACF;AACA;AACA;AACA;AACA;EAGE;AACF;AACA;EA4BE;AACF;AACA;EAyDE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA2BE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA2NE;AACF;AACA;AAFE,GAv9EeF,sBAAsB,KAAtBA,sBAAsB;AA4/EvC;AACA;AACA","ignoreList":[]}