@glissandoo/lib 1.121.0 → 1.123.0-dev.210.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 (364) hide show
  1. package/functions/auth.d.ts +3 -1
  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 +4 -0
  7. package/functions/event.js +1 -1
  8. package/functions/eventPlayer.js +1 -1
  9. package/functions/eventRepertory.d.ts +2 -0
  10. package/functions/eventRepertory.js +1 -1
  11. package/functions/eventoPayout.d.ts +15 -2
  12. package/functions/groupPayment.d.ts +6 -0
  13. package/functions/groupRepertory.d.ts +110 -0
  14. package/functions/index.d.ts +32 -0
  15. package/functions/index.js +33 -1
  16. package/functions/misc.d.ts +6 -0
  17. package/functions/regions.js +33 -1
  18. package/helpers/appScenes.js +1 -1
  19. package/helpers/auth.d.ts +2 -9
  20. package/helpers/auth.js +33 -14
  21. package/helpers/badges.js +1 -1
  22. package/helpers/catalogBridge.d.ts +121 -0
  23. package/helpers/catalogBridge.js +95 -0
  24. package/helpers/collections.js +2 -2
  25. package/helpers/communicationTemplate/index.d.ts +3 -2
  26. package/helpers/communicationTemplate/index.js +5 -5
  27. package/helpers/compositionCategories/genres.d.ts +922 -0
  28. package/helpers/compositionCategories/genres.js +940 -0
  29. package/helpers/compositionCategories/index.d.ts +2 -0
  30. package/helpers/compositionCategories/index.js +18 -0
  31. package/helpers/compositionCategories/styles.d.ts +181 -0
  32. package/helpers/compositionCategories/styles.js +197 -0
  33. package/helpers/compositionSoloistOffstageParts/index.d.ts +34 -0
  34. package/helpers/compositionSoloistOffstageParts/index.js +117 -0
  35. package/helpers/currency.d.ts +19 -0
  36. package/helpers/currency.js +71 -2
  37. package/helpers/currencyConversion.d.ts +45 -0
  38. package/helpers/currencyConversion.js +119 -0
  39. package/helpers/dataStructures/trees/index.d.ts +12 -0
  40. package/helpers/dataStructures/trees/index.js +71 -0
  41. package/helpers/dataStructures/trees/types.d.ts +14 -0
  42. package/helpers/dataStructures/trees/types.js +5 -0
  43. package/helpers/dlinks.js +1 -1
  44. package/helpers/errors.d.ts +1 -0
  45. package/helpers/errors.js +2 -1
  46. package/helpers/externalUrls.d.ts +12 -0
  47. package/helpers/externalUrls.js +40 -0
  48. package/helpers/instruments/index.d.ts +17 -0
  49. package/helpers/instruments/index.js +5 -1
  50. package/helpers/instruments/lists.d.ts +3 -3
  51. package/helpers/instruments/lists.js +5 -5
  52. package/helpers/musicStyles/index.d.ts +22 -4
  53. package/helpers/musicStyles/index.js +114 -35
  54. package/helpers/notifications/index.js +1 -1
  55. package/helpers/objects.d.ts +5 -1
  56. package/helpers/objects.js +7 -6
  57. package/helpers/paymentForecast.d.ts +15 -9
  58. package/helpers/paymentForecast.js +10 -11
  59. package/helpers/payoutRules.js +3 -4
  60. package/helpers/plans.js +2 -2
  61. package/helpers/rates.d.ts +1 -1
  62. package/helpers/slate.d.ts +64 -5
  63. package/helpers/slate.js +7 -1
  64. package/helpers/ts-extras/array-includes.js +1 -2
  65. package/helpers/ts-extras/as-mutable.js +1 -2
  66. package/helpers/ts-extras/assert-error.js +1 -2
  67. package/helpers/ts-extras/index.js +1 -1
  68. package/helpers/ts-extras/is-defined.js +1 -2
  69. package/helpers/ts-extras/is-empty.js +1 -2
  70. package/helpers/ts-extras/is-infinite.js +1 -2
  71. package/helpers/ts-extras/is-present.js +1 -2
  72. package/helpers/ts-extras/object-entries.d.ts +1 -1
  73. package/helpers/ts-extras/object-from-entries.d.ts +1 -1
  74. package/helpers/ts-extras/object-has-own.js +1 -2
  75. package/helpers/ts-extras/object-keys.d.ts +1 -1
  76. package/helpers/ts-extras/object-keys.js +0 -1
  77. package/helpers/ts-extras/set-has.js +1 -2
  78. package/helpers/types.d.ts +26 -0
  79. package/helpers/types.js +26 -6
  80. package/lang/ca.json +325 -91
  81. package/lang/de.json +325 -91
  82. package/lang/en.json +325 -91
  83. package/lang/es.json +325 -91
  84. package/lang/eu.json +325 -91
  85. package/lang/fr.json +325 -91
  86. package/lang/gl.json +325 -91
  87. package/lang/index.js +3 -2
  88. package/lang/it.json +325 -91
  89. package/lang/nl.json +325 -91
  90. package/lang/pt.json +325 -91
  91. package/models/Communication/types.d.ts +0 -16
  92. package/models/Communication/types.js +3 -9
  93. package/models/CompositionGenre/index.d.ts +9 -0
  94. package/models/CompositionGenre/index.js +16 -0
  95. package/models/CompositionStyle/index.d.ts +9 -0
  96. package/models/CompositionStyle/index.js +16 -0
  97. package/models/Counters/Group/Analytics/types.js +1 -1
  98. package/models/Customer/index.d.ts +1 -1
  99. package/models/Customer/index.js +3 -3
  100. package/models/Customer/types.js +1 -1
  101. package/models/Evento/Player/types.js +3 -3
  102. package/models/Evento/Repertory/types.d.ts +2 -1
  103. package/models/Evento/index.d.ts +3 -2
  104. package/models/Evento/index.js +5 -4
  105. package/models/Evento/types.d.ts +16 -35
  106. package/models/Evento/types.js +9 -41
  107. package/models/Federation/index.d.ts +1 -1
  108. package/models/Federation/index.js +3 -3
  109. package/models/Group/Analytics/types.js +1 -1
  110. package/models/Group/Payment/supabase.js +3 -3
  111. package/models/Group/Payment/types.d.ts +48 -0
  112. package/models/Group/Payment/types.js +17 -5
  113. package/models/Group/Player/types.js +1 -1
  114. package/models/Group/Repertory/File/Section/index.d.ts +3 -3
  115. package/models/Group/Repertory/File/Section/index.js +3 -2
  116. package/models/Group/Repertory/File/Section/types.d.ts +7 -0
  117. package/models/Group/Repertory/File/Section/types.js +1 -1
  118. package/models/Group/Repertory/File/index.d.ts +4 -2
  119. package/models/Group/Repertory/File/index.js +4 -4
  120. package/models/Group/Repertory/FilePath/index.d.ts +3 -4
  121. package/models/Group/Repertory/index.d.ts +12 -4
  122. package/models/Group/Repertory/index.js +9 -0
  123. package/models/Group/Repertory/types.d.ts +21 -32
  124. package/models/Group/Repertory/types.js +8 -18
  125. package/models/Group/index.d.ts +7 -2
  126. package/models/Group/index.js +30 -14
  127. package/models/Group/types.d.ts +2 -21
  128. package/models/Group/types.js +14 -33
  129. package/models/Instrument/fromRecord.d.ts +11 -0
  130. package/models/Instrument/fromRecord.js +33 -0
  131. package/models/Instrument/index.d.ts +2 -0
  132. package/models/Instrument/index.js +38 -1
  133. package/models/Inventory/Item/types.js +2 -2
  134. package/models/Inventory/types.js +1 -1
  135. package/models/Notification/types.js +2 -2
  136. package/models/Offer/types.d.ts +0 -12
  137. package/models/Offer/types.js +2 -15
  138. package/models/Partnership/Communication/supabase.js +2 -2
  139. package/models/Partnership/Group/index.d.ts +2 -1
  140. package/models/Partnership/Group/index.js +15 -3
  141. package/models/Partnership/Group/supabase.js +2 -2
  142. package/models/Partnership/Partner/supabase.js +2 -2
  143. package/models/Partnership/Partner/types.js +1 -1
  144. package/models/Partnership/Payment/supabase.js +3 -3
  145. package/models/Partnership/Payment/types.js +2 -2
  146. package/models/Partnership/Plan/supabase.js +2 -2
  147. package/models/Partnership/SepaPaymentGroup/supabase.js +2 -2
  148. package/models/Partnership/Subscription/supabase.js +2 -2
  149. package/models/Partnership/index.d.ts +1 -0
  150. package/models/Partnership/index.js +4 -0
  151. package/models/Partnership/types.js +1 -1
  152. package/models/Repertory/types.d.ts +12 -0
  153. package/models/Repertory/types.js +2 -2
  154. package/models/User/Group/index.js +1 -2
  155. package/models/User/index.d.ts +1 -1
  156. package/models/User/index.js +3 -3
  157. package/models/User/types.d.ts +2 -1
  158. package/models/User/types.js +7 -7
  159. package/models/WebhookEvent/types.js +1 -1
  160. package/models/supabase/Comm/index.d.ts +24 -0
  161. package/models/supabase/Comm/index.js +68 -0
  162. package/models/supabase/Comm/types.d.ts +6 -0
  163. package/models/supabase/CommHistory/index.d.ts +22 -0
  164. package/models/supabase/CommHistory/index.js +37 -0
  165. package/models/supabase/CommHistory/types.d.ts +11 -0
  166. package/models/supabase/CommHistory/types.js +9 -0
  167. package/models/supabase/Composer/Composition/Acquisition/index.d.ts +4 -0
  168. package/models/supabase/Composer/Composition/Acquisition/index.js +9 -0
  169. package/models/supabase/Composer/Composition/Acquisition/types.d.ts +36 -0
  170. package/models/supabase/Composer/Composition/Favorite/index.d.ts +4 -0
  171. package/models/supabase/Composer/Composition/Favorite/index.js +9 -0
  172. package/models/supabase/Composer/Composition/Favorite/types.d.ts +6 -0
  173. package/models/supabase/Composer/Composition/View/index.d.ts +4 -0
  174. package/models/supabase/Composer/Composition/View/index.js +9 -0
  175. package/models/supabase/Composer/Composition/View/types.d.ts +6 -0
  176. package/models/supabase/Composer/Composition/index.d.ts +5284 -0
  177. package/models/supabase/Composer/Composition/index.js +166 -0
  178. package/models/supabase/Composer/Composition/types.d.ts +96 -0
  179. package/models/supabase/Composer/Composition/types.js +32 -0
  180. package/models/supabase/Composer/Notification/index.d.ts +4 -0
  181. package/models/supabase/Composer/Notification/index.js +9 -0
  182. package/models/supabase/Composer/Notification/types.d.ts +39 -0
  183. package/models/supabase/Composer/Notification/types.js +27 -0
  184. package/models/supabase/Composer/Payout/index.d.ts +4 -0
  185. package/models/supabase/Composer/Payout/index.js +9 -0
  186. package/models/supabase/Composer/Payout/status.d.ts +1 -0
  187. package/models/supabase/Composer/Payout/types.d.ts +5 -0
  188. package/models/supabase/Composer/PerformanceAttendance/types.d.ts +4 -0
  189. package/models/supabase/Composer/index.d.ts +78 -0
  190. package/models/supabase/Composer/index.js +105 -0
  191. package/models/supabase/Composer/types.d.ts +6 -0
  192. package/models/supabase/Composer/types.js +2 -0
  193. package/models/supabase/EventHistory/index.d.ts +22 -0
  194. package/models/supabase/EventHistory/index.js +37 -0
  195. package/models/supabase/EventHistory/types.d.ts +39 -0
  196. package/models/supabase/EventHistory/types.js +37 -0
  197. package/models/supabase/GroupHistory/index.d.ts +21 -0
  198. package/models/supabase/GroupHistory/index.js +34 -0
  199. package/models/supabase/GroupHistory/types.d.ts +27 -0
  200. package/models/supabase/GroupHistory/types.js +25 -0
  201. package/models/supabase/Model/index.d.ts +10 -0
  202. package/models/supabase/Model/index.js +21 -0
  203. package/models/supabase/OfferHistory/index.d.ts +22 -0
  204. package/models/supabase/OfferHistory/index.js +37 -0
  205. package/models/supabase/OfferHistory/types.d.ts +18 -0
  206. package/models/supabase/OfferHistory/types.js +16 -0
  207. package/models/supabase/Repertoire/index.d.ts +16 -0
  208. package/models/supabase/Repertoire/index.js +43 -0
  209. package/models/supabase/Repertoire/types.d.ts +6 -0
  210. package/models/supabase/Repertoire/types.js +2 -0
  211. package/models/supabase/RepertoireHistory/index.d.ts +22 -0
  212. package/models/supabase/RepertoireHistory/index.js +37 -0
  213. package/models/supabase/RepertoireHistory/types.d.ts +21 -0
  214. package/models/supabase/RepertoireHistory/types.js +19 -0
  215. package/models/supabase/User/Group/index.d.ts +11 -0
  216. package/models/supabase/User/Group/index.js +30 -0
  217. package/models/supabase/User/Group/types.d.ts +6 -0
  218. package/models/supabase/User/Group/types.js +2 -0
  219. package/models/supabase/User/index.d.ts +13 -0
  220. package/models/supabase/User/index.js +37 -0
  221. package/models/supabase/User/types.d.ts +6 -0
  222. package/models/supabase/User/types.js +2 -0
  223. package/package.json +16 -13
  224. package/types/firestore.d.ts +0 -1
  225. package/types/firestore.js +1 -1
  226. package/types/payoutRule.js +3 -3
  227. package/types/supabase/catalog.d.ts +46 -0
  228. package/types/supabase/catalog.js +2 -0
  229. package/types/supabase/catalog.ts +67 -0
  230. package/types/supabase/composerMetrics.d.ts +27 -0
  231. package/types/supabase/composerMetrics.js +2 -0
  232. package/types/supabase/composerMetrics.ts +26 -0
  233. package/types/supabase/generated.d.ts +3488 -935
  234. package/types/supabase/generated.js +9 -0
  235. package/types/supabase/generated.ts +3468 -986
  236. package/types/supabase/index.d.ts +155 -19
  237. package/types/supabase/index.js +15 -0
  238. package/types/supabase/index.ts +288 -21
  239. package/types/supabase/overwrites/index.d.ts +1 -1
  240. package/types/supabase/overwrites/index.ts +1 -1
  241. package/types/supabase/overwrites/tables/comm/model.d.ts +4 -0
  242. package/types/supabase/overwrites/tables/comm/model.js +2 -0
  243. package/types/supabase/overwrites/tables/comm/model.ts +4 -0
  244. package/types/supabase/overwrites/tables/comm_history/index.d.ts +7 -0
  245. package/types/supabase/overwrites/tables/comm_history/index.js +2 -0
  246. package/types/supabase/overwrites/tables/comm_history/index.ts +9 -0
  247. package/types/supabase/overwrites/tables/comm_history/model.d.ts +10 -0
  248. package/types/supabase/overwrites/tables/comm_history/model.js +2 -0
  249. package/types/supabase/overwrites/tables/comm_history/model.ts +13 -0
  250. package/types/supabase/overwrites/tables/common/index.js +2 -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/{event.d.ts → tables/event/index.d.ts} +1 -1
  300. package/types/supabase/overwrites/tables/event/index.js +2 -0
  301. package/types/supabase/overwrites/{event.ts → tables/event/index.ts} +1 -1
  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/{group.d.ts → tables/group/index.d.ts} +2 -5
  309. package/types/supabase/overwrites/tables/group/index.js +2 -0
  310. package/types/supabase/overwrites/{group.ts → tables/group/index.ts} +2 -6
  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/{offer.d.ts → tables/offer/index.d.ts} +6 -2
  318. package/types/supabase/overwrites/tables/offer/index.js +2 -0
  319. package/types/supabase/overwrites/{offer.ts → tables/offer/index.ts} +7 -2
  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/types/supabase/overwrites/comm.d.ts +0 -18
  339. package/types/supabase/overwrites/comm.ts +0 -18
  340. package/types/supabase/overwrites/comm_history.d.ts +0 -10
  341. package/types/supabase/overwrites/comm_history.ts +0 -10
  342. package/types/supabase/overwrites/event_history.d.ts +0 -10
  343. package/types/supabase/overwrites/event_history.ts +0 -10
  344. package/types/supabase/overwrites/group_history.d.ts +0 -9
  345. package/types/supabase/overwrites/group_history.ts +0 -9
  346. package/types/supabase/overwrites/offer_history.d.ts +0 -10
  347. package/types/supabase/overwrites/offer_history.ts +0 -10
  348. package/types/supabase/overwrites/repertoire.d.ts +0 -12
  349. package/types/supabase/overwrites/repertoire.ts +0 -12
  350. package/types/supabase/overwrites/repertoire_history.d.ts +0 -10
  351. package/types/supabase/overwrites/repertoire_history.ts +0 -10
  352. /package/{types/supabase/overwrites/comm.js → functions/composer.js} +0 -0
  353. /package/{types/supabase/overwrites/comm_history.js → functions/composerComposition.js} +0 -0
  354. /package/{types/supabase/overwrites/event.js → functions/composerNotification.js} +0 -0
  355. /package/{types/supabase/overwrites/event_history.js → functions/composerPayout.js} +0 -0
  356. /package/{types/supabase/overwrites/group.js → models/supabase/Comm/types.js} +0 -0
  357. /package/{types/supabase/overwrites/group_history.js → models/supabase/Composer/Composition/Acquisition/types.js} +0 -0
  358. /package/{types/supabase/overwrites/offer.js → models/supabase/Composer/Composition/Favorite/types.js} +0 -0
  359. /package/{types/supabase/overwrites/offer_history.js → models/supabase/Composer/Composition/View/types.js} +0 -0
  360. /package/{types/supabase/overwrites/repertoire.js → models/supabase/Composer/Payout/status.js} +0 -0
  361. /package/{types/supabase/overwrites/repertoire_history.js → models/supabase/Composer/Payout/types.js} +0 -0
  362. /package/{types/supabase/overwrites/utils.js → models/supabase/Composer/PerformanceAttendance/types.js} +0 -0
  363. /package/types/supabase/overwrites/{utils.d.ts → tables/common/index.d.ts} +0 -0
  364. /package/types/supabase/overwrites/{utils.ts → tables/common/index.ts} +0 -0
