@glissandoo/lib 1.123.0 → 1.123.2

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 (525) hide show
  1. package/.firebaserc +7 -0
  2. package/.husky/pre-commit +4 -0
  3. package/README.md +70 -0
  4. package/{models → lib/models}/User/index.d.ts +7 -1
  5. package/{models → lib/models}/User/index.js +9 -0
  6. package/{models → lib/models}/User/types.d.ts +6 -0
  7. package/{models → lib/models}/User/types.js +5 -1
  8. package/{types → lib/types}/supabase/generated.d.ts +0 -36
  9. package/package.json +1 -1
  10. package/scripts/setHusky.js +11 -0
  11. package/supabase/.dev.env +1 -0
  12. package/supabase/.prod.env +1 -0
  13. package/supabase/.sample.env +2 -0
  14. package/supabase/README.md +126 -0
  15. package/supabase/config.toml +68 -0
  16. package/supabase/migrations/20231117044943_remote_schema.sql +228 -0
  17. package/supabase/migrations/20231117124947_event_selection_mode_closed_at_nullable.sql +1 -0
  18. package/supabase/migrations/20231121002132_remote_schema.sql +31 -0
  19. package/supabase/migrations/20231121004031_references_nullable.sql +3 -0
  20. package/supabase/migrations/20231121014339_updated_at_trigger.sql +13 -0
  21. package/supabase/migrations/20231122111241_remote_schema.sql +25 -0
  22. package/supabase/migrations/20231124151424_snake_case_to_camel_case.sql +105 -0
  23. package/supabase/migrations/20231129133721_add_columns_for_sites.sql +11 -0
  24. package/supabase/migrations/20231129142806_promoter_can_be_null.sql +3 -0
  25. package/supabase/migrations/20231130125327_group_location_latlon.sql +3 -0
  26. package/supabase/migrations/20231130150154_error_solvings.sql +9 -0
  27. package/supabase/migrations/20240405115914_new_columns.sql +9 -0
  28. package/supabase/migrations/20240405121956_init_offer.sql +81 -0
  29. package/supabase/migrations/20240503032440_add_columns_to_offer.sql +11 -0
  30. package/supabase/migrations/20240503101641_add_column_createdOn.sql +19 -0
  31. package/supabase/migrations/20240506035104_add_groupInfo_to_offer.sql +10 -0
  32. package/supabase/migrations/20240510110328_add_relationships_to_offer.sql +9 -0
  33. package/supabase/migrations/20240514100316_offers_public.sql +9 -0
  34. package/supabase/migrations/20260506013030_add_user_mirror.sql +50 -0
  35. package/supabase/migrations/20260506013031_add_user_group_mirror.sql +31 -0
  36. package/supabase/migrations/20260529000000_init_group_payment.sql +79 -0
  37. package/supabase/migrations/20260529120000_group_payment_realtime.sql +19 -0
  38. package/supabase/migrations/20260529130000_group_payment_anon_read.sql +16 -0
  39. package/supabase/migrations/20260601000000_group_payment_concept_norm.sql +20 -0
  40. package/supabase/migrations/20260605000000_init_partnership_domain.sql +333 -0
  41. package/supabase/migrations/20260605000100_partnership_recurring_rpc.sql +62 -0
  42. package/supabase/migrations/20260606000000_partnership_payer.sql +83 -0
  43. package/supabase/migrations/20260607000000_partnership_partner_number_not_unique.sql +10 -0
  44. package/supabase/migrations/20260608000000_partnership_payment_method_bizum.sql +2 -0
  45. package/supabase/migrations/20260609000000_partnership_payment_sepa_end_to_end.sql +13 -0
  46. package/supabase/migrations/20260617000000_partnership_portal_query_indexes.sql +23 -0
  47. package/supabase/migrations/20260618000000_partnership_communication_attachments.sql +5 -0
  48. package/supabase/migrations/20260701000000_partnership_recurring_rpc_drop_ambiguous.sql +29 -0
  49. package/supabase/migrations/20260713191700_add_personal_calendar_feed.sql +506 -0
  50. package/supabase/migrations/20260714193734_add_pending_calendar_invitations.sql +403 -0
  51. package/supabase/migrations/20260714205623_add_event_datetime_end_backfill.sql +64 -0
  52. package/supabase/migrations/20260729161126_remove_calendar_event_history_dependency.sql +19 -0
  53. package/supabase/migrations/20260729161202_reconcile_production_remote_schema.sql +135 -0
  54. package/supabase/migrations/20260804120000_add_calendar_feed_token_cipher.sql +9 -0
  55. package/supabase/migrations/20260805120000_replace_usergroup_with_group_playerids.sql +363 -0
  56. package/supabase/seed.sql +2973 -0
  57. package/models/supabase/User/Group/types.d.ts +0 -6
  58. package/models/supabase/User/Group/types.js +0 -2
  59. package/models/supabase/User/types.d.ts +0 -6
  60. package/models/supabase/User/types.js +0 -2
  61. package/types/firestore.ts +0 -1998
  62. package/types/messagebirdChatWidget.ts +0 -20
  63. package/types/minVersion.ts +0 -4
  64. package/types/payoutRule.ts +0 -132
  65. package/types/supabase/generated.ts +0 -1718
  66. package/types/supabase/index.ts +0 -36
  67. package/types/supabase/overwrites/comm.ts +0 -18
  68. package/types/supabase/overwrites/comm_history.ts +0 -10
  69. package/types/supabase/overwrites/event.ts +0 -28
  70. package/types/supabase/overwrites/event_history.ts +0 -10
  71. package/types/supabase/overwrites/group.ts +0 -49
  72. package/types/supabase/overwrites/group_history.ts +0 -9
  73. package/types/supabase/overwrites/index.ts +0 -7
  74. package/types/supabase/overwrites/offer.ts +0 -15
  75. package/types/supabase/overwrites/offer_history.ts +0 -10
  76. package/types/supabase/overwrites/repertoire.ts +0 -12
  77. package/types/supabase/overwrites/repertoire_history.ts +0 -10
  78. package/types/supabase/overwrites/utils.ts +0 -4
  79. /package/{functions → lib/functions}/auth.d.ts +0 -0
  80. /package/{functions → lib/functions}/auth.js +0 -0
  81. /package/{functions → lib/functions}/calendarFeed.d.ts +0 -0
  82. /package/{functions → lib/functions}/calendarFeed.js +0 -0
  83. /package/{functions → lib/functions}/communication.d.ts +0 -0
  84. /package/{functions → lib/functions}/communication.js +0 -0
  85. /package/{functions → lib/functions}/communicationComment.d.ts +0 -0
  86. /package/{functions → lib/functions}/communicationComment.js +0 -0
  87. /package/{functions → lib/functions}/customer.d.ts +0 -0
  88. /package/{functions → lib/functions}/customer.js +0 -0
  89. /package/{functions → lib/functions}/customerGroup.d.ts +0 -0
  90. /package/{functions → lib/functions}/customerGroup.js +0 -0
  91. /package/{functions → lib/functions}/event.d.ts +0 -0
  92. /package/{functions → lib/functions}/event.js +0 -0
  93. /package/{functions → lib/functions}/eventPlayer.d.ts +0 -0
  94. /package/{functions → lib/functions}/eventPlayer.js +0 -0
  95. /package/{functions → lib/functions}/eventRepertory.d.ts +0 -0
  96. /package/{functions → lib/functions}/eventRepertory.js +0 -0
  97. /package/{functions → lib/functions}/eventoPayout.d.ts +0 -0
  98. /package/{functions → lib/functions}/eventoPayout.js +0 -0
  99. /package/{functions → lib/functions}/federation.d.ts +0 -0
  100. /package/{functions → lib/functions}/federation.js +0 -0
  101. /package/{functions → lib/functions}/federationPartnership.d.ts +0 -0
  102. /package/{functions → lib/functions}/federationPartnership.js +0 -0
  103. /package/{functions → lib/functions}/group.d.ts +0 -0
  104. /package/{functions → lib/functions}/group.js +0 -0
  105. /package/{functions → lib/functions}/groupEventStage.d.ts +0 -0
  106. /package/{functions → lib/functions}/groupEventStage.js +0 -0
  107. /package/{functions → lib/functions}/groupModule.d.ts +0 -0
  108. /package/{functions → lib/functions}/groupModule.js +0 -0
  109. /package/{functions → lib/functions}/groupPayment.d.ts +0 -0
  110. /package/{functions → lib/functions}/groupPayment.js +0 -0
  111. /package/{functions → lib/functions}/groupPayoutRule.d.ts +0 -0
  112. /package/{functions → lib/functions}/groupPayoutRule.js +0 -0
  113. /package/{functions → lib/functions}/groupPlayer.d.ts +0 -0
  114. /package/{functions → lib/functions}/groupPlayer.js +0 -0
  115. /package/{functions → lib/functions}/groupRepertory.d.ts +0 -0
  116. /package/{functions → lib/functions}/groupRepertory.js +0 -0
  117. /package/{functions → lib/functions}/index.d.ts +0 -0
  118. /package/{functions → lib/functions}/index.js +0 -0
  119. /package/{functions → lib/functions}/inventory.d.ts +0 -0
  120. /package/{functions → lib/functions}/inventory.js +0 -0
  121. /package/{functions → lib/functions}/inventoryItem.d.ts +0 -0
  122. /package/{functions → lib/functions}/inventoryItem.js +0 -0
  123. /package/{functions → lib/functions}/jwt.d.ts +0 -0
  124. /package/{functions → lib/functions}/jwt.js +0 -0
  125. /package/{functions → lib/functions}/misc.d.ts +0 -0
  126. /package/{functions → lib/functions}/misc.js +0 -0
  127. /package/{functions → lib/functions}/notification.d.ts +0 -0
  128. /package/{functions → lib/functions}/notification.js +0 -0
  129. /package/{functions → lib/functions}/offer.d.ts +0 -0
  130. /package/{functions → lib/functions}/offer.js +0 -0
  131. /package/{functions → lib/functions}/offerApplicant.d.ts +0 -0
  132. /package/{functions → lib/functions}/offerApplicant.js +0 -0
  133. /package/{functions → lib/functions}/partnership.d.ts +0 -0
  134. /package/{functions → lib/functions}/partnership.js +0 -0
  135. /package/{functions → lib/functions}/partnershipCommunication.d.ts +0 -0
  136. /package/{functions → lib/functions}/partnershipCommunication.js +0 -0
  137. /package/{functions → lib/functions}/partnershipGroup.d.ts +0 -0
  138. /package/{functions → lib/functions}/partnershipGroup.js +0 -0
  139. /package/{functions → lib/functions}/partnershipPartner.d.ts +0 -0
  140. /package/{functions → lib/functions}/partnershipPartner.js +0 -0
  141. /package/{functions → lib/functions}/partnershipPayment.d.ts +0 -0
  142. /package/{functions → lib/functions}/partnershipPayment.js +0 -0
  143. /package/{functions → lib/functions}/partnershipPlan.d.ts +0 -0
  144. /package/{functions → lib/functions}/partnershipPlan.js +0 -0
  145. /package/{functions → lib/functions}/partnershipSepaPaymentGroup.d.ts +0 -0
  146. /package/{functions → lib/functions}/partnershipSepaPaymentGroup.js +0 -0
  147. /package/{functions → lib/functions}/partnershipSubscription.d.ts +0 -0
  148. /package/{functions → lib/functions}/partnershipSubscription.js +0 -0
  149. /package/{functions → lib/functions}/regions.d.ts +0 -0
  150. /package/{functions → lib/functions}/regions.js +0 -0
  151. /package/{functions → lib/functions}/subscription.d.ts +0 -0
  152. /package/{functions → lib/functions}/subscription.js +0 -0
  153. /package/{functions → lib/functions}/user.d.ts +0 -0
  154. /package/{functions → lib/functions}/user.js +0 -0
  155. /package/{functions → lib/functions}/userNotification.d.ts +0 -0
  156. /package/{functions → lib/functions}/userNotification.js +0 -0
  157. /package/{helpers → lib/helpers}/appScenes.d.ts +0 -0
  158. /package/{helpers → lib/helpers}/appScenes.js +0 -0
  159. /package/{helpers → lib/helpers}/audios.d.ts +0 -0
  160. /package/{helpers → lib/helpers}/audios.js +0 -0
  161. /package/{helpers → lib/helpers}/auth.d.ts +0 -0
  162. /package/{helpers → lib/helpers}/auth.js +0 -0
  163. /package/{helpers → lib/helpers}/badges.d.ts +0 -0
  164. /package/{helpers → lib/helpers}/badges.js +0 -0
  165. /package/{helpers → lib/helpers}/collections.d.ts +0 -0
  166. /package/{helpers → lib/helpers}/collections.js +0 -0
  167. /package/{helpers → lib/helpers}/communicationTemplate/index.d.ts +0 -0
  168. /package/{helpers → lib/helpers}/communicationTemplate/index.js +0 -0
  169. /package/{helpers → lib/helpers}/communicationTemplate/newGroup.d.ts +0 -0
  170. /package/{helpers → lib/helpers}/communicationTemplate/newGroup.js +0 -0
  171. /package/{helpers → lib/helpers}/communicationTemplate/newMember.d.ts +0 -0
  172. /package/{helpers → lib/helpers}/communicationTemplate/newMember.js +0 -0
  173. /package/{helpers → lib/helpers}/countries.d.ts +0 -0
  174. /package/{helpers → lib/helpers}/countries.js +0 -0
  175. /package/{helpers → lib/helpers}/currency.d.ts +0 -0
  176. /package/{helpers → lib/helpers}/currency.js +0 -0
  177. /package/{helpers → lib/helpers}/dlinks.d.ts +0 -0
  178. /package/{helpers → lib/helpers}/dlinks.js +0 -0
  179. /package/{helpers → lib/helpers}/errors.d.ts +0 -0
  180. /package/{helpers → lib/helpers}/errors.js +0 -0
  181. /package/{helpers → lib/helpers}/fileSections/index.d.ts +0 -0
  182. /package/{helpers → lib/helpers}/fileSections/index.js +0 -0
  183. /package/{helpers → lib/helpers}/fileSections/orders.d.ts +0 -0
  184. /package/{helpers → lib/helpers}/fileSections/orders.js +0 -0
  185. /package/{helpers → lib/helpers}/glissandooAdmin.d.ts +0 -0
  186. /package/{helpers → lib/helpers}/glissandooAdmin.js +0 -0
  187. /package/{helpers → lib/helpers}/instruments/index.d.ts +0 -0
  188. /package/{helpers → lib/helpers}/instruments/index.js +0 -0
  189. /package/{helpers → lib/helpers}/instruments/lists.d.ts +0 -0
  190. /package/{helpers → lib/helpers}/instruments/lists.js +0 -0
  191. /package/{helpers → lib/helpers}/instruments/orders.d.ts +0 -0
  192. /package/{helpers → lib/helpers}/instruments/orders.js +0 -0
  193. /package/{helpers → lib/helpers}/musicStyles/index.d.ts +0 -0
  194. /package/{helpers → lib/helpers}/musicStyles/index.js +0 -0
  195. /package/{helpers → lib/helpers}/musicStyles/orders.d.ts +0 -0
  196. /package/{helpers → lib/helpers}/musicStyles/orders.js +0 -0
  197. /package/{helpers → lib/helpers}/notifications/index.d.ts +0 -0
  198. /package/{helpers → lib/helpers}/notifications/index.js +0 -0
  199. /package/{helpers → lib/helpers}/notifications/placeholders.d.ts +0 -0
  200. /package/{helpers → lib/helpers}/notifications/placeholders.js +0 -0
  201. /package/{helpers → lib/helpers}/objects.d.ts +0 -0
  202. /package/{helpers → lib/helpers}/objects.js +0 -0
  203. /package/{helpers → lib/helpers}/paymentForecast.d.ts +0 -0
  204. /package/{helpers → lib/helpers}/paymentForecast.js +0 -0
  205. /package/{helpers → lib/helpers}/payoutRules.d.ts +0 -0
  206. /package/{helpers → lib/helpers}/payoutRules.js +0 -0
  207. /package/{helpers → lib/helpers}/plans.d.ts +0 -0
  208. /package/{helpers → lib/helpers}/plans.js +0 -0
  209. /package/{helpers → lib/helpers}/rates.d.ts +0 -0
  210. /package/{helpers → lib/helpers}/rates.js +0 -0
  211. /package/{helpers → lib/helpers}/reasons.d.ts +0 -0
  212. /package/{helpers → lib/helpers}/reasons.js +0 -0
  213. /package/{helpers → lib/helpers}/slate.d.ts +0 -0
  214. /package/{helpers → lib/helpers}/slate.js +0 -0
  215. /package/{helpers → lib/helpers}/styles.d.ts +0 -0
  216. /package/{helpers → lib/helpers}/styles.js +0 -0
  217. /package/{helpers → lib/helpers}/ts-extras/array-includes.d.ts +0 -0
  218. /package/{helpers → lib/helpers}/ts-extras/array-includes.js +0 -0
  219. /package/{helpers → lib/helpers}/ts-extras/as-mutable.d.ts +0 -0
  220. /package/{helpers → lib/helpers}/ts-extras/as-mutable.js +0 -0
  221. /package/{helpers → lib/helpers}/ts-extras/assert-error.d.ts +0 -0
  222. /package/{helpers → lib/helpers}/ts-extras/assert-error.js +0 -0
  223. /package/{helpers → lib/helpers}/ts-extras/index.d.ts +0 -0
  224. /package/{helpers → lib/helpers}/ts-extras/index.js +0 -0
  225. /package/{helpers → lib/helpers}/ts-extras/is-defined.d.ts +0 -0
  226. /package/{helpers → lib/helpers}/ts-extras/is-defined.js +0 -0
  227. /package/{helpers → lib/helpers}/ts-extras/is-empty.d.ts +0 -0
  228. /package/{helpers → lib/helpers}/ts-extras/is-empty.js +0 -0
  229. /package/{helpers → lib/helpers}/ts-extras/is-finite.d.ts +0 -0
  230. /package/{helpers → lib/helpers}/ts-extras/is-finite.js +0 -0
  231. /package/{helpers → lib/helpers}/ts-extras/is-infinite.d.ts +0 -0
  232. /package/{helpers → lib/helpers}/ts-extras/is-infinite.js +0 -0
  233. /package/{helpers → lib/helpers}/ts-extras/is-integer.d.ts +0 -0
  234. /package/{helpers → lib/helpers}/ts-extras/is-integer.js +0 -0
  235. /package/{helpers → lib/helpers}/ts-extras/is-present.d.ts +0 -0
  236. /package/{helpers → lib/helpers}/ts-extras/is-present.js +0 -0
  237. /package/{helpers → lib/helpers}/ts-extras/is-safe-integer.d.ts +0 -0
  238. /package/{helpers → lib/helpers}/ts-extras/is-safe-integer.js +0 -0
  239. /package/{helpers → lib/helpers}/ts-extras/object-entries.d.ts +0 -0
  240. /package/{helpers → lib/helpers}/ts-extras/object-entries.js +0 -0
  241. /package/{helpers → lib/helpers}/ts-extras/object-from-entries.d.ts +0 -0
  242. /package/{helpers → lib/helpers}/ts-extras/object-from-entries.js +0 -0
  243. /package/{helpers → lib/helpers}/ts-extras/object-has-own.d.ts +0 -0
  244. /package/{helpers → lib/helpers}/ts-extras/object-has-own.js +0 -0
  245. /package/{helpers → lib/helpers}/ts-extras/object-keys.d.ts +0 -0
  246. /package/{helpers → lib/helpers}/ts-extras/object-keys.js +0 -0
  247. /package/{helpers → lib/helpers}/ts-extras/set-has.d.ts +0 -0
  248. /package/{helpers → lib/helpers}/ts-extras/set-has.js +0 -0
  249. /package/{helpers → lib/helpers}/types.d.ts +0 -0
  250. /package/{helpers → lib/helpers}/types.js +0 -0
  251. /package/{helpers → lib/helpers}/utils.d.ts +0 -0
  252. /package/{helpers → lib/helpers}/utils.js +0 -0
  253. /package/{index.d.ts → lib/index.d.ts} +0 -0
  254. /package/{index.js → lib/index.js} +0 -0
  255. /package/{lang → lib/lang}/ca.json +0 -0
  256. /package/{lang → lib/lang}/de.json +0 -0
  257. /package/{lang → lib/lang}/en.json +0 -0
  258. /package/{lang → lib/lang}/es.json +0 -0
  259. /package/{lang → lib/lang}/eu.json +0 -0
  260. /package/{lang → lib/lang}/fr.json +0 -0
  261. /package/{lang → lib/lang}/gl.json +0 -0
  262. /package/{lang → lib/lang}/index.d.ts +0 -0
  263. /package/{lang → lib/lang}/index.js +0 -0
  264. /package/{lang → lib/lang}/it.json +0 -0
  265. /package/{lang → lib/lang}/nl.json +0 -0
  266. /package/{lang → lib/lang}/pt.json +0 -0
  267. /package/{models → lib/models}/Communication/Comment/index.d.ts +0 -0
  268. /package/{models → lib/models}/Communication/Comment/index.js +0 -0
  269. /package/{models → lib/models}/Communication/Comment/types.d.ts +0 -0
  270. /package/{models → lib/models}/Communication/Comment/types.js +0 -0
  271. /package/{models → lib/models}/Communication/index.d.ts +0 -0
  272. /package/{models → lib/models}/Communication/index.js +0 -0
  273. /package/{models → lib/models}/Communication/types.d.ts +0 -0
  274. /package/{models → lib/models}/Communication/types.js +0 -0
  275. /package/{models → lib/models}/Counters/Group/Analytics/index.d.ts +0 -0
  276. /package/{models → lib/models}/Counters/Group/Analytics/index.js +0 -0
  277. /package/{models → lib/models}/Counters/Group/Analytics/types.d.ts +0 -0
  278. /package/{models → lib/models}/Counters/Group/Analytics/types.js +0 -0
  279. /package/{models → lib/models}/Counters/Group/index.d.ts +0 -0
  280. /package/{models → lib/models}/Counters/Group/index.js +0 -0
  281. /package/{models → lib/models}/Counters/Group/types.d.ts +0 -0
  282. /package/{models → lib/models}/Counters/Group/types.js +0 -0
  283. /package/{models → lib/models}/Counters/event.d.ts +0 -0
  284. /package/{models → lib/models}/Counters/event.js +0 -0
  285. /package/{models → lib/models}/Counters/index.d.ts +0 -0
  286. /package/{models → lib/models}/Counters/index.js +0 -0
  287. /package/{models → lib/models}/Counters/types.d.ts +0 -0
  288. /package/{models → lib/models}/Counters/types.js +0 -0
  289. /package/{models → lib/models}/Customer/Group/index.d.ts +0 -0
  290. /package/{models → lib/models}/Customer/Group/index.js +0 -0
  291. /package/{models → lib/models}/Customer/Group/types.d.ts +0 -0
  292. /package/{models → lib/models}/Customer/Group/types.js +0 -0
  293. /package/{models → lib/models}/Customer/basic.d.ts +0 -0
  294. /package/{models → lib/models}/Customer/basic.js +0 -0
  295. /package/{models → lib/models}/Customer/index.d.ts +0 -0
  296. /package/{models → lib/models}/Customer/index.js +0 -0
  297. /package/{models → lib/models}/Customer/types.d.ts +0 -0
  298. /package/{models → lib/models}/Customer/types.js +0 -0
  299. /package/{models → lib/models}/Evento/Player/basic.d.ts +0 -0
  300. /package/{models → lib/models}/Evento/Player/basic.js +0 -0
  301. /package/{models → lib/models}/Evento/Player/index.d.ts +0 -0
  302. /package/{models → lib/models}/Evento/Player/index.js +0 -0
  303. /package/{models → lib/models}/Evento/Player/types.d.ts +0 -0
  304. /package/{models → lib/models}/Evento/Player/types.js +0 -0
  305. /package/{models → lib/models}/Evento/Repertory/index.d.ts +0 -0
  306. /package/{models → lib/models}/Evento/Repertory/index.js +0 -0
  307. /package/{models → lib/models}/Evento/Repertory/types.d.ts +0 -0
  308. /package/{models → lib/models}/Evento/Repertory/types.js +0 -0
  309. /package/{models → lib/models}/Evento/basic.d.ts +0 -0
  310. /package/{models → lib/models}/Evento/basic.js +0 -0
  311. /package/{models → lib/models}/Evento/index.d.ts +0 -0
  312. /package/{models → lib/models}/Evento/index.js +0 -0
  313. /package/{models → lib/models}/Evento/promoter.d.ts +0 -0
  314. /package/{models → lib/models}/Evento/promoter.js +0 -0
  315. /package/{models → lib/models}/Evento/tiny.d.ts +0 -0
  316. /package/{models → lib/models}/Evento/tiny.js +0 -0
  317. /package/{models → lib/models}/Evento/types.d.ts +0 -0
  318. /package/{models → lib/models}/Evento/types.js +0 -0
  319. /package/{models → lib/models}/Federation/Partnership/index.d.ts +0 -0
  320. /package/{models → lib/models}/Federation/Partnership/index.js +0 -0
  321. /package/{models → lib/models}/Federation/Partnership/types.d.ts +0 -0
  322. /package/{models → lib/models}/Federation/Partnership/types.js +0 -0
  323. /package/{models → lib/models}/Federation/index.d.ts +0 -0
  324. /package/{models → lib/models}/Federation/index.js +0 -0
  325. /package/{models → lib/models}/Federation/types.d.ts +0 -0
  326. /package/{models → lib/models}/Federation/types.js +0 -0
  327. /package/{models → lib/models}/Group/Analytics/index.d.ts +0 -0
  328. /package/{models → lib/models}/Group/Analytics/index.js +0 -0
  329. /package/{models → lib/models}/Group/Analytics/types.d.ts +0 -0
  330. /package/{models → lib/models}/Group/Analytics/types.js +0 -0
  331. /package/{models → lib/models}/Group/Event/index.d.ts +0 -0
  332. /package/{models → lib/models}/Group/Event/index.js +0 -0
  333. /package/{models → lib/models}/Group/Event/types.d.ts +0 -0
  334. /package/{models → lib/models}/Group/Event/types.js +0 -0
  335. /package/{models → lib/models}/Group/Payment/index.d.ts +0 -0
  336. /package/{models → lib/models}/Group/Payment/index.js +0 -0
  337. /package/{models → lib/models}/Group/Payment/supabase.d.ts +0 -0
  338. /package/{models → lib/models}/Group/Payment/supabase.js +0 -0
  339. /package/{models → lib/models}/Group/Payment/types.d.ts +0 -0
  340. /package/{models → lib/models}/Group/Payment/types.js +0 -0
  341. /package/{models → lib/models}/Group/Player/Event/index.d.ts +0 -0
  342. /package/{models → lib/models}/Group/Player/Event/index.js +0 -0
  343. /package/{models → lib/models}/Group/Player/Event/types.d.ts +0 -0
  344. /package/{models → lib/models}/Group/Player/Event/types.js +0 -0
  345. /package/{models → lib/models}/Group/Player/Log/index.d.ts +0 -0
  346. /package/{models → lib/models}/Group/Player/Log/index.js +0 -0
  347. /package/{models → lib/models}/Group/Player/Log/types.d.ts +0 -0
  348. /package/{models → lib/models}/Group/Player/Log/types.js +0 -0
  349. /package/{models → lib/models}/Group/Player/index.d.ts +0 -0
  350. /package/{models → lib/models}/Group/Player/index.js +0 -0
  351. /package/{models → lib/models}/Group/Player/types.d.ts +0 -0
  352. /package/{models → lib/models}/Group/Player/types.js +0 -0
  353. /package/{models → lib/models}/Group/Repertory/File/Section/index.d.ts +0 -0
  354. /package/{models → lib/models}/Group/Repertory/File/Section/index.js +0 -0
  355. /package/{models → lib/models}/Group/Repertory/File/Section/types.d.ts +0 -0
  356. /package/{models → lib/models}/Group/Repertory/File/Section/types.js +0 -0
  357. /package/{models → lib/models}/Group/Repertory/File/index.d.ts +0 -0
  358. /package/{models → lib/models}/Group/Repertory/File/index.js +0 -0
  359. /package/{models → lib/models}/Group/Repertory/File/types.d.ts +0 -0
  360. /package/{models → lib/models}/Group/Repertory/File/types.js +0 -0
  361. /package/{models → lib/models}/Group/Repertory/FilePath/index.d.ts +0 -0
  362. /package/{models → lib/models}/Group/Repertory/FilePath/index.js +0 -0
  363. /package/{models → lib/models}/Group/Repertory/index.d.ts +0 -0
  364. /package/{models → lib/models}/Group/Repertory/index.js +0 -0
  365. /package/{models → lib/models}/Group/Repertory/types.d.ts +0 -0
  366. /package/{models → lib/models}/Group/Repertory/types.js +0 -0
  367. /package/{models → lib/models}/Group/StageTemplate/index.d.ts +0 -0
  368. /package/{models → lib/models}/Group/StageTemplate/index.js +0 -0
  369. /package/{models → lib/models}/Group/StageTemplate/types.d.ts +0 -0
  370. /package/{models → lib/models}/Group/StageTemplate/types.js +0 -0
  371. /package/{models → lib/models}/Group/basic.d.ts +0 -0
  372. /package/{models → lib/models}/Group/basic.js +0 -0
  373. /package/{models → lib/models}/Group/index.d.ts +0 -0
  374. /package/{models → lib/models}/Group/index.js +0 -0
  375. /package/{models → lib/models}/Group/types.d.ts +0 -0
  376. /package/{models → lib/models}/Group/types.js +0 -0
  377. /package/{models → lib/models}/Instrument/group.d.ts +0 -0
  378. /package/{models → lib/models}/Instrument/group.js +0 -0
  379. /package/{models → lib/models}/Instrument/index.d.ts +0 -0
  380. /package/{models → lib/models}/Instrument/index.js +0 -0
  381. /package/{models → lib/models}/Inventory/Item/index.d.ts +0 -0
  382. /package/{models → lib/models}/Inventory/Item/index.js +0 -0
  383. /package/{models → lib/models}/Inventory/Item/types.d.ts +0 -0
  384. /package/{models → lib/models}/Inventory/Item/types.js +0 -0
  385. /package/{models → lib/models}/Inventory/index.d.ts +0 -0
  386. /package/{models → lib/models}/Inventory/index.js +0 -0
  387. /package/{models → lib/models}/Inventory/types.d.ts +0 -0
  388. /package/{models → lib/models}/Inventory/types.js +0 -0
  389. /package/{models → lib/models}/Metrics/index.d.ts +0 -0
  390. /package/{models → lib/models}/Metrics/index.js +0 -0
  391. /package/{models → lib/models}/Metrics/types.d.ts +0 -0
  392. /package/{models → lib/models}/Metrics/types.js +0 -0
  393. /package/{models → lib/models}/Model/index.d.ts +0 -0
  394. /package/{models → lib/models}/Model/index.js +0 -0
  395. /package/{models → lib/models}/Model/lang.d.ts +0 -0
  396. /package/{models → lib/models}/Model/lang.js +0 -0
  397. /package/{models → lib/models}/MusicStyle/index.d.ts +0 -0
  398. /package/{models → lib/models}/MusicStyle/index.js +0 -0
  399. /package/{models → lib/models}/Notification/index.d.ts +0 -0
  400. /package/{models → lib/models}/Notification/index.js +0 -0
  401. /package/{models → lib/models}/Notification/types.d.ts +0 -0
  402. /package/{models → lib/models}/Notification/types.js +0 -0
  403. /package/{models → lib/models}/Offer/Applicant/index.d.ts +0 -0
  404. /package/{models → lib/models}/Offer/Applicant/index.js +0 -0
  405. /package/{models → lib/models}/Offer/Applicant/types.d.ts +0 -0
  406. /package/{models → lib/models}/Offer/Applicant/types.js +0 -0
  407. /package/{models → lib/models}/Offer/index.d.ts +0 -0
  408. /package/{models → lib/models}/Offer/index.js +0 -0
  409. /package/{models → lib/models}/Offer/types.d.ts +0 -0
  410. /package/{models → lib/models}/Offer/types.js +0 -0
  411. /package/{models → lib/models}/Partnership/Communication/index.d.ts +0 -0
  412. /package/{models → lib/models}/Partnership/Communication/index.js +0 -0
  413. /package/{models → lib/models}/Partnership/Communication/supabase.d.ts +0 -0
  414. /package/{models → lib/models}/Partnership/Communication/supabase.js +0 -0
  415. /package/{models → lib/models}/Partnership/Communication/types.d.ts +0 -0
  416. /package/{models → lib/models}/Partnership/Communication/types.js +0 -0
  417. /package/{models → lib/models}/Partnership/Group/index.d.ts +0 -0
  418. /package/{models → lib/models}/Partnership/Group/index.js +0 -0
  419. /package/{models → lib/models}/Partnership/Group/supabase.d.ts +0 -0
  420. /package/{models → lib/models}/Partnership/Group/supabase.js +0 -0
  421. /package/{models → lib/models}/Partnership/Group/types.d.ts +0 -0
  422. /package/{models → lib/models}/Partnership/Group/types.js +0 -0
  423. /package/{models → lib/models}/Partnership/Partner/index.d.ts +0 -0
  424. /package/{models → lib/models}/Partnership/Partner/index.js +0 -0
  425. /package/{models → lib/models}/Partnership/Partner/supabase.d.ts +0 -0
  426. /package/{models → lib/models}/Partnership/Partner/supabase.js +0 -0
  427. /package/{models → lib/models}/Partnership/Partner/types.d.ts +0 -0
  428. /package/{models → lib/models}/Partnership/Partner/types.js +0 -0
  429. /package/{models → lib/models}/Partnership/Payment/index.d.ts +0 -0
  430. /package/{models → lib/models}/Partnership/Payment/index.js +0 -0
  431. /package/{models → lib/models}/Partnership/Payment/supabase.d.ts +0 -0
  432. /package/{models → lib/models}/Partnership/Payment/supabase.js +0 -0
  433. /package/{models → lib/models}/Partnership/Payment/types.d.ts +0 -0
  434. /package/{models → lib/models}/Partnership/Payment/types.js +0 -0
  435. /package/{models → lib/models}/Partnership/Plan/index.d.ts +0 -0
  436. /package/{models → lib/models}/Partnership/Plan/index.js +0 -0
  437. /package/{models → lib/models}/Partnership/Plan/supabase.d.ts +0 -0
  438. /package/{models → lib/models}/Partnership/Plan/supabase.js +0 -0
  439. /package/{models → lib/models}/Partnership/Plan/types.d.ts +0 -0
  440. /package/{models → lib/models}/Partnership/Plan/types.js +0 -0
  441. /package/{models → lib/models}/Partnership/SepaPaymentGroup/index.d.ts +0 -0
  442. /package/{models → lib/models}/Partnership/SepaPaymentGroup/index.js +0 -0
  443. /package/{models → lib/models}/Partnership/SepaPaymentGroup/supabase.d.ts +0 -0
  444. /package/{models → lib/models}/Partnership/SepaPaymentGroup/supabase.js +0 -0
  445. /package/{models → lib/models}/Partnership/SepaPaymentGroup/types.d.ts +0 -0
  446. /package/{models → lib/models}/Partnership/SepaPaymentGroup/types.js +0 -0
  447. /package/{models → lib/models}/Partnership/Subscription/index.d.ts +0 -0
  448. /package/{models → lib/models}/Partnership/Subscription/index.js +0 -0
  449. /package/{models → lib/models}/Partnership/Subscription/supabase.d.ts +0 -0
  450. /package/{models → lib/models}/Partnership/Subscription/supabase.js +0 -0
  451. /package/{models → lib/models}/Partnership/Subscription/types.d.ts +0 -0
  452. /package/{models → lib/models}/Partnership/Subscription/types.js +0 -0
  453. /package/{models → lib/models}/Partnership/basic.d.ts +0 -0
  454. /package/{models → lib/models}/Partnership/basic.js +0 -0
  455. /package/{models → lib/models}/Partnership/index.d.ts +0 -0
  456. /package/{models → lib/models}/Partnership/index.js +0 -0
  457. /package/{models → lib/models}/Partnership/types.d.ts +0 -0
  458. /package/{models → lib/models}/Partnership/types.js +0 -0
  459. /package/{models → lib/models}/Player/basic.d.ts +0 -0
  460. /package/{models → lib/models}/Player/basic.js +0 -0
  461. /package/{models → lib/models}/Player/types.d.ts +0 -0
  462. /package/{models → lib/models}/Player/types.js +0 -0
  463. /package/{models → lib/models}/Repertory/basic.d.ts +0 -0
  464. /package/{models → lib/models}/Repertory/basic.js +0 -0
  465. /package/{models → lib/models}/Repertory/types.d.ts +0 -0
  466. /package/{models → lib/models}/Repertory/types.js +0 -0
  467. /package/{models → lib/models}/User/Group/index.d.ts +0 -0
  468. /package/{models → lib/models}/User/Group/index.js +0 -0
  469. /package/{models → lib/models}/User/Group/types.d.ts +0 -0
  470. /package/{models → lib/models}/User/Group/types.js +0 -0
  471. /package/{models → lib/models}/User/Notification/index.d.ts +0 -0
  472. /package/{models → lib/models}/User/Notification/index.js +0 -0
  473. /package/{models → lib/models}/User/Notification/types.d.ts +0 -0
  474. /package/{models → lib/models}/User/Notification/types.js +0 -0
  475. /package/{models → lib/models}/User/OfferAlarm/index.d.ts +0 -0
  476. /package/{models → lib/models}/User/OfferAlarm/index.js +0 -0
  477. /package/{models → lib/models}/User/OfferAlarm/types.d.ts +0 -0
  478. /package/{models → lib/models}/User/OfferAlarm/types.js +0 -0
  479. /package/{models → lib/models}/User/Partnership/index.d.ts +0 -0
  480. /package/{models → lib/models}/User/Partnership/index.js +0 -0
  481. /package/{models → lib/models}/User/Partnership/types.d.ts +0 -0
  482. /package/{models → lib/models}/User/Partnership/types.js +0 -0
  483. /package/{models → lib/models}/User/basic.d.ts +0 -0
  484. /package/{models → lib/models}/User/basic.js +0 -0
  485. /package/{models → lib/models}/User/extended.d.ts +0 -0
  486. /package/{models → lib/models}/User/extended.js +0 -0
  487. /package/{models → lib/models}/WebhookEvent/index.d.ts +0 -0
  488. /package/{models → lib/models}/WebhookEvent/index.js +0 -0
  489. /package/{models → lib/models}/WebhookEvent/types.d.ts +0 -0
  490. /package/{models → lib/models}/WebhookEvent/types.js +0 -0
  491. /package/{types → lib/types}/firestore.d.ts +0 -0
  492. /package/{types → lib/types}/firestore.js +0 -0
  493. /package/{types → lib/types}/messagebirdChatWidget.d.ts +0 -0
  494. /package/{types → lib/types}/messagebirdChatWidget.js +0 -0
  495. /package/{types → lib/types}/minVersion.d.ts +0 -0
  496. /package/{types → lib/types}/minVersion.js +0 -0
  497. /package/{types → lib/types}/payoutRule.d.ts +0 -0
  498. /package/{types → lib/types}/payoutRule.js +0 -0
  499. /package/{types → lib/types}/supabase/generated.js +0 -0
  500. /package/{types → lib/types}/supabase/index.d.ts +0 -0
  501. /package/{types → lib/types}/supabase/index.js +0 -0
  502. /package/{types → lib/types}/supabase/overwrites/comm.d.ts +0 -0
  503. /package/{types → lib/types}/supabase/overwrites/comm.js +0 -0
  504. /package/{types → lib/types}/supabase/overwrites/comm_history.d.ts +0 -0
  505. /package/{types → lib/types}/supabase/overwrites/comm_history.js +0 -0
  506. /package/{types → lib/types}/supabase/overwrites/event.d.ts +0 -0
  507. /package/{types → lib/types}/supabase/overwrites/event.js +0 -0
  508. /package/{types → lib/types}/supabase/overwrites/event_history.d.ts +0 -0
  509. /package/{types → lib/types}/supabase/overwrites/event_history.js +0 -0
  510. /package/{types → lib/types}/supabase/overwrites/group.d.ts +0 -0
  511. /package/{types → lib/types}/supabase/overwrites/group.js +0 -0
  512. /package/{types → lib/types}/supabase/overwrites/group_history.d.ts +0 -0
  513. /package/{types → lib/types}/supabase/overwrites/group_history.js +0 -0
  514. /package/{types → lib/types}/supabase/overwrites/index.d.ts +0 -0
  515. /package/{types → lib/types}/supabase/overwrites/index.js +0 -0
  516. /package/{types → lib/types}/supabase/overwrites/offer.d.ts +0 -0
  517. /package/{types → lib/types}/supabase/overwrites/offer.js +0 -0
  518. /package/{types → lib/types}/supabase/overwrites/offer_history.d.ts +0 -0
  519. /package/{types → lib/types}/supabase/overwrites/offer_history.js +0 -0
  520. /package/{types → lib/types}/supabase/overwrites/repertoire.d.ts +0 -0
  521. /package/{types → lib/types}/supabase/overwrites/repertoire.js +0 -0
  522. /package/{types → lib/types}/supabase/overwrites/repertoire_history.d.ts +0 -0
  523. /package/{types → lib/types}/supabase/overwrites/repertoire_history.js +0 -0
  524. /package/{types → lib/types}/supabase/overwrites/utils.d.ts +0 -0
  525. /package/{types → lib/types}/supabase/overwrites/utils.js +0 -0
