firebase-admin-edge 1.1.1 → 2.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 (437) hide show
  1. package/README.md +102 -261
  2. package/dist/app-check/app-check-endpoints.d.ts +31 -0
  3. package/dist/app-check/app-check-endpoints.d.ts.map +1 -0
  4. package/dist/app-check/app-check-endpoints.js +75 -0
  5. package/dist/app-check/app-check-endpoints.js.map +1 -0
  6. package/dist/app-check/app-check-jwt.d.ts +16 -0
  7. package/dist/app-check/app-check-jwt.d.ts.map +1 -0
  8. package/dist/app-check/app-check-jwt.js +59 -0
  9. package/dist/app-check/app-check-jwt.js.map +1 -0
  10. package/dist/app-check/app-check.d.ts +43 -0
  11. package/dist/app-check/app-check.d.ts.map +1 -0
  12. package/dist/app-check/app-check.js +141 -0
  13. package/dist/app-check/app-check.js.map +1 -0
  14. package/dist/auth/auth-blocking-types.d.ts +44 -0
  15. package/dist/auth/auth-blocking-types.d.ts.map +1 -0
  16. package/dist/auth/auth-blocking-types.js +2 -0
  17. package/dist/auth/auth-blocking-types.js.map +1 -0
  18. package/dist/auth/auth-config-types.d.ts +146 -0
  19. package/dist/auth/auth-config-types.d.ts.map +1 -0
  20. package/dist/auth/auth-config-types.js +2 -0
  21. package/dist/auth/auth-config-types.js.map +1 -0
  22. package/dist/auth/auth-config.d.ts +15 -0
  23. package/dist/auth/auth-config.d.ts.map +1 -0
  24. package/dist/auth/auth-config.js +413 -0
  25. package/dist/auth/auth-config.js.map +1 -0
  26. package/dist/auth/auth-emulator.d.ts +7 -0
  27. package/dist/auth/auth-emulator.d.ts.map +1 -0
  28. package/dist/auth/auth-emulator.js +24 -0
  29. package/dist/auth/auth-emulator.js.map +1 -0
  30. package/dist/auth/auth-endpoint-errors.d.ts +2 -0
  31. package/dist/auth/auth-endpoint-errors.d.ts.map +1 -1
  32. package/dist/auth/auth-endpoint-errors.js +20 -1
  33. package/dist/auth/auth-endpoint-errors.js.map +1 -1
  34. package/dist/auth/email-link.d.ts +24 -0
  35. package/dist/auth/email-link.d.ts.map +1 -0
  36. package/dist/auth/email-link.js +103 -0
  37. package/dist/auth/email-link.js.map +1 -0
  38. package/dist/auth/firebase-admin-auth.d.ts +29 -4
  39. package/dist/auth/firebase-admin-auth.d.ts.map +1 -1
  40. package/dist/auth/firebase-admin-auth.js +192 -59
  41. package/dist/auth/firebase-admin-auth.js.map +1 -1
  42. package/dist/auth/firebase-auth-endpoints.d.ts +64 -5
  43. package/dist/auth/firebase-auth-endpoints.d.ts.map +1 -1
  44. package/dist/auth/firebase-auth-endpoints.js +258 -73
  45. package/dist/auth/firebase-auth-endpoints.js.map +1 -1
  46. package/dist/auth/firebase-auth.d.ts +78 -4
  47. package/dist/auth/firebase-auth.d.ts.map +1 -1
  48. package/dist/auth/firebase-auth.js +101 -8
  49. package/dist/auth/firebase-auth.js.map +1 -1
  50. package/dist/auth/firebase-jwt.d.ts +19 -10
  51. package/dist/auth/firebase-jwt.d.ts.map +1 -1
  52. package/dist/auth/firebase-jwt.js +176 -39
  53. package/dist/auth/firebase-jwt.js.map +1 -1
  54. package/dist/auth/firebase-types.d.ts +3 -0
  55. package/dist/auth/firebase-types.d.ts.map +1 -1
  56. package/dist/auth/google-oauth.d.ts +0 -1
  57. package/dist/auth/google-oauth.d.ts.map +1 -1
  58. package/dist/auth/google-oauth.js +16 -86
  59. package/dist/auth/google-oauth.js.map +1 -1
  60. package/dist/auth/project-config-manager.d.ts +10 -0
  61. package/dist/auth/project-config-manager.d.ts.map +1 -0
  62. package/dist/auth/project-config-manager.js +22 -0
  63. package/dist/auth/project-config-manager.js.map +1 -0
  64. package/dist/auth/provider-credential.d.ts +43 -0
  65. package/dist/auth/provider-credential.d.ts.map +1 -0
  66. package/dist/auth/provider-credential.js +107 -0
  67. package/dist/auth/provider-credential.js.map +1 -0
  68. package/dist/auth/provider-session.d.ts +10 -0
  69. package/dist/auth/provider-session.d.ts.map +1 -0
  70. package/dist/auth/provider-session.js +28 -0
  71. package/dist/auth/provider-session.js.map +1 -0
  72. package/dist/auth/tenant-manager.d.ts +17 -0
  73. package/dist/auth/tenant-manager.d.ts.map +1 -0
  74. package/dist/auth/tenant-manager.js +59 -0
  75. package/dist/auth/tenant-manager.js.map +1 -0
  76. package/dist/db/aggregate.d.ts +49 -0
  77. package/dist/db/aggregate.d.ts.map +1 -0
  78. package/dist/db/aggregate.js +115 -0
  79. package/dist/db/aggregate.js.map +1 -0
  80. package/dist/db/bulk-writer.d.ts +55 -0
  81. package/dist/db/bulk-writer.d.ts.map +1 -0
  82. package/dist/db/bulk-writer.js +257 -0
  83. package/dist/db/bulk-writer.js.map +1 -0
  84. package/dist/db/bundle-builder.d.ts +17 -0
  85. package/dist/db/bundle-builder.d.ts.map +1 -0
  86. package/dist/db/bundle-builder.js +118 -0
  87. package/dist/db/bundle-builder.js.map +1 -0
  88. package/dist/db/bytes.d.ts +12 -0
  89. package/dist/db/bytes.d.ts.map +1 -0
  90. package/dist/db/bytes.js +49 -0
  91. package/dist/db/bytes.js.map +1 -0
  92. package/dist/db/collection-group.d.ts +14 -0
  93. package/dist/db/collection-group.d.ts.map +1 -0
  94. package/dist/db/collection-group.js +43 -0
  95. package/dist/db/collection-group.js.map +1 -0
  96. package/dist/db/collection-reference.d.ts +21 -0
  97. package/dist/db/collection-reference.d.ts.map +1 -0
  98. package/dist/db/collection-reference.js +46 -0
  99. package/dist/db/collection-reference.js.map +1 -0
  100. package/dist/db/document-reference.d.ts +41 -0
  101. package/dist/db/document-reference.d.ts.map +1 -0
  102. package/dist/db/document-reference.js +125 -0
  103. package/dist/db/document-reference.js.map +1 -0
  104. package/dist/db/document-snapshot.d.ts +31 -0
  105. package/dist/db/document-snapshot.d.ts.map +1 -0
  106. package/dist/db/document-snapshot.js +103 -0
  107. package/dist/db/document-snapshot.js.map +1 -0
  108. package/dist/db/explain.d.ts +28 -0
  109. package/dist/db/explain.d.ts.map +1 -0
  110. package/dist/db/explain.js +61 -0
  111. package/dist/db/explain.js.map +1 -0
  112. package/dist/db/field-path.d.ts +10 -0
  113. package/dist/db/field-path.d.ts.map +1 -0
  114. package/dist/db/field-path.js +65 -0
  115. package/dist/db/field-path.js.map +1 -0
  116. package/dist/db/field-value.d.ts +17 -0
  117. package/dist/db/field-value.d.ts.map +1 -0
  118. package/dist/db/field-value.js +57 -0
  119. package/dist/db/field-value.js.map +1 -0
  120. package/dist/db/filter.d.ts +20 -0
  121. package/dist/db/filter.d.ts.map +1 -0
  122. package/dist/db/filter.js +48 -0
  123. package/dist/db/filter.js.map +1 -0
  124. package/dist/db/firestore-converter.d.ts +11 -0
  125. package/dist/db/firestore-converter.d.ts.map +1 -0
  126. package/dist/db/firestore-converter.js +14 -0
  127. package/dist/db/firestore-converter.js.map +1 -0
  128. package/dist/db/firestore-document.d.ts +62 -0
  129. package/dist/db/firestore-document.d.ts.map +1 -0
  130. package/dist/db/firestore-document.js +238 -0
  131. package/dist/db/firestore-document.js.map +1 -0
  132. package/dist/db/firestore-endpoints.d.ts +41 -0
  133. package/dist/db/firestore-endpoints.d.ts.map +1 -0
  134. package/dist/db/firestore-endpoints.js +735 -0
  135. package/dist/db/firestore-endpoints.js.map +1 -0
  136. package/dist/db/firestore-error-codes.d.ts +24 -0
  137. package/dist/db/firestore-error-codes.d.ts.map +1 -0
  138. package/dist/db/firestore-error-codes.js +24 -0
  139. package/dist/db/firestore-error-codes.js.map +1 -0
  140. package/dist/db/firestore-logging.d.ts +23 -0
  141. package/dist/db/firestore-logging.d.ts.map +1 -0
  142. package/dist/db/firestore-logging.js +41 -0
  143. package/dist/db/firestore-logging.js.map +1 -0
  144. package/dist/db/firestore-path.d.ts +4 -0
  145. package/dist/db/firestore-path.d.ts.map +1 -0
  146. package/dist/db/firestore-path.js +37 -0
  147. package/dist/db/firestore-path.js.map +1 -0
  148. package/dist/db/firestore-results.d.ts +12 -0
  149. package/dist/db/firestore-results.d.ts.map +1 -0
  150. package/dist/db/firestore-results.js +19 -0
  151. package/dist/db/firestore-results.js.map +1 -0
  152. package/dist/db/firestore-settings.d.ts +22 -0
  153. package/dist/db/firestore-settings.d.ts.map +1 -0
  154. package/dist/db/firestore-settings.js +83 -0
  155. package/dist/db/firestore-settings.js.map +1 -0
  156. package/dist/db/firestore-telemetry.d.ts +21 -0
  157. package/dist/db/firestore-telemetry.d.ts.map +1 -0
  158. package/dist/db/firestore-telemetry.js +84 -0
  159. package/dist/db/firestore-telemetry.js.map +1 -0
  160. package/dist/db/firestore-types.d.ts +25 -0
  161. package/dist/db/firestore-types.d.ts.map +1 -0
  162. package/dist/db/firestore-types.js +2 -0
  163. package/dist/db/firestore-types.js.map +1 -0
  164. package/dist/db/firestore.d.ts +151 -0
  165. package/dist/db/firestore.d.ts.map +1 -0
  166. package/dist/db/firestore.js +505 -0
  167. package/dist/db/firestore.js.map +1 -0
  168. package/dist/db/geo-point.d.ts +11 -0
  169. package/dist/db/geo-point.d.ts.map +1 -0
  170. package/dist/db/geo-point.js +29 -0
  171. package/dist/db/geo-point.js.map +1 -0
  172. package/dist/db/json-stream.d.ts +3 -0
  173. package/dist/db/json-stream.d.ts.map +1 -0
  174. package/dist/db/json-stream.js +117 -0
  175. package/dist/db/json-stream.js.map +1 -0
  176. package/dist/db/pipeline-expression.d.ts +293 -0
  177. package/dist/db/pipeline-expression.d.ts.map +1 -0
  178. package/dist/db/pipeline-expression.js +1436 -0
  179. package/dist/db/pipeline-expression.js.map +1 -0
  180. package/dist/db/pipeline-query.d.ts +6 -0
  181. package/dist/db/pipeline-query.d.ts.map +1 -0
  182. package/dist/db/pipeline-query.js +91 -0
  183. package/dist/db/pipeline-query.js.map +1 -0
  184. package/dist/db/pipeline.d.ts +120 -0
  185. package/dist/db/pipeline.d.ts.map +1 -0
  186. package/dist/db/pipeline.js +396 -0
  187. package/dist/db/pipeline.js.map +1 -0
  188. package/dist/db/query-document-snapshot.d.ts +2 -0
  189. package/dist/db/query-document-snapshot.d.ts.map +1 -0
  190. package/dist/db/query-document-snapshot.js +2 -0
  191. package/dist/db/query-document-snapshot.js.map +1 -0
  192. package/dist/db/query-partition.d.ts +14 -0
  193. package/dist/db/query-partition.d.ts.map +1 -0
  194. package/dist/db/query-partition.js +32 -0
  195. package/dist/db/query-partition.js.map +1 -0
  196. package/dist/db/query-request.d.ts +96 -0
  197. package/dist/db/query-request.d.ts.map +1 -0
  198. package/dist/db/query-request.js +283 -0
  199. package/dist/db/query-request.js.map +1 -0
  200. package/dist/db/query.d.ts +129 -0
  201. package/dist/db/query.d.ts.map +1 -0
  202. package/dist/db/query.js +468 -0
  203. package/dist/db/query.js.map +1 -0
  204. package/dist/db/recursive-delete.d.ts +6 -0
  205. package/dist/db/recursive-delete.d.ts.map +1 -0
  206. package/dist/db/recursive-delete.js +38 -0
  207. package/dist/db/recursive-delete.js.map +1 -0
  208. package/dist/db/snapshot-listener.d.ts +10 -0
  209. package/dist/db/snapshot-listener.d.ts.map +1 -0
  210. package/dist/db/snapshot-listener.js +71 -0
  211. package/dist/db/snapshot-listener.js.map +1 -0
  212. package/dist/db/timestamp.d.ts +29 -0
  213. package/dist/db/timestamp.d.ts.map +1 -0
  214. package/dist/db/timestamp.js +98 -0
  215. package/dist/db/timestamp.js.map +1 -0
  216. package/dist/db/transaction.d.ts +44 -0
  217. package/dist/db/transaction.d.ts.map +1 -0
  218. package/dist/db/transaction.js +177 -0
  219. package/dist/db/transaction.js.map +1 -0
  220. package/dist/db/value-equality.d.ts +3 -0
  221. package/dist/db/value-equality.d.ts.map +1 -0
  222. package/dist/db/value-equality.js +29 -0
  223. package/dist/db/value-equality.js.map +1 -0
  224. package/dist/db/vector-query.d.ts +38 -0
  225. package/dist/db/vector-query.d.ts.map +1 -0
  226. package/dist/db/vector-query.js +110 -0
  227. package/dist/db/vector-query.js.map +1 -0
  228. package/dist/db/vector-value.d.ts +8 -0
  229. package/dist/db/vector-value.d.ts.map +1 -0
  230. package/dist/db/vector-value.js +25 -0
  231. package/dist/db/vector-value.js.map +1 -0
  232. package/dist/db/write-batch.d.ts +25 -0
  233. package/dist/db/write-batch.d.ts.map +1 -0
  234. package/dist/db/write-batch.js +72 -0
  235. package/dist/db/write-batch.js.map +1 -0
  236. package/dist/db/write-request.d.ts +36 -0
  237. package/dist/db/write-request.d.ts.map +1 -0
  238. package/dist/db/write-request.js +257 -0
  239. package/dist/db/write-request.js.map +1 -0
  240. package/dist/firebase-edge-server.d.ts +143 -36
  241. package/dist/firebase-edge-server.d.ts.map +1 -1
  242. package/dist/firebase-edge-server.js +463 -258
  243. package/dist/firebase-edge-server.js.map +1 -1
  244. package/dist/index.d.ts +6 -0
  245. package/dist/index.d.ts.map +1 -1
  246. package/dist/index.js +5 -0
  247. package/dist/index.js.map +1 -1
  248. package/dist/rest-fetch.d.ts +1 -1
  249. package/dist/rest-fetch.d.ts.map +1 -1
  250. package/dist/storage/storage-acl.d.ts +48 -0
  251. package/dist/storage/storage-acl.d.ts.map +1 -0
  252. package/dist/storage/storage-acl.js +101 -0
  253. package/dist/storage/storage-acl.js.map +1 -0
  254. package/dist/storage/storage-bucket-endpoints.d.ts +10 -0
  255. package/dist/storage/storage-bucket-endpoints.d.ts.map +1 -0
  256. package/dist/storage/storage-bucket-endpoints.js +514 -0
  257. package/dist/storage/storage-bucket-endpoints.js.map +1 -0
  258. package/dist/storage/storage-bucket-types.d.ts +183 -0
  259. package/dist/storage/storage-bucket-types.d.ts.map +1 -0
  260. package/dist/storage/storage-bucket-types.js +2 -0
  261. package/dist/storage/storage-bucket-types.js.map +1 -0
  262. package/dist/storage/storage-bucket.d.ts +122 -0
  263. package/dist/storage/storage-bucket.d.ts.map +1 -0
  264. package/dist/storage/storage-bucket.js +544 -0
  265. package/dist/storage/storage-bucket.js.map +1 -0
  266. package/dist/storage/storage-channel.d.ts +10 -0
  267. package/dist/storage/storage-channel.d.ts.map +1 -0
  268. package/dist/storage/storage-channel.js +15 -0
  269. package/dist/storage/storage-channel.js.map +1 -0
  270. package/dist/storage/storage-checksum.d.ts +35 -0
  271. package/dist/storage/storage-checksum.d.ts.map +1 -0
  272. package/dist/storage/storage-checksum.js +312 -0
  273. package/dist/storage/storage-checksum.js.map +1 -0
  274. package/dist/storage/storage-endpoints.d.ts +14 -0
  275. package/dist/storage/storage-endpoints.d.ts.map +1 -0
  276. package/dist/storage/storage-endpoints.js +721 -0
  277. package/dist/storage/storage-endpoints.js.map +1 -0
  278. package/dist/storage/storage-file.d.ts +126 -0
  279. package/dist/storage/storage-file.d.ts.map +1 -0
  280. package/dist/storage/storage-file.js +604 -0
  281. package/dist/storage/storage-file.js.map +1 -0
  282. package/dist/storage/storage-hmac-key.d.ts +26 -0
  283. package/dist/storage/storage-hmac-key.d.ts.map +1 -0
  284. package/dist/storage/storage-hmac-key.js +45 -0
  285. package/dist/storage/storage-hmac-key.js.map +1 -0
  286. package/dist/storage/storage-iam.d.ts +20 -0
  287. package/dist/storage/storage-iam.d.ts.map +1 -0
  288. package/dist/storage/storage-iam.js +43 -0
  289. package/dist/storage/storage-iam.js.map +1 -0
  290. package/dist/storage/storage-md5.d.ts +11 -0
  291. package/dist/storage/storage-md5.d.ts.map +1 -0
  292. package/dist/storage/storage-md5.js +96 -0
  293. package/dist/storage/storage-md5.js.map +1 -0
  294. package/dist/storage/storage-notification.d.ts +24 -0
  295. package/dist/storage/storage-notification.d.ts.map +1 -0
  296. package/dist/storage/storage-notification.js +40 -0
  297. package/dist/storage/storage-notification.js.map +1 -0
  298. package/dist/storage/storage-progress.d.ts +4 -0
  299. package/dist/storage/storage-progress.d.ts.map +1 -0
  300. package/dist/storage/storage-progress.js +17 -0
  301. package/dist/storage/storage-progress.js.map +1 -0
  302. package/dist/storage/storage-reference-endpoints.d.ts +63 -0
  303. package/dist/storage/storage-reference-endpoints.d.ts.map +1 -0
  304. package/dist/storage/storage-reference-endpoints.js +276 -0
  305. package/dist/storage/storage-reference-endpoints.js.map +1 -0
  306. package/dist/storage/storage-reference-helpers.d.ts +12 -0
  307. package/dist/storage/storage-reference-helpers.d.ts.map +1 -0
  308. package/dist/storage/storage-reference-helpers.js +72 -0
  309. package/dist/storage/storage-reference-helpers.js.map +1 -0
  310. package/dist/storage/storage-reference-signing.d.ts +40 -0
  311. package/dist/storage/storage-reference-signing.d.ts.map +1 -0
  312. package/dist/storage/storage-reference-signing.js +289 -0
  313. package/dist/storage/storage-reference-signing.js.map +1 -0
  314. package/dist/storage/storage-reference-types.d.ts +76 -0
  315. package/dist/storage/storage-reference-types.d.ts.map +1 -0
  316. package/dist/storage/storage-reference-types.js +2 -0
  317. package/dist/storage/storage-reference-types.js.map +1 -0
  318. package/dist/storage/storage-results.d.ts +8 -0
  319. package/dist/storage/storage-results.d.ts.map +1 -0
  320. package/dist/storage/storage-results.js +32 -0
  321. package/dist/storage/storage-results.js.map +1 -0
  322. package/dist/storage/storage-resumable.d.ts +18 -0
  323. package/dist/storage/storage-resumable.d.ts.map +1 -0
  324. package/dist/storage/storage-resumable.js +166 -0
  325. package/dist/storage/storage-resumable.js.map +1 -0
  326. package/dist/storage/storage-retry.d.ts +9 -0
  327. package/dist/storage/storage-retry.d.ts.map +1 -0
  328. package/dist/storage/storage-retry.js +104 -0
  329. package/dist/storage/storage-retry.js.map +1 -0
  330. package/dist/storage/storage-signed-url.d.ts +9 -0
  331. package/dist/storage/storage-signed-url.d.ts.map +1 -0
  332. package/dist/storage/storage-signed-url.js +96 -0
  333. package/dist/storage/storage-signed-url.js.map +1 -0
  334. package/dist/storage/storage-special-endpoints.d.ts +10 -0
  335. package/dist/storage/storage-special-endpoints.d.ts.map +1 -0
  336. package/dist/storage/storage-special-endpoints.js +394 -0
  337. package/dist/storage/storage-special-endpoints.js.map +1 -0
  338. package/dist/storage/storage-special-types.d.ts +154 -0
  339. package/dist/storage/storage-special-types.d.ts.map +1 -0
  340. package/dist/storage/storage-special-types.js +2 -0
  341. package/dist/storage/storage-special-types.js.map +1 -0
  342. package/dist/storage/storage-types.d.ts +251 -0
  343. package/dist/storage/storage-types.d.ts.map +1 -0
  344. package/dist/storage/storage-types.js +2 -0
  345. package/dist/storage/storage-types.js.map +1 -0
  346. package/dist/storage/storage-upload-stream.d.ts +41 -0
  347. package/dist/storage/storage-upload-stream.d.ts.map +1 -0
  348. package/dist/storage/storage-upload-stream.js +335 -0
  349. package/dist/storage/storage-upload-stream.js.map +1 -0
  350. package/dist/storage/storage-xml-signing.d.ts +17 -0
  351. package/dist/storage/storage-xml-signing.d.ts.map +1 -0
  352. package/dist/storage/storage-xml-signing.js +144 -0
  353. package/dist/storage/storage-xml-signing.js.map +1 -0
  354. package/dist/storage/storage.d.ts +152 -0
  355. package/dist/storage/storage.d.ts.map +1 -0
  356. package/dist/storage/storage.js +532 -0
  357. package/dist/storage/storage.js.map +1 -0
  358. package/dist/utils/token-cache.d.ts.map +1 -1
  359. package/dist/utils/token-cache.js +3 -2
  360. package/dist/utils/token-cache.js.map +1 -1
  361. package/package.json +22 -6
  362. package/dist/auth/auth-endpoint-errors.test.d.ts +0 -2
  363. package/dist/auth/auth-endpoint-errors.test.d.ts.map +0 -1
  364. package/dist/auth/auth-endpoint-errors.test.js +0 -411
  365. package/dist/auth/auth-endpoint-errors.test.js.map +0 -1
  366. package/dist/auth/email-action-request.test.d.ts +0 -2
  367. package/dist/auth/email-action-request.test.d.ts.map +0 -1
  368. package/dist/auth/email-action-request.test.js +0 -128
  369. package/dist/auth/email-action-request.test.js.map +0 -1
  370. package/dist/auth/errors.test.d.ts +0 -2
  371. package/dist/auth/errors.test.d.ts.map +0 -1
  372. package/dist/auth/errors.test.js +0 -123
  373. package/dist/auth/errors.test.js.map +0 -1
  374. package/dist/auth/firebase-admin-auth.test.d.ts +0 -2
  375. package/dist/auth/firebase-admin-auth.test.d.ts.map +0 -1
  376. package/dist/auth/firebase-admin-auth.test.js +0 -1542
  377. package/dist/auth/firebase-admin-auth.test.js.map +0 -1
  378. package/dist/auth/firebase-auth-endpoints.test.d.ts +0 -2
  379. package/dist/auth/firebase-auth-endpoints.test.d.ts.map +0 -1
  380. package/dist/auth/firebase-auth-endpoints.test.js +0 -1082
  381. package/dist/auth/firebase-auth-endpoints.test.js.map +0 -1
  382. package/dist/auth/firebase-auth.test.d.ts +0 -2
  383. package/dist/auth/firebase-auth.test.d.ts.map +0 -1
  384. package/dist/auth/firebase-auth.test.js +0 -167
  385. package/dist/auth/firebase-auth.test.js.map +0 -1
  386. package/dist/auth/firebase-jwt.test.d.ts +0 -2
  387. package/dist/auth/firebase-jwt.test.d.ts.map +0 -1
  388. package/dist/auth/firebase-jwt.test.js +0 -164
  389. package/dist/auth/firebase-jwt.test.js.map +0 -1
  390. package/dist/auth/github-oauth.d.ts +0 -19
  391. package/dist/auth/github-oauth.d.ts.map +0 -1
  392. package/dist/auth/github-oauth.js +0 -145
  393. package/dist/auth/github-oauth.js.map +0 -1
  394. package/dist/auth/github-oauth.test.d.ts +0 -2
  395. package/dist/auth/github-oauth.test.d.ts.map +0 -1
  396. package/dist/auth/github-oauth.test.js +0 -202
  397. package/dist/auth/github-oauth.test.js.map +0 -1
  398. package/dist/auth/google-oauth.test.d.ts +0 -2
  399. package/dist/auth/google-oauth.test.d.ts.map +0 -1
  400. package/dist/auth/google-oauth.test.js +0 -200
  401. package/dist/auth/google-oauth.test.js.map +0 -1
  402. package/dist/auth/oauth.d.ts +0 -3
  403. package/dist/auth/oauth.d.ts.map +0 -1
  404. package/dist/auth/oauth.js +0 -48
  405. package/dist/auth/oauth.js.map +0 -1
  406. package/dist/auth/oauth.test.d.ts +0 -2
  407. package/dist/auth/oauth.test.d.ts.map +0 -1
  408. package/dist/auth/oauth.test.js +0 -109
  409. package/dist/auth/oauth.test.js.map +0 -1
  410. package/dist/auth/user-batch.test.d.ts +0 -2
  411. package/dist/auth/user-batch.test.d.ts.map +0 -1
  412. package/dist/auth/user-batch.test.js +0 -73
  413. package/dist/auth/user-batch.test.js.map +0 -1
  414. package/dist/auth/user-import.test.d.ts +0 -2
  415. package/dist/auth/user-import.test.d.ts.map +0 -1
  416. package/dist/auth/user-import.test.js +0 -217
  417. package/dist/auth/user-import.test.js.map +0 -1
  418. package/dist/auth/user-record.test.d.ts +0 -2
  419. package/dist/auth/user-record.test.d.ts.map +0 -1
  420. package/dist/auth/user-record.test.js +0 -198
  421. package/dist/auth/user-record.test.js.map +0 -1
  422. package/dist/auth/user-request.test.d.ts +0 -2
  423. package/dist/auth/user-request.test.d.ts.map +0 -1
  424. package/dist/auth/user-request.test.js +0 -327
  425. package/dist/auth/user-request.test.js.map +0 -1
  426. package/dist/firebase-edge-errors.test.d.ts +0 -2
  427. package/dist/firebase-edge-errors.test.d.ts.map +0 -1
  428. package/dist/firebase-edge-errors.test.js +0 -72
  429. package/dist/firebase-edge-errors.test.js.map +0 -1
  430. package/dist/firebase-edge-server.test.d.ts +0 -2
  431. package/dist/firebase-edge-server.test.d.ts.map +0 -1
  432. package/dist/firebase-edge-server.test.js +0 -293
  433. package/dist/firebase-edge-server.test.js.map +0 -1
  434. package/dist/rest-fetch.test.d.ts +0 -2
  435. package/dist/rest-fetch.test.d.ts.map +0 -1
  436. package/dist/rest-fetch.test.js +0 -164
  437. package/dist/rest-fetch.test.js.map +0 -1