@@ -95,6 +95,15 @@ class GroupRepertory extends basic_1.default {
95
95
  get lastEventDatetime() {
96
96
  return this.data.lastEventDatetime || null;
97
97
  }
98
+ get sourceComposition() {
99
+ return this.data.sourceComposition || null;
100
+ }
101
+ get acquisitionStatus() {
102
+ return this.data.acquisitionStatus || null;
103
+ }
104
+ get isFromComposer() {
105
+ return !!this.data.sourceComposition;
106
+ }
98
107
  get claims() {
99
108
  return this.data.claims || {};
100
109
  }
@@ -1,23 +1,10 @@
1
1
  import { DocumentReference, Timestamp } from '@google-cloud/firestore';
2
2
  import { InstrumentId } from '../../../helpers/instruments';
3
3
  import { EventTinyData } from '../../Evento/types';
4
- import { ThemeBasicData } from '../../Repertory/types';
5
- import { FileSectionId } from './File/Section/types';
6
- export declare enum RepertoireHistoryAction {
7
- Created = "created",
8
- Deleted = "deleted",
9
- PlayerPlay = "player_play",
10
- PlayerView = "player_view",
11
- PlayerDownload = "player_download",
12
- PlayerDownloadAll = "player_download_all",
13
- PlayerClaim = "player_claim",
14
- RemovedClaim = "removed_claim",
15
- EditTitle = "edit_title",
16
- EditTags = "edit_tags",
17
- EditVisibility = "edit_visibility",
18
- EditCompositor = "edit_compositor",
19
- EditFile = "edit_file"
20
- }
4
+ import { BaseRepertoireFile, RepertoireFileId, SourceComposition, ThemeBasicData } from '../../Repertory/types';
5
+ import { FileSectionId, SectionArrayRecordByTags, SectionRecord } from './File/Section/types';
6
+ import { UserId } from '../../User/types';
7
+ export type { SourceComposition } from '../../Repertory/types';
21
8
  export declare enum GroupRepertoireVisibility {
22
9
  Always = "always",
23
10
  ByEvent = "byEvent"
@@ -50,33 +37,34 @@ export interface GroupRepertoireScoreFilePage {
50
37
  export interface AGroupRepertoireScoreFilePage extends GroupRepertoireScoreFilePage {
51
38
  id: FileSectionId;
52
39
  }
53
- type PageNumber = string;
54
- type FileId = string;
55
- type UserId = string;
40
+ export type RepertoirePageNumber = string;
56
41
  export interface GroupRepertoireFileSections {
57
42
  tags?: string[];
58
- pages?: Record<PageNumber, GroupRepertoireScoreFilePage>;
43
+ pages?: Record<RepertoirePageNumber, GroupRepertoireScoreFilePage>;
59
44
  }
60
- export interface GroupRepertoireFile {
61
- readonly path: string;
62
- readonly filetype: string;
63
- readonly uploadedAt: number;
45
+ export interface GroupRepertoireFile extends BaseRepertoireFile {
64
46
  readonly pageCount: number | null;
65
47
  readonly isEncrypted: boolean;
66
48
  identifyAt: number | null;
67
- sections: Partial<Record<FileSectionId, GroupRepertoireFileSections>>;
49
+ sections: SectionRecord<GroupRepertoireFileSections>;
68
50
  }
69
- export interface GroupRepertoireFilePathItem {
51
+ export type GroupRepertoireFilePath = SectionArrayRecordByTags<{
70
52
  path: string;
71
- tag: string;
72
- }
53
+ }>;
54
+ export type GroupRepertoireFilePathItem = NonNullable<GroupRepertoireFilePath[keyof GroupRepertoireFilePath]>[number];
73
55
  export type VoteValue = 1 | 2 | 3 | 4;
56
+ export type { AcquiredProduct, AcquiredProductsMap, } from '../../supabase/Composer/Composition/Acquisition/types';
57
+ export declare enum AcquisitionStatus {
58
+ Preparing = "preparing",
59
+ ActionsNeeded = "actionsNeeded",
60
+ Ready = "ready"
61
+ }
74
62
  export interface GroupRepertoryData extends ThemeBasicData {
75
63
  events: string[];
76
64
  eventsTL: Record<string, EventTinyData>;
77
65
  tagsAlgolia: GroupRepertoryTagAlgoliaData[];
78
- files: Record<FileId, GroupRepertoireFile>;
79
- filesPath: Partial<Record<FileSectionId, GroupRepertoireFilePathItem[]>>;
66
+ files: Record<RepertoireFileId, GroupRepertoireFile>;
67
+ filesPath: GroupRepertoireFilePath;
80
68
  votes: Record<string, VoteValue>;
81
69
  thumbnailURL: string | null;
82
70
  editedAt: Timestamp | null;
@@ -85,7 +73,8 @@ export interface GroupRepertoryData extends ThemeBasicData {
85
73
  lastEventDatetime: Timestamp | null;
86
74
  claims: Partial<Record<InstrumentId, Record<UserId, GroupRepertoryClaimType>>>;
87
75
  clonedFrom: DocumentReference | null;
76
+ sourceComposition?: SourceComposition | null;
77
+ acquisitionStatus?: AcquisitionStatus | null;
88
78
  readonly owner: DocumentReference;
89
79
  readonly createdAt: Timestamp;
90
80
  }
91
- export {};
@@ -1,24 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GroupRepertoireVisibility = exports.RepertoireHistoryAction = void 0;
4
- var RepertoireHistoryAction;
5
- (function (RepertoireHistoryAction) {
6
- RepertoireHistoryAction["Created"] = "created";
7
- RepertoireHistoryAction["Deleted"] = "deleted";
8
- RepertoireHistoryAction["PlayerPlay"] = "player_play";
9
- RepertoireHistoryAction["PlayerView"] = "player_view";
10
- RepertoireHistoryAction["PlayerDownload"] = "player_download";
11
- RepertoireHistoryAction["PlayerDownloadAll"] = "player_download_all";
12
- RepertoireHistoryAction["PlayerClaim"] = "player_claim";
13
- RepertoireHistoryAction["RemovedClaim"] = "removed_claim";
14
- RepertoireHistoryAction["EditTitle"] = "edit_title";
15
- RepertoireHistoryAction["EditTags"] = "edit_tags";
16
- RepertoireHistoryAction["EditVisibility"] = "edit_visibility";
17
- RepertoireHistoryAction["EditCompositor"] = "edit_compositor";
18
- RepertoireHistoryAction["EditFile"] = "edit_file";
19
- })(RepertoireHistoryAction = exports.RepertoireHistoryAction || (exports.RepertoireHistoryAction = {}));
3
+ exports.AcquisitionStatus = exports.GroupRepertoireVisibility = void 0;
20
4
  var GroupRepertoireVisibility;
21
5
  (function (GroupRepertoireVisibility) {
22
6
  GroupRepertoireVisibility["Always"] = "always";
23
7
  GroupRepertoireVisibility["ByEvent"] = "byEvent";
24
- })(GroupRepertoireVisibility = exports.GroupRepertoireVisibility || (exports.GroupRepertoireVisibility = {}));
8
+ })(GroupRepertoireVisibility || (exports.GroupRepertoireVisibility = GroupRepertoireVisibility = {}));
9
+ var AcquisitionStatus;
10
+ (function (AcquisitionStatus) {
11
+ AcquisitionStatus["Preparing"] = "preparing";
12
+ AcquisitionStatus["ActionsNeeded"] = "actionsNeeded";
13
+ AcquisitionStatus["Ready"] = "ready";
14
+ })(AcquisitionStatus || (exports.AcquisitionStatus = AcquisitionStatus = {}));
@@ -1,4 +1,5 @@
1
1
  import { DocumentReference } from '@google-cloud/firestore';
2
+ import { CustomInstrumentId } from '../../helpers/instruments';
2
3
  import { PlansGroup } from '../../helpers/plans';
3
4
  import { LanguagesTypes } from '../../lang';
4
5
  import { GroupPayoutRuleEntry } from '../../types/payoutRule';
@@ -17,8 +18,10 @@ export default class Group extends GroupBasic<GroupData> {
17
18
  get addressDefault(): import("./types").GroupAddressData | undefined;
18
19
  get activeInvitationLink(): boolean;
19
20
  get invitationLink(): string;
21
+ getInvitationLink(landingHost: string): string;
20
22
  get invitationEmails(): string[];
21
23
  get shortDynamicLink(): string;
24
+ getShortDynamicLink(appHost: string): string;
22
25
  get admins(): string[];
23
26
  get adminPermissions(): Record<string, AdminPermissions[]>;
24
27
  permissionsByAdmin(userId: string): AdminPermissions[];
@@ -89,18 +92,20 @@ export default class Group extends GroupBasic<GroupData> {
89
92
  getRepertoireTagName(id: string): string | null;
90
93
  get trialEndAt(): Date;
91
94
  get glissandooAdminUrl(): string;
95
+ getGlissandooAdminUrl(adminHost: string): string;
92
96
  get createdOn(): import("../../helpers/types").CreatedOn;
93
97
  get instruments(): import("./types").GroupInstruments;
94
98
  get instrumentsList(): AGroupInstrument[];
95
99
  get instrumentsIds(): (import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`)[];
96
- get customInstruments(): Record<`customInstrument-${string}`, CustomGroupInstrument>;
100
+ get customInstruments(): Record<CustomInstrumentId, CustomGroupInstrument>;
97
101
  get customInstrumentsList(): Pick<CustomGroupInstrument & {
98
102
  id: `customInstrument-${string}`;
99
- }, "name" | "id" | "icon" | "basedOnInstrument">[];
103
+ }, "id" | "name" | "icon" | "basedOnInstrument">[];
100
104
  get customInstrumentsIds(): `customInstrument-${string}`[];
101
105
  get visitedDashboardAt(): Record<string, FirebaseFirestore.Timestamp>;
102
106
  get onboardingMessages(): import("./types").GroupOnboardingMessage[];
103
107
  get rollcallLink(): string;
108
+ getRollcallLink(landingHost: string): string;
104
109
  get subscriptionId(): string | null;
105
110
  get questions(): Record<string, import("./types").GroupEventQuestion>;
106
111
  get questionsList(): {
@@ -7,6 +7,7 @@ const date_fns_1 = require("date-fns");
7
7
  const lodash_1 = require("lodash");
8
8
  const collections_1 = require("../../helpers/collections");
9
9
  const currency_1 = require("../../helpers/currency");
10
+ const externalUrls_1 = require("../../helpers/externalUrls");
10
11
  const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
11
12
  const orders_1 = require("../../helpers/instruments/orders");
12
13
  const objects_1 = require("../../helpers/objects");
@@ -58,12 +59,19 @@ class Group extends basic_1.default {
58
59
  }
59
60
  return `${link}?lang=${this.lang}`;
60
61
  }
62
+ getInvitationLink(landingHost) {
63
+ const link = (0, externalUrls_1.buildGroupInvitationUrl)(landingHost, this.id);
64
+ return lang_1.LanguagesTypes.ES === this.lang ? link : `${link}?lang=${this.lang}`;
65
+ }
61
66
  get invitationEmails() {
62
67
  return this.data.invitationEmails || [];
63
68
  }
64
69
  get shortDynamicLink() {
65
70
  return `https://app.glissandoo.com/group/${this.username}`;
66
71
  }
72
+ getShortDynamicLink(appHost) {
73
+ return (0, externalUrls_1.buildGroupShortDynamicUrl)(appHost, this.username);
74
+ }
67
75
  get admins() {
68
76
  return this.data.administrators || [];
69
77
  }
@@ -159,31 +167,33 @@ class Group extends basic_1.default {
159
167
  return null;
160
168
  }
161
169
  get config() {
170
+ const config = this.data.config || {};
162
171
  return {
163
- [types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]: types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined in this.data.config
164
- ? this.data.config[types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]
172
+ [types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]: types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined in config
173
+ ? config[types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]
165
174
  : true,
166
- [types_1.GroupConfigKey.AllowEditInstruments]: types_1.GroupConfigKey.AllowEditInstruments in this.data.config
167
- ? this.data.config[types_1.GroupConfigKey.AllowEditInstruments]
175
+ [types_1.GroupConfigKey.AllowEditInstruments]: types_1.GroupConfigKey.AllowEditInstruments in config
176
+ ? config[types_1.GroupConfigKey.AllowEditInstruments]
168
177
  : true,
169
- [types_1.GroupConfigKey.ShowAttendanceToMembers]: types_1.GroupConfigKey.ShowAttendanceToMembers in this.data.config
170
- ? this.data.config[types_1.GroupConfigKey.ShowAttendanceToMembers]
178
+ [types_1.GroupConfigKey.ShowAttendanceToMembers]: types_1.GroupConfigKey.ShowAttendanceToMembers in config
179
+ ? config[types_1.GroupConfigKey.ShowAttendanceToMembers]
171
180
  : types_1.GroupConfigShowAttendanceToMembers.None,
172
- [types_1.GroupConfigKey.AllowVerifyGeoLoc]: types_1.GroupConfigKey.AllowVerifyGeoLoc in this.data.config
173
- ? this.data.config[types_1.GroupConfigKey.AllowVerifyGeoLoc]
181
+ [types_1.GroupConfigKey.AllowVerifyGeoLoc]: types_1.GroupConfigKey.AllowVerifyGeoLoc in config
182
+ ? config[types_1.GroupConfigKey.AllowVerifyGeoLoc]
174
183
  : false,
175
184
  };
176
185
  }
177
186
  get configSites() {
187
+ const configSites = this.data.configSites || {};
178
188
  return {
179
- [types_1.GroupConfigSitesKey.Active]: types_1.GroupConfigSitesKey.Active in this.data.configSites
180
- ? this.data.configSites[types_1.GroupConfigSitesKey.Active]
189
+ [types_1.GroupConfigSitesKey.Active]: types_1.GroupConfigSitesKey.Active in configSites
190
+ ? configSites[types_1.GroupConfigSitesKey.Active]
181
191
  : false,
182
- [types_1.GroupConfigSitesKey.ShowEvents]: types_1.GroupConfigSitesKey.ShowEvents in this.data.configSites
183
- ? this.data.configSites[types_1.GroupConfigSitesKey.ShowEvents]
192
+ [types_1.GroupConfigSitesKey.ShowEvents]: types_1.GroupConfigSitesKey.ShowEvents in configSites
193
+ ? configSites[types_1.GroupConfigSitesKey.ShowEvents]
184
194
  : false,
185
- [types_1.GroupConfigSitesKey.ShowMembers]: types_1.GroupConfigSitesKey.ShowMembers in this.data.configSites
186
- ? this.data.configSites[types_1.GroupConfigSitesKey.ShowMembers]
195
+ [types_1.GroupConfigSitesKey.ShowMembers]: types_1.GroupConfigSitesKey.ShowMembers in configSites
196
+ ? configSites[types_1.GroupConfigSitesKey.ShowMembers]
187
197
  : false,
188
198
  };
189
199
  }
@@ -246,6 +256,9 @@ class Group extends basic_1.default {
246
256
  get glissandooAdminUrl() {
247
257
  return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
248
258
  }
259
+ getGlissandooAdminUrl(adminHost) {
260
+ return (0, externalUrls_1.buildAdminEntityUrl)(adminHost, collections_1.CollectionNames.Group, this.id);
261
+ }
249
262
  get createdOn() {
250
263
  return this.data.createdOn;
251
264
  }
@@ -276,6 +289,9 @@ class Group extends basic_1.default {
276
289
  get rollcallLink() {
277
290
  return `https://glissandoo.com/rollcall/${this.id}`;
278
291
  }
292
+ getRollcallLink(landingHost) {
293
+ return (0, externalUrls_1.buildRollcallUrl)(landingHost, this.id);
294
+ }
279
295
  get subscriptionId() {
280
296
  return this.data.subscriptionId || null;
281
297
  }
@@ -7,27 +7,7 @@ import { GroupPayoutRuleEntry } from '../../types/payoutRule';
7
7
  import { EventPlayerStatus } from '../Evento/Player/types';
8
8
  import { EventType } from '../Evento/types';
9
9
  import { PlayerBasicData } from '../Player/types';
10
- export declare enum GroupHistoryAction {
11
- Created = "created",
12
- Deleted = "deleted",
13
- MemberAdd = "member_add",
14
- MemberJoin = "member_join",
15
- MemberLeave = "member_leave",
16
- MemberRemove = "member_remove",
17
- MemberInstrumentChange = "member_instrument_change",
18
- MemberPermissionsChange = "member_permissions_change",
19
- TemplateCreated = "template_created",
20
- TemplateDeleted = "template_deleted",
21
- TemplateEdited = "template_edited",
22
- EditInstruments = "edit_instruments",
23
- EditName = "edit_name",
24
- EditLocation = "edit_location",
25
- EditMusicStyle = "edit_music_style",
26
- EditUsername = "edit_username",
27
- EditPhoto = "edit_photo",
28
- LinkFakeAccount = "link_fake_account",
29
- EditFakeAccountInfo = "edit_fake_account_info"
30
- }
10
+ export { GroupHistoryAction } from '../supabase/GroupHistory/types';
31
11
  export declare enum GroupCustomFieldType {
32
12
  TEXT = "text",
33
13
  NUMBER = "number",
@@ -71,6 +51,7 @@ export declare enum AdminPermissions {
71
51
  Rollcall = "rollcall",
72
52
  Members = "members",
73
53
  Repertoire = "repertoire",
54
+ Purchase = "purchase",
74
55
  Communications = "communications",
75
56
  Offers = "offers",
76
57
  Billing = "billing",
@@ -1,28 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupModulePlan = exports.GroupModuleId = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = exports.GroupCustomFieldType = exports.GroupHistoryAction = void 0;
4
- var GroupHistoryAction;
5
- (function (GroupHistoryAction) {
6
- GroupHistoryAction["Created"] = "created";
7
- GroupHistoryAction["Deleted"] = "deleted";
8
- GroupHistoryAction["MemberAdd"] = "member_add";
9
- GroupHistoryAction["MemberJoin"] = "member_join";
10
- GroupHistoryAction["MemberLeave"] = "member_leave";
11
- GroupHistoryAction["MemberRemove"] = "member_remove";
12
- GroupHistoryAction["MemberInstrumentChange"] = "member_instrument_change";
13
- GroupHistoryAction["MemberPermissionsChange"] = "member_permissions_change";
14
- GroupHistoryAction["TemplateCreated"] = "template_created";
15
- GroupHistoryAction["TemplateDeleted"] = "template_deleted";
16
- GroupHistoryAction["TemplateEdited"] = "template_edited";
17
- GroupHistoryAction["EditInstruments"] = "edit_instruments";
18
- GroupHistoryAction["EditName"] = "edit_name";
19
- GroupHistoryAction["EditLocation"] = "edit_location";
20
- GroupHistoryAction["EditMusicStyle"] = "edit_music_style";
21
- GroupHistoryAction["EditUsername"] = "edit_username";
22
- GroupHistoryAction["EditPhoto"] = "edit_photo";
23
- GroupHistoryAction["LinkFakeAccount"] = "link_fake_account";
24
- GroupHistoryAction["EditFakeAccountInfo"] = "edit_fake_account_info";
25
- })(GroupHistoryAction = exports.GroupHistoryAction || (exports.GroupHistoryAction = {}));
4
+ var types_1 = require("../supabase/GroupHistory/types");
5
+ Object.defineProperty(exports, "GroupHistoryAction", { enumerable: true, get: function () { return types_1.GroupHistoryAction; } });
26
6
  // types/CustomFields.ts
27
7
  var GroupCustomFieldType;
28
8
  (function (GroupCustomFieldType) {
@@ -34,7 +14,7 @@ var GroupCustomFieldType;
34
14
  GroupCustomFieldType["PHONE"] = "phone";
35
15
  GroupCustomFieldType["LINK"] = "link";
36
16
  GroupCustomFieldType["PARAGRAPH"] = "paragraph";
37
- })(GroupCustomFieldType = exports.GroupCustomFieldType || (exports.GroupCustomFieldType = {}));
17
+ })(GroupCustomFieldType || (exports.GroupCustomFieldType = GroupCustomFieldType = {}));
38
18
  var AdminPermissions;
39
19
  (function (AdminPermissions) {
40
20
  AdminPermissions["Owner"] = "owner";
@@ -42,38 +22,39 @@ var AdminPermissions;
42
22
  AdminPermissions["Rollcall"] = "rollcall";
43
23
  AdminPermissions["Members"] = "members";
44
24
  AdminPermissions["Repertoire"] = "repertoire";
25
+ AdminPermissions["Purchase"] = "purchase";
45
26
  AdminPermissions["Communications"] = "communications";
46
27
  AdminPermissions["Offers"] = "offers";
47
28
  AdminPermissions["Billing"] = "billing";
48
29
  AdminPermissions["Inventory"] = "inventory";
49
- })(AdminPermissions = exports.AdminPermissions || (exports.AdminPermissions = {}));
30
+ })(AdminPermissions || (exports.AdminPermissions = AdminPermissions = {}));
50
31
  var GroupConfigKey;
51
32
  (function (GroupConfigKey) {
52
33
  GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
53
34
  GroupConfigKey["AllowEditInstruments"] = "allowEditInstruments";
54
35
  GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
55
36
  GroupConfigKey["AllowVerifyGeoLoc"] = "allowVerifyGeoLoc";
56
- })(GroupConfigKey = exports.GroupConfigKey || (exports.GroupConfigKey = {}));
37
+ })(GroupConfigKey || (exports.GroupConfigKey = GroupConfigKey = {}));
57
38
  var GroupConfigSitesKey;
58
39
  (function (GroupConfigSitesKey) {
59
40
  GroupConfigSitesKey["Active"] = "active";
60
41
  GroupConfigSitesKey["ShowMembers"] = "showMembers";
61
42
  GroupConfigSitesKey["ShowEvents"] = "showEvents";
62
- })(GroupConfigSitesKey = exports.GroupConfigSitesKey || (exports.GroupConfigSitesKey = {}));
43
+ })(GroupConfigSitesKey || (exports.GroupConfigSitesKey = GroupConfigSitesKey = {}));
63
44
  var GroupConfigShowAttendanceToMembers;
64
45
  (function (GroupConfigShowAttendanceToMembers) {
65
46
  GroupConfigShowAttendanceToMembers["None"] = "none";
66
47
  GroupConfigShowAttendanceToMembers["OnlyConfirmed"] = "onlyConfirmed";
67
48
  GroupConfigShowAttendanceToMembers["OnlyToSection"] = "onlyToSection";
68
49
  GroupConfigShowAttendanceToMembers["All"] = "all";
69
- })(GroupConfigShowAttendanceToMembers = exports.GroupConfigShowAttendanceToMembers || (exports.GroupConfigShowAttendanceToMembers = {}));
50
+ })(GroupConfigShowAttendanceToMembers || (exports.GroupConfigShowAttendanceToMembers = GroupConfigShowAttendanceToMembers = {}));
70
51
  var GroupStatus;