package/.firebaserc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "projects": {
3
+ "default": "glissandoo-dev-78ed4",
4
+ "production": "glissandoo-6eb90",
5
+ "dev": "glissandoo-dev-78ed4"
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged --no-stash
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # Glissandoo Library
2
+
3
+ ## What is this repository for?
4
+
5
+ - This repo contains a common model codebase that all Glissandoo projects can use.
6
+
7
+ ## Configuration
8
+
9
+ - This project should work with any Node.js version >= 12 and uses NPM to manage dependencies.
10
+ - To install Node.js, we recommend using NVM, which is a Node.js version manager, and can be installed with the following command:
11
+
12
+ ```bash
13
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
14
+ ```
15
+
16
+ - Once installed, restart your terminal and you will be able to use the following command to install the desired Node.js version:
17
+
18
+ ```bash
19
+ nvm install {version}
20
+ ```
21
+
22
+ - To activate a certain Node.js version, you can use the following command:
23
+
24
+ ```bash
25
+ nvm use {version}
26
+ ```
27
+
28
+ - Then, install dependencies with the following command:
29
+
30
+ ```bash
31
+ npm install
32
+ ```
33
+
34
+ ## Developing locally
35
+
36
+ ### 0. (Optional) Create a VS Code workspace including lib:
37
+
38
+ - Open your existing project with VS Code. Then, in the upper left menu, go to File > Add Folder to Workspace, and choose the lib repo folder.
39
+
40
+ - Then, in the same menu as before, go to File > Save Workspace As... and save your workspace wherever you like.
41
+
42
+ - Now, you will be able to work in both your current project and the lib repo in the same workspace.
43
+
44
+ ### 1. NPM-Link lib to your project:
45
+
46
+ - There is a way to link your local lib project to your current project, so any changes made to your local lib repo will automatically be reflected in your current project.
47
+
48
+ - To do this, open a terminal and go to the lib repo folder. Then, run the following command:
49
+
50
+ ```bash
51
+ npm run link
52
+ ```
53
+
54
+ This will create a symlink to your lib repo globally.
55
+
56
+ - Now, to tell your project to use the symlink, go to your project folder and run the following command:
57
+
58
+ ```bash
59
+ npm link @glissandoo/lib
60
+ ```
61
+
62
+ - Now, your project will use the ts-compiled folder of the lib repo as its dependency, but there is one more step left.
63
+
64
+ - Since we use TypeScript, we would need to compile lib for every change we made to it, but we can automate this process by opening a terminal, going into the lib repo folder and keeping the following command running:
65
+
66
+ ```bash
67
+ npm run build:watch
68
+ ```
69
+
70
+ This will compile lib for every change you make to it, so that changes automatically get reflected in your current project.
@@ -2,7 +2,7 @@ import { LanguagesTypes } from '../../lang';
2
2
  import { DocumentModel } from '../Model';
3
3
  import { RepertoireFilterBy, RepertoireFilterDirection } from '../Repertory/types';
4
4
  import UserExtended from './extended';
5
- import { UserAppConfig, UserDashboardConfig, UserData, UserEmailSettings, UserEventsFilter, UserNotificationSettings, UserRole } from './types';
5
+ import { UserAppConfig, UserCalendarConfig, UserDashboardConfig, UserData, UserEmailSettings, UserEventsFilter, UserNotificationSettings, UserRole } from './types';
6
6
  export default class User extends UserExtended<UserData> {
7
7
  constructor(doc: DocumentModel);
8
8
  get instruments(): string[];
@@ -52,6 +52,9 @@ export default class User extends UserExtended<UserData> {
52
52
  repertoire_order_direction: RepertoireFilterDirection;
53
53
  events_type: import("../Evento/types").EventType | null;
54
54
  };
55
+ get calendarConfig(): {
56
+ sync_prompt_dismissed: boolean;
57
+ };
55
58
  getDashboardConfig<T extends UserDashboardConfig>(value: T): {
56
59
  default_group_id: string | null;
57
60
  default_partnership_id: string | null;
@@ -74,6 +77,9 @@ export default class User extends UserExtended<UserData> {
74
77
  offers_filter_instrument: import("../../helpers/instruments").InstrumentId | null;
75
78
  offers_filter_music_style: import("../../helpers/musicStyles").MusicStyleId | null;
76
79
  }[T];
80
+ getCalendarConfig<T extends UserCalendarConfig>(value: T): {
81
+ sync_prompt_dismissed: boolean;
82
+ }[T];
77
83
  getNotificationSetting(key: UserNotificationSettings): boolean;
78
84
  getNotificationByGroup(groupId: string): number;
79
85
  get registerVia(): import("./types").UserRegisterVia;
@@ -132,12 +132,21 @@ class User extends extended_1.default {
132
132
  }, dashboardConfig);
133
133
  return values;
134
134
  }
135
+ get calendarConfig() {
136
+ const { calendarConfig } = this.data;
137
+ return {
138
+ [types_2.UserCalendarConfig.SyncPromptDismissed]: calendarConfig?.[types_2.UserCalendarConfig.SyncPromptDismissed] ?? false,
139
+ };
140
+ }
135
141
  getDashboardConfig(value) {
136
142
  return this.dashboardConfig[value];
137
143
  }
138
144
  getAppConfig(value) {
139
145
  return this.appConfig[value];
140
146
  }
147
+ getCalendarConfig(value) {
148
+ return this.calendarConfig[value];
149
+ }
141
150
  getNotificationSetting(key) {
142
151
  return this.data.notificationSettings[key];
143
152
  }
@@ -32,6 +32,9 @@ export declare enum UserDashboardConfig {
32
32
  RepertoireOrderDirection = "repertoire_order_direction",
33
33
  EventsType = "events_type"
34
34
  }
35
+ export declare enum UserCalendarConfig {
36
+ SyncPromptDismissed = "sync_prompt_dismissed"
37
+ }
35
38
  export declare enum UserNotificationSettings {
36
39
  AttendanceConfirmed = "enabled_attendance_confirmed",
37
40
  AttendanceDeclined = "enabled_attendance_declined",
@@ -117,6 +120,9 @@ export interface UserData extends UserExtendedData {
117
120
  [UserAppConfig.OffersFilterInstrument]: InstrumentId | null;
118
121
  [UserAppConfig.OffersFilterMusicStyle]: MusicStyleId | null;
119
122
  };
123
+ calendarConfig: {
124
+ [UserCalendarConfig.SyncPromptDismissed]: boolean;
125
+ };
120
126
  analyticsEnabled: boolean;
121
127
  registerVia: UserRegisterVia;
122
128
  lastAppLoginAt: Timestamp | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserEventsFilter = exports.UserEmailSettings = exports.UserNotificationSettings = exports.UserDashboardConfig = exports.UserAppConfig = exports.UserRegisterVia = exports.UserRole = void 0;
3
+ exports.UserEventsFilter = exports.UserEmailSettings = exports.UserNotificationSettings = exports.UserCalendarConfig = exports.UserDashboardConfig = exports.UserAppConfig = exports.UserRegisterVia = exports.UserRole = void 0;
4
4
  var UserRole;
5
5
  (function (UserRole) {
6
6
  UserRole["SuperAdmin"] = "admin";
@@ -33,6 +33,10 @@ var UserDashboardConfig;
33
33
  UserDashboardConfig["RepertoireOrderDirection"] = "repertoire_order_direction";
34
34
  UserDashboardConfig["EventsType"] = "events_type";
35
35
  })(UserDashboardConfig = exports.UserDashboardConfig || (exports.UserDashboardConfig = {}));
36
+ var UserCalendarConfig;
37
+ (function (UserCalendarConfig) {
38
+ UserCalendarConfig["SyncPromptDismissed"] = "sync_prompt_dismissed";
39
+ })(UserCalendarConfig = exports.UserCalendarConfig || (exports.UserCalendarConfig = {}));
36
40
  var UserNotificationSettings;
37
41
  (function (UserNotificationSettings) {
38
42
  UserNotificationSettings["AttendanceConfirmed"] = "enabled_attendance_confirmed";
@@ -1434,42 +1434,6 @@ export type Database = {
1434
1434
  };
1435
1435
  Relationships: [];
1436
1436
  };
1437
- userGroup: {
1438
- Row: {
1439
- groupId: string;
1440
- instruments: string[];
1441
- isAdmin: boolean;
1442
- joinedAt: string | null;
1443
- mainInstrument: string | null;
1444
- permissions: string[];
1445
- role: string;
1446
- updatedAt: string;
1447
- userId: string;
1448
- };
1449
- Insert: {
1450
- groupId: string;
1451
- instruments?: string[];
1452
- isAdmin?: boolean;
1453
- joinedAt?: string | null;
1454
- mainInstrument?: string | null;
1455
- permissions?: string[];
1456
- role: string;
1457
- updatedAt?: string;
1458
- userId: string;
1459
- };
1460
- Update: {
1461
- groupId?: string;
1462
- instruments?: string[];
1463
- isAdmin?: boolean;
1464
- joinedAt?: string | null;
1465
- mainInstrument?: string | null;
1466
- permissions?: string[];
1467
- role?: string;
1468
- updatedAt?: string;
1469
- userId?: string;
1470
- };
1471
- Relationships: [];
1472
- };
1473
1437
  };
1474
1438
  Views: {
1475
1439
  [_ in never]: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.123.0",
3
+ "version": "1.123.2",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,11 @@
1
+ const isProduction = process.env.NODE_ENV === 'production';
2
+ const isCi = process.env.CI !== undefined;
3
+
4
+ const main = async () => {
5
+ if (!isCi && !isProduction) {
6
+ const husky = await import('husky');
7
+ husky.install();
8
+ }
9
+ };
10
+
11
+ main();
@@ -0,0 +1 @@
1
+ SUPABASE_DB_PASSWORD=hPqPnsF0QPfOJc9f
@@ -0,0 +1 @@
1
+ SUPABASE_DB_PASSWORD=OQ9vRUfB328QdojG
@@ -0,0 +1,2 @@
1
+ SUPABASE_PROJECT_REF=sample_project_ref
2
+ SUPABASE_DB_PASSWORD=sample_password
@@ -0,0 +1,126 @@
1
+ ## Run emulator
2
+
3
+ To run the emulator, make sure Docker is running and use the following command:
4
+
5
+ ```bash
6
+ supabase start
7
+ ```
8
+
9
+ ## Check emulator status
10
+
11
+ To check the status of the emulator containers, use the following command:
12
+
13
+ ```bash
14
+ supabase status
15
+ ```
16
+
17
+ ## Stop emulator
18
+
19
+ To stop the emulator, DO NOT stop Docker containers directly, but use the following command instead:
20
+
21
+ ```bash
22
+ supabase stop
23
+ ```
24
+
25
+ ## Create migrations
26
+
27
+ To modify our database structure, we need to create a migration file. To do so, we can use the following command:
28
+
29
+ ```bash
30
+ supabase migration new <migration_name>
31
+ ```
32
+
33
+ This will create a new migration file in the `supabase/migrations` folder.
34
+
35
+ Then, we have two options:
36
+
37
+ 1. We can modify the migration file directly writing SQL code, or
38
+
39
+ 2. We can use the Supabase Studio to modify the database structure and then run the following command to generate a migration file:
40
+
41
+ ```bash
42
+ supabase db diff -f <migration_name>
43
+ ```
44
+
45
+ After we have the migration file ready, we can run the following command to apply the migration to our local database:
46
+
47
+ ```bash
48
+ supabase migration up
49
+ ```
50
+
51
+ Or restart the database applying all migrations and seed again, with:
52
+
53
+ ```bash
54
+ supabase db reset
55
+ ```
56
+
57
+ ## Push migrations to remote
58
+
59
+ Normally, this will be done by a CI/CD pipeline, but we can do it manually with the following commands:
60
+
61
+ ```bash
62
+ supabase link --project-ref <project-id>
63
+ supabase db push
64
+ ```
65
+
66
+ ## Pull changes from remote
67
+
68
+ We may change the database structure from the remote Supabase Studio directly, so we need to pull those changes to our local database. To do so, we can run the following command:
69
+
70
+ ```bash
71
+ supabase db pull
72
+ ```
73
+
74
+ ## Update seed.sql
75
+
76
+ To update the database seed:
77
+
78
+ 1. Create filtered tables in the remote db you want to use to get the data for seeding.
79
+
80
+ ```sql
81
+ CREATE TABLE public.users_filtered AS
82
+ SELECT * FROM public.users WHERE id IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');
83
+ ```
84
+
85
+ 2. Export the data from the filtered tables to a csv file.
86
+ 3. Run the emulator as always with the old data, remove all rows and import the csv files in the Local Supabase Studio.
87
+
88
+ ```bash
89
+ supabase start
90
+ ```
91
+
92
+ 4. Then, run the following command to dump the data from the emulator to the seed.sql file:
93
+
94
+ ```bash
95
+ supabase db dump -f supabase/seed.sql --data-only --local
96
+ ```
97
+
98
+ ## Generate types
99
+
100
+ It is important to generate the types before executing `tsc` so we can find type errors in CI/CD pipelines.
101
+ Nevertheless, we may also want to do it locally, so we have an script written in package.json to generate the types from the database schema. To run it, we can run the following command:
102
+
103
+ ```bash
104
+ npm run supabase:local:types
105
+ ```
106
+
107
+ The personal calendar-feed schema is defined by
108
+ `20260713191700_add_personal_calendar_feed.sql`, with pending invitation support
109
+ added by `20260714193734_add_pending_calendar_invitations.sql`. The
110
+ `20260729161126_remove_calendar_event_history_dependency.sql` migration keeps
111
+ decline tombstones on the mirrored event update path, so the release does not
112
+ depend on the Composer-era event-history trigger.
113
+
114
+ Together these migrations create the private bearer-token configuration,
115
+ pending/tentative preferences, 90-day per-user cancellation tombstones, event
116
+ revision tracking, feed revision tracking for user-language changes, and
117
+ service-role-only query functions used by Firebase. Group membership for feed
118
+ visibility is read from `"group"."playerIds"`, so existing users must be
119
+ backfilled before enabling feeds. Validate the migrations with a local database
120
+ reset, regenerate `src/types/supabase/generated.ts`, and run the library build
121
+ before building Functions. The public endpoint and management API are documented
122
+ in `../../functions/README.md`.
123
+
124
+ The local seed derives minimal `user` rows and unions event players into each
125
+ promoter group's `playerIds` from its event fixtures, so calendar event
126
+ visibility can be exercised immediately after `supabase db reset`.
@@ -0,0 +1,68 @@
1
+ # A string used to distinguish different Supabase projects on the same host. Defaults to the working
2
+ # directory name when running `supabase init`.
3
+ project_id = "glissandoo"
4
+
5
+ [api]
6
+ port = 54321
7
+ schemas = ["public", "storage", "graphql_public"]
8
+ extra_search_path = ["public", "extensions"]
9
+ max_rows = 1000
10
+
11
+ [db]
12
+ # Port to use for the local database URL.
13
+ port = 54322
14
+ # The database major version to use. This has to be the same as your remote database's. Run `SHOW
15
+ # server_version;` on the remote database to check.
16
+ major_version = 15
17
+
18
+ [studio]
19
+ # Port to use for Supabase Studio.
20
+ port = 54323
21
+
22
+ # Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
23
+ # are monitored, and you can view the emails that would have been sent from the web interface.
24
+ [inbucket]
25
+ # Port to use for the email testing server web interface.
26
+ port = 54324
27
+ smtp_port = 54325
28
+ pop3_port = 54326
29
+
30
+ [storage]
31
+ # The maximum file size allowed (e.g. "5MB", "500KB").
32
+ file_size_limit = "50MiB"
33
+
34
+ [auth]
35
+ # The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
36
+ # in emails.
37
+ site_url = "http://localhost:3000"
38
+ # A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
39
+ additional_redirect_urls = []
40
+ # How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one
41
+ # week).
42
+ jwt_expiry = 3600
43
+ # Allow/disallow new user signups to your project.
44
+ enable_signup = true
45
+
46
+ [auth.email]
47
+ # Allow/disallow new user signups via email to your project.
48
+ enable_signup = true
49
+ # If enabled, a user will be required to confirm any email change on both the old, and new email
50
+ # addresses. If disabled, only the new email is required to confirm.
51
+ double_confirm_changes = true
52
+ # If enabled, users need to confirm their email address before signing in.
53
+ enable_confirmations = true
54
+
55
+ max_frequency = "1m0s"
56
+
57
+ # Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
58
+ # `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin`, `notion`, `twitch`,
59
+ # `twitter`, `slack`, `spotify`, `workos`, `zoom`.
60
+ [auth.external.apple]
61
+ enabled = false
62
+ client_id = ""
63
+ secret = ""
64
+ # Overrides the default auth redirectUrl.
65
+ redirect_uri = ""
66
+ # Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
67
+ # or any other third-party OIDC providers.
68
+ url = ""
@@ -0,0 +1,228 @@
1
+
2
+ SET statement_timeout = 0;
3
+ SET lock_timeout = 0;
4
+ SET idle_in_transaction_session_timeout = 0;
5
+ SET client_encoding = 'UTF8';
6
+ SET standard_conforming_strings = on;
7
+ SELECT pg_catalog.set_config('search_path', '', false);
8
+ SET check_function_bodies = false;
9
+ SET xmloption = content;
10
+ SET client_min_messages = warning;
11
+ SET row_security = off;
12
+
13
+ CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql";
14
+
15
+ CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions";
16
+
17
+ CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions";
18
+
19
+ CREATE EXTENSION IF NOT EXISTS "pgjwt" WITH SCHEMA "extensions";
20
+
21
+ CREATE EXTENSION IF NOT EXISTS "postgis" WITH SCHEMA "extensions";
22
+
23
+ CREATE EXTENSION IF NOT EXISTS "supabase_vault" CASCADE;
24
+
25
+ CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions";
26
+
27
+ CREATE TYPE "public"."event_created_on" AS ENUM (
28
+ 'app',
29
+ 'dashboard',
30
+ 'auth'
31
+ );
32
+
33
+ ALTER TYPE "public"."event_created_on" OWNER TO "postgres";
34
+
35
+ CREATE TYPE "public"."event_selection_mode" AS ENUM (
36
+ 'open',
37
+ 'closed'
38
+ );
39
+
40
+ ALTER TYPE "public"."event_selection_mode" OWNER TO "postgres";
41
+
42
+ CREATE TYPE "public"."event_type" AS ENUM (
43
+ 'practice',
44
+ 'performance'
45
+ );
46
+
47
+ ALTER TYPE "public"."event_type" OWNER TO "postgres";
48
+
49
+ CREATE TYPE "public"."group_created_on" AS ENUM (
50
+ 'web',
51
+ 'app',
52
+ 'dashboard'
53
+ );
54
+
55
+ ALTER TYPE "public"."group_created_on" OWNER TO "postgres";
56
+
57
+ CREATE TYPE "public"."group_plan" AS ENUM (
58
+ 'piano',
59
+ 'mezzopiano',
60
+ 'mezzoforte',
61
+ 'forte',
62
+ 'fortissimo',
63
+ 'tutti'
64
+ );
65
+
66
+ ALTER TYPE "public"."group_plan" OWNER TO "postgres";
67
+
68
+ CREATE TYPE "public"."group_plan_period" AS ENUM (
69
+ 'yearly',
70
+ 'monthly'
71
+ );
72
+
73
+ ALTER TYPE "public"."group_plan_period" OWNER TO "postgres";
74
+
75
+ CREATE TYPE "public"."group_status" AS ENUM (
76
+ 'premium',
77
+ 'trial',
78
+ 'inactive',
79
+ 'deleted'
80
+ );
81
+
82
+ ALTER TYPE "public"."group_status" OWNER TO "postgres";
83
+
84
+ CREATE TYPE "public"."social_network" AS ENUM (
85
+ 'facebook',
86
+ 'twitter',
87
+ 'instagram',
88
+ 'youtube'
89
+ );
90
+
91
+ ALTER TYPE "public"."social_network" OWNER TO "postgres";
92
+
93
+ SET default_tablespace = '';
94
+
95
+ SET default_table_access_method = "heap";
96
+
97
+ CREATE TABLE IF NOT EXISTS "public"."event" (
98
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
99
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
100
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
101
+ "display_name" "text",
102
+ "datetime" timestamp with time zone NOT NULL,
103
+ "type" "public"."event_type" NOT NULL,
104
+ "locality" "text",
105
+ "online" boolean NOT NULL,
106
+ "datetime_end" timestamp with time zone NOT NULL,
107
+ "response_deadline_at" timestamp with time zone NOT NULL,
108
+ "selection_mode" "public"."event_selection_mode",
109
+ "promoter_group_id" "uuid" NOT NULL,
110
+ "cover_url" "text",
111
+ "video_url" "text",
112
+ "description" "text",
113
+ "description_slate" "jsonb"[] NOT NULL,
114
+ "player_ids" "text"[] NOT NULL,
115
+ "players" "jsonb" NOT NULL,
116
+ "repertory_ids" "text"[] NOT NULL,
117
+ "repertory" "jsonb" NOT NULL,
118
+ "rel_events" "text"[] NOT NULL,
119
+ "active_invitation_link" boolean NOT NULL,
120
+ "short_dynamic_link" "text",
121
+ "invitation_link" "text",
122
+ "notify_at" timestamp with time zone NOT NULL,
123
+ "max_attendance" bigint,
124
+ "deleted_at" timestamp with time zone,
125
+ "roll_called_by" "text",
126
+ "roll_called_at" timestamp with time zone,
127
+ "roll_call_reminder_at" timestamp with time zone,
128
+ "roll_call_history" "jsonb"[] NOT NULL,
129
+ "template_id" "text",
130
+ "repeat" "jsonb",
131
+ "stage" "jsonb",
132
+ "stage_template_id" "text",
133
+ "response_deadline" "jsonb" NOT NULL,
134
+ "selection_mode_closed_at" timestamp with time zone NOT NULL,
135
+ "owner_user_id" "uuid" NOT NULL,
136
+ "created_on" "public"."event_created_on" NOT NULL,
137
+ "location" "extensions"."geography" NOT NULL
138
+ );
139
+
140
+ ALTER TABLE "public"."event" OWNER TO "postgres";
141
+
142
+ CREATE TABLE IF NOT EXISTS "public"."group" (
143
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
144
+ "display_name" "text" NOT NULL,
145
+ "photo_url" "text" NOT NULL,
146
+ "username" "text" NOT NULL,
147
+ "music_style" "text" NOT NULL,
148
+ "locality" "text" NOT NULL,
149
+ "location" "extensions"."geography"(Point,4326) NOT NULL,
150
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
151
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
152
+ "players" "jsonb" NOT NULL,
153
+ "templates" "jsonb" NOT NULL,
154
+ "active_invitation_link" boolean NOT NULL,
155
+ "invitation_link" "text",
156
+ "short_dynamic_link" "text",
157
+ "intercom_id" "text",
158
+ "description" "text",
159
+ "deleted_at" timestamp with time zone,
160
+ "social_networks" "jsonb",
161
+ "config" "jsonb" NOT NULL,
162
+ "satisfaction_index" "jsonb" NOT NULL,
163
+ "plan_id" "public"."group_plan" NOT NULL,
164
+ "partnsership_id" "text",
165
+ "customer_id" "text",
166
+ "country" "text" NOT NULL,
167
+ "instruments" "jsonb" NOT NULL,
168
+ "metadata" "jsonb" NOT NULL,
169
+ "repertoire_tags" "jsonb" NOT NULL,
170
+ "trial_end_at" timestamp with time zone,
171
+ "visited_dashboard_at" "jsonb" NOT NULL,
172
+ "created_on" "public"."group_created_on" NOT NULL,
173
+ "owner_user_id" "text" NOT NULL,
174
+ "player_ids" "text"[] NOT NULL,
175
+ "administrators" "text"[] NOT NULL,
176
+ "invitation_emails" "text"[] NOT NULL,
177
+ "status" "public"."group_status" NOT NULL,
178
+ "onboarding_messages" "jsonb"[] NOT NULL,
179
+ "addresses" "jsonb"[] NOT NULL
180
+ );
181
+
182
+ ALTER TABLE "public"."group" OWNER TO "postgres";
183
+
184
+ ALTER TABLE ONLY "public"."event"
185
+ ADD CONSTRAINT "event_pkey" PRIMARY KEY ("id");
186
+
187
+ ALTER TABLE ONLY "public"."group"
188
+ ADD CONSTRAINT "group_pkey" PRIMARY KEY ("id");
189
+
190
+ ALTER TABLE ONLY "public"."group"
191
+ ADD CONSTRAINT "group_username_key" UNIQUE ("username");
192
+
193
+ ALTER TABLE ONLY "public"."event"
194
+ ADD CONSTRAINT "event_promoter_group_id_fkey" FOREIGN KEY ("promoter_group_id") REFERENCES "public"."group"("id") ON UPDATE CASCADE ON DELETE CASCADE;
195
+
196
+ ALTER TABLE "public"."event" ENABLE ROW LEVEL SECURITY;
197
+
198
+ ALTER TABLE "public"."group" ENABLE ROW LEVEL SECURITY;
199
+
200
+ GRANT USAGE ON SCHEMA "public" TO "postgres";
201
+ GRANT USAGE ON SCHEMA "public" TO "anon";
202
+ GRANT USAGE ON SCHEMA "public" TO "authenticated";
203
+ GRANT USAGE ON SCHEMA "public" TO "service_role";
204
+
205
+ GRANT ALL ON TABLE "public"."event" TO "anon";
206
+ GRANT ALL ON TABLE "public"."event" TO "authenticated";
207
+ GRANT ALL ON TABLE "public"."event" TO "service_role";
208
+
209
+ GRANT ALL ON TABLE "public"."group" TO "anon";
210
+ GRANT ALL ON TABLE "public"."group" TO "authenticated";
211
+ GRANT ALL ON TABLE "public"."group" TO "service_role";
212
+
213
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres";
214
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon";
215
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated";
216
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role";
217
+
218
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres";
219
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon";
220
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated";
221
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role";
222
+
223
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres";
224
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon";
225
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated";
226
+ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role";
227
+
228
+ RESET ALL;
@@ -0,0 +1 @@
1
+ alter table "public"."event" alter column "selection_mode_closed_at" drop not null;