@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,326 @@
1
+ import type { Pipeline } from './pipeline';
2
+ import type { DocumentReference, Query } from '../types/firestore';
3
+ import type VectorValue from '../FirestoreVectorValue';
4
+ import type { OneOf } from './types';
5
+ import type { Ordering, Selectable, Field, BooleanExpression, Expression, AliasedAggregate } from './expressions';
6
+ /**
7
+ * @beta
8
+ * Distance measure for vector search.
9
+ */
10
+ export type PipelineDistanceMeasure = 'COSINE' | 'EUCLIDEAN' | 'DOT_PRODUCT';
11
+ /**
12
+ * @beta
13
+ * Options for pipeline aggregate() stage.
14
+ */
15
+ export interface PipelineAggregateOptions {
16
+ accumulators?: AliasedAggregate[];
17
+ groups?: Array<string | Selectable>;
18
+ }
19
+ /**
20
+ * @beta
21
+ * Options for pipeline distinct() stage.
22
+ */
23
+ export interface PipelineDistinctOptions {
24
+ groups?: (Field | string)[];
25
+ }
26
+ /**
27
+ * @beta
28
+ * Options for pipeline findNearest() stage (vector search).
29
+ */
30
+ export interface PipelineFindNearestOptions {
31
+ field: string | Field;
32
+ vectorValue: number[] | {
33
+ values: number[];
34
+ };
35
+ distanceMeasure: PipelineDistanceMeasure;
36
+ limit?: number;
37
+ distanceField?: string;
38
+ }
39
+ /**
40
+ * @beta
41
+ * Options for pipeline replaceWith() stage.
42
+ */
43
+ export interface PipelineReplaceWithOptions {
44
+ map?: Selectable | string;
45
+ }
46
+ /**
47
+ * @beta
48
+ * Options for pipeline sample() stage.
49
+ */
50
+ export interface PipelineSampleOptions {
51
+ documents?: number;
52
+ percentage?: number;
53
+ }
54
+ /**
55
+ * @beta
56
+ * Options for pipeline union() stage.
57
+ */
58
+ export interface PipelineUnionOptions<T = import('../types/firestore').DocumentData> {
59
+ pipeline?: Pipeline<T>;
60
+ }
61
+ /**
62
+ * @beta
63
+ * Options for pipeline unnest() stage.
64
+ */
65
+ export interface PipelineUnnestOptions {
66
+ selectable?: Selectable;
67
+ indexField?: string;
68
+ }
69
+ /**
70
+ * @beta
71
+ * Options for pipeline rawStage().
72
+ */
73
+ export interface PipelineRawStageOptions {
74
+ [key: string]: unknown;
75
+ }
76
+ /**
77
+ * @beta
78
+ * Options defining how a Stage is evaluated. Base type for stage option types.
79
+ */
80
+ export interface StageOptions {
81
+ /**
82
+ * @beta
83
+ * Escape hatch for options not known at build time (e.g. backend-specific snake_case options).
84
+ */
85
+ rawOptions?: {
86
+ [name: string]: unknown;
87
+ };
88
+ }
89
+ /**
90
+ * @beta
91
+ * Options for AddFields stage. At least one field required.
92
+ */
93
+ export type AddFieldsStageOptions = StageOptions & {
94
+ /**
95
+ * @beta
96
+ * The fields to add to each document, specified as a Selectable. At least one field is required.
97
+ */
98
+ fields: Selectable[];
99
+ };
100
+ /**
101
+ * @beta
102
+ * Options for Aggregate stage.
103
+ */
104
+ export type AggregateStageOptions = StageOptions & {
105
+ /**
106
+ * @beta
107
+ * The AliasedAggregate values specifying aggregate operations to perform on the input documents.
108
+ */
109
+ accumulators: AliasedAggregate[];
110
+ /**
111
+ * @beta
112
+ * The Selectable expressions or field names to consider when determining distinct value combinations (groups), which will be aggregated over.
113
+ */
114
+ groups?: Array<string | Selectable>;
115
+ };
116
+ /**
117
+ * @beta
118
+ * Options for CollectionGroup stage.
119
+ */
120
+ export type CollectionGroupStageOptions = StageOptions & {
121
+ /**
122
+ * @beta
123
+ * ID of the collection group to use as the Pipeline source.
124
+ */
125
+ collectionId: string;
126
+ /**
127
+ * @beta
128
+ * Specifies the name of an index to be used for a query, overriding the query optimizer's default choice. This can be useful for performance tuning in specific scenarios where the default index selection does not yield optimal performance. This property is optional. When provided, it should be the exact name of the index to force.
129
+ */
130
+ forceIndex?: string;
131
+ };
132
+ /**
133
+ * @beta
134
+ * Options for Collection stage.
135
+ */
136
+ export type CollectionStageOptions = StageOptions & {
137
+ /**
138
+ * @beta
139
+ * Name or reference to the collection that will be used as the Pipeline source.
140
+ */
141
+ collection: string | Query;
142
+ /**
143
+ * @beta
144
+ * Specifies the name of an index to be used for a query, overriding the query optimizer's default choice. This can be useful for performance tuning in specific scenarios where the default index selection does not yield optimal performance. This property is optional. When provided, it should be the exact name of the index to force.
145
+ */
146
+ forceIndex?: string;
147
+ };
148
+ /**
149
+ * @beta
150
+ * Options for Database stage.
151
+ */
152
+ export type DatabaseStageOptions = StageOptions & {};
153
+ /**
154
+ * @beta
155
+ * Options for Distinct stage.
156
+ */
157
+ export type DistinctStageOptions = StageOptions & {
158
+ /**
159
+ * @beta
160
+ * The Selectable expressions or field names to consider when determining distinct value combinations (groups).
161
+ */
162
+ groups: Array<string | Selectable>;
163
+ };
164
+ /**
165
+ * @beta
166
+ * Options for Documents stage.
167
+ */
168
+ export type DocumentsStageOptions = StageOptions & {
169
+ /**
170
+ * @beta
171
+ * An array of paths and DocumentReferences specifying the individual documents that will be the source of this pipeline. The converters for these DocumentReferences will be ignored and not have an effect on this pipeline. There must be at least one document specified in the array.
172
+ */
173
+ docs: Array<string | DocumentReference>;
174
+ };
175
+ /**
176
+ * @beta
177
+ * Options for FindNearest stage (vector search).
178
+ */
179
+ export type FindNearestStageOptions = StageOptions & {
180
+ /**
181
+ * @beta
182
+ * Specifies the field to be used. This can be a string representing the field path (e.g., 'fieldName', 'nested.fieldName') or an object of type Field representing a more complex field expression.
183
+ */
184
+ field: Field | string;
185
+ /**
186
+ * @beta
187
+ * Specifies the query vector value, to which the vector distance will be computed.
188
+ */
189
+ vectorValue: VectorValue | number[];
190
+ /**
191
+ * @beta
192
+ * Specifies the method used to compute the distance between vectors. Possible values are: 'euclidean', 'cosine', 'dot_product'.
193
+ */
194
+ distanceMeasure: 'euclidean' | 'cosine' | 'dot_product';
195
+ /**
196
+ * @beta
197
+ * The maximum number of documents to return from the FindNearest stage.
198
+ */
199
+ limit?: number;
200
+ /**
201
+ * @beta
202
+ * If set, specifies the field on the output documents that will contain the computed vector distance for the document. If not set, the computed vector distance will not be returned.
203
+ */
204
+ distanceField?: string;
205
+ };
206
+ /**
207
+ * @beta
208
+ * Options for Limit stage.
209
+ */
210
+ export type LimitStageOptions = StageOptions & {
211
+ /**
212
+ * @beta
213
+ * The maximum number of documents to return.
214
+ */
215
+ limit: number;
216
+ };
217
+ /**
218
+ * @beta
219
+ * Options for Offset stage.
220
+ */
221
+ export type OffsetStageOptions = StageOptions & {
222
+ /**
223
+ * @beta
224
+ * The number of documents to skip.
225
+ */
226
+ offset: number;
227
+ };
228
+ /**
229
+ * @beta
230
+ * Options for RemoveFields stage.
231
+ */
232
+ export type RemoveFieldsStageOptions = StageOptions & {
233
+ /**
234
+ * @beta
235
+ * The fields to remove from each document.
236
+ */
237
+ fields: Array<Field | string>;
238
+ };
239
+ /**
240
+ * @beta
241
+ * Options for ReplaceWith stage.
242
+ */
243
+ export type ReplaceWithStageOptions = StageOptions & {
244
+ /**
245
+ * @beta
246
+ * The name of a field that contains a map or an Expression that evaluates to a map.
247
+ */
248
+ map: Expression | string;
249
+ };
250
+ /**
251
+ * @beta
252
+ * Options for Sample stage (documents or percentage, one of).
253
+ */
254
+ export type SampleStageOptions = StageOptions & OneOf<{
255
+ /**
256
+ * @beta
257
+ * If set, specifies the sample rate as a percentage of the input documents. Cannot be set when documents: number is set.
258
+ */
259
+ percentage: number;
260
+ /**
261
+ * @beta
262
+ * If set, specifies the sample rate as a total number of documents to sample from the input documents. Cannot be set when percentage: number is set.
263
+ */
264
+ documents: number;
265
+ }>;
266
+ /**
267
+ * @beta
268
+ * Options for Select stage.
269
+ */
270
+ export type SelectStageOptions = StageOptions & {
271
+ /**
272
+ * @beta
273
+ * The fields to include in the output documents, specified as Selectable expression or as a string value indicating the field name.
274
+ */
275
+ selections: Array<Selectable | string>;
276
+ };
277
+ /**
278
+ * @beta
279
+ * Options for Sort stage.
280
+ */
281
+ export type SortStageOptions = StageOptions & {
282
+ /**
283
+ * @beta
284
+ * Orderings specify how the input documents are sorted. One or more ordering are required.
285
+ */
286
+ orderings: Ordering[];
287
+ };
288
+ /**
289
+ * @beta
290
+ * Options for Union stage.
291
+ */
292
+ export type UnionStageOptions = StageOptions & {
293
+ /**
294
+ * @beta
295
+ * Specifies the other Pipeline to union with.
296
+ */
297
+ other: Pipeline;
298
+ };
299
+ /**
300
+ * @beta
301
+ * Options for Unnest stage.
302
+ */
303
+ export type UnnestStageOptions = StageOptions & {
304
+ /**
305
+ * @beta
306
+ * A Selectable object that defines an array expression to be un-nested and the alias for the un-nested field.
307
+ */
308
+ selectable: Selectable;
309
+ /**
310
+ * @beta
311
+ * If set, specifies the field on the output documents that will contain the offset (starting at zero) that the element is from the original array.
312
+ */
313
+ indexField?: string;
314
+ };
315
+ /**
316
+ * @beta
317
+ * Options for Where stage.
318
+ */
319
+ export type WhereStageOptions = StageOptions & {
320
+ /**
321
+ * @beta
322
+ * The BooleanExpression to apply as a filter for each input document to this stage.
323
+ */
324
+ condition: BooleanExpression;
325
+ };
326
+ //# sourceMappingURL=stage_options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage_options.d.ts","sourceRoot":"","sources":["../../../../lib/pipelines/stage_options.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,KAAK,EACL,iBAAiB,EACjB,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G;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C;;;OAGG;IACH,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAC9C;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C;;;OAGG;IACH,SAAS,EAAE,iBAAiB,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @beta
3
+ * Utility type: only one property of T may be set.
4
+ */
5
+ export type OneOf<T> = {
6
+ [K in keyof T]: Pick<T, K> & {
7
+ [P in Exclude<keyof T, K>]?: undefined;
8
+ };
9
+ }[keyof T];
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../lib/pipelines/types.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;SAC1B,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS;KACvC;CACF,CAAC,MAAM,CAAC,CAAC,CAAC"}
@@ -0,0 +1,263 @@
1
+ import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
+ import type { FieldPath } from '../modular/FieldPath';
3
+ import type { FieldValue } from '../modular/FieldValue';
4
+ import type { AggregateField } from '../FirestoreAggregate';
5
+ import type { sum, average, count } from '../modular';
6
+ export type FirebaseApp = ReactNativeFirebase.FirebaseApp;
7
+ export declare class Firestore {
8
+ /**
9
+ * Whether it's a Firestore or Firestore Lite instance.
10
+ */
11
+ type: 'firestore';
12
+ /**
13
+ * The FirebaseApp associated with this Firestore instance.
14
+ */
15
+ get app(): FirebaseApp;
16
+ /**
17
+ * Returns a JSON-serializable representation of this Firestore instance.
18
+ */
19
+ toJSON(): object;
20
+ }
21
+ export type LogLevel = 'debug' | 'error' | 'silent';
22
+ export interface ExperimentalLongPollingOptions {
23
+ timeoutSeconds?: number;
24
+ }
25
+ export interface PersistenceSettings {
26
+ forceOwnership?: boolean;
27
+ }
28
+ export type MemoryLocalCache = {
29
+ kind: 'memory';
30
+ _onlineComponentProvider: unknown;
31
+ _offlineComponentProvider: unknown;
32
+ };
33
+ export type PersistentLocalCache = {
34
+ kind: 'persistent';
35
+ _onlineComponentProvider: unknown;
36
+ _offlineComponentProvider: unknown;
37
+ };
38
+ export type FirestoreLocalCache = MemoryLocalCache | PersistentLocalCache;
39
+ export interface FirestoreSettings {
40
+ host?: string;
41
+ ssl?: boolean;
42
+ ignoreUndefinedProperties?: boolean;
43
+ cacheSizeBytes?: number;
44
+ localCache?: FirestoreLocalCache;
45
+ experimentalForceLongPolling?: boolean;
46
+ experimentalAutoDetectLongPolling?: boolean;
47
+ experimentalLongPollingOptions?: ExperimentalLongPollingOptions;
48
+ persistence?: boolean;
49
+ serverTimestampBehavior?: 'estimate' | 'previous' | 'none';
50
+ }
51
+ export type AggregateType = 'count' | 'avg' | 'sum';
52
+ export type AggregateFieldType = ReturnType<typeof sum> | ReturnType<typeof average> | ReturnType<typeof count>;
53
+ export interface AggregateSpec {
54
+ [field: string]: AggregateFieldType;
55
+ }
56
+ export type AggregateSpecData<T extends AggregateSpec> = {
57
+ [P in keyof T]: T[P] extends AggregateField<infer U> ? U : never;
58
+ };
59
+ /**
60
+ * Provider identifier for Firebase Auth (from @firebase/util).
61
+ * Must match the union used by EmulatorMockTokenOptions / FirebaseIdToken.
62
+ */
63
+ export type FirebaseSignInProvider = 'custom' | 'email' | 'password' | 'phone' | 'anonymous' | 'google.com' | 'facebook.com' | 'github.com' | 'twitter.com' | 'microsoft.com' | 'apple.com';
64
+ /**
65
+ * Shape of a decoded Firebase ID token (JWT) used for emulator mock auth.
66
+ * @see https://firebase.google.com/docs/reference/js/auth#firebaseidtoken
67
+ */
68
+ export interface FirebaseIdToken {
69
+ iss: string;
70
+ aud: string;
71
+ sub: string;
72
+ iat: number;
73
+ exp: number;
74
+ user_id: string;
75
+ auth_time: number;
76
+ provider_id?: 'anonymous';
77
+ email?: string;
78
+ email_verified?: boolean;
79
+ phone_number?: string;
80
+ name?: string;
81
+ picture?: string;
82
+ firebase: {
83
+ sign_in_provider: FirebaseSignInProvider;
84
+ identities?: {
85
+ [provider in FirebaseSignInProvider]?: string[];
86
+ };
87
+ };
88
+ [claim: string]: unknown;
89
+ uid?: never;
90
+ }
91
+ /**
92
+ * Options for mock auth token when using the Firestore emulator.
93
+ * Must include either `user_id` or `sub`; may include other partial ID token claims.
94
+ */
95
+ export type EmulatorMockTokenOptions = ({
96
+ user_id: string;
97
+ } | {
98
+ sub: string;
99
+ }) & Partial<FirebaseIdToken>;
100
+ export type TaskState = 'Error' | 'Running' | 'Success';
101
+ export interface LoadBundleTaskProgress {
102
+ documentsLoaded: number;
103
+ totalDocuments: number;
104
+ bytesLoaded: number;
105
+ totalBytes: number;
106
+ taskState: TaskState;
107
+ }
108
+ export declare class LoadBundleTask implements PromiseLike<LoadBundleTaskProgress> {
109
+ onProgress(next?: (progress: LoadBundleTaskProgress) => unknown, error?: (err: Error) => unknown, complete?: () => void): void;
110
+ catch<R>(onRejected: (a: Error) => R | PromiseLike<R>): Promise<R | LoadBundleTaskProgress>;
111
+ then<T, R>(onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike<T>, onRejected?: (a: Error) => R | PromiseLike<R>): Promise<T | R>;
112
+ }
113
+ export type SetOptions = {
114
+ readonly merge?: boolean;
115
+ } | {
116
+ readonly mergeFields?: Array<string | FieldPath>;
117
+ };
118
+ export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
119
+ export type OrderByDirection = 'desc' | 'asc';
120
+ export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore';
121
+ export interface SnapshotListenOptions {
122
+ readonly includeMetadataChanges?: boolean;
123
+ }
124
+ /**
125
+ * Options that configure how data is retrieved from a `DocumentSnapshot` (for
126
+ * example the desired behavior for server timestamps that have not yet been set
127
+ * to their final value).
128
+ */
129
+ export declare interface SnapshotOptions {
130
+ /**
131
+ * If set, controls the return value for server timestamps that have not yet
132
+ * been set to their final value.
133
+ *
134
+ * By specifying 'estimate', pending server timestamps return an estimate
135
+ * based on the local clock. This estimate will differ from the final value
136
+ * and cause these values to change once the server result becomes available.
137
+ *
138
+ * By specifying 'previous', pending timestamps will be ignored and return
139
+ * their previous value instead.
140
+ *
141
+ * If omitted or set to 'none', `null` will be returned by default until the
142
+ * server value becomes available.
143
+ */
144
+ readonly serverTimestamps?: 'estimate' | 'previous' | 'none';
145
+ }
146
+ export declare class SnapshotMetadata {
147
+ readonly fromCache: boolean;
148
+ readonly hasPendingWrites: boolean;
149
+ isEqual(other: SnapshotMetadata): boolean;
150
+ }
151
+ export type DocumentChangeType = 'added' | 'removed' | 'modified';
152
+ export type FirestoreError = Error;
153
+ export interface Unsubscribe {
154
+ (): void;
155
+ }
156
+ export interface DocumentChange<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> {
157
+ readonly type: DocumentChangeType;
158
+ readonly doc: QueryDocumentSnapshot<AppModelType, DbModelType>;
159
+ readonly oldIndex: number;
160
+ readonly newIndex: number;
161
+ }
162
+ export type Primitive = string | number | boolean | undefined | null;
163
+ export interface DocumentData {
164
+ [key: string]: any;
165
+ }
166
+ export type PartialWithFieldValue<T> = Partial<T> | (T extends Primitive ? T : T extends {} ? {
167
+ [K in keyof T]?: PartialWithFieldValue<T[K]> | FieldValue;
168
+ } : never);
169
+ /**
170
+ * Given a union type `U = T1 | T2 | ...`, returns an intersected type
171
+ * `(T1 & T2 & ...)`.
172
+ *
173
+ * Uses distributive conditional types and inference from conditional types.
174
+ * This works because multiple candidates for the same type variable in
175
+ * contra-variant positions causes an intersection type to be inferred.
176
+ * https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-inference-in-conditional-types
177
+ * https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type
178
+ */
179
+ export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
180
+ export type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
181
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
182
+ };
183
+ export type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
184
+ export type NestedUpdateFields<T extends {}> = UnionToIntersection<{
185
+ [K in keyof T & string]: ChildUpdateFields<K, T[K]>;
186
+ }[keyof T & string]>;
187
+ export type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
188
+ [K in keyof T]?: UpdateData<T[K]> | FieldValue;
189
+ } & NestedUpdateFields<T> : Partial<T>;
190
+ export type WithFieldValue<T> = T | (T extends Primitive ? T : T extends {} ? {
191
+ [K in keyof T]: WithFieldValue<T[K]> | FieldValue;
192
+ } : never);
193
+ export interface FirestoreDataConverter<AppModelType, DbModelType extends DocumentData = DocumentData> {
194
+ toFirestore(modelObject: WithFieldValue<AppModelType>): WithFieldValue<DbModelType>;
195
+ toFirestore(modelObject: PartialWithFieldValue<AppModelType>, options: SetOptions): PartialWithFieldValue<DbModelType>;
196
+ fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData, DocumentData>, options?: SnapshotOptions): AppModelType;
197
+ }
198
+ export declare class Query<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> {
199
+ readonly converter: FirestoreDataConverter<AppModelType, DbModelType> | null;
200
+ readonly type: 'query' | 'collection';
201
+ readonly firestore: Firestore;
202
+ withConverter(converter: null): Query<DocumentData, DocumentData>;
203
+ withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): Query<NewAppModelType, NewDbModelType>;
204
+ }
205
+ export declare class CollectionReference<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> extends Query<AppModelType, DbModelType> {
206
+ readonly type: 'collection';
207
+ id: string;
208
+ parent: DocumentReference<DocumentData, DocumentData> | null;
209
+ path: string;
210
+ withConverter(converter: null): CollectionReference<DocumentData, DocumentData>;
211
+ withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): CollectionReference<NewAppModelType, NewDbModelType>;
212
+ }
213
+ export declare class DocumentReference<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> {
214
+ readonly type: 'document';
215
+ firestore: Firestore;
216
+ converter: FirestoreDataConverter<AppModelType, DbModelType> | null;
217
+ id: string;
218
+ parent: CollectionReference<AppModelType, DbModelType>;
219
+ path: string;
220
+ withConverter(converter: null): DocumentReference<DocumentData, DocumentData>;
221
+ withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): DocumentReference<NewAppModelType, NewDbModelType>;
222
+ }
223
+ export declare class WriteBatch {
224
+ set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): WriteBatch;
225
+ set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): WriteBatch;
226
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): WriteBatch;
227
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch;
228
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, fieldOrUpdateData: string | FieldPath | UpdateData<DbModelType>, value?: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch;
229
+ delete<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): WriteBatch;
230
+ commit(): Promise<void>;
231
+ }
232
+ export declare class LiteTransaction {
233
+ }
234
+ export declare class Transaction extends LiteTransaction {
235
+ get<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>;
236
+ set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): this;
237
+ set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): this;
238
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): this;
239
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this;
240
+ update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, fieldOrUpdateData: string | FieldPath | UpdateData<DbModelType>, value?: unknown, ...moreFieldsAndValues: unknown[]): this;
241
+ delete<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): this;
242
+ }
243
+ export declare class DocumentSnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> {
244
+ readonly metadata: SnapshotMetadata;
245
+ exists(): this is QueryDocumentSnapshot<AppModelType, DbModelType>;
246
+ data(options?: SnapshotOptions): AppModelType | undefined;
247
+ get(fieldPath: string | FieldPath, options?: SnapshotOptions): any;
248
+ get id(): string;
249
+ get ref(): DocumentReference<AppModelType, DbModelType>;
250
+ }
251
+ export declare class QueryDocumentSnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> extends DocumentSnapshot<AppModelType, DbModelType> {
252
+ data(options?: SnapshotOptions): AppModelType;
253
+ }
254
+ export declare class QuerySnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> {
255
+ readonly metadata: SnapshotMetadata;
256
+ readonly query: Query<AppModelType, DbModelType>;
257
+ get docs(): Array<QueryDocumentSnapshot<AppModelType, DbModelType>>;
258
+ get size(): number;
259
+ get empty(): boolean;
260
+ forEach(callback: (result: QueryDocumentSnapshot<AppModelType, DbModelType>) => void, thisArg?: unknown): void;
261
+ docChanges(options?: SnapshotListenOptions): Array<DocumentChange<AppModelType, DbModelType>>;
262
+ }
263
+ //# sourceMappingURL=firestore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firestore.d.ts","sourceRoot":"","sources":["../../../../lib/types/firestore.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGtD,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;AAC1D,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,IAAI,GAAG,IAAI,WAAW,CAAC;IACvB;;OAEG;IACH,MAAM,IAAI,MAAM;CACjB;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,8BAA8B;IAC7C,c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