71
52
  (function (GroupStatus) {
72
53
  GroupStatus["Premium"] = "premium";
73
54
  GroupStatus["Trial"] = "trial";
74
55
  GroupStatus["Inactive"] = "inactive";
75
56
  GroupStatus["Deleted"] = "deleted";
76
- })(GroupStatus = exports.GroupStatus || (exports.GroupStatus = {}));
57
+ })(GroupStatus || (exports.GroupStatus = GroupStatus = {}));
77
58
  var GroupModuleId;
78
59
  (function (GroupModuleId) {
79
60
  GroupModuleId["Payout"] = "payout";
@@ -81,12 +62,12 @@ var GroupModuleId;
81
62
  GroupModuleId["Vacancies"] = "vacancies";
82
63
  GroupModuleId["Partnership"] = "partnership";
83
64
  GroupModuleId["MusicSchool"] = "musicSchool";
84
- })(GroupModuleId = exports.GroupModuleId || (exports.GroupModuleId = {}));
65
+ })(GroupModuleId || (exports.GroupModuleId = GroupModuleId = {}));
85
66
  var GroupModulePlan;
86
67
  (function (GroupModulePlan) {
87
68
  GroupModulePlan["Free"] = "free";
88
69
  GroupModulePlan["Paid"] = "paid";
89
- })(GroupModulePlan = exports.GroupModulePlan || (exports.GroupModulePlan = {}));
70
+ })(GroupModulePlan || (exports.GroupModulePlan = GroupModulePlan = {}));
90
71
  var SocialNetwork;
