@glissandoo/lib 1.123.2 → 1.124.0-dev.219.1

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 (839) hide show
  1. package/functions/auth.d.ts +22 -0
  2. package/functions/composer.d.ts +13 -0
  3. package/functions/composerComposition.d.ts +102 -0
  4. package/functions/composerNotification.d.ts +38 -0
  5. package/functions/composerPayout.d.ts +20 -0
  6. package/functions/customer.d.ts +102 -0
  7. package/functions/event.js +29 -0
  8. package/functions/eventPlayer.js +13 -0
  9. package/functions/eventRepertory.d.ts +42 -0
  10. package/functions/eventRepertory.js +16 -0
  11. package/functions/groupRepertory.d.ts +250 -0
  12. package/functions/index.d.ts +256 -0
  13. package/functions/index.js +261 -0
  14. package/functions/misc.d.ts +24 -0
  15. package/functions/regions.js +270 -0
  16. package/helpers/appScenes.js +109 -0
  17. package/helpers/auth.d.ts +21 -0
  18. package/helpers/auth.js +43 -0
  19. package/helpers/badges.js +162 -0
  20. package/helpers/catalogBridge.d.ts +121 -0
  21. package/helpers/catalogBridge.js +95 -0
  22. package/helpers/collections.js +49 -0
  23. package/helpers/communicationTemplate/index.d.ts +33 -0
  24. package/helpers/communicationTemplate/index.js +47 -0
  25. package/helpers/compositionCategories/genres.d.ts +922 -0
  26. package/helpers/compositionCategories/genres.js +940 -0
  27. package/helpers/compositionCategories/index.d.ts +2 -0
  28. package/helpers/compositionCategories/index.js +18 -0
  29. package/helpers/compositionCategories/styles.d.ts +181 -0
  30. package/helpers/compositionCategories/styles.js +197 -0
  31. package/helpers/compositionSoloistOffstageParts/index.d.ts +34 -0
  32. package/helpers/compositionSoloistOffstageParts/index.js +117 -0
  33. package/helpers/currency.d.ts +23 -0
  34. package/helpers/currency.js +346 -0
  35. package/helpers/currencyConversion.d.ts +45 -0
  36. package/helpers/currencyConversion.js +119 -0
  37. package/helpers/dataStructures/trees/index.d.ts +12 -0
  38. package/helpers/dataStructures/trees/index.js +71 -0
  39. package/helpers/dataStructures/trees/types.d.ts +14 -0
  40. package/helpers/dataStructures/trees/types.js +5 -0
  41. package/helpers/dlinks.js +12 -0
  42. package/helpers/errors.d.ts +93 -0
  43. package/helpers/errors.js +85 -0
  44. package/helpers/externalUrls.d.ts +12 -0
  45. package/helpers/externalUrls.js +40 -0
  46. package/helpers/instruments/index.d.ts +164 -0
  47. package/helpers/instruments/index.js +344 -0
  48. package/helpers/instruments/lists.d.ts +6 -0
  49. package/helpers/instruments/lists.js +21 -0
  50. package/helpers/musicStyles/index.d.ts +40 -0
  51. package/helpers/musicStyles/index.js +227 -0
  52. package/helpers/notifications/index.js +231 -0
  53. package/helpers/objects.d.ts +15 -0
  54. package/helpers/objects.js +40 -0
  55. package/helpers/paymentForecast.js +57 -0
  56. package/helpers/payoutRules.js +165 -0
  57. package/helpers/plans.js +99 -0
  58. package/helpers/rates.d.ts +13 -0
  59. package/helpers/slate.d.ts +75 -0
  60. package/helpers/slate.js +26 -0
  61. package/helpers/ts-extras/array-includes.js +26 -0
  62. package/helpers/ts-extras/as-mutable.js +20 -0
  63. package/helpers/ts-extras/assert-error.js +37 -0
  64. package/helpers/ts-extras/index.js +33 -0
  65. package/helpers/ts-extras/is-defined.js +21 -0
  66. package/helpers/ts-extras/is-empty.js +6 -0
  67. package/helpers/ts-extras/is-infinite.js +11 -0
  68. package/helpers/ts-extras/is-present.js +21 -0
  69. package/helpers/ts-extras/object-entries.d.ts +23 -0
  70. package/helpers/ts-extras/object-from-entries.d.ts +26 -0
  71. package/helpers/ts-extras/object-has-own.js +25 -0
  72. package/helpers/ts-extras/object-keys.d.ts +21 -0
  73. package/helpers/ts-extras/object-keys.js +23 -0
  74. package/helpers/ts-extras/set-has.js +27 -0
  75. package/helpers/types.d.ts +69 -0
  76. package/helpers/types.js +65 -0
  77. package/lang/ca.json +704 -0
  78. package/lang/de.json +704 -0
  79. package/lang/en.json +704 -0
  80. package/lang/es.json +704 -0
  81. package/lang/eu.json +704 -0
  82. package/lang/fr.json +704 -0
  83. package/lang/gl.json +704 -0
  84. package/lang/index.js +203 -0
  85. package/lang/it.json +704 -0
  86. package/lang/nl.json +704 -0
  87. package/lang/pt.json +704 -0
  88. package/models/Communication/types.d.ts +63 -0
  89. package/models/Communication/types.js +26 -0
  90. package/models/CompositionGenre/index.d.ts +9 -0
  91. package/models/CompositionGenre/index.js +16 -0
  92. package/models/CompositionStyle/index.d.ts +9 -0
  93. package/models/CompositionStyle/index.js +16 -0
  94. package/models/Counters/Group/Analytics/types.js +17 -0
  95. package/models/Customer/index.d.ts +30 -0
  96. package/models/Customer/index.js +79 -0
  97. package/models/Customer/types.js +7 -0
  98. package/models/Evento/Player/types.js +22 -0
  99. package/models/Evento/Repertory/types.d.ts +8 -0
  100. package/models/Evento/index.d.ts +94 -0
  101. package/models/Evento/index.js +256 -0
  102. package/models/Evento/types.d.ts +177 -0
  103. package/models/Evento/types.js +55 -0
  104. package/models/Federation/index.d.ts +28 -0
  105. package/models/Federation/index.js +85 -0
  106. package/models/Group/Analytics/types.js +13 -0
  107. package/models/Group/Payment/supabase.js +46 -0
  108. package/models/Group/Payment/types.js +38 -0
  109. package/models/Group/Player/types.js +9 -0
  110. package/models/Group/Repertory/File/Section/index.d.ts +12 -0
  111. package/models/Group/Repertory/File/Section/index.js +26 -0
  112. package/models/Group/Repertory/File/Section/types.d.ts +12 -0
  113. package/models/Group/Repertory/File/Section/types.js +7 -0
  114. package/models/Group/Repertory/File/index.d.ts +31 -0
  115. package/models/Group/Repertory/File/index.js +81 -0
  116. package/models/Group/Repertory/FilePath/index.d.ts +22 -0
  117. package/models/Group/Repertory/index.d.ts +64 -0
  118. package/models/Group/Repertory/index.js +160 -0
  119. package/models/Group/Repertory/types.d.ts +80 -0
  120. package/models/Group/Repertory/types.js +14 -0
  121. package/models/Group/index.d.ts +145 -0
  122. package/models/Group/index.js +340 -0
  123. package/models/Group/types.d.ts +272 -0
  124. package/models/Group/types.js +90 -0
  125. package/models/Instrument/fromRecord.d.ts +11 -0
  126. package/models/Instrument/fromRecord.js +33 -0
  127. package/models/Instrument/index.d.ts +11 -0
  128. package/models/Instrument/index.js +55 -0
  129. package/models/Inventory/Item/types.js +15 -0
  130. package/models/Inventory/types.js +15 -0
  131. package/models/Notification/types.js +279 -0
  132. package/models/Offer/types.d.ts +57 -0
  133. package/models/Offer/types.js +8 -0
  134. package/models/Partnership/Communication/supabase.js +25 -0
  135. package/models/Partnership/Group/index.d.ts +29 -0
  136. package/models/Partnership/Group/index.js +73 -0
  137. package/models/Partnership/Group/supabase.js +25 -0
  138. package/models/Partnership/Partner/supabase.js +38 -0
  139. package/models/Partnership/Partner/types.js +9 -0
  140. package/models/Partnership/Payment/supabase.js +40 -0
  141. package/models/Partnership/Payment/types.js +17 -0
  142. package/models/Partnership/Plan/supabase.js +22 -0
  143. package/models/Partnership/SepaPaymentGroup/supabase.js +18 -0
  144. package/models/Partnership/Subscription/supabase.js +23 -0
  145. package/models/Partnership/index.d.ts +35 -0
  146. package/models/Partnership/index.js +118 -0
  147. package/models/Partnership/types.js +8 -0
  148. package/models/Repertory/types.d.ts +44 -0
  149. package/models/Repertory/types.js +16 -0
  150. package/models/User/Group/index.js +45 -0
  151. package/models/User/index.d.ts +103 -0
  152. package/models/User/index.js +198 -0
  153. package/models/User/types.d.ts +142 -0
  154. package/models/User/types.js +58 -0
  155. package/models/WebhookEvent/types.js +9 -0
  156. package/models/supabase/Comm/index.d.ts +24 -0
  157. package/models/supabase/Comm/index.js +68 -0
  158. package/models/supabase/Comm/types.d.ts +6 -0
  159. package/models/supabase/CommHistory/index.d.ts +22 -0
  160. package/models/supabase/CommHistory/index.js +37 -0
  161. package/models/supabase/CommHistory/types.d.ts +11 -0
  162. package/models/supabase/CommHistory/types.js +9 -0
  163. package/models/supabase/Composer/Composition/Acquisition/index.d.ts +4 -0
  164. package/models/supabase/Composer/Composition/Acquisition/index.js +9 -0
  165. package/models/supabase/Composer/Composition/Acquisition/types.d.ts +36 -0
  166. package/models/supabase/Composer/Composition/Favorite/index.d.ts +4 -0
  167. package/models/supabase/Composer/Composition/Favorite/index.js +9 -0
  168. package/models/supabase/Composer/Composition/Favorite/types.d.ts +6 -0
  169. package/models/supabase/Composer/Composition/View/index.d.ts +4 -0
  170. package/models/supabase/Composer/Composition/View/index.js +9 -0
  171. package/models/supabase/Composer/Composition/View/types.d.ts +6 -0
  172. package/models/supabase/Composer/Composition/index.d.ts +5284 -0
  173. package/models/supabase/Composer/Composition/index.js +166 -0
  174. package/models/supabase/Composer/Composition/types.d.ts +96 -0
  175. package/models/supabase/Composer/Composition/types.js +32 -0
  176. package/models/supabase/Composer/Notification/index.d.ts +4 -0
  177. package/models/supabase/Composer/Notification/index.js +9 -0
  178. package/models/supabase/Composer/Notification/types.d.ts +39 -0
  179. package/models/supabase/Composer/Notification/types.js +27 -0
  180. package/models/supabase/Composer/Payout/index.d.ts +4 -0
  181. package/models/supabase/Composer/Payout/index.js +9 -0
  182. package/models/supabase/Composer/Payout/status.d.ts +1 -0
  183. package/models/supabase/Composer/Payout/types.d.ts +5 -0
  184. package/models/supabase/Composer/PerformanceAttendance/types.d.ts +4 -0
  185. package/models/supabase/Composer/index.d.ts +78 -0
  186. package/models/supabase/Composer/index.js +105 -0
  187. package/models/supabase/Composer/types.d.ts +6 -0
  188. package/models/supabase/EventHistory/index.d.ts +22 -0
  189. package/models/supabase/EventHistory/index.js +37 -0
  190. package/models/supabase/EventHistory/types.d.ts +39 -0
  191. package/models/supabase/EventHistory/types.js +37 -0
  192. package/models/supabase/GroupHistory/index.d.ts +21 -0
  193. package/models/supabase/GroupHistory/index.js +34 -0
  194. package/models/supabase/GroupHistory/types.d.ts +27 -0
  195. package/models/supabase/GroupHistory/types.js +25 -0
  196. package/models/supabase/Model/index.d.ts +10 -0
  197. package/models/supabase/Model/index.js +21 -0
  198. package/models/supabase/OfferHistory/index.d.ts +22 -0
  199. package/models/supabase/OfferHistory/index.js +37 -0
  200. package/models/supabase/OfferHistory/types.d.ts +18 -0
  201. package/models/supabase/OfferHistory/types.js +16 -0
  202. package/models/supabase/Repertoire/index.d.ts +16 -0
  203. package/models/supabase/Repertoire/index.js +43 -0
  204. package/models/supabase/Repertoire/types.d.ts +6 -0
  205. package/models/supabase/RepertoireHistory/index.d.ts +22 -0
  206. package/models/supabase/RepertoireHistory/index.js +37 -0
  207. package/models/supabase/RepertoireHistory/types.d.ts +21 -0
  208. package/models/supabase/RepertoireHistory/types.js +19 -0
  209. package/models/supabase/User/Group/index.d.ts +11 -0
  210. package/models/supabase/User/Group/index.js +30 -0
  211. package/models/supabase/User/Group/types.d.ts +6 -0
  212. package/models/supabase/User/index.d.ts +13 -0
  213. package/models/supabase/User/index.js +37 -0
  214. package/models/supabase/User/types.d.ts +6 -0
  215. package/package.json +15 -13
  216. package/types/firestore.d.ts +1746 -0
  217. package/types/firestore.js +57 -0
  218. package/types/firestore.ts +1998 -0
  219. package/types/messagebirdChatWidget.js +2 -0
  220. package/types/messagebirdChatWidget.ts +20 -0
  221. package/types/minVersion.js +2 -0
  222. package/types/minVersion.ts +4 -0
  223. package/types/payoutRule.js +34 -0
  224. package/types/payoutRule.ts +132 -0
  225. package/types/supabase/catalog.d.ts +46 -0
  226. package/types/supabase/catalog.js +2 -0
  227. package/types/supabase/catalog.ts +67 -0
  228. package/types/supabase/composerMetrics.d.ts +27 -0
  229. package/types/supabase/composerMetrics.js +2 -0
  230. package/types/supabase/composerMetrics.ts +26 -0
  231. package/types/supabase/generated.d.ts +4092 -0
  232. package/types/supabase/generated.js +34 -0
  233. package/types/supabase/generated.ts +4076 -0
  234. package/types/supabase/index.d.ts +169 -0
  235. package/types/supabase/index.js +17 -0
  236. package/types/supabase/index.ts +307 -0
  237. package/types/supabase/overwrites/index.d.ts +6 -0
  238. package/types/supabase/overwrites/index.js +2 -0
  239. package/types/supabase/overwrites/index.ts +7 -0
  240. package/types/supabase/overwrites/tables/comm/model.d.ts +4 -0
  241. package/types/supabase/overwrites/tables/comm/model.js +2 -0
  242. package/types/supabase/overwrites/tables/comm/model.ts +4 -0
  243. package/types/supabase/overwrites/tables/comm_history/index.d.ts +7 -0
  244. package/types/supabase/overwrites/tables/comm_history/index.js +2 -0
  245. package/types/supabase/overwrites/tables/comm_history/index.ts +9 -0
  246. package/types/supabase/overwrites/tables/comm_history/model.d.ts +10 -0
  247. package/types/supabase/overwrites/tables/comm_history/model.js +2 -0
  248. package/types/supabase/overwrites/tables/comm_history/model.ts +13 -0
  249. package/types/supabase/overwrites/tables/common/index.js +2 -0
  250. package/types/supabase/overwrites/tables/common/index.ts +4 -0
  251. package/types/supabase/overwrites/tables/composer/index.d.ts +9 -0
  252. package/types/supabase/overwrites/tables/composer/index.js +2 -0
  253. package/types/supabase/overwrites/tables/composer/index.ts +10 -0
  254. package/types/supabase/overwrites/tables/composer/model.d.ts +12 -0
  255. package/types/supabase/overwrites/tables/composer/model.js +2 -0
  256. package/types/supabase/overwrites/tables/composer/model.ts +15 -0
  257. package/types/supabase/overwrites/tables/composer/publicModel.d.ts +11 -0
  258. package/types/supabase/overwrites/tables/composer/publicModel.js +2 -0
  259. package/types/supabase/overwrites/tables/composer/publicModel.ts +15 -0
  260. package/types/supabase/overwrites/tables/composerComposition/index.d.ts +18 -0
  261. package/types/supabase/overwrites/tables/composerComposition/index.js +2 -0
  262. package/types/supabase/overwrites/tables/composerComposition/index.ts +24 -0
  263. package/types/supabase/overwrites/tables/composerComposition/model.d.ts +9 -0
  264. package/types/supabase/overwrites/tables/composerComposition/model.js +2 -0
  265. package/types/supabase/overwrites/tables/composerComposition/model.ts +26 -0
  266. package/types/supabase/overwrites/tables/composerComposition/publicModel.d.ts +9 -0
  267. package/types/supabase/overwrites/tables/composerComposition/publicModel.js +2 -0
  268. package/types/supabase/overwrites/tables/composerComposition/publicModel.ts +37 -0
  269. package/types/supabase/overwrites/tables/composerNotification/index.d.ts +19 -0
  270. package/types/supabase/overwrites/tables/composerNotification/index.js +2 -0
  271. package/types/supabase/overwrites/tables/composerNotification/index.ts +25 -0
  272. package/types/supabase/overwrites/tables/composerOwnedTransaction/model.d.ts +2 -0
  273. package/types/supabase/overwrites/tables/composerOwnedTransaction/model.js +2 -0
  274. package/types/supabase/overwrites/tables/composerOwnedTransaction/model.ts +3 -0
  275. package/types/supabase/overwrites/tables/composerPayout/index.d.ts +7 -0
  276. package/types/supabase/overwrites/tables/composerPayout/index.js +2 -0
  277. package/types/supabase/overwrites/tables/composerPayout/index.ts +8 -0
  278. package/types/supabase/overwrites/tables/compositionAcquisition/index.d.ts +4 -0
  279. package/types/supabase/overwrites/tables/compositionAcquisition/index.js +2 -0
  280. package/types/supabase/overwrites/tables/compositionAcquisition/index.ts +8 -0
  281. package/types/supabase/overwrites/tables/compositionAcquisition/model.d.ts +6 -0
  282. package/types/supabase/overwrites/tables/compositionAcquisition/model.js +2 -0
  283. package/types/supabase/overwrites/tables/compositionAcquisition/model.ts +11 -0
  284. package/types/supabase/overwrites/tables/compositionFavorite/index.d.ts +1 -0
  285. package/types/supabase/overwrites/tables/compositionFavorite/index.js +2 -0
  286. package/types/supabase/overwrites/tables/compositionFavorite/index.ts +2 -0
  287. package/types/supabase/overwrites/tables/compositionFavorite/model.d.ts +1 -0
  288. package/types/supabase/overwrites/tables/compositionFavorite/model.js +2 -0
  289. package/types/supabase/overwrites/tables/compositionFavorite/model.ts +1 -0
  290. package/types/supabase/overwrites/tables/compositionView/index.d.ts +1 -0
  291. package/types/supabase/overwrites/tables/compositionView/index.js +2 -0
  292. package/types/supabase/overwrites/tables/compositionView/index.ts +2 -0
  293. package/types/supabase/overwrites/tables/compositionView/model.d.ts +1 -0
  294. package/types/supabase/overwrites/tables/compositionView/model.js +2 -0
  295. package/types/supabase/overwrites/tables/compositionView/model.ts +1 -0
  296. package/types/supabase/overwrites/tables/currencyExchangeRate/index.d.ts +16 -0
  297. package/types/supabase/overwrites/tables/currencyExchangeRate/index.js +2 -0
  298. package/types/supabase/overwrites/tables/currencyExchangeRate/index.ts +18 -0
  299. package/types/supabase/overwrites/tables/event/index.d.ts +23 -0
  300. package/types/supabase/overwrites/tables/event/index.js +2 -0
  301. package/types/supabase/overwrites/tables/event/index.ts +28 -0
  302. package/types/supabase/overwrites/tables/event_history/index.d.ts +7 -0
  303. package/types/supabase/overwrites/tables/event_history/index.js +2 -0
  304. package/types/supabase/overwrites/tables/event_history/index.ts +9 -0
  305. package/types/supabase/overwrites/tables/event_history/model.d.ts +10 -0
  306. package/types/supabase/overwrites/tables/event_history/model.js +2 -0
  307. package/types/supabase/overwrites/tables/event_history/model.ts +13 -0
  308. package/types/supabase/overwrites/tables/group/index.d.ts +38 -0
  309. package/types/supabase/overwrites/tables/group/index.js +2 -0
  310. package/types/supabase/overwrites/tables/group/index.ts +45 -0
  311. package/types/supabase/overwrites/tables/group_history/index.d.ts +7 -0
  312. package/types/supabase/overwrites/tables/group_history/index.js +2 -0
  313. package/types/supabase/overwrites/tables/group_history/index.ts +9 -0
  314. package/types/supabase/overwrites/tables/group_history/model.d.ts +10 -0
  315. package/types/supabase/overwrites/tables/group_history/model.js +2 -0
  316. package/types/supabase/overwrites/tables/group_history/model.ts +13 -0
  317. package/types/supabase/overwrites/tables/offer/index.d.ts +17 -0
  318. package/types/supabase/overwrites/tables/offer/index.js +2 -0
  319. package/types/supabase/overwrites/tables/offer/index.ts +20 -0
  320. package/types/supabase/overwrites/tables/offer_history/index.d.ts +7 -0
  321. package/types/supabase/overwrites/tables/offer_history/index.js +2 -0
  322. package/types/supabase/overwrites/tables/offer_history/index.ts +9 -0
  323. package/types/supabase/overwrites/tables/offer_history/model.d.ts +10 -0
  324. package/types/supabase/overwrites/tables/offer_history/model.js +2 -0
  325. package/types/supabase/overwrites/tables/offer_history/model.ts +13 -0
  326. package/types/supabase/overwrites/tables/repertoire/model.d.ts +7 -0
  327. package/types/supabase/overwrites/tables/repertoire/model.js +2 -0
  328. package/types/supabase/overwrites/tables/repertoire/model.ts +7 -0
  329. package/types/supabase/overwrites/tables/repertoire_history/index.d.ts +7 -0
  330. package/types/supabase/overwrites/tables/repertoire_history/index.js +2 -0
  331. package/types/supabase/overwrites/tables/repertoire_history/index.ts +9 -0
  332. package/types/supabase/overwrites/tables/repertoire_history/model.d.ts +10 -0
  333. package/types/supabase/overwrites/tables/repertoire_history/model.js +2 -0
  334. package/types/supabase/overwrites/tables/repertoire_history/model.ts +13 -0
  335. package/types/supabase/overwrites/tables/user/index.d.ts +11 -0
  336. package/types/supabase/overwrites/tables/user/index.js +2 -0
  337. package/types/supabase/overwrites/tables/user/index.ts +13 -0
  338. package/.firebaserc +0 -7
  339. package/.husky/pre-commit +0 -4
  340. package/README.md +0 -70
  341. package/lib/functions/auth.d.ts +0 -20
  342. package/lib/functions/customer.d.ts +0 -98
  343. package/lib/functions/event.js +0 -29
  344. package/lib/functions/eventPlayer.js +0 -13
  345. package/lib/functions/eventRepertory.d.ts +0 -40
  346. package/lib/functions/eventRepertory.js +0 -16
  347. package/lib/functions/groupRepertory.d.ts +0 -140
  348. package/lib/functions/index.d.ts +0 -226
  349. package/lib/functions/index.js +0 -231
  350. package/lib/functions/misc.d.ts +0 -18
  351. package/lib/functions/regions.js +0 -240
  352. package/lib/helpers/appScenes.js +0 -109
  353. package/lib/helpers/auth.d.ts +0 -28
  354. package/lib/helpers/auth.js +0 -24
  355. package/lib/helpers/badges.js +0 -162
  356. package/lib/helpers/collections.js +0 -49
  357. package/lib/helpers/communicationTemplate/index.d.ts +0 -32
  358. package/lib/helpers/communicationTemplate/index.js +0 -47
  359. package/lib/helpers/currency.d.ts +0 -4
  360. package/lib/helpers/currency.js +0 -277
  361. package/lib/helpers/dlinks.js +0 -12
  362. package/lib/helpers/errors.d.ts +0 -92
  363. package/lib/helpers/errors.js +0 -84
  364. package/lib/helpers/instruments/index.d.ts +0 -147
  365. package/lib/helpers/instruments/index.js +0 -340
  366. package/lib/helpers/instruments/lists.d.ts +0 -6
  367. package/lib/helpers/instruments/lists.js +0 -21
  368. package/lib/helpers/musicStyles/index.d.ts +0 -22
  369. package/lib/helpers/musicStyles/index.js +0 -148
  370. package/lib/helpers/notifications/index.js +0 -231
  371. package/lib/helpers/objects.d.ts +0 -11
  372. package/lib/helpers/objects.js +0 -39
  373. package/lib/helpers/paymentForecast.js +0 -58
  374. package/lib/helpers/payoutRules.js +0 -166
  375. package/lib/helpers/plans.js +0 -99
  376. package/lib/helpers/rates.d.ts +0 -13
  377. package/lib/helpers/slate.d.ts +0 -16
  378. package/lib/helpers/slate.js +0 -20
  379. package/lib/helpers/ts-extras/array-includes.js +0 -27
  380. package/lib/helpers/ts-extras/as-mutable.js +0 -21
  381. package/lib/helpers/ts-extras/assert-error.js +0 -38
  382. package/lib/helpers/ts-extras/index.js +0 -33
  383. package/lib/helpers/ts-extras/is-defined.js +0 -22
  384. package/lib/helpers/ts-extras/is-empty.js +0 -7
  385. package/lib/helpers/ts-extras/is-infinite.js +0 -12
  386. package/lib/helpers/ts-extras/is-present.js +0 -22
  387. package/lib/helpers/ts-extras/object-entries.d.ts +0 -23
  388. package/lib/helpers/ts-extras/object-from-entries.d.ts +0 -26
  389. package/lib/helpers/ts-extras/object-has-own.js +0 -26
  390. package/lib/helpers/ts-extras/object-keys.d.ts +0 -21
  391. package/lib/helpers/ts-extras/object-keys.js +0 -24
  392. package/lib/helpers/ts-extras/set-has.js +0 -28
  393. package/lib/helpers/types.d.ts +0 -43
  394. package/lib/helpers/types.js +0 -45
  395. package/lib/lang/ca.json +0 -470
  396. package/lib/lang/de.json +0 -470
  397. package/lib/lang/en.json +0 -470
  398. package/lib/lang/es.json +0 -470
  399. package/lib/lang/eu.json +0 -470
  400. package/lib/lang/fr.json +0 -470
  401. package/lib/lang/gl.json +0 -470
  402. package/lib/lang/index.js +0 -202
  403. package/lib/lang/it.json +0 -470
  404. package/lib/lang/nl.json +0 -470
  405. package/lib/lang/pt.json +0 -470
  406. package/lib/models/Communication/types.d.ts +0 -79
  407. package/lib/models/Communication/types.js +0 -32
  408. package/lib/models/Counters/Group/Analytics/types.js +0 -17
  409. package/lib/models/Customer/index.d.ts +0 -30
  410. package/lib/models/Customer/index.js +0 -79
  411. package/lib/models/Customer/types.js +0 -7
  412. package/lib/models/Evento/Player/types.js +0 -22
  413. package/lib/models/Evento/Repertory/types.d.ts +0 -7
  414. package/lib/models/Evento/index.d.ts +0 -93
  415. package/lib/models/Evento/index.js +0 -255
  416. package/lib/models/Evento/types.d.ts +0 -208
  417. package/lib/models/Evento/types.js +0 -87
  418. package/lib/models/Federation/index.d.ts +0 -28
  419. package/lib/models/Federation/index.js +0 -85
  420. package/lib/models/Group/Analytics/types.js +0 -13
  421. package/lib/models/Group/Payment/supabase.js +0 -46
  422. package/lib/models/Group/Payment/types.js +0 -38
  423. package/lib/models/Group/Player/types.js +0 -9
  424. package/lib/models/Group/Repertory/File/Section/index.d.ts +0 -12
  425. package/lib/models/Group/Repertory/File/Section/index.js +0 -25
  426. package/lib/models/Group/Repertory/File/Section/types.d.ts +0 -5
  427. package/lib/models/Group/Repertory/File/Section/types.js +0 -7
  428. package/lib/models/Group/Repertory/File/index.d.ts +0 -29
  429. package/lib/models/Group/Repertory/File/index.js +0 -81
  430. package/lib/models/Group/Repertory/FilePath/index.d.ts +0 -23
  431. package/lib/models/Group/Repertory/index.d.ts +0 -56
  432. package/lib/models/Group/Repertory/index.js +0 -151
  433. package/lib/models/Group/Repertory/types.d.ts +0 -91
  434. package/lib/models/Group/Repertory/types.js +0 -24
  435. package/lib/models/Group/index.d.ts +0 -140
  436. package/lib/models/Group/index.js +0 -326
  437. package/lib/models/Group/types.d.ts +0 -291
  438. package/lib/models/Group/types.js +0 -109
  439. package/lib/models/Instrument/index.d.ts +0 -9
  440. package/lib/models/Instrument/index.js +0 -18
  441. package/lib/models/Inventory/Item/types.js +0 -15
  442. package/lib/models/Inventory/types.js +0 -15
  443. package/lib/models/Notification/types.js +0 -279
  444. package/lib/models/Offer/types.d.ts +0 -69
  445. package/lib/models/Offer/types.js +0 -21
  446. package/lib/models/Partnership/Communication/supabase.js +0 -25
  447. package/lib/models/Partnership/Group/index.d.ts +0 -28
  448. package/lib/models/Partnership/Group/index.js +0 -61
  449. package/lib/models/Partnership/Group/supabase.js +0 -25
  450. package/lib/models/Partnership/Partner/supabase.js +0 -38
  451. package/lib/models/Partnership/Partner/types.js +0 -9
  452. package/lib/models/Partnership/Payment/supabase.js +0 -40
  453. package/lib/models/Partnership/Payment/types.js +0 -17
  454. package/lib/models/Partnership/Plan/supabase.js +0 -22
  455. package/lib/models/Partnership/SepaPaymentGroup/supabase.js +0 -18
  456. package/lib/models/Partnership/Subscription/supabase.js +0 -23
  457. package/lib/models/Partnership/index.d.ts +0 -34
  458. package/lib/models/Partnership/index.js +0 -114
  459. package/lib/models/Partnership/types.js +0 -8
  460. package/lib/models/Repertory/types.d.ts +0 -32
  461. package/lib/models/Repertory/types.js +0 -16
  462. package/lib/models/User/Group/index.js +0 -46
  463. package/lib/models/User/index.d.ts +0 -103
  464. package/lib/models/User/index.js +0 -198
  465. package/lib/models/User/types.d.ts +0 -141
  466. package/lib/models/User/types.js +0 -58
  467. package/lib/models/WebhookEvent/types.js +0 -9
  468. package/lib/types/firestore.d.ts +0 -1747
  469. package/lib/types/firestore.js +0 -57
  470. package/lib/types/payoutRule.js +0 -34
  471. package/lib/types/supabase/generated.d.ts +0 -1629
  472. package/lib/types/supabase/generated.js +0 -25
  473. package/lib/types/supabase/index.d.ts +0 -29
  474. package/lib/types/supabase/overwrites/comm.d.ts +0 -18
  475. package/lib/types/supabase/overwrites/comm_history.d.ts +0 -10
  476. package/lib/types/supabase/overwrites/event.d.ts +0 -23
  477. package/lib/types/supabase/overwrites/event_history.d.ts +0 -10
  478. package/lib/types/supabase/overwrites/group.d.ts +0 -41
  479. package/lib/types/supabase/overwrites/group_history.d.ts +0 -9
  480. package/lib/types/supabase/overwrites/index.d.ts +0 -6
  481. package/lib/types/supabase/overwrites/offer.d.ts +0 -13
  482. package/lib/types/supabase/overwrites/offer_history.d.ts +0 -10
  483. package/lib/types/supabase/overwrites/repertoire.d.ts +0 -12
  484. package/lib/types/supabase/overwrites/repertoire_history.d.ts +0 -10
  485. package/scripts/setHusky.js +0 -11
  486. package/supabase/.dev.env +0 -1
  487. package/supabase/.prod.env +0 -1
  488. package/supabase/.sample.env +0 -2
  489. package/supabase/README.md +0 -126
  490. package/supabase/config.toml +0 -68
  491. package/supabase/migrations/20231117044943_remote_schema.sql +0 -228
  492. package/supabase/migrations/20231117124947_event_selection_mode_closed_at_nullable.sql +0 -1
  493. package/supabase/migrations/20231121002132_remote_schema.sql +0 -31
  494. package/supabase/migrations/20231121004031_references_nullable.sql +0 -3
  495. package/supabase/migrations/20231121014339_updated_at_trigger.sql +0 -13
  496. package/supabase/migrations/20231122111241_remote_schema.sql +0 -25
  497. package/supabase/migrations/20231124151424_snake_case_to_camel_case.sql +0 -105
  498. package/supabase/migrations/20231129133721_add_columns_for_sites.sql +0 -11
  499. package/supabase/migrations/20231129142806_promoter_can_be_null.sql +0 -3
  500. package/supabase/migrations/20231130125327_group_location_latlon.sql +0 -3
  501. package/supabase/migrations/20231130150154_error_solvings.sql +0 -9
  502. package/supabase/migrations/20240405115914_new_columns.sql +0 -9
  503. package/supabase/migrations/20240405121956_init_offer.sql +0 -81
  504. package/supabase/migrations/20240503032440_add_columns_to_offer.sql +0 -11
  505. package/supabase/migrations/20240503101641_add_column_createdOn.sql +0 -19
  506. package/supabase/migrations/20240506035104_add_groupInfo_to_offer.sql +0 -10
  507. package/supabase/migrations/20240510110328_add_relationships_to_offer.sql +0 -9
  508. package/supabase/migrations/20240514100316_offers_public.sql +0 -9
  509. package/supabase/migrations/20260506013030_add_user_mirror.sql +0 -50
  510. package/supabase/migrations/20260506013031_add_user_group_mirror.sql +0 -31
  511. package/supabase/migrations/20260529000000_init_group_payment.sql +0 -79
  512. package/supabase/migrations/20260529120000_group_payment_realtime.sql +0 -19
  513. package/supabase/migrations/20260529130000_group_payment_anon_read.sql +0 -16
  514. package/supabase/migrations/20260601000000_group_payment_concept_norm.sql +0 -20
  515. package/supabase/migrations/20260605000000_init_partnership_domain.sql +0 -333
  516. package/supabase/migrations/20260605000100_partnership_recurring_rpc.sql +0 -62
  517. package/supabase/migrations/20260606000000_partnership_payer.sql +0 -83
  518. package/supabase/migrations/20260607000000_partnership_partner_number_not_unique.sql +0 -10
  519. package/supabase/migrations/20260608000000_partnership_payment_method_bizum.sql +0 -2
  520. package/supabase/migrations/20260609000000_partnership_payment_sepa_end_to_end.sql +0 -13
  521. package/supabase/migrations/20260617000000_partnership_portal_query_indexes.sql +0 -23
  522. package/supabase/migrations/20260618000000_partnership_communication_attachments.sql +0 -5
  523. package/supabase/migrations/20260701000000_partnership_recurring_rpc_drop_ambiguous.sql +0 -29
  524. package/supabase/migrations/20260713191700_add_personal_calendar_feed.sql +0 -506
  525. package/supabase/migrations/20260714193734_add_pending_calendar_invitations.sql +0 -403
  526. package/supabase/migrations/20260714205623_add_event_datetime_end_backfill.sql +0 -64
  527. package/supabase/migrations/20260729161126_remove_calendar_event_history_dependency.sql +0 -19
  528. package/supabase/migrations/20260729161202_reconcile_production_remote_schema.sql +0 -135
  529. package/supabase/migrations/20260804120000_add_calendar_feed_token_cipher.sql +0 -9
  530. package/supabase/migrations/20260805120000_replace_usergroup_with_group_playerids.sql +0 -363
  531. package/supabase/seed.sql +0 -2973
  532. /package/{lib/functions → functions}/auth.js +0 -0
  533. /package/{lib/functions → functions}/calendarFeed.d.ts +0 -0
  534. /package/{lib/functions → functions}/calendarFeed.js +0 -0
  535. /package/{lib/functions → functions}/communication.d.ts +0 -0
  536. /package/{lib/functions → functions}/communication.js +0 -0
  537. /package/{lib/functions → functions}/communicationComment.d.ts +0 -0
  538. /package/{lib/functions → functions}/communicationComment.js +0 -0
  539. /package/{lib/functions/customer.js → functions/composer.js} +0 -0
  540. /package/{lib/functions/customerGroup.js → functions/composerComposition.js} +0 -0
  541. /package/{lib/functions/eventoPayout.js → functions/composerNotification.js} +0 -0
  542. /package/{lib/functions/federation.js → functions/composerPayout.js} +0 -0
  543. /package/{lib/functions/federationPartnership.js → functions/customer.js} +0 -0
  544. /package/{lib/functions → functions}/customerGroup.d.ts +0 -0
  545. /package/{lib/functions/group.js → functions/customerGroup.js} +0 -0
  546. /package/{lib/functions → functions}/event.d.ts +0 -0
  547. /package/{lib/functions → functions}/eventPlayer.d.ts +0 -0
  548. /package/{lib/functions → functions}/eventoPayout.d.ts +0 -0
  549. /package/{lib/functions/groupEventStage.js → functions/eventoPayout.js} +0 -0
  550. /package/{lib/functions → functions}/federation.d.ts +0 -0
  551. /package/{lib/functions/groupModule.js → functions/federation.js} +0 -0
  552. /package/{lib/functions → functions}/federationPartnership.d.ts +0 -0
  553. /package/{lib/functions/groupPayment.js → functions/federationPartnership.js} +0 -0
  554. /package/{lib/functions → functions}/group.d.ts +0 -0
  555. /package/{lib/types/supabase/overwrites → functions}/group.js +0 -0
  556. /package/{lib/functions → functions}/groupEventStage.d.ts +0 -0
  557. /package/{lib/functions/groupPayoutRule.js → functions/groupEventStage.js} +0 -0
  558. /package/{lib/functions → functions}/groupModule.d.ts +0 -0
  559. /package/{lib/functions/groupPlayer.js → functions/groupModule.js} +0 -0
  560. /package/{lib/functions → functions}/groupPayment.d.ts +0 -0
  561. /package/{lib/functions/groupRepertory.js → functions/groupPayment.js} +0 -0
  562. /package/{lib/functions → functions}/groupPayoutRule.d.ts +0 -0
  563. /package/{lib/functions/inventory.js → functions/groupPayoutRule.js} +0 -0
  564. /package/{lib/functions → functions}/groupPlayer.d.ts +0 -0
  565. /package/{lib/functions/inventoryItem.js → functions/groupPlayer.js} +0 -0
  566. /package/{lib/functions/jwt.js → functions/groupRepertory.js} +0 -0
  567. /package/{lib/functions → functions}/inventory.d.ts +0 -0
  568. /package/{lib/functions/misc.js → functions/inventory.js} +0 -0
  569. /package/{lib/functions → functions}/inventoryItem.d.ts +0 -0
  570. /package/{lib/functions/notification.js → functions/inventoryItem.js} +0 -0
  571. /package/{lib/functions → functions}/jwt.d.ts +0 -0
  572. /package/{lib/functions/offer.js → functions/jwt.js} +0 -0
  573. /package/{lib/functions/offerApplicant.js → functions/misc.js} +0 -0
  574. /package/{lib/functions → functions}/notification.d.ts +0 -0
  575. /package/{lib/functions/partnership.js → functions/notification.js} +0 -0
  576. /package/{lib/functions → functions}/offer.d.ts +0 -0
  577. /package/{lib/types/supabase/overwrites → functions}/offer.js +0 -0
  578. /package/{lib/functions → functions}/offerApplicant.d.ts +0 -0
  579. /package/{lib/functions/partnershipCommunication.js → functions/offerApplicant.js} +0 -0
  580. /package/{lib/functions → functions}/partnership.d.ts +0 -0
  581. /package/{lib/functions/partnershipGroup.js → functions/partnership.js} +0 -0
  582. /package/{lib/functions → functions}/partnershipCommunication.d.ts +0 -0
  583. /package/{lib/functions/partnershipPartner.js → functions/partnershipCommunication.js} +0 -0
  584. /package/{lib/functions → functions}/partnershipGroup.d.ts +0 -0
  585. /package/{lib/functions/partnershipPayment.js → functions/partnershipGroup.js} +0 -0
  586. /package/{lib/functions → functions}/partnershipPartner.d.ts +0 -0
  587. /package/{lib/functions/partnershipPlan.js → functions/partnershipPartner.js} +0 -0
  588. /package/{lib/functions → functions}/partnershipPayment.d.ts +0 -0
  589. /package/{lib/functions/partnershipSepaPaymentGroup.js → functions/partnershipPayment.js} +0 -0
  590. /package/{lib/functions → functions}/partnershipPlan.d.ts +0 -0
  591. /package/{lib/functions/partnershipSubscription.js → functions/partnershipPlan.js} +0 -0
  592. /package/{lib/functions → functions}/partnershipSepaPaymentGroup.d.ts +0 -0
  593. /package/{lib/functions/subscription.js → functions/partnershipSepaPaymentGroup.js} +0 -0
  594. /package/{lib/functions → functions}/partnershipSubscription.d.ts +0 -0
  595. /package/{lib/functions/user.js → functions/partnershipSubscription.js} +0 -0
  596. /package/{lib/functions → functions}/regions.d.ts +0 -0
  597. /package/{lib/functions → functions}/subscription.d.ts +0 -0
  598. /package/{lib/functions/userNotification.js → functions/subscription.js} +0 -0
  599. /package/{lib/functions → functions}/user.d.ts +0 -0
  600. /package/{lib/models/Communication/Comment/types.js → functions/user.js} +0 -0
  601. /package/{lib/functions → functions}/userNotification.d.ts +0 -0
  602. /package/{lib/models/Counters/Group/types.js → functions/userNotification.js} +0 -0
  603. /package/{lib/helpers → helpers}/appScenes.d.ts +0 -0
  604. /package/{lib/helpers → helpers}/audios.d.ts +0 -0
  605. /package/{lib/helpers → helpers}/audios.js +0 -0
  606. /package/{lib/helpers → helpers}/badges.d.ts +0 -0
  607. /package/{lib/helpers → helpers}/collections.d.ts +0 -0
  608. /package/{lib/helpers → helpers}/communicationTemplate/newGroup.d.ts +0 -0
  609. /package/{lib/helpers → helpers}/communicationTemplate/newGroup.js +0 -0
  610. /package/{lib/helpers → helpers}/communicationTemplate/newMember.d.ts +0 -0
  611. /package/{lib/helpers → helpers}/communicationTemplate/newMember.js +0 -0
  612. /package/{lib/helpers → helpers}/countries.d.ts +0 -0
  613. /package/{lib/helpers → helpers}/countries.js +0 -0
  614. /package/{lib/helpers → helpers}/dlinks.d.ts +0 -0
  615. /package/{lib/helpers → helpers}/fileSections/index.d.ts +0 -0
  616. /package/{lib/helpers → helpers}/fileSections/index.js +0 -0
  617. /package/{lib/helpers → helpers}/fileSections/orders.d.ts +0 -0
  618. /package/{lib/helpers → helpers}/fileSections/orders.js +0 -0
  619. /package/{lib/helpers → helpers}/glissandooAdmin.d.ts +0 -0
  620. /package/{lib/helpers → helpers}/glissandooAdmin.js +0 -0
  621. /package/{lib/helpers → helpers}/instruments/orders.d.ts +0 -0
  622. /package/{lib/helpers → helpers}/instruments/orders.js +0 -0
  623. /package/{lib/helpers → helpers}/musicStyles/orders.d.ts +0 -0
  624. /package/{lib/helpers → helpers}/musicStyles/orders.js +0 -0
  625. /package/{lib/helpers → helpers}/notifications/index.d.ts +0 -0
  626. /package/{lib/helpers → helpers}/notifications/placeholders.d.ts +0 -0
  627. /package/{lib/helpers → helpers}/notifications/placeholders.js +0 -0
  628. /package/{lib/helpers → helpers}/paymentForecast.d.ts +0 -0
  629. /package/{lib/helpers → helpers}/payoutRules.d.ts +0 -0
  630. /package/{lib/helpers → helpers}/plans.d.ts +0 -0
  631. /package/{lib/helpers → helpers}/rates.js +0 -0
  632. /package/{lib/helpers → helpers}/reasons.d.ts +0 -0
  633. /package/{lib/helpers → helpers}/reasons.js +0 -0
  634. /package/{lib/helpers → helpers}/styles.d.ts +0 -0
  635. /package/{lib/helpers → helpers}/styles.js +0 -0
  636. /package/{lib/helpers → helpers}/ts-extras/array-includes.d.ts +0 -0
  637. /package/{lib/helpers → helpers}/ts-extras/as-mutable.d.ts +0 -0
  638. /package/{lib/helpers → helpers}/ts-extras/assert-error.d.ts +0 -0
  639. /package/{lib/helpers → helpers}/ts-extras/index.d.ts +0 -0
  640. /package/{lib/helpers → helpers}/ts-extras/is-defined.d.ts +0 -0
  641. /package/{lib/helpers → helpers}/ts-extras/is-empty.d.ts +0 -0
  642. /package/{lib/helpers → helpers}/ts-extras/is-finite.d.ts +0 -0
  643. /package/{lib/helpers → helpers}/ts-extras/is-finite.js +0 -0
  644. /package/{lib/helpers → helpers}/ts-extras/is-infinite.d.ts +0 -0
  645. /package/{lib/helpers → helpers}/ts-extras/is-integer.d.ts +0 -0
  646. /package/{lib/helpers → helpers}/ts-extras/is-integer.js +0 -0
  647. /package/{lib/helpers → helpers}/ts-extras/is-present.d.ts +0 -0
  648. /package/{lib/helpers → helpers}/ts-extras/is-safe-integer.d.ts +0 -0
  649. /package/{lib/helpers → helpers}/ts-extras/is-safe-integer.js +0 -0
  650. /package/{lib/helpers → helpers}/ts-extras/object-entries.js +0 -0
  651. /package/{lib/helpers → helpers}/ts-extras/object-from-entries.js +0 -0
  652. /package/{lib/helpers → helpers}/ts-extras/object-has-own.d.ts +0 -0
  653. /package/{lib/helpers → helpers}/ts-extras/set-has.d.ts +0 -0
  654. /package/{lib/helpers → helpers}/utils.d.ts +0 -0
  655. /package/{lib/helpers → helpers}/utils.js +0 -0
  656. /package/{lib/index.d.ts → index.d.ts} +0 -0
  657. /package/{lib/index.js → index.js} +0 -0
  658. /package/{lib/lang → lang}/index.d.ts +0 -0
  659. /package/{lib/models → models}/Communication/Comment/index.d.ts +0 -0
  660. /package/{lib/models → models}/Communication/Comment/index.js +0 -0
  661. /package/{lib/models → models}/Communication/Comment/types.d.ts +0 -0
  662. /package/{lib/models/Counters → models/Communication/Comment}/types.js +0 -0
  663. /package/{lib/models → models}/Communication/index.d.ts +0 -0
  664. /package/{lib/models → models}/Communication/index.js +0 -0
  665. /package/{lib/models → models}/Counters/Group/Analytics/index.d.ts +0 -0
  666. /package/{lib/models → models}/Counters/Group/Analytics/index.js +0 -0
  667. /package/{lib/models → models}/Counters/Group/Analytics/types.d.ts +0 -0
  668. /package/{lib/models → models}/Counters/Group/index.d.ts +0 -0
  669. /package/{lib/models → models}/Counters/Group/index.js +0 -0
  670. /package/{lib/models → models}/Counters/Group/types.d.ts +0 -0
  671. /package/{lib/models/Customer → models/Counters}/Group/types.js +0 -0
  672. /package/{lib/models → models}/Counters/event.d.ts +0 -0
  673. /package/{lib/models → models}/Counters/event.js +0 -0
  674. /package/{lib/models → models}/Counters/index.d.ts +0 -0
  675. /package/{lib/models → models}/Counters/index.js +0 -0
  676. /package/{lib/models → models}/Counters/types.d.ts +0 -0
  677. /package/{lib/models/Evento/Repertory → models/Counters}/types.js +0 -0
  678. /package/{lib/models → models}/Customer/Group/index.d.ts +0 -0
  679. /package/{lib/models → models}/Customer/Group/index.js +0 -0
  680. /package/{lib/models → models}/Customer/Group/types.d.ts +0 -0
  681. /package/{lib/models/Federation/Partnership → models/Customer/Group}/types.js +0 -0
  682. /package/{lib/models → models}/Customer/basic.d.ts +0 -0
  683. /package/{lib/models → models}/Customer/basic.js +0 -0
  684. /package/{lib/models → models}/Customer/types.d.ts +0 -0
  685. /package/{lib/models → models}/Evento/Player/basic.d.ts +0 -0
  686. /package/{lib/models → models}/Evento/Player/basic.js +0 -0
  687. /package/{lib/models → models}/Evento/Player/index.d.ts +0 -0
  688. /package/{lib/models → models}/Evento/Player/index.js +0 -0
  689. /package/{lib/models → models}/Evento/Player/types.d.ts +0 -0
  690. /package/{lib/models → models}/Evento/Repertory/index.d.ts +0 -0
  691. /package/{lib/models → models}/Evento/Repertory/index.js +0 -0
  692. /package/{lib/models/Federation → models/Evento/Repertory}/types.js +0 -0
  693. /package/{lib/models → models}/Evento/basic.d.ts +0 -0
  694. /package/{lib/models → models}/Evento/basic.js +0 -0
  695. /package/{lib/models → models}/Evento/promoter.d.ts +0 -0
  696. /package/{lib/models → models}/Evento/promoter.js +0 -0
  697. /package/{lib/models → models}/Evento/tiny.d.ts +0 -0
  698. /package/{lib/models → models}/Evento/tiny.js +0 -0
  699. /package/{lib/models → models}/Federation/Partnership/index.d.ts +0 -0
  700. /package/{lib/models → models}/Federation/Partnership/index.js +0 -0
  701. /package/{lib/models → models}/Federation/Partnership/types.d.ts +0 -0
  702. /package/{lib/models/Group/Event → models/Federation/Partnership}/types.js +0 -0
  703. /package/{lib/models → models}/Federation/types.d.ts +0 -0
  704. /package/{lib/models/Group/Player/Event → models/Federation}/types.js +0 -0
  705. /package/{lib/models → models}/Group/Analytics/index.d.ts +0 -0
  706. /package/{lib/models → models}/Group/Analytics/index.js +0 -0
  707. /package/{lib/models → models}/Group/Analytics/types.d.ts +0 -0
  708. /package/{lib/models → models}/Group/Event/index.d.ts +0 -0
  709. /package/{lib/models → models}/Group/Event/index.js +0 -0
  710. /package/{lib/models → models}/Group/Event/types.d.ts +0 -0
  711. /package/{lib/models/Group/Player/Log → models/Group/Event}/types.js +0 -0
  712. /package/{lib/models → models}/Group/Payment/index.d.ts +0 -0
  713. /package/{lib/models → models}/Group/Payment/index.js +0 -0
  714. /package/{lib/models → models}/Group/Payment/supabase.d.ts +0 -0
  715. /package/{lib/models → models}/Group/Payment/types.d.ts +0 -0
  716. /package/{lib/models → models}/Group/Player/Event/index.d.ts +0 -0
  717. /package/{lib/models → models}/Group/Player/Event/index.js +0 -0
  718. /package/{lib/models → models}/Group/Player/Event/types.d.ts +0 -0
  719. /package/{lib/models/Group/Repertory/File → models/Group/Player/Event}/types.js +0 -0
  720. /package/{lib/models → models}/Group/Player/Log/index.d.ts +0 -0
  721. /package/{lib/models → models}/Group/Player/Log/index.js +0 -0
  722. /package/{lib/models → models}/Group/Player/Log/types.d.ts +0 -0
  723. /package/{lib/models/Group/StageTemplate → models/Group/Player/Log}/types.js +0 -0
  724. /package/{lib/models → models}/Group/Player/index.d.ts +0 -0
  725. /package/{lib/models → models}/Group/Player/index.js +0 -0
  726. /package/{lib/models → models}/Group/Player/types.d.ts +0 -0
  727. /package/{lib/models → models}/Group/Repertory/File/types.d.ts +0 -0
  728. /package/{lib/models/Metrics → models/Group/Repertory/File}/types.js +0 -0
  729. /package/{lib/models → models}/Group/Repertory/FilePath/index.js +0 -0
  730. /package/{lib/models → models}/Group/StageTemplate/index.d.ts +0 -0
  731. /package/{lib/models → models}/Group/StageTemplate/index.js +0 -0
  732. /package/{lib/models → models}/Group/StageTemplate/types.d.ts +0 -0
  733. /package/{lib/models/Offer/Applicant → models/Group/StageTemplate}/types.js +0 -0
  734. /package/{lib/models → models}/Group/basic.d.ts +0 -0
  735. /package/{lib/models → models}/Group/basic.js +0 -0
  736. /package/{lib/models → models}/Instrument/group.d.ts +0 -0
  737. /package/{lib/models → models}/Instrument/group.js +0 -0
  738. /package/{lib/models → models}/Inventory/Item/index.d.ts +0 -0
  739. /package/{lib/models → models}/Inventory/Item/index.js +0 -0
  740. /package/{lib/models → models}/Inventory/Item/types.d.ts +0 -0
  741. /package/{lib/models → models}/Inventory/index.d.ts +0 -0
  742. /package/{lib/models → models}/Inventory/index.js +0 -0
  743. /package/{lib/models → models}/Inventory/types.d.ts +0 -0
  744. /package/{lib/models → models}/Metrics/index.d.ts +0 -0
  745. /package/{lib/models → models}/Metrics/index.js +0 -0
  746. /package/{lib/models → models}/Metrics/types.d.ts +0 -0
  747. /package/{lib/models/Partnership/Communication → models/Metrics}/types.js +0 -0
  748. /package/{lib/models → models}/Model/index.d.ts +0 -0
  749. /package/{lib/models → models}/Model/index.js +0 -0
  750. /package/{lib/models → models}/Model/lang.d.ts +0 -0
  751. /package/{lib/models → models}/Model/lang.js +0 -0
  752. /package/{lib/models → models}/MusicStyle/index.d.ts +0 -0
  753. /package/{lib/models → models}/MusicStyle/index.js +0 -0
  754. /package/{lib/models → models}/Notification/index.d.ts +0 -0
  755. /package/{lib/models → models}/Notification/index.js +0 -0
  756. /package/{lib/models → models}/Notification/types.d.ts +0 -0
  757. /package/{lib/models → models}/Offer/Applicant/index.d.ts +0 -0
  758. /package/{lib/models → models}/Offer/Applicant/index.js +0 -0
  759. /package/{lib/models → models}/Offer/Applicant/types.d.ts +0 -0
  760. /package/{lib/models/Partnership/Group → models/Offer/Applicant}/types.js +0 -0
  761. /package/{lib/models → models}/Offer/index.d.ts +0 -0
  762. /package/{lib/models → models}/Offer/index.js +0 -0
  763. /package/{lib/models → models}/Partnership/Communication/index.d.ts +0 -0
  764. /package/{lib/models → models}/Partnership/Communication/index.js +0 -0
  765. /package/{lib/models → models}/Partnership/Communication/supabase.d.ts +0 -0
  766. /package/{lib/models → models}/Partnership/Communication/types.d.ts +0 -0
  767. /package/{lib/models/Partnership/Plan → models/Partnership/Communication}/types.js +0 -0
  768. /package/{lib/models → models}/Partnership/Group/supabase.d.ts +0 -0
  769. /package/{lib/models → models}/Partnership/Group/types.d.ts +0 -0
  770. /package/{lib/models/Partnership/SepaPaymentGroup → models/Partnership/Group}/types.js +0 -0
  771. /package/{lib/models → models}/Partnership/Partner/index.d.ts +0 -0
  772. /package/{lib/models → models}/Partnership/Partner/index.js +0 -0
  773. /package/{lib/models → models}/Partnership/Partner/supabase.d.ts +0 -0
  774. /package/{lib/models → models}/Partnership/Partner/types.d.ts +0 -0
  775. /package/{lib/models → models}/Partnership/Payment/index.d.ts +0 -0
  776. /package/{lib/models → models}/Partnership/Payment/index.js +0 -0
  777. /package/{lib/models → models}/Partnership/Payment/supabase.d.ts +0 -0
  778. /package/{lib/models → models}/Partnership/Payment/types.d.ts +0 -0
  779. /package/{lib/models → models}/Partnership/Plan/index.d.ts +0 -0
  780. /package/{lib/models → models}/Partnership/Plan/index.js +0 -0
  781. /package/{lib/models → models}/Partnership/Plan/supabase.d.ts +0 -0
  782. /package/{lib/models → models}/Partnership/Plan/types.d.ts +0 -0
  783. /package/{lib/models/Partnership/Subscription → models/Partnership/Plan}/types.js +0 -0
  784. /package/{lib/models → models}/Partnership/SepaPaymentGroup/index.d.ts +0 -0
  785. /package/{lib/models → models}/Partnership/SepaPaymentGroup/index.js +0 -0
  786. /package/{lib/models → models}/Partnership/SepaPaymentGroup/supabase.d.ts +0 -0
  787. /package/{lib/models → models}/Partnership/SepaPaymentGroup/types.d.ts +0 -0
  788. /package/{lib/models/Player → models/Partnership/SepaPaymentGroup}/types.js +0 -0
  789. /package/{lib/models → models}/Partnership/Subscription/index.d.ts +0 -0
  790. /package/{lib/models → models}/Partnership/Subscription/index.js +0 -0
  791. /package/{lib/models → models}/Partnership/Subscription/supabase.d.ts +0 -0
  792. /package/{lib/models → models}/Partnership/Subscription/types.d.ts +0 -0
  793. /package/{lib/models/User/Group → models/Partnership/Subscription}/types.js +0 -0
  794. /package/{lib/models → models}/Partnership/basic.d.ts +0 -0
  795. /package/{lib/models → models}/Partnership/basic.js +0 -0
  796. /package/{lib/models → models}/Partnership/types.d.ts +0 -0
  797. /package/{lib/models → models}/Player/basic.d.ts +0 -0
  798. /package/{lib/models → models}/Player/basic.js +0 -0
  799. /package/{lib/models → models}/Player/types.d.ts +0 -0
  800. /package/{lib/models/User/Notification → models/Player}/types.js +0 -0
  801. /package/{lib/models → models}/Repertory/basic.d.ts +0 -0
  802. /package/{lib/models → models}/Repertory/basic.js +0 -0
  803. /package/{lib/models → models}/User/Group/index.d.ts +0 -0
  804. /package/{lib/models → models}/User/Group/types.d.ts +0 -0
  805. /package/{lib/models/User/OfferAlarm → models/User/Group}/types.js +0 -0
  806. /package/{lib/models → models}/User/Notification/index.d.ts +0 -0
  807. /package/{lib/models → models}/User/Notification/index.js +0 -0
  808. /package/{lib/models → models}/User/Notification/types.d.ts +0 -0
  809. /package/{lib/models/User/Partnership → models/User/Notification}/types.js +0 -0
  810. /package/{lib/models → models}/User/OfferAlarm/index.d.ts +0 -0
  811. /package/{lib/models → models}/User/OfferAlarm/index.js +0 -0
  812. /package/{lib/models → models}/User/OfferAlarm/types.d.ts +0 -0
  813. /package/{lib/types/messagebirdChatWidget.js → models/User/OfferAlarm/types.js} +0 -0
  814. /package/{lib/models → models}/User/Partnership/index.d.ts +0 -0
  815. /package/{lib/models → models}/User/Partnership/index.js +0 -0
  816. /package/{lib/models → models}/User/Partnership/types.d.ts +0 -0
  817. /package/{lib/types/minVersion.js → models/User/Partnership/types.js} +0 -0
  818. /package/{lib/models → models}/User/basic.d.ts +0 -0
  819. /package/{lib/models → models}/User/basic.js +0 -0
  820. /package/{lib/models → models}/User/extended.d.ts +0 -0
  821. /package/{lib/models → models}/User/extended.js +0 -0
  822. /package/{lib/models → models}/WebhookEvent/index.d.ts +0 -0
  823. /package/{lib/models → models}/WebhookEvent/index.js +0 -0
  824. /package/{lib/models → models}/WebhookEvent/types.d.ts +0 -0
  825. /package/{lib/types/supabase/index.js → models/supabase/Comm/types.js} +0 -0
  826. /package/{lib/types/supabase/overwrites/comm.js → models/supabase/Composer/Composition/Acquisition/types.js} +0 -0
  827. /package/{lib/types/supabase/overwrites/comm_history.js → models/supabase/Composer/Composition/Favorite/types.js} +0 -0
  828. /package/{lib/types/supabase/overwrites/event.js → models/supabase/Composer/Composition/View/types.js} +0 -0
  829. /package/{lib/types/supabase/overwrites/event_history.js → models/supabase/Composer/Payout/status.js} +0 -0
  830. /package/{lib/types/supabase/overwrites/group_history.js → models/supabase/Composer/Payout/types.js} +0 -0
  831. /package/{lib/types/supabase/overwrites/index.js → models/supabase/Composer/PerformanceAttendance/types.js} +0 -0
  832. /package/{lib/types/supabase/overwrites/offer_history.js → models/supabase/Composer/types.js} +0 -0
  833. /package/{lib/types/supabase/overwrites/repertoire.js → models/supabase/Repertoire/types.js} +0 -0
  834. /package/{lib/types/supabase/overwrites/repertoire_history.js → models/supabase/User/Group/types.js} +0 -0
  835. /package/{lib/types/supabase/overwrites/utils.js → models/supabase/User/types.js} +0 -0
  836. /package/{lib/types → types}/messagebirdChatWidget.d.ts +0 -0
  837. /package/{lib/types → types}/minVersion.d.ts +0 -0
  838. /package/{lib/types → types}/payoutRule.d.ts +0 -0
  839. /package/{lib/types/supabase/overwrites/utils.d.ts → types/supabase/overwrites/tables/common/index.d.ts} +0 -0