@@ -0,0 +1,1436 @@
1
+ import { encodeValue, validateFieldPath } from './query-request.js';
2
+ import { FieldPath } from './field-path.js';
3
+ import { FirebaseEdgeError } from '../auth/errors.js';
4
+ import { FirestoreErrorInfo } from './firestore-error-codes.js';
5
+ export class Expression {
6
+ _value;
7
+ constructor(_value) {
8
+ this._value = _value;
9
+ }
10
+ add(...values) {
11
+ return new FunctionExpression('add', [this, ...values]);
12
+ }
13
+ subtract(...values) {
14
+ return new FunctionExpression('subtract', [this, ...values]);
15
+ }
16
+ multiply(...values) {
17
+ return new FunctionExpression('multiply', [this, ...values]);
18
+ }
19
+ divide(...values) {
20
+ return new FunctionExpression('divide', [this, ...values]);
21
+ }
22
+ mod(...values) {
23
+ return new FunctionExpression('mod', [this, ...values]);
24
+ }
25
+ equal(...values) {
26
+ return new FunctionExpression('equal', [this, ...values]).asBoolean();
27
+ }
28
+ notEqual(...values) {
29
+ return new FunctionExpression('not_equal', [
30
+ this,
31
+ ...values
32
+ ]).asBoolean();
33
+ }
34
+ lessThan(...values) {
35
+ return new FunctionExpression('less_than', [
36
+ this,
37
+ ...values
38
+ ]).asBoolean();
39
+ }
40
+ lessThanOrEqual(...values) {
41
+ return new FunctionExpression('less_than_or_equal', [
42
+ this,
43
+ ...values
44
+ ]).asBoolean();
45
+ }
46
+ greaterThan(...values) {
47
+ return new FunctionExpression('greater_than', [
48
+ this,
49
+ ...values
50
+ ]).asBoolean();
51
+ }
52
+ greaterThanOrEqual(...values) {
53
+ return new FunctionExpression('greater_than_or_equal', [
54
+ this,
55
+ ...values
56
+ ]).asBoolean();
57
+ }
58
+ arrayConcat(...values) {
59
+ return new FunctionExpression('array_concat', [this, ...values]);
60
+ }
61
+ arrayContains(...values) {
62
+ return new FunctionExpression('array_contains', [
63
+ this,
64
+ ...values
65
+ ]).asBoolean();
66
+ }
67
+ arrayContainsAll(...values) {
68
+ return new FunctionExpression('array_contains_all', [
69
+ this,
70
+ ...values
71
+ ]).asBoolean();
72
+ }
73
+ arrayContainsAny(...values) {
74
+ return new FunctionExpression('array_contains_any', [
75
+ this,
76
+ ...values
77
+ ]).asBoolean();
78
+ }
79
+ arrayFilter(...values) {
80
+ return new FunctionExpression('array_filter', [this, ...values]);
81
+ }
82
+ arrayTransform(...values) {
83
+ return new FunctionExpression('array_transform', [this, ...values]);
84
+ }
85
+ arrayTransformWithIndex(...values) {
86
+ return new FunctionExpression('array_transform', [this, ...values]);
87
+ }
88
+ arraySlice(...values) {
89
+ return new FunctionExpression('array_slice', [this, ...values]);
90
+ }
91
+ arrayReverse(...values) {
92
+ return new FunctionExpression('array_reverse', [this, ...values]);
93
+ }
94
+ arrayLength(...values) {
95
+ return new FunctionExpression('array_length', [this, ...values]);
96
+ }
97
+ arrayFirst(...values) {
98
+ return new FunctionExpression('array_first', [this, ...values]);
99
+ }
100
+ arrayFirstN(...values) {
101
+ return new FunctionExpression('array_first_n', [this, ...values]);
102
+ }
103
+ arrayLast(...values) {
104
+ return new FunctionExpression('array_last', [this, ...values]);
105
+ }
106
+ arrayLastN(...values) {
107
+ return new FunctionExpression('array_last_n', [this, ...values]);
108
+ }
109
+ arrayMaximum(...values) {
110
+ return new FunctionExpression('maximum', [this, ...values]);
111
+ }
112
+ arrayMaximumN(...values) {
113
+ return new FunctionExpression('maximum_n', [this, ...values]);
114
+ }
115
+ arrayMinimum(...values) {
116
+ return new FunctionExpression('minimum', [this, ...values]);
117
+ }
118
+ arrayMinimumN(...values) {
119
+ return new FunctionExpression('minimum_n', [this, ...values]);
120
+ }
121
+ arrayIndexOf(...values) {
122
+ return new FunctionExpression('array_index_of', [
123
+ this,
124
+ ...values,
125
+ 'first'
126
+ ]);
127
+ }
128
+ arrayLastIndexOf(...values) {
129
+ return new FunctionExpression('array_index_of', [
130
+ this,
131
+ ...values,
132
+ 'last'
133
+ ]);
134
+ }
135
+ arrayIndexOfAll(...values) {
136
+ return new FunctionExpression('array_index_of_all', [this, ...values]);
137
+ }
138
+ equalAny(...values) {
139
+ return new FunctionExpression('equal_any', [
140
+ this,
141
+ ...values
142
+ ]).asBoolean();
143
+ }
144
+ notEqualAny(...values) {
145
+ return new FunctionExpression('not_equal_any', [
146
+ this,
147
+ ...values
148
+ ]).asBoolean();
149
+ }
150
+ exists(...values) {
151
+ return new FunctionExpression('exists', [this, ...values]).asBoolean();
152
+ }
153
+ charLength(...values) {
154
+ return new FunctionExpression('char_length', [this, ...values]);
155
+ }
156
+ like(...values) {
157
+ return new FunctionExpression('like', [this, ...values]).asBoolean();
158
+ }
159
+ regexContains(...values) {
160
+ return new FunctionExpression('regex_contains', [
161
+ this,
162
+ ...values
163
+ ]).asBoolean();
164
+ }
165
+ regexFind(...values) {
166
+ return new FunctionExpression('regex_find', [this, ...values]);
167
+ }
168
+ regexFindAll(...values) {
169
+ return new FunctionExpression('regex_find_all', [this, ...values]);
170
+ }
171
+ regexMatch(...values) {
172
+ return new FunctionExpression('regex_match', [
173
+ this,
174
+ ...values
175
+ ]).asBoolean();
176
+ }
177
+ stringContains(...values) {
178
+ return new FunctionExpression('string_contains', [
179
+ this,
180
+ ...values
181
+ ]).asBoolean();
182
+ }
183
+ startsWith(...values) {
184
+ return new FunctionExpression('starts_with', [
185
+ this,
186
+ ...values
187
+ ]).asBoolean();
188
+ }
189
+ endsWith(...values) {
190
+ return new FunctionExpression('ends_with', [
191
+ this,
192
+ ...values
193
+ ]).asBoolean();
194
+ }
195
+ toLower(...values) {
196
+ return new FunctionExpression('to_lower', [this, ...values]);
197
+ }
198
+ toUpper(...values) {
199
+ return new FunctionExpression('to_upper', [this, ...values]);
200
+ }
201
+ trim(...values) {
202
+ return new FunctionExpression('trim', [this, ...values]);
203
+ }
204
+ ltrim(...values) {
205
+ return new FunctionExpression('ltrim', [this, ...values]);
206
+ }
207
+ rtrim(...values) {
208
+ return new FunctionExpression('rtrim', [this, ...values]);
209
+ }
210
+ stringConcat(...values) {
211
+ return new FunctionExpression('string_concat', [this, ...values]);
212
+ }
213
+ stringIndexOf(...values) {
214
+ return new FunctionExpression('string_index_of', [this, ...values]);
215
+ }
216
+ stringRepeat(...values) {
217
+ return new FunctionExpression('string_repeat', [this, ...values]);
218
+ }
219
+ stringReplaceAll(...values) {
220
+ return new FunctionExpression('string_replace_all', [this, ...values]);
221
+ }
222
+ stringReplaceOne(...values) {
223
+ return new FunctionExpression('string_replace_one', [this, ...values]);
224
+ }
225
+ concat(...values) {
226
+ return new FunctionExpression('concat', [this, ...values]);
227
+ }
228
+ reverse(...values) {
229
+ return new FunctionExpression('reverse', [this, ...values]);
230
+ }
231
+ byteLength(...values) {
232
+ return new FunctionExpression('byte_length', [this, ...values]);
233
+ }
234
+ ceil(...values) {
235
+ return new FunctionExpression('ceil', [this, ...values]);
236
+ }
237
+ floor(...values) {
238
+ return new FunctionExpression('floor', [this, ...values]);
239
+ }
240
+ abs(...values) {
241
+ return new FunctionExpression('abs', [this, ...values]);
242
+ }
243
+ exp(...values) {
244
+ return new FunctionExpression('exp', [this, ...values]);
245
+ }
246
+ mapGet(...values) {
247
+ return new FunctionExpression('map_get', [this, ...values]);
248
+ }
249
+ mapSet(...values) {
250
+ return new FunctionExpression('map_set', [this, ...values]);
251
+ }
252
+ mapKeys(...values) {
253
+ return new FunctionExpression('map_keys', [this, ...values]);
254
+ }
255
+ mapValues(...values) {
256
+ return new FunctionExpression('map_values', [this, ...values]);
257
+ }
258
+ mapEntries(...values) {
259
+ return new FunctionExpression('map_entries', [this, ...values]);
260
+ }
261
+ count(...values) {
262
+ return new AggregateFunction('count', [this, ...values]);
263
+ }
264
+ sum(...values) {
265
+ return new AggregateFunction('sum', [this, ...values]);
266
+ }
267
+ average(...values) {
268
+ return new AggregateFunction('average', [this, ...values]);
269
+ }
270
+ minimum(...values) {
271
+ return new AggregateFunction('minimum', [this, ...values]);
272
+ }
273
+ maximum(...values) {
274
+ return new AggregateFunction('maximum', [this, ...values]);
275
+ }
276
+ first(...values) {
277
+ return new AggregateFunction('first', [this, ...values]);
278
+ }
279
+ last(...values) {
280
+ return new AggregateFunction('last', [this, ...values]);
281
+ }
282
+ arrayAgg(...values) {
283
+ return new AggregateFunction('array_agg', [this, ...values]);
284
+ }
285
+ arrayAggDistinct(...values) {
286
+ return new AggregateFunction('array_agg_distinct', [this, ...values]);
287
+ }
288
+ countDistinct(...values) {
289
+ return new AggregateFunction('count_distinct', [this, ...values]);
290
+ }
291
+ logicalMaximum(...values) {
292
+ return new FunctionExpression('maximum', [this, ...values]);
293
+ }
294
+ logicalMinimum(...values) {
295
+ return new FunctionExpression('minimum', [this, ...values]);
296
+ }
297
+ vectorLength(...values) {
298
+ return new FunctionExpression('vector_length', [this, ...values]);
299
+ }
300
+ cosineDistance(...values) {
301
+ return new FunctionExpression('cosine_distance', [this, ...values]);
302
+ }
303
+ dotProduct(...values) {
304
+ return new FunctionExpression('dot_product', [this, ...values]);
305
+ }
306
+ euclideanDistance(...values) {
307
+ return new FunctionExpression('euclidean_distance', [this, ...values]);
308
+ }
309
+ unixMicrosToTimestamp(...values) {
310
+ return new FunctionExpression('unix_micros_to_timestamp', [
311
+ this,
312
+ ...values
313
+ ]);
314
+ }
315
+ timestampToUnixMicros(...values) {
316
+ return new FunctionExpression('timestamp_to_unix_micros', [
317
+ this,
318
+ ...values
319
+ ]);
320
+ }
321
+ unixMillisToTimestamp(...values) {
322
+ return new FunctionExpression('unix_millis_to_timestamp', [
323
+ this,
324
+ ...values
325
+ ]);
326
+ }
327
+ timestampToUnixMillis(...values) {
328
+ return new FunctionExpression('timestamp_to_unix_millis', [
329
+ this,
330
+ ...values
331
+ ]);
332
+ }
333
+ unixSecondsToTimestamp(...values) {
334
+ return new FunctionExpression('unix_seconds_to_timestamp', [
335
+ this,
336
+ ...values
337
+ ]);
338
+ }
339
+ timestampToUnixSeconds(...values) {
340
+ return new FunctionExpression('timestamp_to_unix_seconds', [
341
+ this,
342
+ ...values
343
+ ]);
344
+ }
345
+ timestampAdd(...values) {
346
+ return new FunctionExpression('timestamp_add', [this, ...values]);
347
+ }
348
+ timestampSubtract(...values) {
349
+ return new FunctionExpression('timestamp_subtract', [this, ...values]);
350
+ }
351
+ timestampDiff(...values) {
352
+ return new FunctionExpression('timestamp_diff', [this, ...values]);
353
+ }
354
+ timestampExtract(...values) {
355
+ return new FunctionExpression('timestamp_extract', [this, ...values]);
356
+ }
357
+ documentId(...values) {
358
+ return new FunctionExpression('document_id', [this, ...values]);
359
+ }
360
+ parent(...values) {
361
+ return new FunctionExpression('parent', [this, ...values]);
362
+ }
363
+ substring(...values) {
364
+ return new FunctionExpression('substring', [this, ...values]);
365
+ }
366
+ arrayGet(...values) {
367
+ return new FunctionExpression('array_get', [this, ...values]);
368
+ }
369
+ isError(...values) {
370
+ return new FunctionExpression('is_error', [
371
+ this,
372
+ ...values
373
+ ]).asBoolean();
374
+ }
375
+ ifError(...values) {
376
+ return new FunctionExpression('if_error', [this, ...values]);
377
+ }
378
+ isAbsent(...values) {
379
+ return new FunctionExpression('is_absent', [
380
+ this,
381
+ ...values
382
+ ]).asBoolean();
383
+ }
384
+ mapRemove(...values) {
385
+ return new FunctionExpression('map_remove', [this, ...values]);
386
+ }
387
+ mapMerge(...values) {
388
+ return new FunctionExpression('map_merge', [this, ...values]);
389
+ }
390
+ pow(...values) {
391
+ return new FunctionExpression('pow', [this, ...values]);
392
+ }
393
+ trunc(...values) {
394
+ return new FunctionExpression('trunc', [this, ...values]);
395
+ }
396
+ round(...values) {
397
+ return new FunctionExpression('round', [this, ...values]);
398
+ }
399
+ collectionId(...values) {
400
+ return new FunctionExpression('collection_id', [this, ...values]);
401
+ }
402
+ length(...values) {
403
+ return new FunctionExpression('length', [this, ...values]);
404
+ }
405
+ ln(...values) {
406
+ return new FunctionExpression('ln', [this, ...values]);
407
+ }
408
+ sqrt(...values) {
409
+ return new FunctionExpression('sqrt', [this, ...values]);
410
+ }
411
+ stringReverse(...values) {
412
+ return new FunctionExpression('string_reverse', [this, ...values]);
413
+ }
414
+ ifAbsent(...values) {
415
+ return new FunctionExpression('if_absent', [this, ...values]);
416
+ }
417
+ ifNull(...values) {
418
+ return new FunctionExpression('if_null', [this, ...values]);
419
+ }
420
+ coalesce(...values) {
421
+ return new FunctionExpression('coalesce', [this, ...values]);
422
+ }
423
+ join(...values) {
424
+ return new FunctionExpression('join', [this, ...values]);
425
+ }
426
+ log10(...values) {
427
+ return new FunctionExpression('log10', [this, ...values]);
428
+ }
429
+ arraySum(...values) {
430
+ return new FunctionExpression('sum', [this, ...values]);
431
+ }
432
+ split(...values) {
433
+ return new FunctionExpression('split', [this, ...values]);
434
+ }
435
+ timestampTruncate(...values) {
436
+ return new FunctionExpression('timestamp_trunc', [this, ...values]);
437
+ }
438
+ type(...values) {
439
+ return new FunctionExpression('type', [this, ...values]);
440
+ }
441
+ isType(...values) {
442
+ return new FunctionExpression('is_type', [this, ...values]).asBoolean();
443
+ }
444
+ getField(...values) {
445
+ return new FunctionExpression('get_field', [this, ...values]);
446
+ }
447
+ as(alias) {
448
+ return new AliasedExpression(this, alias);
449
+ }
450
+ ascending() {
451
+ return new Ordering(this, 'ascending');
452
+ }
453
+ descending() {
454
+ return new Ordering(this, 'descending');
455
+ }
456
+ asBoolean() {
457
+ return new BooleanExpression(this._value);
458
+ }
459
+ }
460
+ export class FunctionExpression extends Expression {
461
+ constructor(name, params) {
462
+ if (typeof name !== 'string' || !name || !Array.isArray(params))
463
+ throw new FirebaseEdgeError({
464
+ ...FirestoreErrorInfo.INVALID_ARGUMENT,
465
+ message: 'Expected a function name and arguments.'
466
+ });
467
+ super({
468
+ functionValue: { name, args: params.map(encodePipelineValue) }
469
+ });
470
+ }
471
+ }
472
+ export class BooleanExpression extends Expression {
473
+ not() {
474
+ return new FunctionExpression('not', [this]).asBoolean();
475
+ }
476
+ }
477
+ export class AggregateFunction extends FunctionExpression {
478
+ as(alias) {
479
+ return new AliasedAggregate(this, alias);
480
+ }
481
+ }
482
+ export class Field extends Expression {
483
+ fieldPath;
484
+ constructor(fieldPath) {
485
+ if (!(fieldPath instanceof FieldPath))
486
+ validateFieldPath(fieldPath);
487
+ super({ fieldReferenceValue: fieldPath.toString() });
488
+ this.fieldPath = fieldPath;
489
+ }
490
+ }
491
+ export class Constant extends Expression {
492
+ constructor(value) {
493
+ super(encodeValue(value));
494
+ }
495
+ }
496
+ export class AliasedExpression {
497
+ expr;
498
+ alias;
499
+ constructor(expr, alias) {
500
+ this.expr = expr;
501
+ this.alias = alias;
502
+ if (!(expr instanceof Expression) ||
503
+ typeof alias !== 'string' ||
504
+ !alias)
505
+ throw new FirebaseEdgeError({
506
+ ...FirestoreErrorInfo.INVALID_ARGUMENT,
507
+ message: 'Expected an expression and nonempty alias.'
508
+ });
509
+ }
510
+ }
511
+ export class AliasedAggregate extends AliasedExpression {
512
+ }
513
+ export class Ordering {
514
+ expr;
515
+ direction;
516
+ constructor(expr, direction) {
517
+ this.expr = expr;
518
+ this.direction = direction;
519
+ if (!(expr instanceof Expression) ||
520
+ !['ascending', 'descending'].includes(direction))
521
+ throw new FirebaseEdgeError({
522
+ ...FirestoreErrorInfo.INVALID_ARGUMENT,
523
+ message: 'Invalid pipeline ordering.'
524
+ });
525
+ }
526
+ }
527
+ export function field(path) {
528
+ return new Field(path);
529
+ }
530
+ export function constant(value) {
531
+ return new Constant(value);
532
+ }
533
+ export function functionExpression(name, ...params) {
534
+ return new FunctionExpression(name, params);
535
+ }
536
+ export function aggregateFunction(name, ...params) {
537
+ return new AggregateFunction(name, params);
538
+ }
539
+ /** @internal Recursively encode expressions nested in stage maps and arrays. */
540
+ export function encodePipelineValue(value) {
541
+ if (value instanceof Expression)
542
+ return structuredClone(value._value);
543
+ if (value instanceof Ordering)
544
+ return encodePipelineValue({
545
+ expression: value.expr,
546
+ direction: value.direction
547
+ });
548
+ if (Array.isArray(value))
549
+ return { arrayValue: { values: value.map(encodePipelineValue) } };
550
+ if (value && Object.getPrototypeOf(value) === Object.prototype)
551
+ return {
552
+ mapValue: {
553
+ fields: Object.fromEntries(Object.entries(value).map(([key, entry]) => [
554
+ key,
555
+ encodePipelineValue(entry)
556
+ ]))
557
+ }
558
+ };
559
+ return encodeValue(value);
560
+ }
561
+ /** @internal Normalize selections without assigning user keys to object prototypes. */
562
+ export function selectionMap(selections) {
563
+ return Object.fromEntries(selections.map((selection) => {
564
+ if (typeof selection === 'string')
565
+ return [selection, field(selection)];
566
+ if (selection instanceof Field)
567
+ return [selection.fieldPath.toString(), selection];
568
+ if (selection instanceof AliasedExpression)
569
+ return [selection.alias, selection.expr];
570
+ throw new FirebaseEdgeError({
571
+ ...FirestoreErrorInfo.INVALID_ARGUMENT,
572
+ message: 'Expected a field or aliased expression.'
573
+ });
574
+ }));
575
+ }
576
+ export function add(first, ...values) {
577
+ return (first instanceof Expression
578
+ ? first
579
+ : typeof first === 'string'
580
+ ? field(first)
581
+ : constant(first)).add(...values);
582
+ }
583
+ export function subtract(first, ...values) {
584
+ return (first instanceof Expression
585
+ ? first
586
+ : typeof first === 'string'
587
+ ? field(first)
588
+ : constant(first)).subtract(...values);
589
+ }
590
+ export function multiply(first, ...values) {
591
+ return (first instanceof Expression
592
+ ? first
593
+ : typeof first === 'string'
594
+ ? field(first)
595
+ : constant(first)).multiply(...values);
596
+ }
597
+ export function divide(first, ...values) {
598
+ return (first instanceof Expression
599
+ ? first
600
+ : typeof first === 'string'
601
+ ? field(first)
602
+ : constant(first)).divide(...values);
603
+ }
604
+ export function mod(first, ...values) {
605
+ return (first instanceof Expression
606
+ ? first
607
+ : typeof first === 'string'
608
+ ? field(first)
609
+ : constant(first)).mod(...values);
610
+ }
611
+ export function equal(first, ...values) {
612
+ return (first instanceof Expression
613
+ ? first
614
+ : typeof first === 'string'
615
+ ? field(first)
616
+ : constant(first)).equal(...values);
617
+ }
618
+ export function notEqual(first, ...values) {
619
+ return (first instanceof Expression
620
+ ? first
621
+ : typeof first === 'string'
622
+ ? field(first)
623
+ : constant(first)).notEqual(...values);
624
+ }
625
+ export function lessThan(first, ...values) {
626
+ return (first instanceof Expression
627
+ ? first
628
+ : typeof first === 'string'
629
+ ? field(first)
630
+ : constant(first)).lessThan(...values);
631
+ }
632
+ export function lessThanOrEqual(first, ...values) {
633
+ return (first instanceof Expression
634
+ ? first
635
+ : typeof first === 'string'
636
+ ? field(first)
637
+ : constant(first)).lessThanOrEqual(...values);
638
+ }
639
+ export function greaterThan(first, ...values) {
640
+ return (first instanceof Expression
641
+ ? first
642
+ : typeof first === 'string'
643
+ ? field(first)
644
+ : constant(first)).greaterThan(...values);
645
+ }
646
+ export function greaterThanOrEqual(first, ...values) {
647
+ return (first instanceof Expression
648
+ ? first
649
+ : typeof first === 'string'
650
+ ? field(first)
651
+ : constant(first)).greaterThanOrEqual(...values);
652
+ }
653
+ export function arrayConcat(first, ...values) {
654
+ return (first instanceof Expression
655
+ ? first
656
+ : typeof first === 'string'
657
+ ? field(first)
658
+ : constant(first)).arrayConcat(...values);
659
+ }
660
+ export function arrayContains(first, ...values) {
661
+ return (first instanceof Expression
662
+ ? first
663
+ : typeof first === 'string'
664
+ ? field(first)
665
+ : constant(first)).arrayContains(...values);
666
+ }
667
+ export function arrayContainsAll(first, ...values) {
668
+ return (first instanceof Expression
669
+ ? first
670
+ : typeof first === 'string'
671
+ ? field(first)
672
+ : constant(first)).arrayContainsAll(...values);
673
+ }
674
+ export function arrayContainsAny(first, ...values) {
675
+ return (first instanceof Expression
676
+ ? first
677
+ : typeof first === 'string'
678
+ ? field(first)
679
+ : constant(first)).arrayContainsAny(...values);
680
+ }
681
+ export function arrayFilter(first, ...values) {
682
+ return (first instanceof Expression
683
+ ? first
684
+ : typeof first === 'string'
685
+ ? field(first)
686
+ : constant(first)).arrayFilter(...values);
687
+ }
688
+ export function arrayTransform(first, ...values) {
689
+ return (first instanceof Expression
690
+ ? first
691
+ : typeof first === 'string'
692
+ ? field(first)
693
+ : constant(first)).arrayTransform(...values);
694
+ }
695
+ export function arrayTransformWithIndex(first, ...values) {
696
+ return (first instanceof Expression
697
+ ? first
698
+ : typeof first === 'string'
699
+ ? field(first)
700
+ : constant(first)).arrayTransformWithIndex(...values);
701
+ }
702
+ export function arraySlice(first, ...values) {
703
+ return (first instanceof Expression
704
+ ? first
705
+ : typeof first === 'string'
706
+ ? field(first)
707
+ : constant(first)).arraySlice(...values);
708
+ }
709
+ export function arrayReverse(first, ...values) {
710
+ return (first instanceof Expression
711
+ ? first
712
+ : typeof first === 'string'
713
+ ? field(first)
714
+ : constant(first)).arrayReverse(...values);
715
+ }
716
+ export function arrayLength(first, ...values) {
717
+ return (first instanceof Expression
718
+ ? first
719
+ : typeof first === 'string'
720
+ ? field(first)
721
+ : constant(first)).arrayLength(...values);
722
+ }
723
+ export function arrayFirst(first, ...values) {
724
+ return (first instanceof Expression
725
+ ? first
726
+ : typeof first === 'string'
727
+ ? field(first)
728
+ : constant(first)).arrayFirst(...values);
729
+ }
730
+ export function arrayFirstN(first, ...values) {
731
+ return (first instanceof Expression
732
+ ? first
733
+ : typeof first === 'string'
734
+ ? field(first)
735
+ : constant(first)).arrayFirstN(...values);
736
+ }
737
+ export function arrayLast(first, ...values) {
738
+ return (first instanceof Expression
739
+ ? first
740
+ : typeof first === 'string'
741
+ ? field(first)
742
+ : constant(first)).arrayLast(...values);
743
+ }
744
+ export function arrayLastN(first, ...values) {
745
+ return (first instanceof Expression
746
+ ? first
747
+ : typeof first === 'string'
748
+ ? field(first)
749
+ : constant(first)).arrayLastN(...values);
750
+ }
751
+ export function arrayMaximum(first, ...values) {
752
+ return (first instanceof Expression
753
+ ? first
754
+ : typeof first === 'string'
755
+ ? field(first)
756
+ : constant(first)).arrayMaximum(...values);
757
+ }
758
+ export function arrayMaximumN(first, ...values) {
759
+ return (first instanceof Expression
760
+ ? first
761
+ : typeof first === 'string'
762
+ ? field(first)
763
+ : constant(first)).arrayMaximumN(...values);
764
+ }
765
+ export function arrayMinimum(first, ...values) {
766
+ return (first instanceof Expression
767
+ ? first
768
+ : typeof first === 'string'
769
+ ? field(first)
770
+ : constant(first)).arrayMinimum(...values);
771
+ }
772
+ export function arrayMinimumN(first, ...values) {
773
+ return (first instanceof Expression
774
+ ? first
775
+ : typeof first === 'string'
776
+ ? field(first)
777
+ : constant(first)).arrayMinimumN(...values);
778
+ }
779
+ export function arrayIndexOf(first, ...values) {
780
+ return (first instanceof Expression
781
+ ? first
782
+ : typeof first === 'string'
783
+ ? field(first)
784
+ : constant(first)).arrayIndexOf(...values);
785
+ }
786
+ export function arrayLastIndexOf(first, ...values) {
787
+ return (first instanceof Expression
788
+ ? first
789
+ : typeof first === 'string'
790
+ ? field(first)
791
+ : constant(first)).arrayLastIndexOf(...values);
792
+ }
793
+ export function arrayIndexOfAll(first, ...values) {
794
+ return (first instanceof Expression
795
+ ? first
796
+ : typeof first === 'string'
797
+ ? field(first)
798
+ : constant(first)).arrayIndexOfAll(...values);
799
+ }
800
+ export function equalAny(first, ...values) {
801
+ return (first instanceof Expression
802
+ ? first
803
+ : typeof first === 'string'
804
+ ? field(first)
805
+ : constant(first)).equalAny(...values);
806
+ }
807
+ export function notEqualAny(first, ...values) {
808
+ return (first instanceof Expression
809
+ ? first
810
+ : typeof first === 'string'
811
+ ? field(first)
812
+ : constant(first)).notEqualAny(...values);
813
+ }
814
+ export function exists(first, ...values) {
815
+ return (first instanceof Expression
816
+ ? first
817
+ : typeof first === 'string'
818
+ ? field(first)
819
+ : constant(first)).exists(...values);
820
+ }
821
+ export function charLength(first, ...values) {
822
+ return (first instanceof Expression
823
+ ? first
824
+ : typeof first === 'string'
825
+ ? field(first)
826
+ : constant(first)).charLength(...values);
827
+ }
828
+ export function like(first, ...values) {
829
+ return (first instanceof Expression
830
+ ? first
831
+ : typeof first === 'string'
832
+ ? field(first)
833
+ : constant(first)).like(...values);
834
+ }
835
+ export function regexContains(first, ...values) {
836
+ return (first instanceof Expression
837
+ ? first
838
+ : typeof first === 'string'
839
+ ? field(first)
840
+ : constant(first)).regexContains(...values);
841
+ }
842
+ export function regexFind(first, ...values) {
843
+ return (first instanceof Expression
844
+ ? first
845
+ : typeof first === 'string'
846
+ ? field(first)
847
+ : constant(first)).regexFind(...values);
848
+ }
849
+ export function regexFindAll(first, ...values) {
850
+ return (first instanceof Expression
851
+ ? first
852
+ : typeof first === 'string'
853
+ ? field(first)
854
+ : constant(first)).regexFindAll(...values);
855
+ }
856
+ export function regexMatch(first, ...values) {
857
+ return (first instanceof Expression
858
+ ? first
859
+ : typeof first === 'string'
860
+ ? field(first)
861
+ : constant(first)).regexMatch(...values);
862
+ }
863
+ export function stringContains(first, ...values) {
864
+ return (first instanceof Expression
865
+ ? first
866
+ : typeof first === 'string'
867
+ ? field(first)
868
+ : constant(first)).stringContains(...values);
869
+ }
870
+ export function startsWith(first, ...values) {
871
+ return (first instanceof Expression
872
+ ? first
873
+ : typeof first === 'string'
874
+ ? field(first)
875
+ : constant(first)).startsWith(...values);
876
+ }
877
+ export function endsWith(first, ...values) {
878
+ return (first instanceof Expression
879
+ ? first
880
+ : typeof first === 'string'
881
+ ? field(first)
882
+ : constant(first)).endsWith(...values);
883
+ }
884
+ export function toLower(first, ...values) {
885
+ return (first instanceof Expression
886
+ ? first
887
+ : typeof first === 'string'
888
+ ? field(first)
889
+ : constant(first)).toLower(...values);
890
+ }
891
+ export function toUpper(first, ...values) {
892
+ return (first instanceof Expression
893
+ ? first
894
+ : typeof first === 'string'
895
+ ? field(first)
896
+ : constant(first)).toUpper(...values);
897
+ }
898
+ export function trim(first, ...values) {
899
+ return (first instanceof Expression
900
+ ? first
901
+ : typeof first === 'string'
902
+ ? field(first)
903
+ : constant(first)).trim(...values);
904
+ }
905
+ export function ltrim(first, ...values) {
906
+ return (first instanceof Expression
907
+ ? first
908
+ : typeof first === 'string'
909
+ ? field(first)
910
+ : constant(first)).ltrim(...values);
911
+ }
912
+ export function rtrim(first, ...values) {
913
+ return (first instanceof Expression
914
+ ? first
915
+ : typeof first === 'string'
916
+ ? field(first)
917
+ : constant(first)).rtrim(...values);
918
+ }
919
+ export function stringConcat(first, ...values) {
920
+ return (first instanceof Expression
921
+ ? first
922
+ : typeof first === 'string'
923
+ ? field(first)
924
+ : constant(first)).stringConcat(...values);
925
+ }
926
+ export function stringIndexOf(first, ...values) {
927
+ return (first instanceof Expression
928
+ ? first
929
+ : typeof first === 'string'
930
+ ? field(first)
931
+ : constant(first)).stringIndexOf(...values);
932
+ }
933
+ export function stringRepeat(first, ...values) {
934
+ return (first instanceof Expression
935
+ ? first
936
+ : typeof first === 'string'
937
+ ? field(first)
938
+ : constant(first)).stringRepeat(...values);
939
+ }
940
+ export function stringReplaceAll(first, ...values) {
941
+ return (first instanceof Expression
942
+ ? first
943
+ : typeof first === 'string'
944
+ ? field(first)
945
+ : constant(first)).stringReplaceAll(...values);
946
+ }
947
+ export function stringReplaceOne(first, ...values) {
948
+ return (first instanceof Expression
949
+ ? first
950
+ : typeof first === 'string'
951
+ ? field(first)
952
+ : constant(first)).stringReplaceOne(...values);
953
+ }
954
+ export function concat(first, ...values) {
955
+ return (first instanceof Expression
956
+ ? first
957
+ : typeof first === 'string'
958
+ ? field(first)
959
+ : constant(first)).concat(...values);
960
+ }
961
+ export function reverse(first, ...values) {
962
+ return (first instanceof Expression
963
+ ? first
964
+ : typeof first === 'string'
965
+ ? field(first)
966
+ : constant(first)).reverse(...values);
967
+ }
968
+ export function byteLength(first, ...values) {
969
+ return (first instanceof Expression
970
+ ? first
971
+ : typeof first === 'string'
972
+ ? field(first)
973
+ : constant(first)).byteLength(...values);
974
+ }
975
+ export function ceil(first, ...values) {
976
+ return (first instanceof Expression
977
+ ? first
978
+ : typeof first === 'string'
979
+ ? field(first)
980
+ : constant(first)).ceil(...values);
981
+ }
982
+ export function floor(first, ...values) {
983
+ return (first instanceof Expression
984
+ ? first
985
+ : typeof first === 'string'
986
+ ? field(first)
987
+ : constant(first)).floor(...values);
988
+ }
989
+ export function abs(first, ...values) {
990
+ return (first instanceof Expression
991
+ ? first
992
+ : typeof first === 'string'
993
+ ? field(first)
994
+ : constant(first)).abs(...values);
995
+ }
996
+ export function exp(first, ...values) {
997
+ return (first instanceof Expression
998
+ ? first
999
+ : typeof first === 'string'
1000
+ ? field(first)
1001
+ : constant(first)).exp(...values);
1002
+ }
1003
+ export function mapGet(first, ...values) {
1004
+ return (first instanceof Expression
1005
+ ? first
1006
+ : typeof first === 'string'
1007
+ ? field(first)
1008
+ : constant(first)).mapGet(...values);
1009
+ }
1010
+ export function mapSet(first, ...values) {
1011
+ return (first instanceof Expression
1012
+ ? first
1013
+ : typeof first === 'string'
1014
+ ? field(first)
1015
+ : constant(first)).mapSet(...values);
1016
+ }
1017
+ export function mapKeys(first, ...values) {
1018
+ return (first instanceof Expression
1019
+ ? first
1020
+ : typeof first === 'string'
1021
+ ? field(first)
1022
+ : constant(first)).mapKeys(...values);
1023
+ }
1024
+ export function mapValues(first, ...values) {
1025
+ return (first instanceof Expression
1026
+ ? first
1027
+ : typeof first === 'string'
1028
+ ? field(first)
1029
+ : constant(first)).mapValues(...values);
1030
+ }
1031
+ export function mapEntries(first, ...values) {
1032
+ return (first instanceof Expression
1033
+ ? first
1034
+ : typeof first === 'string'
1035
+ ? field(first)
1036
+ : constant(first)).mapEntries(...values);
1037
+ }
1038
+ export function count(first, ...values) {
1039
+ return (first instanceof Expression
1040
+ ? first
1041
+ : typeof first === 'string'
1042
+ ? field(first)
1043
+ : constant(first)).count(...values);
1044
+ }
1045
+ export function sum(first, ...values) {
1046
+ return (first instanceof Expression
1047
+ ? first
1048
+ : typeof first === 'string'
1049
+ ? field(first)
1050
+ : constant(first)).sum(...values);
1051
+ }
1052
+ export function average(first, ...values) {
1053
+ return (first instanceof Expression
1054
+ ? first
1055
+ : typeof first === 'string'
1056
+ ? field(first)
1057
+ : constant(first)).average(...values);
1058
+ }
1059
+ export function minimum(first, ...values) {
1060
+ return (first instanceof Expression
1061
+ ? first
1062
+ : typeof first === 'string'
1063
+ ? field(first)
1064
+ : constant(first)).minimum(...values);
1065
+ }
1066
+ export function maximum(first, ...values) {
1067
+ return (first instanceof Expression
1068
+ ? first
1069
+ : typeof first === 'string'
1070
+ ? field(first)
1071
+ : constant(first)).maximum(...values);
1072
+ }
1073
+ export function first(first, ...values) {
1074
+ return (first instanceof Expression
1075
+ ? first
1076
+ : typeof first === 'string'
1077
+ ? field(first)
1078
+ : constant(first)).first(...values);
1079
+ }
1080
+ export function last(first, ...values) {
1081
+ return (first instanceof Expression
1082
+ ? first
1083
+ : typeof first === 'string'
1084
+ ? field(first)
1085
+ : constant(first)).last(...values);
1086
+ }
1087
+ export function arrayAgg(first, ...values) {
1088
+ return (first instanceof Expression
1089
+ ? first
1090
+ : typeof first === 'string'
1091
+ ? field(first)
1092
+ : constant(first)).arrayAgg(...values);
1093
+ }
1094
+ export function arrayAggDistinct(first, ...values) {
1095
+ return (first instanceof Expression
1096
+ ? first
1097
+ : typeof first === 'string'
1098
+ ? field(first)
1099
+ : constant(first)).arrayAggDistinct(...values);
1100
+ }
1101
+ export function countDistinct(first, ...values) {
1102
+ return (first instanceof Expression
1103
+ ? first
1104
+ : typeof first === 'string'
1105
+ ? field(first)
1106
+ : constant(first)).countDistinct(...values);
1107
+ }
1108
+ export function logicalMaximum(first, ...values) {
1109
+ return (first instanceof Expression
1110
+ ? first
1111
+ : typeof first === 'string'
1112
+ ? field(first)
1113
+ : constant(first)).logicalMaximum(...values);
1114
+ }
1115
+ export function logicalMinimum(first, ...values) {
1116
+ return (first instanceof Expression
1117
+ ? first
1118
+ : typeof first === 'string'
1119
+ ? field(first)
1120
+ : constant(first)).logicalMinimum(...values);
1121
+ }
1122
+ export function vectorLength(first, ...values) {
1123
+ return (first instanceof Expression
1124
+ ? first
1125
+ : typeof first === 'string'
1126
+ ? field(first)
1127
+ : constant(first)).vectorLength(...values);
1128
+ }
1129
+ export function cosineDistance(first, ...values) {
1130
+ return (first instanceof Expression
1131
+ ? first
1132
+ : typeof first === 'string'
1133
+ ? field(first)
1134
+ : constant(first)).cosineDistance(...values);
1135
+ }
1136
+ export function dotProduct(first, ...values) {
1137
+ return (first instanceof Expression
1138
+ ? first
1139
+ : typeof first === 'string'
1140
+ ? field(first)
1141
+ : constant(first)).dotProduct(...values);
1142
+ }
1143
+ export function euclideanDistance(first, ...values) {
1144
+ return (first instanceof Expression
1145
+ ? first
1146
+ : typeof first === 'string'
1147
+ ? field(first)
1148
+ : constant(first)).euclideanDistance(...values);
1149
+ }
1150
+ export function unixMicrosToTimestamp(first, ...values) {
1151
+ return (first instanceof Expression
1152
+ ? first
1153
+ : typeof first === 'string'
1154
+ ? field(first)
1155
+ : constant(first)).unixMicrosToTimestamp(...values);
1156
+ }
1157
+ export function timestampToUnixMicros(first, ...values) {
1158
+ return (first instanceof Expression
1159
+ ? first
1160
+ : typeof first === 'string'
1161
+ ? field(first)
1162
+ : constant(first)).timestampToUnixMicros(...values);
1163
+ }
1164
+ export function unixMillisToTimestamp(first, ...values) {
1165
+ return (first instanceof Expression
1166
+ ? first
1167
+ : typeof first === 'string'
1168
+ ? field(first)
1169
+ : constant(first)).unixMillisToTimestamp(...values);
1170
+ }
1171
+ export function timestampToUnixMillis(first, ...values) {
1172
+ return (first instanceof Expression
1173
+ ? first
1174
+ : typeof first === 'string'
1175
+ ? field(first)
1176
+ : constant(first)).timestampToUnixMillis(...values);
1177
+ }
1178
+ export function unixSecondsToTimestamp(first, ...values) {
1179
+ return (first instanceof Expression
1180
+ ? first
1181
+ : typeof first === 'string'
1182
+ ? field(first)
1183
+ : constant(first)).unixSecondsToTimestamp(...values);
1184
+ }
1185
+ export function timestampToUnixSeconds(first, ...values) {
1186
+ return (first instanceof Expression
1187
+ ? first
1188
+ : typeof first === 'string'
1189
+ ? field(first)
1190
+ : constant(first)).timestampToUnixSeconds(...values);
1191
+ }
1192
+ export function timestampAdd(first, ...values) {
1193
+ return (first instanceof Expression
1194
+ ? first
1195
+ : typeof first === 'string'
1196
+ ? field(first)
1197
+ : constant(first)).timestampAdd(...values);
1198
+ }
1199
+ export function timestampSubtract(first, ...values) {
1200
+ return (first instanceof Expression
1201
+ ? first
1202
+ : typeof first === 'string'
1203
+ ? field(first)
1204
+ : constant(first)).timestampSubtract(...values);
1205
+ }
1206
+ export function timestampDiff(first, ...values) {
1207
+ return (first instanceof Expression
1208
+ ? first
1209
+ : typeof first === 'string'
1210
+ ? field(first)
1211
+ : constant(first)).timestampDiff(...values);
1212
+ }
1213
+ export function timestampExtract(first, ...values) {
1214
+ return (first instanceof Expression
1215
+ ? first
1216
+ : typeof first === 'string'
1217
+ ? field(first)
1218
+ : constant(first)).timestampExtract(...values);
1219
+ }
1220
+ export function documentId(first, ...values) {
1221
+ return (first instanceof Expression
1222
+ ? first
1223
+ : typeof first === 'string'
1224
+ ? field(first)
1225
+ : constant(first)).documentId(...values);
1226
+ }
1227
+ export function parent(first, ...values) {
1228
+ return (first instanceof Expression
1229
+ ? first
1230
+ : typeof first === 'string'
1231
+ ? field(first)
1232
+ : constant(first)).parent(...values);
1233
+ }
1234
+ export function substring(first, ...values) {
1235
+ return (first instanceof Expression
1236
+ ? first
1237
+ : typeof first === 'string'
1238
+ ? field(first)
1239
+ : constant(first)).substring(...values);
1240
+ }
1241
+ export function arrayGet(first, ...values) {
1242
+ return (first instanceof Expression
1243
+ ? first
1244
+ : typeof first === 'string'
1245
+ ? field(first)
1246
+ : constant(first)).arrayGet(...values);
1247
+ }
1248
+ export function isError(first, ...values) {
1249
+ return (first instanceof Expression
1250
+ ? first
1251
+ : typeof first === 'string'
1252
+ ? field(first)
1253
+ : constant(first)).isError(...values);
1254
+ }
1255
+ export function ifError(first, ...values) {
1256
+ return (first instanceof Expression
1257
+ ? first
1258
+ : typeof first === 'string'
1259
+ ? field(first)
1260
+ : constant(first)).ifError(...values);
1261
+ }
1262
+ export function isAbsent(first, ...values) {
1263
+ return (first instanceof Expression
1264
+ ? first
1265
+ : typeof first === 'string'
1266
+ ? field(first)
1267
+ : constant(first)).isAbsent(...values);
1268
+ }
1269
+ export function mapRemove(first, ...values) {
1270
+ return (first instanceof Expression
1271
+ ? first
1272
+ : typeof first === 'string'
1273
+ ? field(first)
1274
+ : constant(first)).mapRemove(...values);
1275
+ }
1276
+ export function mapMerge(first, ...values) {
1277
+ return (first instanceof Expression
1278
+ ? first
1279
+ : typeof first === 'string'
1280
+ ? field(first)
1281
+ : constant(first)).mapMerge(...values);
1282
+ }
1283
+ export function pow(first, ...values) {
1284
+ return (first instanceof Expression
1285
+ ? first
1286
+ : typeof first === 'string'
1287
+ ? field(first)
1288
+ : constant(first)).pow(...values);
1289
+ }
1290
+ export function trunc(first, ...values) {
1291
+ return (first instanceof Expression
1292
+ ? first
1293
+ : typeof first === 'string'
1294
+ ? field(first)
1295
+ : constant(first)).trunc(...values);
1296
+ }
1297
+ export function round(first, ...values) {
1298
+ return (first instanceof Expression
1299
+ ? first
1300
+ : typeof first === 'string'
1301
+ ? field(first)
1302
+ : constant(first)).round(...values);
1303
+ }
1304
+ export function collectionId(first, ...values) {
1305
+ return (first instanceof Expression
1306
+ ? first
1307
+ : typeof first === 'string'
1308
+ ? field(first)
1309
+ : constant(first)).collectionId(...values);
1310
+ }
1311
+ export function length(first, ...values) {
1312
+ return (first instanceof Expression
1313
+ ? first
1314
+ : typeof first === 'string'
1315
+ ? field(first)
1316
+ : constant(first)).length(...values);
1317
+ }
1318
+ export function ln(first, ...values) {
1319
+ return (first instanceof Expression
1320
+ ? first
1321
+ : typeof first === 'string'
1322
+ ? field(first)
1323
+ : constant(first)).ln(...values);
1324
+ }
1325
+ export function sqrt(first, ...values) {
1326
+ return (first instanceof Expression
1327
+ ? first
1328
+ : typeof first === 'string'
1329
+ ? field(first)
1330
+ : constant(first)).sqrt(...values);
1331
+ }
1332
+ export function stringReverse(first, ...values) {
1333
+ return (first instanceof Expression
1334
+ ? first
1335
+ : typeof first === 'string'
1336
+ ? field(first)
1337
+ : constant(first)).stringReverse(...values);
1338
+ }
1339
+ export function ifAbsent(first, ...values) {
1340
+ return (first instanceof Expression
1341
+ ? first
1342
+ : typeof first === 'string'
1343
+ ? field(first)
1344
+ : constant(first)).ifAbsent(...values);
1345
+ }
1346
+ export function ifNull(first, ...values) {
1347
+ return (first instanceof Expression
1348
+ ? first
1349
+ : typeof first === 'string'
1350
+ ? field(first)
1351
+ : constant(first)).ifNull(...values);
1352
+ }
1353
+ export function coalesce(first, ...values) {
1354
+ return (first instanceof Expression
1355
+ ? first
1356
+ : typeof first === 'string'
1357
+ ? field(first)
1358
+ : constant(first)).coalesce(...values);
1359
+ }
1360
+ export function join(first, ...values) {
1361
+ return (first instanceof Expression
1362
+ ? first
1363
+ : typeof first === 'string'
1364
+ ? field(first)
1365
+ : constant(first)).join(...values);
1366
+ }
1367
+ export function log10(first, ...values) {
1368
+ return (first instanceof Expression
1369
+ ? first
1370
+ : typeof first === 'string'
1371
+ ? field(first)
1372
+ : constant(first)).log10(...values);
1373
+ }
1374
+ export function arraySum(first, ...values) {
1375
+ return (first instanceof Expression
1376
+ ? first
1377
+ : typeof first === 'string'
1378
+ ? field(first)
1379
+ : constant(first)).arraySum(...values);
1380
+ }
1381
+ export function split(first, ...values) {
1382
+ return (first instanceof Expression
1383
+ ? first
1384
+ : typeof first === 'string'
1385
+ ? field(first)
1386
+ : constant(first)).split(...values);
1387
+ }
1388
+ export function timestampTruncate(first, ...values) {
1389
+ return (first instanceof Expression
1390
+ ? first
1391
+ : typeof first === 'string'
1392
+ ? field(first)
1393
+ : constant(first)).timestampTruncate(...values);
1394
+ }
1395
+ export function type(first, ...values) {
1396
+ return (first instanceof Expression
1397
+ ? first
1398
+ : typeof first === 'string'
1399
+ ? field(first)
1400
+ : constant(first)).type(...values);
1401
+ }
1402
+ export function isType(first, ...values) {
1403
+ return (first instanceof Expression
1404
+ ? first
1405
+ : typeof first === 'string'
1406
+ ? field(first)
1407
+ : constant(first)).isType(...values);
1408
+ }
1409
+ export function getField(first, ...values) {
1410
+ return (first instanceof Expression
1411
+ ? first
1412
+ : typeof first === 'string'
1413
+ ? field(first)
1414
+ : constant(first)).getField(...values);
1415
+ }
1416
+ export function and(...conditions) {
1417
+ return new FunctionExpression('and', conditions).asBoolean();
1418
+ }
1419
+ export function or(...conditions) {
1420
+ return new FunctionExpression('or', conditions).asBoolean();
1421
+ }
1422
+ export function not(condition) {
1423
+ return condition.asBoolean().not();
1424
+ }
1425
+ export function countAll() {
1426
+ return new AggregateFunction('count', []);
1427
+ }
1428
+ export function variable(name) {
1429
+ if (typeof name !== 'string' || !name)
1430
+ throw new FirebaseEdgeError({
1431
+ ...FirestoreErrorInfo.INVALID_ARGUMENT,
1432
+ message: 'Expected a variable name.'
1433
+ });
1434
+ return new Expression({ variableReferenceValue: name });
1435
+ }
1436
+ //# sourceMappingURL=pipeline-expression.js.map