91
72
  (function (SocialNetwork) {
92
73
  SocialNetwork["Facebook"] = "facebook";
@@ -94,11 +75,11 @@ var SocialNetwork;
94
75
  SocialNetwork["Instagram"] = "instagram";
95
76
  SocialNetwork["YouTube"] = "youtube";
96
77
  SocialNetwork["Web"] = "web";
97
- })(SocialNetwork = exports.SocialNetwork || (exports.SocialNetwork = {}));
78
+ })(SocialNetwork || (exports.SocialNetwork = SocialNetwork = {}));
98
79
  var GroupRepertoireTagReserved;
99
80
  (function (GroupRepertoireTagReserved) {
100
81
  GroupRepertoireTagReserved["NoTag"] = "$noTag";
101
- })(GroupRepertoireTagReserved = exports.GroupRepertoireTagReserved || (exports.GroupRepertoireTagReserved = {}));
82
+ })(GroupRepertoireTagReserved || (exports.GroupRepertoireTagReserved = GroupRepertoireTagReserved = {}));
102
83
  var GroupRepertoireTagDefault;
103
84
  (function (GroupRepertoireTagDefault) {
104
85
  GroupRepertoireTagDefault["First"] = "repertoireTags.1";
@@ -106,4 +87,4 @@ var GroupRepertoireTagDefault;
106
87
  GroupRepertoireTagDefault["Third"] = "repertoireTags.3";
107
88
  GroupRepertoireTagDefault["Fourth"] = "repertoireTags.4";
108
89
  GroupRepertoireTagDefault["Principal"] = "repertoireTags.principal";
109
- })(GroupRepertoireTagDefault = exports.GroupRepertoireTagDefault || (exports.GroupRepertoireTagDefault = {}));
90
+ })(GroupRepertoireTagDefault || (exports.GroupRepertoireTagDefault = GroupRepertoireTagDefault = {}));
@@ -0,0 +1,11 @@
1
+ import Instrument from '.';
2
+ import { CustomInstrumentId, InstrumentId, InstrumentsRecord } from '../../helpers/instruments';
3
+ import { LanguagesTypes } from '../../lang';
4
+ export default class InstrumentFromRecord extends Instrument {
5
+ private instrumentsRecord;
6
+ constructor(id: InstrumentId, lang: LanguagesTypes | undefined, instrumentsRecord: InstrumentsRecord);
7
+ static isCustom(instrumentId: InstrumentId): instrumentId is CustomInstrumentId;
8
+ get isCustomInstrument(): boolean;
9
+ get name(): string;
10
+ get icon(): string;
11
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const _1 = __importDefault(require("."));
7
+ const lang_1 = require("../../lang");
8
+ class InstrumentFromRecord extends _1.default {
9
+ constructor(id, lang = lang_1.defaultLocale, instrumentsRecord) {
10
+ super(id, lang);
11
+ this.instrumentsRecord = instrumentsRecord;
12
+ }
13
+ static isCustom(instrumentId) {
14
+ return (instrumentId || '').startsWith('customInstrument-');
15
+ }
16
+ get isCustomInstrument() {
17
+ return InstrumentFromRecord.isCustom(this.id);
18
+ }
19
+ get name() {
20
+ if (!InstrumentFromRecord.isCustom(this.id))
21
+ return super.name;
22
+ if (this.id in this.instrumentsRecord) {
23
+ return this.instrumentsRecord[this.id].name;
24
+ }
25
+ return (0, lang_1.getTranslation)('instruments.unknown', this.lang) || this.id;
26
+ }
27
+ get icon() {
28
+ return InstrumentFromRecord.isCustom(this.id) && this.id in this.instrumentsRecord
29
+ ? this.instrumentsRecord[this.id].icon
30
+ : super.icon;
31
+ }
32
+ }
33
+ exports.default = InstrumentFromRecord;
@@ -5,5 +5,7 @@ export default class Instrument {
5
5
  protected lang: LanguagesTypes;
6
6
  constructor(id: InstrumentId, lang?: LanguagesTypes);
7
7
  get name(): string;
8
+ get pluralName(): string;
9
+ getName(count: number): string;
8
10
  get icon(): string;
9
11
  }
@@ -2,6 +2,36 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const instruments_1 = require("../../helpers/instruments");
4
4
  const lang_1 = require("../../lang");
5
+ const getPluralBlock = (message, selector) => {
6
+ const startToken = `${selector} {`;
7
+ const start = message.indexOf(startToken);
8
+ if (start === -1)
9
+ return null;
10
+ let depth = 1;
11
+ let index = start + startToken.length;
12
+ const blockStart = index;
13
+ while (index < message.length) {
14
+ const character = message[index];
15
+ if (character === '{')
16
+ depth++;
17
+ if (character === '}')
18
+ depth--;
19
+ if (depth === 0) {
20
+ return message.slice(blockStart, index);
21
+ }
22
+ index++;
23
+ }
24
+ return null;
25
+ };
26
+ const formatInstrumentMessage = (message, count, lang) => {
27
+ if (!message.includes('{count, plural,'))
28
+ return message;
29
+ const pluralCategory = new Intl.PluralRules(lang).select(count);
30
+ const selectedBlock = getPluralBlock(message, `=${count}`) ||
31
+ getPluralBlock(message, pluralCategory) ||
32
+ getPluralBlock(message, 'other');
33
+ return (selectedBlock || message).replace(/#/g, String(count));
34
+ };
5
35
  class Instrument {
6
36
  constructor(id, lang = lang_1.defaultLocale) {
7
37
  this.id = id;
@@ -9,7 +39,14 @@ class Instrument {
9
39
  }
10
40
  get name() {
11
41
  const translation = (0, lang_1.getTranslation)(`instruments.${this.id}`, this.lang);
12
- return translation || this.id;
42
+ return translation ? formatInstrumentMessage(translation, 1, this.lang) : this.id;
43
+ }
44
+ get pluralName() {
45
+ return this.getName(2);
46
+ }
47
+ getName(count) {
48
+ const translation = (0, lang_1.getTranslation)(`instruments.${this.id}`, this.lang);
49
+ return translation ? formatInstrumentMessage(translation, count, this.lang) : this.id;
13
50
  }
14
51
  get icon() {
15
52
  return instruments_1.InstrumentIcons[this.id] || 'warning';
@@ -7,9 +7,9 @@ var InventoryItemStatus;
7
7
  InventoryItemStatus["Assigned"] = "assigned";
8
8
  InventoryItemStatus["OnHold"] = "onHold";
9
9
  InventoryItemStatus["Retired"] = "retired";
10
- })(InventoryItemStatus = exports.InventoryItemStatus || (exports.InventoryItemStatus = {}));
10
+ })(InventoryItemStatus || (exports.InventoryItemStatus = InventoryItemStatus = {}));
11
11
  var InventoryItemAssignmentKind;
12
12
  (function (InventoryItemAssignmentKind) {
13
13
  InventoryItemAssignmentKind["Member"] = "member";
14
14
  InventoryItemAssignmentKind["Other"] = "other";
15
- })(InventoryItemAssignmentKind = exports.InventoryItemAssignmentKind || (exports.InventoryItemAssignmentKind = {}));
15
+ })(InventoryItemAssignmentKind || (exports.InventoryItemAssignmentKind = InventoryItemAssignmentKind = {}));
@@ -12,4 +12,4 @@ var InventoryTypeCustomFieldType;
12
12
  InventoryTypeCustomFieldType["ASSIGNABLE"] = "assignable";