@@ -0,0 +1,1746 @@
1
+ /*!
2
+ * Copyright 2020 Google LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Document data (for use with `DocumentReference.set()`) consists of fields
18
+ * mapped to values.
19
+ */
20
+ export type DocumentData = {
21
+ [field: string]: any;
22
+ };
23
+ /**
24
+ * Update data (for use with `DocumentReference.update()`) consists of field
25
+ * paths (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots
26
+ * reference nested fields within the document.
27
+ */
28
+ export type UpdateData = {
29
+ [fieldPath: string]: any;
30
+ };
31
+ /**
32
+ * Converter used by `withConverter()` to transform user objects of type T
33
+ * into Firestore data.
34
+ *
35
+ * Using the converter allows you to specify generic type arguments when
36
+ * storing and retrieving objects from Firestore.
37
+ *
38
+ * @example
39
+ * class Post {
40
+ * constructor(readonly title: string, readonly author: string) {}
41
+ *
42
+ * toString(): string {
43
+ * return this.title + ', by ' + this.author;
44
+ * }
45
+ * }
46
+ *
47
+ * const postConverter = {
48
+ * toFirestore(post: Post): FirebaseFirestore.DocumentData {
49
+ * return {title: post.title, author: post.author};
50
+ * },
51
+ * fromFirestore(
52
+ * snapshot: FirebaseFirestore.QueryDocumentSnapshot
53
+ * ): Post {
54
+ * const data = snapshot.data();
55
+ * return new Post(data.title, data.author);
56
+ * }
57
+ * };
58
+ *
59
+ * const postSnap = await Firestore()
60
+ * .collection('posts')
61
+ * .withConverter(postConverter)
62
+ * .doc().get();
63
+ * const post = postSnap.data();
64
+ * if (post !== undefined) {
65
+ * post.title; // string
66
+ * post.toString(); // Should be defined
67
+ * post.someNonExistentProperty; // TS error
68
+ * }
69
+ */
70
+ export interface FirestoreDataConverter<T> {
71
+ /**
72
+ * Called by the Firestore SDK to convert a custom model object of type T
73
+ * into a plain Javascript object (suitable for writing directly to the
74
+ * Firestore database). To use set() with `merge` and `mergeFields`,
75
+ * toFirestore() must be defined with `Partial<T>`.
76
+ */
77
+ toFirestore(modelObject: T): DocumentData;
78
+ toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData;
79
+ /**
80
+ * Called by the Firestore SDK to convert Firestore data into an object of
81
+ * type T.
82
+ */
83
+ fromFirestore(snapshot: QueryDocumentSnapshot): T;
84
+ }
85
+ /**
86
+ * Settings used to directly configure a `Firestore` instance.
87
+ */
88
+ export interface Settings {
89
+ /**
90
+ * The project ID from the Google Developer's Console, e.g.
91
+ * 'grape-spaceship-123'. We will also check the environment variable
92
+ * GCLOUD_PROJECT for your project ID. Can be omitted in environments that
93
+ * support {@link https://cloud.google.com/docs/authentication Application
94
+ * Default Credentials}
95
+ */
96
+ projectId?: string;
97
+ /** The hostname to connect to. */
98
+ host?: string;
99
+ /** The port to connect to. */
100
+ port?: number;
101
+ /**
102
+ * Local file containing the Service Account credentials as downloaded from
103
+ * the Google Developers Console. Can be omitted in environments that
104
+ * support {@link https://cloud.google.com/docs/authentication Application
105
+ * Default Credentials}. To configure Firestore with custom credentials, use
106
+ * the `credentials` property to provide the `client_email` and
107
+ * `private_key` of your service account.
108
+ */
109
+ keyFilename?: string;
110
+ /**
111
+ * The 'client_email' and 'private_key' properties of the service account
112
+ * to use with your Firestore project. Can be omitted in environments that
113
+ * support {@link https://cloud.google.com/docs/authentication Application
114
+ * Default Credentials}. If your credentials are stored in a JSON file, you
115
+ * can specify a `keyFilename` instead.
116
+ */
117
+ credentials?: {
118
+ client_email?: string;
119
+ private_key?: string;
120
+ };
121
+ /** Whether to use SSL when connecting. */
122
+ ssl?: boolean;
123
+ /**
124
+ * The maximum number of idle GRPC channels to keep. A smaller number of idle
125
+ * channels reduces memory usage but increases request latency for clients
126
+ * with fluctuating request rates. If set to 0, shuts down all GRPC channels
127
+ * when the client becomes idle. Defaults to 1.
128
+ */
129
+ maxIdleChannels?: number;
130
+ /**
131
+ * Whether to use `BigInt` for integer types when deserializing Firestore
132
+ * Documents. Regardless of magnitude, all integer values are returned as
133
+ * `BigInt` to match the precision of the Firestore backend. Floating point
134
+ * numbers continue to use JavaScript's `number` type.
135
+ */
136
+ useBigInt?: boolean;
137
+ /**
138
+ * Whether to skip nested properties that are set to `undefined` during
139
+ * object serialization. If set to `true`, these properties are skipped
140
+ * and not written to Firestore. If set `false` or omitted, the SDK throws
141
+ * an exception when it encounters properties of type `undefined`.
142
+ */
143
+ ignoreUndefinedProperties?: boolean;
144
+ [key: string]: any;
145
+ }
146
+ /**
147
+ * `Firestore` represents a Firestore Database and is the entry point for all
148
+ * Firestore operations.
149
+ */
150
+ export declare class Firestore {
151
+ /**
152
+ * @param settings Configuration object. See [Firestore Documentation]
153
+ * {@link https://firebase.google.com/docs/firestore/}
154
+ */
155
+ constructor(settings?: Settings);
156
+ /**
157
+ * Specifies custom settings to be used to configure the `Firestore`
158
+ * instance. Can only be invoked once and before any other Firestore
159
+ * method.
160
+ *
161
+ * If settings are provided via both `settings()` and the `Firestore`
162
+ * constructor, both settings objects are merged and any settings provided
163
+ * via `settings()` take precedence.
164
+ *
165
+ * @param {object} settings The settings to use for all Firestore
166
+ * operations.
167
+ */
168
+ settings(settings: Settings): void;
169
+ /**
170
+ * Gets a `CollectionReference` instance that refers to the collection at
171
+ * the specified path.
172
+ *
173
+ * @param collectionPath A slash-separated path to a collection.
174
+ * @return The `CollectionReference` instance.
175
+ */
176
+ collection(collectionPath: string): CollectionReference<DocumentData>;
177
+ /**
178
+ * Gets a `DocumentReference` instance that refers to the document at the
179
+ * specified path.
180
+ *
181
+ * @param documentPath A slash-separated path to a document.
182
+ * @return The `DocumentReference` instance.
183
+ */
184
+ doc(documentPath: string): DocumentReference<DocumentData>;
185
+ /**
186
+ * Creates and returns a new Query that includes all documents in the
187
+ * database that are contained in a collection or subcollection with the
188
+ * given collectionId.
189
+ *
190
+ * @param collectionId Identifies the collections to query over. Every
191
+ * collection or subcollection with this ID as the last segment of its path
192
+ * will be included. Cannot contain a slash.
193
+ * @return The created `CollectionGroup`.
194
+ */
195
+ collectionGroup(collectionId: string): CollectionGroup<DocumentData>;
196
+ /**
197
+ * Retrieves multiple documents from Firestore.
198
+ *
199
+ * The first argument is required and must be of type `DocumentReference`
200
+ * followed by any additional `DocumentReference` documents. If used, the
201
+ * optional `ReadOptions` must be the last argument.
202
+ *
203
+ * @param {Array.<DocumentReference|ReadOptions>} documentRefsOrReadOptions
204
+ * The `DocumentReferences` to receive, followed by an optional field
205
+ * mask.
206
+ * @return A Promise that resolves with an array of resulting document
207
+ * snapshots.
208
+ */
209
+ getAll(...documentRefsOrReadOptions: Array<DocumentReference<DocumentData> | ReadOptions>): Promise<Array<DocumentSnapshot<DocumentData>>>;
210
+ /**
211
+ * Recursively deletes all documents and subcollections at and under the
212
+ * specified level.
213
+ *
214
+ * If any delete fails, the promise is rejected with an error message
215
+ * containing the number of failed deletes and the stack trace of the last
216
+ * failed delete. The provided reference is deleted regardless of whether
217
+ * all deletes succeeded.
218
+ *
219
+ * `recursiveDelete()` uses a BulkWriter instance with default settings to
220
+ * perform the deletes. To customize throttling rates or add success/error
221
+ * callbacks, pass in a custom BulkWriter instance.
222
+ *
223
+ * @param ref The reference of a document or collection to delete.
224
+ * @param bulkWriter A custom BulkWriter instance used to perform the
225
+ * deletes.
226
+ * @return A promise that resolves when all deletes have been performed.
227
+ * The promise is rejected if any of the deletes fail.
228
+ *
229
+ * @example
230
+ * // Recursively delete a reference and log the references of failures.
231
+ * const bulkWriter = firestore.bulkWriter();
232
+ * bulkWriter
233
+ * .onWriteError((error) => {
234
+ * if (
235
+ * error.failedAttempts < MAX_RETRY_ATTEMPTS
236
+ * ) {
237
+ * return true;
238
+ * } else {
239
+ * console.log('Failed write at document: ', error.documentRef.path);
240
+ * return false;
241
+ * }
242
+ * });
243
+ * await firestore.recursiveDelete(docRef, bulkWriter);
244
+ */
245
+ recursiveDelete(ref: CollectionReference<unknown> | DocumentReference<unknown>, bulkWriter?: BulkWriter): Promise<void>;
246
+ /**
247
+ * Terminates the Firestore client and closes all open streams.
248
+ *
249
+ * @return A Promise that resolves when the client is terminated.
250
+ */
251
+ terminate(): Promise<void>;
252
+ /**
253
+ * Fetches the root collections that are associated with this Firestore
254
+ * database.
255
+ *
256
+ * @returns A Promise that resolves with an array of CollectionReferences.
257
+ */
258
+ listCollections(): Promise<Array<CollectionReference<DocumentData>>>;
259
+ /**
260
+ * Executes the given updateFunction and commits the changes applied within
261
+ * the transaction.
262
+ *
263
+ * You can use the transaction object passed to 'updateFunction' to read and
264
+ * modify Firestore documents under lock. Transactions are committed once
265
+ * 'updateFunction' resolves and attempted up to five times on failure.
266
+ *
267
+ * @param updateFunction The function to execute within the transaction
268
+ * context.
269
+ * @param {object=} transactionOptions Transaction options.
270
+ * @param {number=} transactionOptions.maxAttempts The maximum number of
271
+ * attempts for this transaction.
272
+ * @return If the transaction completed successfully or was explicitly
273
+ * aborted (by the updateFunction returning a failed Promise), the Promise
274
+ * returned by the updateFunction will be returned here. Else if the
275
+ * transaction failed, a rejected Promise with the corresponding failure
276
+ * error will be returned.
277
+ */
278
+ runTransaction<T>(updateFunction: (transaction: Transaction) => Promise<T>, transactionOptions?: {
279
+ maxAttempts?: number;
280
+ }): Promise<T>;
281
+ /**
282
+ * Creates a write batch, used for performing multiple writes as a single
283
+ * atomic operation.
284
+ */
285
+ batch(): WriteBatch;
286
+ /**
287
+ * Creates a [BulkWriter]{@link BulkWriter}, used for performing
288
+ * multiple writes in parallel. Gradually ramps up writes as specified
289
+ * by the 500/50/5 rule.
290
+ *
291
+ * @see https://firebase.google.com/docs/firestore/best-practices#ramping_up_traffic
292
+ *
293
+ * @param options An options object used to configure the throttling
294
+ * behavior for the underlying BulkWriter.
295
+ */
296
+ bulkWriter(options?: BulkWriterOptions): BulkWriter;
297
+ /**
298
+ * Creates a new `BundleBuilder` instance to package selected Firestore data into
299
+ * a bundle.
300
+ *
301
+ * @param bundleId The ID of the bundle. When loaded on clients, client SDKs use this ID
302
+ * and the timestamp associated with the bundle to tell if it has been loaded already.
303
+ * If not specified, a random identifier will be used.
304
+ *
305
+ *
306
+ * @example
307
+ * const bundle = firestore.bundle('data-bundle');
308
+ * const docSnapshot = await firestore.doc('abc/123').get();
309
+ * const querySnapshot = await firestore.collection('coll').get();
310
+ *
311
+ * const bundleBuffer = bundle.add(docSnapshot); // Add a document
312
+ * .add('coll-query', querySnapshot) // Add a named query.
313
+ * .build()
314
+ * // Save `bundleBuffer` to CDN or stream it to clients.
315
+ */
316
+ bundle(bundleId?: string): BundleBuilder;
317
+ }
318
+ /**
319
+ * An immutable object representing a geo point in Firestore. The geo point
320
+ * is represented as latitude/longitude pair.
321
+ *
322
+ * Latitude values are in the range of [-90, 90].
323
+ * Longitude values are in the range of [-180, 180].
324
+ */
325
+ export declare class GeoPoint {
326
+ /**
327
+ * Creates a new immutable GeoPoint object with the provided latitude and
328
+ * longitude values.
329
+ * @param latitude The latitude as number between -90 and 90.
330
+ * @param longitude The longitude as number between -180 and 180.
331
+ */
332
+ constructor(latitude: number, longitude: number);
333
+ readonly latitude: number;
334
+ readonly longitude: number;
335
+ /**
336
+ * Returns true if this `GeoPoint` is equal to the provided one.
337
+ *
338
+ * @param other The `GeoPoint` to compare against.
339
+ * @return true if this `GeoPoint` is equal to the provided one.
340
+ */
341
+ isEqual(other: GeoPoint): boolean;
342
+ }
343
+ /**
344
+ * A reference to a transaction.
345
+ * The `Transaction` object passed to a transaction's updateFunction provides
346
+ * the methods to read and write data within the transaction context. See
347
+ * `Firestore.runTransaction()`.
348
+ */
349
+ export declare class Transaction {
350
+ private constructor();
351
+ /**
352
+ * Retrieves a query result. Holds a pessimistic lock on all returned
353
+ * documents.
354
+ *
355
+ * @param query A query to execute.
356
+ * @return A QuerySnapshot for the retrieved data.
357
+ */
358
+ get<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
359
+ /**
360
+ * Reads the document referenced by the provided `DocumentReference.`
361
+ * Holds a pessimistic lock on the returned document.
362
+ *
363
+ * @param documentRef A reference to the document to be read.
364
+ * @return A DocumentSnapshot for the read data.
365
+ */
366
+ get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
367
+ /**
368
+ * Retrieves multiple documents from Firestore. Holds a pessimistic lock on
369
+ * all returned documents.
370
+ *
371
+ * The first argument is required and must be of type `DocumentReference`
372
+ * followed by any additional `DocumentReference` documents. If used, the
373
+ * optional `ReadOptions` must be the last argument.
374
+ *
375
+ * @param {Array.<DocumentReference|ReadOptions>} documentRefsOrReadOptions
376
+ * The `DocumentReferences` to receive, followed by an optional field
377
+ * mask.
378
+ * @return A Promise that resolves with an array of resulting document
379
+ * snapshots.
380
+ */
381
+ getAll<T>(...documentRefsOrReadOptions: Array<DocumentReference<T> | ReadOptions>): Promise<Array<DocumentSnapshot<T>>>;
382
+ /**
383
+ * Create the document referred to by the provided `DocumentReference`.
384
+ * The operation will fail the transaction if a document exists at the
385
+ * specified location.
386
+ *
387
+ * @param documentRef A reference to the document to be create.
388
+ * @param data The object data to serialize as the document.
389
+ * @return This `Transaction` instance. Used for chaining method calls.
390
+ */
391
+ create<T>(documentRef: DocumentReference<T>, data: T): Transaction;
392
+ /**
393
+ * Writes to the document referred to by the provided `DocumentReference`.
394
+ * If the document does not exist yet, it will be created. If you pass
395
+ * `SetOptions`, the provided data can be merged into the existing document.
396
+ *
397
+ * @param documentRef A reference to the document to be set.
398
+ * @param data An object of the fields and values for the document.
399
+ * @param options An object to configure the set behavior.
400
+ * @return This `Transaction` instance. Used for chaining method calls.
401
+ */
402
+ set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: SetOptions): Transaction;
403
+ set<T>(documentRef: DocumentReference<T>, data: T): Transaction;
404
+ /**
405
+ * Updates fields in the document referred to by the provided
406
+ * `DocumentReference`. The update will fail if applied to a document that
407
+ * does not exist.
408
+ *
409
+ * Nested fields can be updated by providing dot-separated field path
410
+ * strings.
411
+ *
412
+ * @param documentRef A reference to the document to be updated.
413
+ * @param data An object containing the fields and values with which to
414
+ * update the document.
415
+ * @param precondition A Precondition to enforce on this update.
416
+ * @return This `Transaction` instance. Used for chaining method calls.
417
+ */
418
+ update(documentRef: DocumentReference<any>, data: UpdateData, precondition?: Precondition): Transaction;
419
+ /**
420
+ * Updates fields in the document referred to by the provided
421
+ * `DocumentReference`. The update will fail if applied to a document that
422
+ * does not exist.
423
+ *
424
+ * Nested fields can be updated by providing dot-separated field path
425
+ * strings or by providing FieldPath objects.
426
+ *
427
+ * A `Precondition` restricting this update can be specified as the last
428
+ * argument.
429
+ *
430
+ * @param documentRef A reference to the document to be updated.
431
+ * @param field The first field to update.
432
+ * @param value The first value
433
+ * @param fieldsOrPrecondition An alternating list of field paths and values
434
+ * to update, optionally followed by a `Precondition` to enforce on this
435
+ * update.
436
+ * @return This `Transaction` instance. Used for chaining method calls.
437
+ */
438
+ update(documentRef: DocumentReference<any>, field: string | FieldPath, value: any, ...fieldsOrPrecondition: any[]): Transaction;
439
+ /**
440
+ * Deletes the document referred to by the provided `DocumentReference`.
441
+ *
442
+ * @param documentRef A reference to the document to be deleted.
443
+ * @param precondition A Precondition to enforce for this delete.
444
+ * @return This `Transaction` instance. Used for chaining method calls.
445
+ */
446
+ delete(documentRef: DocumentReference<any>, precondition?: Precondition): Transaction;
447
+ }
448
+ /**
449
+ * A Firestore BulkWriter than can be used to perform a large number of writes
450
+ * in parallel. Writes to the same document will be executed sequentially.
451
+ *
452
+ * @class
453
+ */
454
+ export declare class BulkWriter {
455
+ private constructor();
456
+ /**
457
+ * Create a document with the provided data. This single operation will fail
458
+ * if a document exists at its location.
459
+ *
460
+ * @param documentRef A reference to the document to be
461
+ * created.
462
+ * @param data The object to serialize as the document.
463
+ * @returns A promise that resolves with the result of the write. If the
464
+ * write fails, the promise is rejected with a
465
+ * [BulkWriterError]{@link BulkWriterError}.
466
+ */
467
+ create<T>(documentRef: DocumentReference<T>, data: T): Promise<WriteResult>;
468
+ /**
469
+ * Delete a document from the database.
470
+ *
471
+ * @param documentRef A reference to the document to be
472
+ * deleted.
473
+ * @param precondition A precondition to enforce for this
474
+ * delete.
475
+ * @param precondition.lastUpdateTime If set, enforces that the
476
+ * document was last updated at lastUpdateTime. Fails the batch if the
477
+ * document doesn't exist or was last updated at a different time.
478
+ * @param precondition.exists If set, enforces that the target document
479
+ * must or must not exist.
480
+ * @returns A promise that resolves with the result of the delete. If the
481
+ * delete fails, the promise is rejected with a
482
+ * [BulkWriterError]{@link BulkWriterError}.
483
+ */
484
+ delete(documentRef: DocumentReference<any>, precondition?: Precondition): Promise<WriteResult>;
485
+ /**
486
+ * Write to the document referred to by the provided
487
+ * [DocumentReference]{@link DocumentReference}. If the document does not
488
+ * exist yet, it will be created. If you pass
489
+ * [SetOptions]{@link SetOptions}., the provided data can be merged into the
490
+ * existing document.
491
+ *
492
+ * @param documentRef A reference to the document to be
493
+ * set.
494
+ * @param data The object to serialize as the document.
495
+ * @param options An object to configure the set behavior.
496
+ * @param options.merge - If true, set() merges the values
497
+ * specified in its data argument. Fields omitted from this set() call
498
+ * remain untouched.
499
+ * @param options.mergeFields - If provided,
500
+ * set() only replaces the specified field paths. Any field path that is not
501
+ * specified is ignored and remains untouched.
502
+ * @returns A promise that resolves with the result of the write. If the
503
+ * write fails, the promise is rejected with a
504
+ * [BulkWriterError]{@link BulkWriterError}.
505
+ */
506
+ set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: SetOptions): Promise<WriteResult>;
507
+ set<T>(documentRef: DocumentReference<T>, data: T): Promise<WriteResult>;
508
+ /**
509
+ * Update fields of the document referred to by the provided
510
+ * [DocumentReference]{@link DocumentReference}. If the document doesn't yet
511
+ * exist, the update fails and the entire batch will be rejected.
512
+ *
513
+ * The update() method accepts either an object with field paths encoded as
514
+ * keys and field values encoded as values, or a variable number of
515
+ * arguments that alternate between field paths and field values. Nested
516
+ * fields can be updated by providing dot-separated field path strings or by
517
+ * providing FieldPath objects.
518
+ *
519
+ *
520
+ * A Precondition restricting this update can be specified as the last
521
+ * argument.
522
+ *
523
+ * @param documentRef A reference to the document to be updated.
524
+ * @param data An object containing the fields and values with which to
525
+ * update the document.
526
+ * @param precondition A Precondition to enforce on this update.
527
+ * @returns A promise that resolves with the result of the write. If the
528
+ * write fails, the promise is rejected with a
529
+ * [BulkWriterError]{@link BulkWriterError}.
530
+ */
531
+ update(documentRef: DocumentReference<any>, data: UpdateData, precondition?: Precondition): Promise<WriteResult>;
532
+ /**
533
+ * Update fields of the document referred to by the provided
534
+ * [DocumentReference]{@link DocumentReference}. If the document doesn't yet
535
+ * exist, the update fails and the entire batch will be rejected.
536
+ *
537
+ * The update() method accepts either an object with field paths encoded as
538
+ * keys and field values encoded as values, or a variable number of
539
+ * arguments that alternate between field paths and field values. Nested
540
+ * fields can be updated by providing dot-separated field path strings or by
541
+ * providing FieldPath objects.
542
+ *
543
+ *
544
+ * A Precondition restricting this update can be specified as the last
545
+ * argument.
546
+ *
547
+ * @param documentRef A reference to the document to be updated.
548
+ * @param field The first field to update.
549
+ * @param value The first value
550
+ * @param fieldsOrPrecondition An alternating list of field paths and values
551
+ * to update, optionally followed a `Precondition` to enforce on this update.
552
+ * @returns A promise that resolves with the result of the write. If the
553
+ * write fails, the promise is rejected with a
554
+ * [BulkWriterError]{@link BulkWriterError}.
555
+ */
556
+ update(documentRef: DocumentReference<any>, field: string | FieldPath, value: any, ...fieldsOrPrecondition: any[]): Promise<WriteResult>;
557
+ /**
558
+ * Attaches a listener that is run every time a BulkWriter operation
559
+ * successfully completes.
560
+ *
561
+ * @param callback A callback to be called every time a BulkWriter operation
562
+ * successfully completes.
563
+ */
564
+ onWriteResult(callback: (documentRef: DocumentReference<any>, result: WriteResult) => void): void;
565
+ /**
566
+ * Attaches an error handler listener that is run every time a BulkWriter
567
+ * operation fails.
568
+ *
569
+ * BulkWriter has a default error handler that retries UNAVAILABLE and
570
+ * ABORTED errors up to a maximum of 10 failed attempts. When an error
571
+ * handler is specified, the default error handler will be overwritten.
572
+ *
573
+ * @param shouldRetryCallback A callback to be called every time a BulkWriter
574
+ * operation fails. Returning `true` will retry the operation. Returning
575
+ * `false` will stop the retry loop.
576
+ */
577
+ onWriteError(shouldRetryCallback: (error: BulkWriterError) => boolean): void;
578
+ /**
579
+ * Commits all writes that have been enqueued up to this point in parallel.
580
+ *
581
+ * Returns a Promise that resolves when all currently queued operations have
582
+ * been committed. The Promise will never be rejected since the results for
583
+ * each individual operation are conveyed via their individual Promises.
584
+ *
585
+ * The Promise resolves immediately if there are no pending writes.
586
+ * Otherwise, the Promise waits for all previously issued writes, but it
587
+ * does not wait for writes that were added after the method is called. If
588
+ * you want to wait for additional writes, call `flush()` again.
589
+ *
590
+ * @return A promise that resolves when all enqueued writes
591
+ * up to this point have been committed.
592
+ */
593
+ flush(): Promise<void>;
594
+ /**
595
+ * Commits all enqueued writes and marks the BulkWriter instance as closed.
596
+ *
597
+ * After calling `close()`, calling any method will throw an error. Any
598
+ * retries scheduled as part of an `onWriteError()` handler will be run
599
+ * before the `close()` promise resolves.
600
+ *
601
+ * Returns a Promise that resolves when all writes have been committed. The
602
+ * Promise will never be rejected. Calling this method will send all
603
+ * requests. The promise resolves immediately if there are no pending
604
+ * writes.
605
+ *
606
+ * @return A promise that resolves when all enqueued writes
607
+ * up to this point have been committed.
608
+ */
609
+ close(): Promise<void>;
610
+ }
611
+ /**
612
+ * An options object to configure throttling on BulkWriter.
613
+ */
614
+ export interface BulkWriterOptions {
615
+ /**
616
+ * Whether to disable or configure throttling. By default, throttling is
617
+ * enabled. This field can be set to either a boolean or a config
618
+ * object. Setting it to `true` will use default values. You can override
619
+ * the defaults by setting it to `false` to disable throttling, or by
620
+ * setting the config values to enable throttling with the provided values.
621
+ *
622
+ * @see https://firebase.google.com/docs/firestore/best-practices#ramping_up_traffic
623
+ *
624
+ * @param initialOpsPerSecond The initial maximum number of operations per
625
+ * second allowed by the throttler. If this field is not set, the default
626
+ * is 500 operations per second.
627
+ * @param maxOpsPerSecond The maximum number of operations per second
628
+ * allowed by the throttler. If this field is set, the throttler's allowed
629
+ * operations per second does not ramp up past the specified operations per
630
+ * second.
631
+ */
632
+ readonly throttling?: boolean | {
633
+ initialOpsPerSecond?: number;
634
+ maxOpsPerSecond?: number;
635
+ };
636
+ }
637
+ /**
638
+ * The error thrown when a BulkWriter operation fails.
639
+ */
640
+ export declare class BulkWriterError extends Error {
641
+ /** The status code of the error. */
642
+ readonly code: GrpcStatus;
643
+ /** The error message of the error. */
644
+ readonly message: string;
645
+ /** The document reference the operation was performed on. */
646
+ readonly documentRef: DocumentReference<any>;
647
+ /** The type of operation performed. */
648
+ readonly operationType: 'create' | 'set' | 'update' | 'delete';
649
+ /** How many times this operation has been attempted unsuccessfully. */
650
+ readonly failedAttempts: number;
651
+ }
652
+ /**
653
+ * A write batch, used to perform multiple writes as a single atomic unit.
654
+ *
655
+ * A `WriteBatch` object can be acquired by calling `Firestore.batch()`. It
656
+ * provides methods for adding writes to the write batch. None of the
657
+ * writes will be committed (or visible locally) until `WriteBatch.commit()`
658
+ * is called.
659
+ *
660
+ * Unlike transactions, write batches are persisted offline and therefore are
661
+ * preferable when you don't need to condition your writes on read data.
662
+ */
663
+ export declare class WriteBatch {
664
+ private constructor();
665
+ /**
666
+ * Create the document referred to by the provided `DocumentReference`. The
667
+ * operation will fail the batch if a document exists at the specified
668
+ * location.
669
+ *
670
+ * @param documentRef A reference to the document to be created.
671
+ * @param data The object data to serialize as the document.
672
+ * @return This `WriteBatch` instance. Used for chaining method calls.
673
+ */
674
+ create<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
675
+ /**
676
+ * Write to the document referred to by the provided `DocumentReference`.
677
+ * If the document does not exist yet, it will be created. If you pass
678
+ * `SetOptions`, the provided data can be merged into the existing document.
679
+ *
680
+ * @param documentRef A reference to the document to be set.
681
+ * @param data An object of the fields and values for the document.
682
+ * @param options An object to configure the set behavior.
683
+ * @return This `WriteBatch` instance. Used for chaining method calls.
684
+ */
685
+ set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: SetOptions): WriteBatch;
686
+ set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
687
+ /**
688
+ * Update fields of the document referred to by the provided
689
+ * `DocumentReference`. If the document doesn't yet exist, the update fails
690
+ * and the entire batch will be rejected.
691
+ *
692
+ * Nested fields can be updated by providing dot-separated field path
693
+ * strings.
694
+ *
695
+ * @param documentRef A reference to the document to be updated.
696
+ * @param data An object containing the fields and values with which to
697
+ * update the document.
698
+ * @param precondition A Precondition to enforce on this update.
699
+ * @return This `WriteBatch` instance. Used for chaining method calls.
700
+ */
701
+ update(documentRef: DocumentReference<any>, data: UpdateData, precondition?: Precondition): WriteBatch;
702
+ /**
703
+ * Updates fields in the document referred to by the provided
704
+ * `DocumentReference`. The update will fail if applied to a document that
705
+ * does not exist.
706
+ *
707
+ * Nested fields can be updated by providing dot-separated field path
708
+ * strings or by providing FieldPath objects.
709
+ *
710
+ * A `Precondition` restricting this update can be specified as the last
711
+ * argument.
712
+ *
713
+ * @param documentRef A reference to the document to be updated.
714
+ * @param field The first field to update.
715
+ * @param value The first value
716
+ * @param fieldsOrPrecondition An alternating list of field paths and values
717
+ * to update, optionally followed a `Precondition` to enforce on this update.
718
+ * @return This `WriteBatch` instance. Used for chaining method calls.
719
+ */
720
+ update(documentRef: DocumentReference<any>, field: string | FieldPath, value: any, ...fieldsOrPrecondition: any[]): WriteBatch;
721
+ /**
722
+ * Deletes the document referred to by the provided `DocumentReference`.
723
+ *
724
+ * @param documentRef A reference to the document to be deleted.
725
+ * @param precondition A Precondition to enforce for this delete.
726
+ * @return This `WriteBatch` instance. Used for chaining method calls.
727
+ */
728
+ delete(documentRef: DocumentReference<any>, precondition?: Precondition): WriteBatch;
729
+ /**
730
+ * Commits all of the writes in this write batch as a single atomic unit.
731
+ *
732
+ * @return A Promise resolved once all of the writes in the batch have been
733
+ * successfully written to the backend as an atomic unit.
734
+ */
735
+ commit(): Promise<WriteResult[]>;
736
+ }
737
+ /**
738
+ * An options object that configures conditional behavior of `update()` and
739
+ * `delete()` calls in `DocumentReference`, `WriteBatch`, and `Transaction`.
740
+ * Using Preconditions, these calls can be restricted to only apply to
741
+ * documents that match the specified restrictions.
742
+ */
743
+ export interface Precondition {
744
+ /**
745
+ * If set, the last update time to enforce.
746
+ */
747
+ readonly lastUpdateTime?: Timestamp;
748
+ /**
749
+ * If set, enforces that the target document must or must not exist.
750
+ */
751
+ readonly exists?: boolean;
752
+ }
753
+ /**
754
+ * An options object that configures the behavior of `set()` calls in
755
+ * `DocumentReference`, `WriteBatch` and `Transaction`. These calls can be
756
+ * configured to perform granular merges instead of overwriting the target
757
+ * documents in their entirety.
758
+ */
759
+ export interface SetOptions {
760
+ /**
761
+ * Changes the behavior of a set() call to only replace the values specified
762
+ * in its data argument. Fields omitted from the set() call remain
763
+ * untouched.
764
+ */
765
+ readonly merge?: boolean;
766
+ /**
767
+ * Changes the behavior of set() calls to only replace the specified field
768
+ * paths. Any field path that is not specified is ignored and remains
769
+ * untouched.
770
+ *
771
+ * It is an error to pass a SetOptions object to a set() call that is
772
+ * missing a value for any of the fields specified here.
773
+ */
774
+ readonly mergeFields?: (string | FieldPath)[];
775
+ }
776
+ /**
777
+ * An options object that can be used to configure the behavior of `getAll()`
778
+ * calls. By providing a `fieldMask`, these calls can be configured to only
779
+ * return a subset of fields.
780
+ */
781
+ export interface ReadOptions {
782
+ /**
783
+ * Specifies the set of fields to return and reduces the amount of data
784
+ * transmitted by the backend.
785
+ *
786
+ * Adding a field mask does not filter results. Documents do not need to
787
+ * contain values for all the fields in the mask to be part of the result
788
+ * set.
789
+ */
790
+ readonly fieldMask?: (string | FieldPath)[];
791
+ }
792
+ /**
793
+ * A WriteResult wraps the write time set by the Firestore servers on `sets()`,
794
+ * `updates()`, and `creates()`.
795
+ */
796
+ export declare class WriteResult {
797
+ private constructor();
798
+ /**
799
+ * The write time as set by the Firestore servers.
800
+ */
801
+ readonly writeTime: Timestamp;
802
+ /**
803
+ * Returns true if this `WriteResult` is equal to the provided one.
804
+ *
805
+ * @param other The `WriteResult` to compare against.
806
+ * @return true if this `WriteResult` is equal to the provided one.
807
+ */
808
+ isEqual(other: WriteResult): boolean;
809
+ }
810
+ /**
811
+ * A `DocumentReference` refers to a document location in a Firestore database
812
+ * and can be used to write, read, or listen to the location. The document at
813
+ * the referenced location may or may not exist. A `DocumentReference` can
814
+ * also be used to create a `CollectionReference` to a subcollection.
815
+ */
816
+ export declare class DocumentReference<T = DocumentData> {
817
+ private constructor();
818
+ /** The identifier of the document within its collection. */
819
+ readonly id: string;
820
+ /**
821
+ * The `Firestore` for the Firestore database (useful for performing
822
+ * transactions, etc.).
823
+ */
824
+ readonly firestore: Firestore;
825
+ /**
826
+ * A reference to the Collection to which this DocumentReference belongs.
827
+ */
828
+ readonly parent: CollectionReference<T>;
829
+ /**
830
+ * A string representing the path of the referenced document (relative
831
+ * to the root of the database).
832
+ */
833
+ readonly path: string;
834
+ /**
835
+ * Gets a `CollectionReference` instance that refers to the collection at
836
+ * the specified path.
837
+ *
838
+ * @param collectionPath A slash-separated path to a collection.
839
+ * @return The `CollectionReference` instance.
840
+ */
841
+ collection(collectionPath: string): CollectionReference<DocumentData>;
842
+ /**
843
+ * Fetches the subcollections that are direct children of this document.
844
+ *
845
+ * @returns A Promise that resolves with an array of CollectionReferences.
846
+ */
847
+ listCollections(): Promise<Array<CollectionReference<DocumentData>>>;
848
+ /**
849
+ * Creates a document referred to by this `DocumentReference` with the
850
+ * provided object values. The write fails if the document already exists
851
+ *
852
+ * @param data The object data to serialize as the document.
853
+ * @return A Promise resolved with the write time of this create.
854
+ */
855
+ create(data: T): Promise<WriteResult>;
856
+ /**
857
+ * Writes to the document referred to by this `DocumentReference`. If the
858
+ * document does not yet exist, it will be created. If you pass
859
+ * `SetOptions`, the provided data can be merged into an existing document.
860
+ *
861
+ * @param data A map of the fields and values for the document.
862
+ * @param options An object to configure the set behavior.
863
+ * @return A Promise resolved with the write time of this set.
864
+ */
865
+ set(data: Partial<T>, options: SetOptions): Promise<WriteResult>;
866
+ set(data: T): Promise<WriteResult>;
867
+ /**
868
+ * Updates fields in the document referred to by this `DocumentReference`.
869
+ * The update will fail if applied to a document that does not exist.
870
+ *
871
+ * Nested fields can be updated by providing dot-separated field path
872
+ * strings.
873
+ *
874
+ * @param data An object containing the fields and values with which to
875
+ * update the document.
876
+ * @param precondition A Precondition to enforce on this update.
877
+ * @return A Promise resolved with the write time of this update.
878
+ */
879
+ update(data: UpdateData, precondition?: Precondition): Promise<WriteResult>;
880
+ /**
881
+ * Updates fields in the document referred to by this `DocumentReference`.
882
+ * The update will fail if applied to a document that does not exist.
883
+ *
884
+ * Nested fields can be updated by providing dot-separated field path
885
+ * strings or by providing FieldPath objects.
886
+ *
887
+ * A `Precondition` restricting this update can be specified as the last
888
+ * argument.
889
+ *
890
+ * @param field The first field to update.
891
+ * @param value The first value.
892
+ * @param moreFieldsOrPrecondition An alternating list of field paths and
893
+ * values to update, optionally followed by a `Precondition` to enforce on
894
+ * this update.
895
+ * @return A Promise resolved with the write time of this update.
896
+ */
897
+ update(field: string | FieldPath, value: any, ...moreFieldsOrPrecondition: any[]): Promise<WriteResult>;
898
+ /**
899
+ * Deletes the document referred to by this `DocumentReference`.
900
+ *
901
+ * @param precondition A Precondition to enforce for this delete.
902
+ * @return A Promise resolved with the write time of this delete.
903
+ */
904
+ delete(precondition?: Precondition): Promise<WriteResult>;
905
+ /**
906
+ * Reads the document referred to by this `DocumentReference`.
907
+ *
908
+ * @return A Promise resolved with a DocumentSnapshot containing the
909
+ * current document contents.
910
+ */
911
+ get(): Promise<DocumentSnapshot<T>>;
912
+ /**
913
+ * Attaches a listener for DocumentSnapshot events.
914
+ *
915
+ * @param onNext A callback to be called every time a new `DocumentSnapshot`
916
+ * is available.
917
+ * @param onError A callback to be called if the listen fails or is
918
+ * cancelled. No further callbacks will occur.
919
+ * @return An unsubscribe function that can be called to cancel
920
+ * the snapshot listener.
921
+ */
922
+ onSnapshot(onNext: (snapshot: DocumentSnapshot<T>) => void, onError?: (error: Error) => void): () => void;
923
+ /**
924
+ * Returns true if this `DocumentReference` is equal to the provided one.
925
+ *
926
+ * @param other The `DocumentReference` to compare against.
927
+ * @return true if this `DocumentReference` is equal to the provided one.
928
+ */
929
+ isEqual(other: DocumentReference<T>): boolean;
930
+ /**
931
+ * Applies a custom data converter to this DocumentReference, allowing you
932
+ * to use your own custom model objects with Firestore. When you call
933
+ * set(), get(), etc. on the returned DocumentReference instance, the
934
+ * provided converter will convert between Firestore data and your custom
935
+ * type U.
936
+ *
937
+ * @param converter Converts objects to and from Firestore. Passing in
938
+ * `null` removes the current converter.
939
+ * @return A DocumentReference<U> that uses the provided converter.
940
+ */
941
+ withConverter<U>(converter: FirestoreDataConverter<U>): DocumentReference<U>;
942
+ withConverter(converter: null): DocumentReference<DocumentData>;
943
+ }
944
+ /**
945
+ * A `DocumentSnapshot` contains data read from a document in your Firestore
946
+ * database. The data can be extracted with `.data()` or `.get(<field>)` to
947
+ * get a specific field.
948
+ *
949
+ * For a `DocumentSnapshot` that points to a non-existing document, any data
950
+ * access will return 'undefined'. You can use the `exists` property to
951
+ * explicitly verify a document's existence.
952
+ */
953
+ export declare class DocumentSnapshot<T = DocumentData> {
954
+ protected constructor();
955
+ /** True if the document exists. */
956
+ readonly exists: boolean;
957
+ /** A `DocumentReference` to the document location. */
958
+ readonly ref: DocumentReference<T>;
959
+ /**
960
+ * The ID of the document for which this `DocumentSnapshot` contains data.
961
+ */
962
+ readonly id: string;
963
+ /**
964
+ * The time the document was created. Not set for documents that don't
965
+ * exist.
966
+ */
967
+ readonly createTime?: Timestamp;
968
+ /**
969
+ * The time the document was last updated (at the time the snapshot was
970
+ * generated). Not set for documents that don't exist.
971
+ */
972
+ readonly updateTime?: Timestamp;
973
+ /**
974
+ * The time this snapshot was read.
975
+ */
976
+ readonly readTime: Timestamp;
977
+ /**
978
+ * Retrieves all fields in the document as an Object. Returns 'undefined' if
979
+ * the document doesn't exist.
980
+ *
981
+ * @return An Object containing all fields in the document.
982
+ */
983
+ data(): T | undefined;
984
+ /**
985
+ * Retrieves the field specified by `fieldPath`.
986
+ *
987
+ * @param fieldPath The path (e.g. 'foo' or 'foo.bar') to a specific field.
988
+ * @return The data at the specified field location or undefined if no such
989
+ * field exists in the document.
990
+ */
991
+ get(fieldPath: string | FieldPath): any;
992
+ /**
993
+ * Returns true if the document's data and path in this `DocumentSnapshot`
994
+ * is equal to the provided one.
995
+ *
996
+ * @param other The `DocumentSnapshot` to compare against.
997
+ * @return true if this `DocumentSnapshot` is equal to the provided one.
998
+ */
999
+ isEqual(other: DocumentSnapshot<T>): boolean;
1000
+ }
1001
+ /**
1002
+ * A `QueryDocumentSnapshot` contains data read from a document in your
1003
+ * Firestore database as part of a query. The document is guaranteed to exist
1004
+ * and its data can be extracted with `.data()` or `.get(<field>)` to get a
1005
+ * specific field.
1006
+ *
1007
+ * A `QueryDocumentSnapshot` offers the same API surface as a
1008
+ * `DocumentSnapshot`. Since query results contain only existing documents, the
1009
+ * `exists` property will always be true and `data()` will never return
1010
+ * 'undefined'.
1011
+ */
1012
+ export declare class QueryDocumentSnapshot<T = DocumentData> extends DocumentSnapshot<T> {
1013
+ private constructor();
1014
+ /**
1015
+ * The time the document was created.
1016
+ */
1017
+ readonly createTime: Timestamp;
1018
+ /**
1019
+ * The time the document was last updated (at the time the snapshot was
1020
+ * generated).
1021
+ */
1022
+ readonly updateTime: Timestamp;
1023
+ /**
1024
+ * Retrieves all fields in the document as an Object.
1025
+ *
1026
+ * @override
1027
+ * @return An Object containing all fields in the document.
1028
+ */
1029
+ data(): T;
1030
+ }
1031
+ /**
1032
+ * The direction of a `Query.orderBy()` clause is specified as 'desc' or 'asc'
1033
+ * (descending or ascending).
1034
+ */
1035
+ export type OrderByDirection = 'desc' | 'asc';
1036
+ /**
1037
+ * Filter conditions in a `Query.where()` clause are specified using the
1038
+ * strings '<', '<=', '==', '!=', '>=', '>', 'array-contains', 'in', 'not-in',
1039
+ * and 'array-contains-any'.
1040
+ */
1041
+ export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'not-in' | 'array-contains-any';
1042
+ /**
1043
+ * A `Query` refers to a Query which you can read or listen to. You can also
1044
+ * construct refined `Query` objects by adding filters and ordering.
1045
+ */
1046
+ export declare class Query<T = DocumentData> {
1047
+ protected constructor();
1048
+ /**
1049
+ * The `Firestore` for the Firestore database (useful for performing
1050
+ * transactions, etc.).
1051
+ */
1052
+ readonly firestore: Firestore;
1053
+ /**
1054
+ * Creates and returns a new Query with the additional filter that documents
1055
+ * must contain the specified field and that its value should satisfy the
1056
+ * relation constraint provided.
1057
+ *
1058
+ * This function returns a new (immutable) instance of the Query (rather
1059
+ * than modify the existing instance) to impose the filter.
1060
+ *
1061
+ * @param fieldPath The path to compare
1062
+ * @param opStr The operation string (e.g "<", "<=", "==", ">", ">=").
1063
+ * @param value The value for comparison
1064
+ * @return The created Query.
1065
+ */
1066
+ where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: any): Query<T>;
1067
+ /**
1068
+ * Creates and returns a new Query that's additionally sorted by the
1069
+ * specified field, optionally in descending order instead of ascending.
1070
+ *
1071
+ * This function returns a new (immutable) instance of the Query (rather
1072
+ * than modify the existing instance) to impose the order.
1073
+ *
1074
+ * @param fieldPath The field to sort by.
1075
+ * @param directionStr Optional direction to sort by ('asc' or 'desc'). If
1076
+ * not specified, order will be ascending.
1077
+ * @return The created Query.
1078
+ */
1079
+ orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): Query<T>;
1080
+ /**
1081
+ * Creates and returns a new Query that only returns the first matching
1082
+ * documents.
1083
+ *
1084
+ * This function returns a new (immutable) instance of the Query (rather
1085
+ * than modify the existing instance) to impose the limit.
1086
+ *
1087
+ * @param limit The maximum number of items to return.
1088
+ * @return The created Query.
1089
+ */
1090
+ limit(limit: number): Query<T>;
1091
+ /**
1092
+ * Creates and returns a new Query that only returns the last matching
1093
+ * documents.
1094
+ *
1095
+ * You must specify at least one orderBy clause for limitToLast queries,
1096
+ * otherwise an exception will be thrown during execution.
1097
+ *
1098
+ * Results for limitToLast queries cannot be streamed via the `stream()`
1099
+ * API.
1100
+ *
1101
+ * @param limit The maximum number of items to return.
1102
+ * @return The created Query.
1103
+ */
1104
+ limitToLast(limit: number): Query<T>;
1105
+ /**
1106
+ * Specifies the offset of the returned results.
1107
+ *
1108
+ * This function returns a new (immutable) instance of the Query (rather
1109
+ * than modify the existing instance) to impose the offset.
1110
+ *
1111
+ * @param offset The offset to apply to the Query results.
1112
+ * @return The created Query.
1113
+ */
1114
+ offset(offset: number): Query<T>;
1115
+ /**
1116
+ * Creates and returns a new Query instance that applies a field mask to
1117
+ * the result and returns only the specified subset of fields. You can
1118
+ * specify a list of field paths to return, or use an empty list to only
1119
+ * return the references of matching documents.
1120
+ *
1121
+ * Queries that contain field masks cannot be listened to via `onSnapshot()`
1122
+ * listeners.
1123
+ *
1124
+ * This function returns a new (immutable) instance of the Query (rather
1125
+ * than modify the existing instance) to impose the field mask.
1126
+ *
1127
+ * @param field The field paths to return.
1128
+ * @return The created Query.
1129
+ */
1130
+ select(...field: (string | FieldPath)[]): Query<DocumentData>;
1131
+ /**
1132
+ * Creates and returns a new Query that starts at the provided document
1133
+ * (inclusive). The starting position is relative to the order of the query.
1134
+ * The document must contain all of the fields provided in the orderBy of
1135
+ * this query.
1136
+ *
1137
+ * @param snapshot The snapshot of the document to start after.
1138
+ * @return The created Query.
1139
+ */
1140
+ startAt(snapshot: DocumentSnapshot<any>): Query<T>;
1141
+ /**
1142
+ * Creates and returns a new Query that starts at the provided fields
1143
+ * relative to the order of the query. The order of the field values
1144
+ * must match the order of the order by clauses of the query.
1145
+ *
1146
+ * @param fieldValues The field values to start this query at, in order
1147
+ * of the query's order by.
1148
+ * @return The created Query.
1149
+ */
1150
+ startAt(...fieldValues: any[]): Query<T>;
1151
+ /**
1152
+ * Creates and returns a new Query that starts after the provided document
1153
+ * (exclusive). The starting position is relative to the order of the query.
1154
+ * The document must contain all of the fields provided in the orderBy of
1155
+ * this query.
1156
+ *
1157
+ * @param snapshot The snapshot of the document to start after.
1158
+ * @return The created Query.
1159
+ */
1160
+ startAfter(snapshot: DocumentSnapshot<any>): Query<T>;
1161
+ /**
1162
+ * Creates and returns a new Query that starts after the provided fields
1163
+ * relative to the order of the query. The order of the field values
1164
+ * must match the order of the order by clauses of the query.
1165
+ *
1166
+ * @param fieldValues The field values to start this query after, in order
1167
+ * of the query's order by.
1168
+ * @return The created Query.
1169
+ */
1170
+ startAfter(...fieldValues: any[]): Query<T>;
1171
+ /**
1172
+ * Creates and returns a new Query that ends before the provided document
1173
+ * (exclusive). The end position is relative to the order of the query. The
1174
+ * document must contain all of the fields provided in the orderBy of this
1175
+ * query.
1176
+ *
1177
+ * @param snapshot The snapshot of the document to end before.
1178
+ * @return The created Query.
1179
+ */
1180
+ endBefore(snapshot: DocumentSnapshot<any>): Query<T>;
1181
+ /**
1182
+ * Creates and returns a new Query that ends before the provided fields
1183
+ * relative to the order of the query. The order of the field values
1184
+ * must match the order of the order by clauses of the query.
1185
+ *
1186
+ * @param fieldValues The field values to end this query before, in order
1187
+ * of the query's order by.
1188
+ * @return The created Query.
1189
+ */
1190
+ endBefore(...fieldValues: any[]): Query<T>;
1191
+ /**
1192
+ * Creates and returns a new Query that ends at the provided document
1193
+ * (inclusive). The end position is relative to the order of the query. The
1194
+ * document must contain all of the fields provided in the orderBy of this
1195
+ * query.
1196
+ *
1197
+ * @param snapshot The snapshot of the document to end at.
1198
+ * @return The created Query.
1199
+ */
1200
+ endAt(snapshot: DocumentSnapshot<any>): Query<T>;
1201
+ /**
1202
+ * Creates and returns a new Query that ends at the provided fields
1203
+ * relative to the order of the query. The order of the field values
1204
+ * must match the order of the order by clauses of the query.
1205
+ *
1206
+ * @param fieldValues The field values to end this query at, in order
1207
+ * of the query's order by.
1208
+ * @return The created Query.
1209
+ */
1210
+ endAt(...fieldValues: any[]): Query<T>;
1211
+ /**
1212
+ * Executes the query and returns the results as a `QuerySnapshot`.
1213
+ *
1214
+ * @return A Promise that will be resolved with the results of the Query.
1215
+ */
1216
+ get(): Promise<QuerySnapshot<T>>;
1217
+ stream(): NodeJS.ReadableStream;
1218
+ /**
1219
+ * Attaches a listener for `QuerySnapshot `events.
1220
+ *
1221
+ * @param onNext A callback to be called every time a new `QuerySnapshot`
1222
+ * is available.
1223
+ * @param onError A callback to be called if the listen fails or is
1224
+ * cancelled. No further callbacks will occur.
1225
+ * @return An unsubscribe function that can be called to cancel
1226
+ * the snapshot listener.
1227
+ */
1228
+ onSnapshot(onNext: (snapshot: QuerySnapshot<T>) => void, onError?: (error: Error) => void): () => void;
1229
+ /**
1230
+ * Returns true if this `Query` is equal to the provided one.
1231
+ *
1232
+ * @param other The `Query` to compare against.
1233
+ * @return true if this `Query` is equal to the provided one.
1234
+ */
1235
+ isEqual(other: Query<T>): boolean;
1236
+ /**
1237
+ * Applies a custom data converter to this Query, allowing you to use your
1238
+ * own custom model objects with Firestore. When you call get() on the
1239
+ * returned Query, the provided converter will convert between Firestore
1240
+ * data and your custom type U.
1241
+ *
1242
+ * @param converter Converts objects to and from Firestore. Passing in
1243
+ * `null` removes the current converter.
1244
+ * @return A Query<U> that uses the provided converter.
1245
+ */
1246
+ withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
1247
+ withConverter(converter: null): Query<DocumentData>;
1248
+ }
1249
+ /**
1250
+ * A `QuerySnapshot` contains zero or more `QueryDocumentSnapshot` objects
1251
+ * representing the results of a query. The documents can be accessed as an
1252
+ * array via the `docs` property or enumerated using the `forEach` method. The
1253
+ * number of documents can be determined via the `empty` and `size`
1254
+ * properties.
1255
+ */
1256
+ export declare class QuerySnapshot<T = DocumentData> {
1257
+ private constructor();
1258
+ /**
1259
+ * The query on which you called `get` or `onSnapshot` in order to get this
1260
+ * `QuerySnapshot`.
1261
+ */
1262
+ readonly query: Query<T>;
1263
+ /** An array of all the documents in the QuerySnapshot. */
1264
+ readonly docs: Array<QueryDocumentSnapshot<T>>;
1265
+ /** The number of documents in the QuerySnapshot. */
1266
+ readonly size: number;
1267
+ /** True if there are no documents in the QuerySnapshot. */
1268
+ readonly empty: boolean;
1269
+ /** The time this query snapshot was obtained. */
1270
+ readonly readTime: Timestamp;
1271
+ /**
1272
+ * Returns an array of the documents changes since the last snapshot. If
1273
+ * this is the first snapshot, all documents will be in the list as added
1274
+ * changes.
1275
+ */
1276
+ docChanges(): DocumentChange<T>[];
1277
+ /**
1278
+ * Enumerates all of the documents in the QuerySnapshot.
1279
+ *
1280
+ * @param callback A callback to be called with a `DocumentSnapshot` for
1281
+ * each document in the snapshot.
1282
+ * @param thisArg The `this` binding for the callback.
1283
+ */
1284
+ forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: any): void;
1285
+ /**
1286
+ * Returns true if the document data in this `QuerySnapshot` is equal to the
1287
+ * provided one.
1288
+ *
1289
+ * @param other The `QuerySnapshot` to compare against.
1290
+ * @return true if this `QuerySnapshot` is equal to the provided one.
1291
+ */
1292
+ isEqual(other: QuerySnapshot<T>): boolean;
1293
+ }
1294
+ /**
1295
+ * The type of of a `DocumentChange` may be 'added', 'removed', or 'modified'.
1296
+ */
1297
+ export type DocumentChangeType = 'added' | 'removed' | 'modified';
1298
+ /**
1299
+ * A `DocumentChange` represents a change to the documents matching a query.
1300
+ * It contains the document affected and the type of change that occurred.
1301
+ */
1302
+ export interface DocumentChange<T = DocumentData> {
1303
+ /** The type of change ('added', 'modified', or 'removed'). */
1304
+ readonly type: DocumentChangeType;
1305
+ /** The document affected by this change. */
1306
+ readonly doc: QueryDocumentSnapshot<T>;
1307
+ /**
1308
+ * The index of the changed document in the result set immediately prior to
1309
+ * this DocumentChange (i.e. supposing that all prior DocumentChange objects
1310
+ * have been applied). Is -1 for 'added' events.
1311
+ */
1312
+ readonly oldIndex: number;
1313
+ /**
1314
+ * The index of the changed document in the result set immediately after
1315
+ * this DocumentChange (i.e. supposing that all prior DocumentChange
1316
+ * objects and the current DocumentChange object have been applied).
1317
+ * Is -1 for 'removed' events.
1318
+ */
1319
+ readonly newIndex: number;
1320
+ /**
1321
+ * Returns true if the data in this `DocumentChange` is equal to the
1322
+ * provided one.
1323
+ *
1324
+ * @param other The `DocumentChange` to compare against.
1325
+ * @return true if this `DocumentChange` is equal to the provided one.
1326
+ */
1327
+ isEqual(other: DocumentChange<T>): boolean;
1328
+ }
1329
+ /**
1330
+ * A `CollectionReference` object can be used for adding documents, getting
1331
+ * document references, and querying for documents (using the methods
1332
+ * inherited from `Query`).
1333
+ */
1334
+ export declare class CollectionReference<T = DocumentData> extends Query<T> {
1335
+ private constructor();
1336
+ /** The identifier of the collection. */
1337
+ readonly id: string;
1338
+ /**
1339
+ * A reference to the containing Document if this is a subcollection, else
1340
+ * null.
1341
+ */
1342
+ readonly parent: DocumentReference<DocumentData> | null;
1343
+ /**
1344
+ * A string representing the path of the referenced collection (relative
1345
+ * to the root of the database).
1346
+ */
1347
+ readonly path: string;
1348
+ /**
1349
+ * Retrieves the list of documents in this collection.
1350
+ *
1351
+ * The document references returned may include references to "missing
1352
+ * documents", i.e. document locations that have no document present but
1353
+ * which contain subcollections with documents. Attempting to read such a
1354
+ * document reference (e.g. via `.get()` or `.onSnapshot()`) will return a
1355
+ * `DocumentSnapshot` whose `.exists` property is false.
1356
+ *
1357
+ * @return {Promise<DocumentReference[]>} The list of documents in this
1358
+ * collection.
1359
+ */
1360
+ listDocuments(): Promise<Array<DocumentReference<T>>>;
1361
+ /**
1362
+ * Get a `DocumentReference` for a randomly-named document within this
1363
+ * collection. An automatically-generated unique ID will be used as the
1364
+ * document ID.
1365
+ *
1366
+ * @return The `DocumentReference` instance.
1367
+ */
1368
+ doc(): DocumentReference<T>;
1369
+ /**
1370
+ * Get a `DocumentReference` for the document within the collection at the
1371
+ * specified path.
1372
+ *
1373
+ * @param documentPath A slash-separated path to a document.
1374
+ * @return The `DocumentReference` instance.
1375
+ */
1376
+ doc(documentPath: string): DocumentReference<T>;
1377
+ /**
1378
+ * Add a new document to this collection with the specified data, assigning
1379
+ * it a document ID automatically.
1380
+ *
1381
+ * @param data An Object containing the data for the new document.
1382
+ * @return A Promise resolved with a `DocumentReference` pointing to the
1383
+ * newly created document after it has been written to the backend.
1384
+ */
1385
+ add(data: T): Promise<DocumentReference<T>>;
1386
+ /**
1387
+ * Returns true if this `CollectionReference` is equal to the provided one.
1388
+ *
1389
+ * @param other The `CollectionReference` to compare against.
1390
+ * @return true if this `CollectionReference` is equal to the provided one.
1391
+ */
1392
+ isEqual(other: CollectionReference<T>): boolean;
1393
+ /**
1394
+ * Applies a custom data converter to this CollectionReference, allowing you
1395
+ * to use your own custom model objects with Firestore. When you call add()
1396
+ * on the returned CollectionReference instance, the provided converter will
1397
+ * convert between Firestore data and your custom type U.
1398
+ *
1399
+ * @param converter Converts objects to and from Firestore. Passing in
1400
+ * `null` removes the current converter.
1401
+ * @return A CollectionReference<U> that uses the provided converter.
1402
+ */
1403
+ withConverter<U>(converter: FirestoreDataConverter<U>): CollectionReference<U>;
1404
+ withConverter(converter: null): CollectionReference<DocumentData>;
1405
+ }
1406
+ /**
1407
+ * A `CollectionGroup` refers to all documents that are contained in a
1408
+ * collection or subcollection with a specific collection ID.
1409
+ */
1410
+ export declare class CollectionGroup<T = DocumentData> extends Query<T> {
1411
+ private constructor();
1412
+ /**
1413
+ * Partitions a query by returning partition cursors that can be used to run
1414
+ * the query in parallel. The returned cursors are split points that can be
1415
+ * used as starting and end points for individual query invocations.
1416
+ *
1417
+ * @param desiredPartitionCount The desired maximum number of partition
1418
+ * points. The number must be strictly positive. The actual number of
1419
+ * partitions returned may be fewer.
1420
+ * @return An AsyncIterable of `QueryPartition`s.
1421
+ */
1422
+ getPartitions(desiredPartitionCount: number): AsyncIterable<QueryPartition<T>>;
1423
+ /**
1424
+ * Applies a custom data converter to this `CollectionGroup`, allowing you
1425
+ * to use your own custom model objects with Firestore. When you call get()
1426
+ * on the returned `CollectionGroup`, the provided converter will convert
1427
+ * between Firestore data and your custom type U.
1428
+ *
1429
+ * Using the converter allows you to specify generic type arguments when
1430
+ * storing and retrieving objects from Firestore.
1431
+ *
1432
+ * @example
1433
+ * class Post {
1434
+ * constructor(readonly title: string, readonly author: string) {}
1435
+ *
1436
+ * toString(): string {
1437
+ * return this.title + ', by ' + this.author;
1438
+ * }
1439
+ * }
1440
+ *
1441
+ * const postConverter = {
1442
+ * toFirestore(post: Post): FirebaseFirestore.DocumentData {
1443
+ * return {title: post.title, author: post.author};
1444
+ * },
1445
+ * fromFirestore(
1446
+ * snapshot: FirebaseFirestore.QueryDocumentSnapshot
1447
+ * ): Post {
1448
+ * const data = snapshot.data();
1449
+ * return new Post(data.title, data.author);
1450
+ * }
1451
+ * };
1452
+ *
1453
+ * const querySnapshot = await Firestore()
1454
+ * .collectionGroup('posts')
1455
+ * .withConverter(postConverter)
1456
+ * .get();
1457
+ * for (const doc of querySnapshot.docs) {
1458
+ * const post = doc.data();
1459
+ * post.title; // string
1460
+ * post.toString(); // Should be defined
1461
+ * post.someNonExistentProperty; // TS error
1462
+ * }
1463
+ *
1464
+ * @param converter Converts objects to and from Firestore. Passing in
1465
+ * `null` removes the current converter.
1466
+ * @return A `CollectionGroup<U>` that uses the provided converter.
1467
+ */
1468
+ withConverter<U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>;
1469
+ withConverter(converter: null): CollectionGroup<DocumentData>;
1470
+ }
1471
+ /**
1472
+ * A split point that can be used in a query as a starting and/or end point for
1473
+ * the query results. The cursors returned by {@link #startAt} and {@link
1474
+ * #endBefore} can only be used in a query that matches the constraint of query
1475
+ * that produced this partition.
1476
+ */
1477
+ export declare class QueryPartition<T = DocumentData> {
1478
+ private constructor();
1479
+ /**
1480
+ * The cursor that defines the first result for this partition or
1481
+ * `undefined` if this is the first partition. The cursor value must be
1482
+ * destructured when passed to `startAt()` (for example with
1483
+ * `query.startAt(...queryPartition.startAt)`).
1484
+ *
1485
+ * @return Cursor values that can be used with {@link Query#startAt} or
1486
+ * `undefined` if this is the first partition.
1487
+ */
1488
+ get startAt(): unknown[] | undefined;
1489
+ /**
1490
+ * The cursor that defines the first result after this partition or
1491
+ * `undefined` if this is the last partition. The cursor value must be
1492
+ * destructured when passed to `endBefore()` (for example with
1493
+ * `query.endBefore(...queryPartition.endBefore)`).
1494
+ *
1495
+ * @return Cursor values that can be used with {@link Query#endBefore} or
1496
+ * `undefined` if this is the last partition.
1497
+ */
1498
+ get endBefore(): unknown[] | undefined;
1499
+ /**
1500
+ * Returns a query that only returns the documents for this partition.
1501
+ *
1502
+ * @return A query partitioned by a {@link Query#startAt} and {@link
1503
+ * Query#endBefore} cursor.
1504
+ */
1505
+ toQuery(): Query<T>;
1506
+ }
1507
+ /**
1508
+ * Sentinel values that can be used when writing document fields with set(),
1509
+ * create() or update().
1510
+ */
1511
+ export declare class FieldValue {
1512
+ private constructor();
1513
+ /**
1514
+ * Returns a sentinel used with set(), create() or update() to include a
1515
+ * server-generated timestamp in the written data.
1516
+ *
1517
+ * @return The FieldValue sentinel for use in a call to set(), create() or
1518
+ * update().
1519
+ */
1520
+ static serverTimestamp(): FieldValue;
1521
+ /**
1522
+ * Returns a sentinel for use with update() or set() with {merge:true} to
1523
+ * mark a field for deletion.
1524
+ *
1525
+ * @return The FieldValue sentinel for use in a call to set() or update().
1526
+ */
1527
+ static delete(): FieldValue;
1528
+ /**
1529
+ * Returns a special value that can be used with set(), create() or update()
1530
+ * that tells the server to increment the field's current value by the given
1531
+ * value.
1532
+ *
1533
+ * If either current field value or the operand uses floating point
1534
+ * precision, both values will be interpreted as floating point numbers and
1535
+ * all arithmetic will follow IEEE 754 semantics. Otherwise, integer
1536
+ * precision is kept and the result is capped between -2^63 and 2^63-1.
1537
+ *
1538
+ * If the current field value is not of type 'number', or if the field does
1539
+ * not yet exist, the transformation will set the field to the given value.
1540
+ *
1541
+ * @param n The value to increment by.
1542
+ * @return The FieldValue sentinel for use in a call to set(), create() or
1543
+ * update().
1544
+ */
1545
+ static increment(n: number): FieldValue;
1546
+ /**
1547
+ * Returns a special value that can be used with set(), create() or update()
1548
+ * that tells the server to union the given elements with any array value
1549
+ * that already exists on the server. Each specified element that doesn't
1550
+ * already exist in the array will be added to the end. If the field being
1551
+ * modified is not already an array it will be overwritten with an array
1552
+ * containing exactly the specified elements.
1553
+ *
1554
+ * @param elements The elements to union into the array.
1555
+ * @return The FieldValue sentinel for use in a call to set(), create() or
1556
+ * update().
1557
+ */
1558
+ static arrayUnion(...elements: any[]): FieldValue;
1559
+ /**
1560
+ * Returns a special value that can be used with set(), create() or update()
1561
+ * that tells the server to remove the given elements from any array value
1562
+ * that already exists on the server. All instances of each element
1563
+ * specified will be removed from the array. If the field being modified is
1564
+ * not already an array it will be overwritten with an empty array.
1565
+ *
1566
+ * @param elements The elements to remove from the array.
1567
+ * @return The FieldValue sentinel for use in a call to set(), create() or
1568
+ * update().
1569
+ */
1570
+ static arrayRemove(...elements: any[]): FieldValue;
1571
+ /**
1572
+ * Returns true if this `FieldValue` is equal to the provided one.
1573
+ *
1574
+ * @param other The `FieldValue` to compare against.
1575
+ * @return true if this `FieldValue` is equal to the provided one.
1576
+ */
1577
+ isEqual(other: FieldValue): boolean;
1578
+ }
1579
+ /**
1580
+ * A FieldPath refers to a field in a document. The path may consist of a
1581
+ * single field name (referring to a top-level field in the document), or a
1582
+ * list of field names (referring to a nested field in the document).
1583
+ */
1584
+ export declare class FieldPath {
1585
+ /**
1586
+ * Creates a FieldPath from the provided field names. If more than one field
1587
+ * name is provided, the path will point to a nested field in a document.
1588
+ *
1589
+ * @param fieldNames A list of field names.
1590
+ */
1591
+ constructor(...fieldNames: string[]);
1592
+ /**
1593
+ * Returns a special sentinel FieldPath to refer to the ID of a document.
1594
+ * It can be used in queries to sort or filter by the document ID.
1595
+ */
1596
+ static documentId(): FieldPath;
1597
+ /**
1598
+ * Returns true if this `FieldPath` is equal to the provided one.
1599
+ *
1600
+ * @param other The `FieldPath` to compare against.
1601
+ * @return true if this `FieldPath` is equal to the provided one.
1602
+ */
1603
+ isEqual(other: FieldPath): boolean;
1604
+ }
1605
+ /**
1606
+ * A Timestamp represents a point in time independent of any time zone or
1607
+ * calendar, represented as seconds and fractions of seconds at nanosecond
1608
+ * resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian
1609
+ * Calendar which extends the Gregorian calendar backwards to year one. It is
1610
+ * encoded assuming all minutes are 60 seconds long, i.e. leap seconds are
1611
+ * "smeared" so that no leap second table is needed for interpretation. Range
1612
+ * is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
1613
+ *
1614
+ * @see https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto
1615
+ */
1616
+ export declare class Timestamp {
1617
+ /**
1618
+ * Creates a new timestamp with the current date, with millisecond precision.
1619
+ *
1620
+ * @return A new `Timestamp` representing the current date.
1621
+ */
1622
+ static now(): Timestamp;
1623
+ /**
1624
+ * Creates a new timestamp from the given date.
1625
+ *
1626
+ * @param date The date to initialize the `Timestamp` from.
1627
+ * @return A new `Timestamp` representing the same point in time as the
1628
+ * given date.
1629
+ */
1630
+ static fromDate(date: Date): Timestamp;
1631
+ /**
1632
+ * Creates a new timestamp from the given number of milliseconds.
1633
+ *
1634
+ * @param milliseconds Number of milliseconds since Unix epoch
1635
+ * 1970-01-01T00:00:00Z.
1636
+ * @return A new `Timestamp` representing the same point in time as the
1637
+ * given number of milliseconds.
1638
+ */
1639
+ static fromMillis(milliseconds: number): Timestamp;
1640
+ /**
1641
+ * Creates a new timestamp.
1642
+ *
1643
+ * @param seconds The number of seconds of UTC time since Unix epoch
1644
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
1645
+ * 9999-12-31T23:59:59Z inclusive.
1646
+ * @param nanoseconds The non-negative fractions of a second at nanosecond
1647
+ * resolution. Negative second values with fractions must still have
1648
+ * non-negative nanoseconds values that count forward in time. Must be from
1649
+ * 0 to 999,999,999 inclusive.
1650
+ */
1651
+ constructor(seconds: number, nanoseconds: number);
1652
+ /**
1653
+ * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
1654
+ */
1655
+ readonly seconds: number;
1656
+ /** The non-negative fractions of a second at nanosecond resolution. */
1657
+ readonly nanoseconds: number;
1658
+ /**
1659
+ * Returns a new `Date` corresponding to this timestamp. This may lose
1660
+ * precision.
1661
+ *
1662
+ * @return JavaScript `Date` object representing the same point in time as
1663
+ * this `Timestamp`, with millisecond precision.
1664
+ */
1665
+ toDate(): Date;
1666
+ /**
1667
+ * Returns the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.
1668
+ *
1669
+ * @return The point in time corresponding to this timestamp, represented as
1670
+ * the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.
1671
+ */
1672
+ toMillis(): number;
1673
+ /**
1674
+ * Returns true if this `Timestamp` is equal to the provided one.
1675
+ *
1676
+ * @param other The `Timestamp` to compare against.
1677
+ * @return 'true' if this `Timestamp` is equal to the provided one.
1678
+ */
1679
+ isEqual(other: Timestamp): boolean;
1680
+ /**
1681
+ * Converts this object to a primitive `string`, which allows `Timestamp` objects to be compared
1682
+ * using the `>`, `<=`, `>=` and `>` operators.
1683
+ *
1684
+ * @return a string encoding of this object.
1685
+ */
1686
+ valueOf(): string;
1687
+ }
1688
+ /**
1689
+ * Builds a Firestore data bundle with results from the given document and query snapshots.
1690
+ */
1691
+ export declare class BundleBuilder {
1692
+ /** The ID of this bundle. */
1693
+ readonly bundleId: string;
1694
+ /**
1695
+ * Adds a Firestore `DocumentSnapshot` to the bundle. Both the documents data and the document
1696
+ * read time will be included in the bundle.
1697
+ *
1698
+ * @param documentSnapshot A `DocumentSnapshot` to add.
1699
+ * @returns This instance.
1700
+ */
1701
+ add<T>(documentSnapshot: DocumentSnapshot<T>): BundleBuilder;
1702
+ /**
1703
+ * Adds a Firestore `QuerySnapshot` to the bundle. Both the documents in the query results and
1704
+ * the query read time will be included in the bundle.
1705
+ *
1706
+ * @param queryName The name of the query to add.
1707
+ * @param querySnapshot A `QuerySnapshot` to add to the bundle.
1708
+ * @returns This instance.
1709
+ */
1710
+ add<T>(queryName: string, querySnapshot: QuerySnapshot<T>): BundleBuilder;
1711
+ /**
1712
+ * Builds the bundle and returns the result as a `Buffer` instance.
1713
+ */
1714
+ build(): Buffer;
1715
+ }
1716
+ /**
1717
+ * The v1beta1 Veneer client. This client provides access to to the underlying
1718
+ * Firestore v1beta1 RPCs.
1719
+ * @deprecated Use v1 instead.
1720
+ */
1721
+ /**
1722
+ * The v1 Veneer clients. These clients provide access to the Firestore Admin
1723
+ * API and the underlying Firestore v1 RPCs.
1724
+ */
1725
+ /**
1726
+ * Status codes returned by Firestore's gRPC calls.
1727
+ */
1728
+ export declare enum GrpcStatus {
1729
+ OK = 0,
1730
+ CANCELLED = 1,
1731
+ UNKNOWN = 2,
1732
+ INVALID_ARGUMENT = 3,
1733
+ DEADLINE_EXCEEDED = 4,
1734
+ NOT_FOUND = 5,
1735
+ ALREADY_EXISTS = 6,
1736
+ PERMISSION_DENIED = 7,
1737
+ RESOURCE_EXHAUSTED = 8,
1738
+ FAILED_PRECONDITION = 9,
1739
+ ABORTED = 10,
1740
+ OUT_OF_RANGE = 11,
1741
+ UNIMPLEMENTED = 12,
1742
+ INTERNAL = 13,
1743
+ UNAVAILABLE = 14,
1744
+ DATA_LOSS = 15,
1745
+ UNAUTHENTICATED = 16
1746
+ }