13
13
  InventoryTypeCustomFieldType["IMAGES"] = "images";
14
14
  InventoryTypeCustomFieldType["DOCUMENT"] = "document";
15
- })(InventoryTypeCustomFieldType = exports.InventoryTypeCustomFieldType || (exports.InventoryTypeCustomFieldType = {}));
15
+ })(InventoryTypeCustomFieldType || (exports.InventoryTypeCustomFieldType = InventoryTypeCustomFieldType = {}));
@@ -149,7 +149,7 @@ var NotificationActions;
149
149
  NotificationActions["GroupPaymentPaid"] = "groupPayment.paid";
150
150
  NotificationActions["GroupPaymentCancelled"] = "groupPayment.cancelled";
151
151
  NotificationActions["GroupPaymentAmountChanged"] = "groupPayment.amountChanged";
152
- })(NotificationActions = exports.NotificationActions || (exports.NotificationActions = {}));
152
+ })(NotificationActions || (exports.NotificationActions = NotificationActions = {}));
153
153
  var NotificationActionsFilter;
154
154
  (function (NotificationActionsFilter) {
155
155
  NotificationActionsFilter["EventCreated"] = "eventCreated";
@@ -168,7 +168,7 @@ var NotificationActionsFilter;
168
168
  NotificationActionsFilter["Offers"] = "offers";
169
169
  NotificationActionsFilter["ThemeClaims"] = "themeClaims";
170
170
  NotificationActionsFilter["Permissions"] = "permissions";
171
- })(NotificationActionsFilter = exports.NotificationActionsFilter || (exports.NotificationActionsFilter = {}));
171
+ })(NotificationActionsFilter || (exports.NotificationActionsFilter = NotificationActionsFilter = {}));
172
172
  exports.notificationByFilter = {
173
173
  [NotificationActionsFilter.EventCreated]: [
174
174
  NotificationActions.PerformanceCreate,
@@ -4,18 +4,6 @@ import { Descendant } from '../../helpers/slate';
4
4
  import { CreatedOn } from '../../helpers/types';
5
5
  import { GroupBasicData } from '../Group/types';
6
6
  import { UserBasicData } from '../User/types';
7
- export declare enum OfferHistoryAction {
8
- Created = "created",
9
- Remove = "remove",
10
- EditLocality = "edit_locality",
11
- EditDescription = "edit_description",
12
- EditDeadline = "edit_deadline",
13
- SelectApplicant = "select_applicant",
14
- CloseSelection = "close_selection",
15
- ReopenSelection = "reopen_selection",
16
- NewApplicant = "new_applicant",
17
- RemoveApplicant = "remove_applicant"
18
- }
19
7
  export declare enum OfferType {
20
8
  Group = "group",
21
9
  Event = "event"
@@ -1,21 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OfferType = exports.OfferHistoryAction = void 0;
4
- var OfferHistoryAction;
5
- (function (OfferHistoryAction) {
6
- OfferHistoryAction["Created"] = "created";
7
- OfferHistoryAction["Remove"] = "remove";
8
- OfferHistoryAction["EditLocality"] = "edit_locality";
9
- OfferHistoryAction["EditDescription"] = "edit_description";
10
- OfferHistoryAction["EditDeadline"] = "edit_deadline";
11
- OfferHistoryAction["SelectApplicant"] = "select_applicant";
12
- OfferHistoryAction["CloseSelection"] = "close_selection";
13
- OfferHistoryAction["ReopenSelection"] = "reopen_selection";
14
- OfferHistoryAction["NewApplicant"] = "new_applicant";
15
- OfferHistoryAction["RemoveApplicant"] = "remove_applicant";
16
- })(OfferHistoryAction = exports.OfferHistoryAction || (exports.OfferHistoryAction = {}));
3
+ exports.OfferType = void 0;
17
4
  var OfferType;
18
5
  (function (OfferType) {
19
6
  OfferType["Group"] = "group";
20
7
  OfferType["Event"] = "event";
21
- })(OfferType = exports.OfferType || (exports.OfferType = {}));
8
+ })(OfferType || (exports.OfferType = OfferType = {}));
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rowToPartnershipCommunicationData = exports.PARTNERSHIP_COMMUNICATION_TABLE = void 0;
3
+ exports.PARTNERSHIP_COMMUNICATION_TABLE = void 0;
4
+ exports.rowToPartnershipCommunicationData = rowToPartnershipCommunicationData;
4
5
  exports.PARTNERSHIP_COMMUNICATION_TABLE = 'partnership_communication';
5
6
  function rowToPartnershipCommunicationData(row) {
6
7
  return {
@@ -22,4 +23,3 @@ function rowToPartnershipCommunicationData(row) {
22
23
  deletedAt: row.deletedAt,
23
24
  };
24
25
  }
25
- exports.rowToPartnershipCommunicationData = rowToPartnershipCommunicationData;