@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.
- package/.firebaserc +7 -0
- package/.husky/pre-commit +4 -0
- package/README.md +70 -0
- package/{models → lib/models}/User/index.d.ts +7 -1
- package/{models → lib/models}/User/index.js +9 -0
- package/{models → lib/models}/User/types.d.ts +6 -0
- package/{models → lib/models}/User/types.js +5 -1
- package/{types → lib/types}/supabase/generated.d.ts +0 -36
- package/package.json +1 -1
- package/scripts/setHusky.js +11 -0
- package/supabase/.dev.env +1 -0
- package/supabase/.prod.env +1 -0
- package/supabase/.sample.env +2 -0
- package/supabase/README.md +126 -0
- package/supabase/config.toml +68 -0
- package/supabase/migrations/20231117044943_remote_schema.sql +228 -0
- package/supabase/migrations/20231117124947_event_selection_mode_closed_at_nullable.sql +1 -0
- package/supabase/migrations/20231121002132_remote_schema.sql +31 -0
- package/supabase/migrations/20231121004031_references_nullable.sql +3 -0
- package/supabase/migrations/20231121014339_updated_at_trigger.sql +13 -0
- package/supabase/migrations/20231122111241_remote_schema.sql +25 -0
- package/supabase/migrations/20231124151424_snake_case_to_camel_case.sql +105 -0
- package/supabase/migrations/20231129133721_add_columns_for_sites.sql +11 -0
- package/supabase/migrations/20231129142806_promoter_can_be_null.sql +3 -0
- package/supabase/migrations/20231130125327_group_location_latlon.sql +3 -0
- package/supabase/migrations/20231130150154_error_solvings.sql +9 -0
- package/supabase/migrations/20240405115914_new_columns.sql +9 -0
- package/supabase/migrations/20240405121956_init_offer.sql +81 -0
- package/supabase/migrations/20240503032440_add_columns_to_offer.sql +11 -0
- package/supabase/migrations/20240503101641_add_column_createdOn.sql +19 -0
- package/supabase/migrations/20240506035104_add_groupInfo_to_offer.sql +10 -0
- package/supabase/migrations/20240510110328_add_relationships_to_offer.sql +9 -0
- package/supabase/migrations/20240514100316_offers_public.sql +9 -0
- package/supabase/migrations/20260506013030_add_user_mirror.sql +50 -0
- package/supabase/migrations/20260506013031_add_user_group_mirror.sql +31 -0
- package/supabase/migrations/20260529000000_init_group_payment.sql +79 -0
- package/supabase/migrations/20260529120000_group_payment_realtime.sql +19 -0
- package/supabase/migrations/20260529130000_group_payment_anon_read.sql +16 -0
- package/supabase/migrations/20260601000000_group_payment_concept_norm.sql +20 -0
- package/supabase/migrations/20260605000000_init_partnership_domain.sql +333 -0
- package/supabase/migrations/20260605000100_partnership_recurring_rpc.sql +62 -0
- package/supabase/migrations/20260606000000_partnership_payer.sql +83 -0
- package/supabase/migrations/20260607000000_partnership_partner_number_not_unique.sql +10 -0
- package/supabase/migrations/20260608000000_partnership_payment_method_bizum.sql +2 -0
- package/supabase/migrations/20260609000000_partnership_payment_sepa_end_to_end.sql +13 -0
- package/supabase/migrations/20260617000000_partnership_portal_query_indexes.sql +23 -0
- package/supabase/migrations/20260618000000_partnership_communication_attachments.sql +5 -0
- package/supabase/migrations/20260701000000_partnership_recurring_rpc_drop_ambiguous.sql +29 -0
- package/supabase/migrations/20260713191700_add_personal_calendar_feed.sql +506 -0
- package/supabase/migrations/20260714193734_add_pending_calendar_invitations.sql +403 -0
- package/supabase/migrations/20260714205623_add_event_datetime_end_backfill.sql +64 -0
- package/supabase/migrations/20260729161126_remove_calendar_event_history_dependency.sql +19 -0
- package/supabase/migrations/20260729161202_reconcile_production_remote_schema.sql +135 -0
- package/supabase/migrations/20260804120000_add_calendar_feed_token_cipher.sql +9 -0
- package/supabase/migrations/20260805120000_replace_usergroup_with_group_playerids.sql +363 -0
- package/supabase/seed.sql +2973 -0
- package/models/supabase/User/Group/types.d.ts +0 -6
- package/models/supabase/User/Group/types.js +0 -2
- package/models/supabase/User/types.d.ts +0 -6
- package/models/supabase/User/types.js +0 -2
- package/types/firestore.ts +0 -1998
- package/types/messagebirdChatWidget.ts +0 -20
- package/types/minVersion.ts +0 -4
- package/types/payoutRule.ts +0 -132
- package/types/supabase/generated.ts +0 -1718
- package/types/supabase/index.ts +0 -36
- package/types/supabase/overwrites/comm.ts +0 -18
- package/types/supabase/overwrites/comm_history.ts +0 -10
- package/types/supabase/overwrites/event.ts +0 -28
- package/types/supabase/overwrites/event_history.ts +0 -10
- package/types/supabase/overwrites/group.ts +0 -49
- package/types/supabase/overwrites/group_history.ts +0 -9
- package/types/supabase/overwrites/index.ts +0 -7
- package/types/supabase/overwrites/offer.ts +0 -15
- package/types/supabase/overwrites/offer_history.ts +0 -10
- package/types/supabase/overwrites/repertoire.ts +0 -12
- package/types/supabase/overwrites/repertoire_history.ts +0 -10
- package/types/supabase/overwrites/utils.ts +0 -4
- /package/{functions → lib/functions}/auth.d.ts +0 -0
- /package/{functions → lib/functions}/auth.js +0 -0
- /package/{functions → lib/functions}/calendarFeed.d.ts +0 -0
- /package/{functions → lib/functions}/calendarFeed.js +0 -0
- /package/{functions → lib/functions}/communication.d.ts +0 -0
- /package/{functions → lib/functions}/communication.js +0 -0
- /package/{functions → lib/functions}/communicationComment.d.ts +0 -0
- /package/{functions → lib/functions}/communicationComment.js +0 -0
- /package/{functions → lib/functions}/customer.d.ts +0 -0
- /package/{functions → lib/functions}/customer.js +0 -0
- /package/{functions → lib/functions}/customerGroup.d.ts +0 -0
- /package/{functions → lib/functions}/customerGroup.js +0 -0
- /package/{functions → lib/functions}/event.d.ts +0 -0
- /package/{functions → lib/functions}/event.js +0 -0
- /package/{functions → lib/functions}/eventPlayer.d.ts +0 -0
- /package/{functions → lib/functions}/eventPlayer.js +0 -0
- /package/{functions → lib/functions}/eventRepertory.d.ts +0 -0
- /package/{functions → lib/functions}/eventRepertory.js +0 -0
- /package/{functions → lib/functions}/eventoPayout.d.ts +0 -0
- /package/{functions → lib/functions}/eventoPayout.js +0 -0
- /package/{functions → lib/functions}/federation.d.ts +0 -0
- /package/{functions → lib/functions}/federation.js +0 -0
- /package/{functions → lib/functions}/federationPartnership.d.ts +0 -0
- /package/{functions → lib/functions}/federationPartnership.js +0 -0
- /package/{functions → lib/functions}/group.d.ts +0 -0
- /package/{functions → lib/functions}/group.js +0 -0
- /package/{functions → lib/functions}/groupEventStage.d.ts +0 -0
- /package/{functions → lib/functions}/groupEventStage.js +0 -0
- /package/{functions → lib/functions}/groupModule.d.ts +0 -0
- /package/{functions → lib/functions}/groupModule.js +0 -0
- /package/{functions → lib/functions}/groupPayment.d.ts +0 -0
- /package/{functions → lib/functions}/groupPayment.js +0 -0
- /package/{functions → lib/functions}/groupPayoutRule.d.ts +0 -0
- /package/{functions → lib/functions}/groupPayoutRule.js +0 -0
- /package/{functions → lib/functions}/groupPlayer.d.ts +0 -0
- /package/{functions → lib/functions}/groupPlayer.js +0 -0
- /package/{functions → lib/functions}/groupRepertory.d.ts +0 -0
- /package/{functions → lib/functions}/groupRepertory.js +0 -0
- /package/{functions → lib/functions}/index.d.ts +0 -0
- /package/{functions → lib/functions}/index.js +0 -0
- /package/{functions → lib/functions}/inventory.d.ts +0 -0
- /package/{functions → lib/functions}/inventory.js +0 -0
- /package/{functions → lib/functions}/inventoryItem.d.ts +0 -0
- /package/{functions → lib/functions}/inventoryItem.js +0 -0
- /package/{functions → lib/functions}/jwt.d.ts +0 -0
- /package/{functions → lib/functions}/jwt.js +0 -0
- /package/{functions → lib/functions}/misc.d.ts +0 -0
- /package/{functions → lib/functions}/misc.js +0 -0
- /package/{functions → lib/functions}/notification.d.ts +0 -0
- /package/{functions → lib/functions}/notification.js +0 -0
- /package/{functions → lib/functions}/offer.d.ts +0 -0
- /package/{functions → lib/functions}/offer.js +0 -0
- /package/{functions → lib/functions}/offerApplicant.d.ts +0 -0
- /package/{functions → lib/functions}/offerApplicant.js +0 -0
- /package/{functions → lib/functions}/partnership.d.ts +0 -0
- /package/{functions → lib/functions}/partnership.js +0 -0
- /package/{functions → lib/functions}/partnershipCommunication.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipCommunication.js +0 -0
- /package/{functions → lib/functions}/partnershipGroup.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipGroup.js +0 -0
- /package/{functions → lib/functions}/partnershipPartner.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipPartner.js +0 -0
- /package/{functions → lib/functions}/partnershipPayment.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipPayment.js +0 -0
- /package/{functions → lib/functions}/partnershipPlan.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipPlan.js +0 -0
- /package/{functions → lib/functions}/partnershipSepaPaymentGroup.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipSepaPaymentGroup.js +0 -0
- /package/{functions → lib/functions}/partnershipSubscription.d.ts +0 -0
- /package/{functions → lib/functions}/partnershipSubscription.js +0 -0
- /package/{functions → lib/functions}/regions.d.ts +0 -0
- /package/{functions → lib/functions}/regions.js +0 -0
- /package/{functions → lib/functions}/subscription.d.ts +0 -0
- /package/{functions → lib/functions}/subscription.js +0 -0
- /package/{functions → lib/functions}/user.d.ts +0 -0
- /package/{functions → lib/functions}/user.js +0 -0
- /package/{functions → lib/functions}/userNotification.d.ts +0 -0
- /package/{functions → lib/functions}/userNotification.js +0 -0
- /package/{helpers → lib/helpers}/appScenes.d.ts +0 -0
- /package/{helpers → lib/helpers}/appScenes.js +0 -0
- /package/{helpers → lib/helpers}/audios.d.ts +0 -0
- /package/{helpers → lib/helpers}/audios.js +0 -0
- /package/{helpers → lib/helpers}/auth.d.ts +0 -0
- /package/{helpers → lib/helpers}/auth.js +0 -0
- /package/{helpers → lib/helpers}/badges.d.ts +0 -0
- /package/{helpers → lib/helpers}/badges.js +0 -0
- /package/{helpers → lib/helpers}/collections.d.ts +0 -0
- /package/{helpers → lib/helpers}/collections.js +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/index.js +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/newGroup.d.ts +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/newGroup.js +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/newMember.d.ts +0 -0
- /package/{helpers → lib/helpers}/communicationTemplate/newMember.js +0 -0
- /package/{helpers → lib/helpers}/countries.d.ts +0 -0
- /package/{helpers → lib/helpers}/countries.js +0 -0
- /package/{helpers → lib/helpers}/currency.d.ts +0 -0
- /package/{helpers → lib/helpers}/currency.js +0 -0
- /package/{helpers → lib/helpers}/dlinks.d.ts +0 -0
- /package/{helpers → lib/helpers}/dlinks.js +0 -0
- /package/{helpers → lib/helpers}/errors.d.ts +0 -0
- /package/{helpers → lib/helpers}/errors.js +0 -0
- /package/{helpers → lib/helpers}/fileSections/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/fileSections/index.js +0 -0
- /package/{helpers → lib/helpers}/fileSections/orders.d.ts +0 -0
- /package/{helpers → lib/helpers}/fileSections/orders.js +0 -0
- /package/{helpers → lib/helpers}/glissandooAdmin.d.ts +0 -0
- /package/{helpers → lib/helpers}/glissandooAdmin.js +0 -0
- /package/{helpers → lib/helpers}/instruments/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/instruments/index.js +0 -0
- /package/{helpers → lib/helpers}/instruments/lists.d.ts +0 -0
- /package/{helpers → lib/helpers}/instruments/lists.js +0 -0
- /package/{helpers → lib/helpers}/instruments/orders.d.ts +0 -0
- /package/{helpers → lib/helpers}/instruments/orders.js +0 -0
- /package/{helpers → lib/helpers}/musicStyles/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/musicStyles/index.js +0 -0
- /package/{helpers → lib/helpers}/musicStyles/orders.d.ts +0 -0
- /package/{helpers → lib/helpers}/musicStyles/orders.js +0 -0
- /package/{helpers → lib/helpers}/notifications/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/notifications/index.js +0 -0
- /package/{helpers → lib/helpers}/notifications/placeholders.d.ts +0 -0
- /package/{helpers → lib/helpers}/notifications/placeholders.js +0 -0
- /package/{helpers → lib/helpers}/objects.d.ts +0 -0
- /package/{helpers → lib/helpers}/objects.js +0 -0
- /package/{helpers → lib/helpers}/paymentForecast.d.ts +0 -0
- /package/{helpers → lib/helpers}/paymentForecast.js +0 -0
- /package/{helpers → lib/helpers}/payoutRules.d.ts +0 -0
- /package/{helpers → lib/helpers}/payoutRules.js +0 -0
- /package/{helpers → lib/helpers}/plans.d.ts +0 -0
- /package/{helpers → lib/helpers}/plans.js +0 -0
- /package/{helpers → lib/helpers}/rates.d.ts +0 -0
- /package/{helpers → lib/helpers}/rates.js +0 -0
- /package/{helpers → lib/helpers}/reasons.d.ts +0 -0
- /package/{helpers → lib/helpers}/reasons.js +0 -0
- /package/{helpers → lib/helpers}/slate.d.ts +0 -0
- /package/{helpers → lib/helpers}/slate.js +0 -0
- /package/{helpers → lib/helpers}/styles.d.ts +0 -0
- /package/{helpers → lib/helpers}/styles.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/array-includes.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/array-includes.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/as-mutable.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/as-mutable.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/assert-error.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/assert-error.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/index.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/index.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-defined.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-defined.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-empty.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-empty.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-finite.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-finite.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-infinite.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-infinite.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-integer.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-integer.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-present.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-present.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-safe-integer.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/is-safe-integer.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-entries.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-entries.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-from-entries.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-from-entries.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-has-own.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-has-own.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-keys.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/object-keys.js +0 -0
- /package/{helpers → lib/helpers}/ts-extras/set-has.d.ts +0 -0
- /package/{helpers → lib/helpers}/ts-extras/set-has.js +0 -0
- /package/{helpers → lib/helpers}/types.d.ts +0 -0
- /package/{helpers → lib/helpers}/types.js +0 -0
- /package/{helpers → lib/helpers}/utils.d.ts +0 -0
- /package/{helpers → lib/helpers}/utils.js +0 -0
- /package/{index.d.ts → lib/index.d.ts} +0 -0
- /package/{index.js → lib/index.js} +0 -0
- /package/{lang → lib/lang}/ca.json +0 -0
- /package/{lang → lib/lang}/de.json +0 -0
- /package/{lang → lib/lang}/en.json +0 -0
- /package/{lang → lib/lang}/es.json +0 -0
- /package/{lang → lib/lang}/eu.json +0 -0
- /package/{lang → lib/lang}/fr.json +0 -0
- /package/{lang → lib/lang}/gl.json +0 -0
- /package/{lang → lib/lang}/index.d.ts +0 -0
- /package/{lang → lib/lang}/index.js +0 -0
- /package/{lang → lib/lang}/it.json +0 -0
- /package/{lang → lib/lang}/nl.json +0 -0
- /package/{lang → lib/lang}/pt.json +0 -0
- /package/{models → lib/models}/Communication/Comment/index.d.ts +0 -0
- /package/{models → lib/models}/Communication/Comment/index.js +0 -0
- /package/{models → lib/models}/Communication/Comment/types.d.ts +0 -0
- /package/{models → lib/models}/Communication/Comment/types.js +0 -0
- /package/{models → lib/models}/Communication/index.d.ts +0 -0
- /package/{models → lib/models}/Communication/index.js +0 -0
- /package/{models → lib/models}/Communication/types.d.ts +0 -0
- /package/{models → lib/models}/Communication/types.js +0 -0
- /package/{models → lib/models}/Counters/Group/Analytics/index.d.ts +0 -0
- /package/{models → lib/models}/Counters/Group/Analytics/index.js +0 -0
- /package/{models → lib/models}/Counters/Group/Analytics/types.d.ts +0 -0
- /package/{models → lib/models}/Counters/Group/Analytics/types.js +0 -0
- /package/{models → lib/models}/Counters/Group/index.d.ts +0 -0
- /package/{models → lib/models}/Counters/Group/index.js +0 -0
- /package/{models → lib/models}/Counters/Group/types.d.ts +0 -0
- /package/{models → lib/models}/Counters/Group/types.js +0 -0
- /package/{models → lib/models}/Counters/event.d.ts +0 -0
- /package/{models → lib/models}/Counters/event.js +0 -0
- /package/{models → lib/models}/Counters/index.d.ts +0 -0
- /package/{models → lib/models}/Counters/index.js +0 -0
- /package/{models → lib/models}/Counters/types.d.ts +0 -0
- /package/{models → lib/models}/Counters/types.js +0 -0
- /package/{models → lib/models}/Customer/Group/index.d.ts +0 -0
- /package/{models → lib/models}/Customer/Group/index.js +0 -0
- /package/{models → lib/models}/Customer/Group/types.d.ts +0 -0
- /package/{models → lib/models}/Customer/Group/types.js +0 -0
- /package/{models → lib/models}/Customer/basic.d.ts +0 -0
- /package/{models → lib/models}/Customer/basic.js +0 -0
- /package/{models → lib/models}/Customer/index.d.ts +0 -0
- /package/{models → lib/models}/Customer/index.js +0 -0
- /package/{models → lib/models}/Customer/types.d.ts +0 -0
- /package/{models → lib/models}/Customer/types.js +0 -0
- /package/{models → lib/models}/Evento/Player/basic.d.ts +0 -0
- /package/{models → lib/models}/Evento/Player/basic.js +0 -0
- /package/{models → lib/models}/Evento/Player/index.d.ts +0 -0
- /package/{models → lib/models}/Evento/Player/index.js +0 -0
- /package/{models → lib/models}/Evento/Player/types.d.ts +0 -0
- /package/{models → lib/models}/Evento/Player/types.js +0 -0
- /package/{models → lib/models}/Evento/Repertory/index.d.ts +0 -0
- /package/{models → lib/models}/Evento/Repertory/index.js +0 -0
- /package/{models → lib/models}/Evento/Repertory/types.d.ts +0 -0
- /package/{models → lib/models}/Evento/Repertory/types.js +0 -0
- /package/{models → lib/models}/Evento/basic.d.ts +0 -0
- /package/{models → lib/models}/Evento/basic.js +0 -0
- /package/{models → lib/models}/Evento/index.d.ts +0 -0
- /package/{models → lib/models}/Evento/index.js +0 -0
- /package/{models → lib/models}/Evento/promoter.d.ts +0 -0
- /package/{models → lib/models}/Evento/promoter.js +0 -0
- /package/{models → lib/models}/Evento/tiny.d.ts +0 -0
- /package/{models → lib/models}/Evento/tiny.js +0 -0
- /package/{models → lib/models}/Evento/types.d.ts +0 -0
- /package/{models → lib/models}/Evento/types.js +0 -0
- /package/{models → lib/models}/Federation/Partnership/index.d.ts +0 -0
- /package/{models → lib/models}/Federation/Partnership/index.js +0 -0
- /package/{models → lib/models}/Federation/Partnership/types.d.ts +0 -0
- /package/{models → lib/models}/Federation/Partnership/types.js +0 -0
- /package/{models → lib/models}/Federation/index.d.ts +0 -0
- /package/{models → lib/models}/Federation/index.js +0 -0
- /package/{models → lib/models}/Federation/types.d.ts +0 -0
- /package/{models → lib/models}/Federation/types.js +0 -0
- /package/{models → lib/models}/Group/Analytics/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Analytics/index.js +0 -0
- /package/{models → lib/models}/Group/Analytics/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Analytics/types.js +0 -0
- /package/{models → lib/models}/Group/Event/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Event/index.js +0 -0
- /package/{models → lib/models}/Group/Event/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Event/types.js +0 -0
- /package/{models → lib/models}/Group/Payment/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Payment/index.js +0 -0
- /package/{models → lib/models}/Group/Payment/supabase.d.ts +0 -0
- /package/{models → lib/models}/Group/Payment/supabase.js +0 -0
- /package/{models → lib/models}/Group/Payment/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Payment/types.js +0 -0
- /package/{models → lib/models}/Group/Player/Event/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/Event/index.js +0 -0
- /package/{models → lib/models}/Group/Player/Event/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/Event/types.js +0 -0
- /package/{models → lib/models}/Group/Player/Log/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/Log/index.js +0 -0
- /package/{models → lib/models}/Group/Player/Log/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/Log/types.js +0 -0
- /package/{models → lib/models}/Group/Player/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/index.js +0 -0
- /package/{models → lib/models}/Group/Player/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Player/types.js +0 -0
- /package/{models → lib/models}/Group/Repertory/File/Section/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/File/Section/index.js +0 -0
- /package/{models → lib/models}/Group/Repertory/File/Section/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/File/Section/types.js +0 -0
- /package/{models → lib/models}/Group/Repertory/File/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/File/index.js +0 -0
- /package/{models → lib/models}/Group/Repertory/File/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/File/types.js +0 -0
- /package/{models → lib/models}/Group/Repertory/FilePath/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/FilePath/index.js +0 -0
- /package/{models → lib/models}/Group/Repertory/index.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/index.js +0 -0
- /package/{models → lib/models}/Group/Repertory/types.d.ts +0 -0
- /package/{models → lib/models}/Group/Repertory/types.js +0 -0
- /package/{models → lib/models}/Group/StageTemplate/index.d.ts +0 -0
- /package/{models → lib/models}/Group/StageTemplate/index.js +0 -0
- /package/{models → lib/models}/Group/StageTemplate/types.d.ts +0 -0
- /package/{models → lib/models}/Group/StageTemplate/types.js +0 -0
- /package/{models → lib/models}/Group/basic.d.ts +0 -0
- /package/{models → lib/models}/Group/basic.js +0 -0
- /package/{models → lib/models}/Group/index.d.ts +0 -0
- /package/{models → lib/models}/Group/index.js +0 -0
- /package/{models → lib/models}/Group/types.d.ts +0 -0
- /package/{models → lib/models}/Group/types.js +0 -0
- /package/{models → lib/models}/Instrument/group.d.ts +0 -0
- /package/{models → lib/models}/Instrument/group.js +0 -0
- /package/{models → lib/models}/Instrument/index.d.ts +0 -0
- /package/{models → lib/models}/Instrument/index.js +0 -0
- /package/{models → lib/models}/Inventory/Item/index.d.ts +0 -0
- /package/{models → lib/models}/Inventory/Item/index.js +0 -0
- /package/{models → lib/models}/Inventory/Item/types.d.ts +0 -0
- /package/{models → lib/models}/Inventory/Item/types.js +0 -0
- /package/{models → lib/models}/Inventory/index.d.ts +0 -0
- /package/{models → lib/models}/Inventory/index.js +0 -0
- /package/{models → lib/models}/Inventory/types.d.ts +0 -0
- /package/{models → lib/models}/Inventory/types.js +0 -0
- /package/{models → lib/models}/Metrics/index.d.ts +0 -0
- /package/{models → lib/models}/Metrics/index.js +0 -0
- /package/{models → lib/models}/Metrics/types.d.ts +0 -0
- /package/{models → lib/models}/Metrics/types.js +0 -0
- /package/{models → lib/models}/Model/index.d.ts +0 -0
- /package/{models → lib/models}/Model/index.js +0 -0
- /package/{models → lib/models}/Model/lang.d.ts +0 -0
- /package/{models → lib/models}/Model/lang.js +0 -0
- /package/{models → lib/models}/MusicStyle/index.d.ts +0 -0
- /package/{models → lib/models}/MusicStyle/index.js +0 -0
- /package/{models → lib/models}/Notification/index.d.ts +0 -0
- /package/{models → lib/models}/Notification/index.js +0 -0
- /package/{models → lib/models}/Notification/types.d.ts +0 -0
- /package/{models → lib/models}/Notification/types.js +0 -0
- /package/{models → lib/models}/Offer/Applicant/index.d.ts +0 -0
- /package/{models → lib/models}/Offer/Applicant/index.js +0 -0
- /package/{models → lib/models}/Offer/Applicant/types.d.ts +0 -0
- /package/{models → lib/models}/Offer/Applicant/types.js +0 -0
- /package/{models → lib/models}/Offer/index.d.ts +0 -0
- /package/{models → lib/models}/Offer/index.js +0 -0
- /package/{models → lib/models}/Offer/types.d.ts +0 -0
- /package/{models → lib/models}/Offer/types.js +0 -0
- /package/{models → lib/models}/Partnership/Communication/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Communication/index.js +0 -0
- /package/{models → lib/models}/Partnership/Communication/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Communication/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Communication/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Communication/types.js +0 -0
- /package/{models → lib/models}/Partnership/Group/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Group/index.js +0 -0
- /package/{models → lib/models}/Partnership/Group/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Group/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Group/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Group/types.js +0 -0
- /package/{models → lib/models}/Partnership/Partner/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Partner/index.js +0 -0
- /package/{models → lib/models}/Partnership/Partner/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Partner/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Partner/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Partner/types.js +0 -0
- /package/{models → lib/models}/Partnership/Payment/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Payment/index.js +0 -0
- /package/{models → lib/models}/Partnership/Payment/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Payment/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Payment/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Payment/types.js +0 -0
- /package/{models → lib/models}/Partnership/Plan/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Plan/index.js +0 -0
- /package/{models → lib/models}/Partnership/Plan/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Plan/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Plan/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Plan/types.js +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/index.js +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/SepaPaymentGroup/types.js +0 -0
- /package/{models → lib/models}/Partnership/Subscription/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Subscription/index.js +0 -0
- /package/{models → lib/models}/Partnership/Subscription/supabase.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Subscription/supabase.js +0 -0
- /package/{models → lib/models}/Partnership/Subscription/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/Subscription/types.js +0 -0
- /package/{models → lib/models}/Partnership/basic.d.ts +0 -0
- /package/{models → lib/models}/Partnership/basic.js +0 -0
- /package/{models → lib/models}/Partnership/index.d.ts +0 -0
- /package/{models → lib/models}/Partnership/index.js +0 -0
- /package/{models → lib/models}/Partnership/types.d.ts +0 -0
- /package/{models → lib/models}/Partnership/types.js +0 -0
- /package/{models → lib/models}/Player/basic.d.ts +0 -0
- /package/{models → lib/models}/Player/basic.js +0 -0
- /package/{models → lib/models}/Player/types.d.ts +0 -0
- /package/{models → lib/models}/Player/types.js +0 -0
- /package/{models → lib/models}/Repertory/basic.d.ts +0 -0
- /package/{models → lib/models}/Repertory/basic.js +0 -0
- /package/{models → lib/models}/Repertory/types.d.ts +0 -0
- /package/{models → lib/models}/Repertory/types.js +0 -0
- /package/{models → lib/models}/User/Group/index.d.ts +0 -0
- /package/{models → lib/models}/User/Group/index.js +0 -0
- /package/{models → lib/models}/User/Group/types.d.ts +0 -0
- /package/{models → lib/models}/User/Group/types.js +0 -0
- /package/{models → lib/models}/User/Notification/index.d.ts +0 -0
- /package/{models → lib/models}/User/Notification/index.js +0 -0
- /package/{models → lib/models}/User/Notification/types.d.ts +0 -0
- /package/{models → lib/models}/User/Notification/types.js +0 -0
- /package/{models → lib/models}/User/OfferAlarm/index.d.ts +0 -0
- /package/{models → lib/models}/User/OfferAlarm/index.js +0 -0
- /package/{models → lib/models}/User/OfferAlarm/types.d.ts +0 -0
- /package/{models → lib/models}/User/OfferAlarm/types.js +0 -0
- /package/{models → lib/models}/User/Partnership/index.d.ts +0 -0
- /package/{models → lib/models}/User/Partnership/index.js +0 -0
- /package/{models → lib/models}/User/Partnership/types.d.ts +0 -0
- /package/{models → lib/models}/User/Partnership/types.js +0 -0
- /package/{models → lib/models}/User/basic.d.ts +0 -0
- /package/{models → lib/models}/User/basic.js +0 -0
- /package/{models → lib/models}/User/extended.d.ts +0 -0
- /package/{models → lib/models}/User/extended.js +0 -0
- /package/{models → lib/models}/WebhookEvent/index.d.ts +0 -0
- /package/{models → lib/models}/WebhookEvent/index.js +0 -0
- /package/{models → lib/models}/WebhookEvent/types.d.ts +0 -0
- /package/{models → lib/models}/WebhookEvent/types.js +0 -0
- /package/{types → lib/types}/firestore.d.ts +0 -0
- /package/{types → lib/types}/firestore.js +0 -0
- /package/{types → lib/types}/messagebirdChatWidget.d.ts +0 -0
- /package/{types → lib/types}/messagebirdChatWidget.js +0 -0
- /package/{types → lib/types}/minVersion.d.ts +0 -0
- /package/{types → lib/types}/minVersion.js +0 -0
- /package/{types → lib/types}/payoutRule.d.ts +0 -0
- /package/{types → lib/types}/payoutRule.js +0 -0
- /package/{types → lib/types}/supabase/generated.js +0 -0
- /package/{types → lib/types}/supabase/index.d.ts +0 -0
- /package/{types → lib/types}/supabase/index.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/comm.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/comm.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/comm_history.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/comm_history.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/event.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/event.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/event_history.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/event_history.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/group.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/group.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/group_history.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/group_history.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/index.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/index.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/offer.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/offer.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/offer_history.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/offer_history.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/repertoire.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/repertoire.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/repertoire_history.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/repertoire_history.js +0 -0
- /package/{types → lib/types}/supabase/overwrites/utils.d.ts +0 -0
- /package/{types → lib/types}/supabase/overwrites/utils.js +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
alter table "public"."event" add column "timezone" text not null;
|
|
2
|
+
|
|
3
|
+
alter table "public"."event" alter column "id" drop default;
|
|
4
|
+
|
|
5
|
+
alter table "public"."event" alter column "id" set data type text using "id"::text;
|
|
6
|
+
|
|
7
|
+
alter table "public"."event" alter column "location" set data type geography(Point,4326) using "location"::geography(Point,4326);
|
|
8
|
+
|
|
9
|
+
alter table "public"."event" drop column "promoter_group_id";
|
|
10
|
+
|
|
11
|
+
alter table "public"."group" alter column "id" set data type text using "id"::text;
|
|
12
|
+
|
|
13
|
+
alter table "public"."event" add column "promoter_group_id" text;
|
|
14
|
+
|
|
15
|
+
ALTER TABLE "public"."event"
|
|
16
|
+
ADD CONSTRAINT event_promoter_group_id_fkey FOREIGN KEY (promoter_group_id) REFERENCES "group"(id);
|
|
17
|
+
|
|
18
|
+
alter table "public"."group" drop column "partnsership_id";
|
|
19
|
+
|
|
20
|
+
alter table "public"."group" add column "partnership_id" text;
|
|
21
|
+
|
|
22
|
+
alter table "public"."group" alter column "id" drop default;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
alter table "public"."group" alter column "owner_user_id" drop not null;
|
|
26
|
+
|
|
27
|
+
CREATE INDEX event_geo_index ON public.event USING gist (location);
|
|
28
|
+
|
|
29
|
+
CREATE INDEX group_geo_index ON public."group" USING gist (location);
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
create extension if not exists moddatetime schema extensions;
|
|
2
|
+
|
|
3
|
+
create trigger
|
|
4
|
+
handle_group__updated_at before update
|
|
5
|
+
on "group"
|
|
6
|
+
for each row execute
|
|
7
|
+
procedure moddatetime(updated_at);
|
|
8
|
+
|
|
9
|
+
create trigger
|
|
10
|
+
handle_event__updated_at before update
|
|
11
|
+
on "event"
|
|
12
|
+
for each row execute
|
|
13
|
+
procedure moddatetime(updated_at);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
alter table "public"."event" drop constraint "event_promoter_group_id_fkey";
|
|
2
|
+
|
|
3
|
+
alter table "public"."event" alter column "promoter_group_id" set not null;
|
|
4
|
+
|
|
5
|
+
alter table "public"."event" add constraint "event_promoter_group_id_fkey" FOREIGN KEY (promoter_group_id) REFERENCES "group"(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
6
|
+
|
|
7
|
+
alter table "public"."event" validate constraint "event_promoter_group_id_fkey";
|
|
8
|
+
|
|
9
|
+
create policy "Enable read access for all users"
|
|
10
|
+
on "public"."event"
|
|
11
|
+
as permissive
|
|
12
|
+
for select
|
|
13
|
+
to public
|
|
14
|
+
using (true);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
create policy "Enable read access for all users"
|
|
18
|
+
on "public"."group"
|
|
19
|
+
as permissive
|
|
20
|
+
for select
|
|
21
|
+
to public
|
|
22
|
+
using (true);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
alter table "public"."event" rename column "active_invitation_link" to "activeInvitationLink";
|
|
2
|
+
|
|
3
|
+
alter table "public"."event" rename column "cover_url" to "coverURL";
|
|
4
|
+
|
|
5
|
+
alter table "public"."event" rename column "created_at" to "createdAt";
|
|
6
|
+
|
|
7
|
+
alter table "public"."event" rename column "datetime_end" to "datetimeEnd";
|
|
8
|
+
|
|
9
|
+
alter table "public"."event" rename column "description_slate" to "descriptionSlate";
|
|
10
|
+
|
|
11
|
+
alter table "public"."event" rename column "display_name" to "displayName";
|
|
12
|
+
|
|
13
|
+
alter table "public"."event" rename column "invitation_link" to "invitationLink";
|
|
14
|
+
|
|
15
|
+
alter table "public"."event" rename column "max_attendance" to "maxAttendance";
|
|
16
|
+
|
|
17
|
+
alter table "public"."event" rename column "notify_at" to "notifyAt";
|
|
18
|
+
|
|
19
|
+
alter table "public"."event" rename column "player_ids" to "playerIds";
|
|
20
|
+
|
|
21
|
+
alter table "public"."event" rename column "rel_events" to "relEvents";
|
|
22
|
+
|
|
23
|
+
alter table "public"."event" rename column "repertory_ids" to "repertoryIds";
|
|
24
|
+
|
|
25
|
+
alter table "public"."event" rename column "response_deadline_at" to "responseDeadlineAt";
|
|
26
|
+
|
|
27
|
+
alter table "public"."event" rename column "selection_mode" to "selectionMode";
|
|
28
|
+
|
|
29
|
+
alter table "public"."event" rename column "short_dynamic_link" to "shortDynamicLink";
|
|
30
|
+
|
|
31
|
+
alter table "public"."event" rename column "updated_at" to "updatedAt";
|
|
32
|
+
|
|
33
|
+
alter table "public"."event" rename column "video_url" to "videoURL";
|
|
34
|
+
|
|
35
|
+
alter table "public"."event" rename column "created_on" to "createdOn";
|
|
36
|
+
|
|
37
|
+
alter table "public"."event" rename column "deleted_at" to "deletedAt";
|
|
38
|
+
|
|
39
|
+
alter table "public"."event" rename column "owner_user_id" to "owner";
|
|
40
|
+
|
|
41
|
+
alter table "public"."event" rename column "promoter_group_id" to "promoter";
|
|
42
|
+
|
|
43
|
+
alter table "public"."event" rename column "response_deadline" to "responseDeadline";
|
|
44
|
+
|
|
45
|
+
alter table "public"."event" rename column "roll_call_history" to "rollCallHistory";
|
|
46
|
+
|
|
47
|
+
alter table "public"."event" rename column "roll_call_reminder_at" to "rollCallReminderAt";
|
|
48
|
+
|
|
49
|
+
alter table "public"."event" rename column "roll_called_at" to "rollCalledAt";
|
|
50
|
+
|
|
51
|
+
alter table "public"."event" rename column "roll_called_by" to "rollCalledBy";
|
|
52
|
+
|
|
53
|
+
alter table "public"."event" rename column "selection_mode_closed_at" to "selectionModeClosedAt";
|
|
54
|
+
|
|
55
|
+
alter table "public"."event" rename column "stage_template_id" to "stageTemplateId";
|
|
56
|
+
|
|
57
|
+
alter table "public"."event" rename column "template_id" to "templateId";
|
|
58
|
+
|
|
59
|
+
alter table "public"."group" rename column "active_invitation_link" to "activeInvitationLink";
|
|
60
|
+
|
|
61
|
+
alter table "public"."group" rename column "created_at" to "createdAt";
|
|
62
|
+
|
|
63
|
+
alter table "public"."group" rename column "created_on" to "createdOn";
|
|
64
|
+
|
|
65
|
+
alter table "public"."group" rename column "customer_id" to "customerId";
|
|
66
|
+
|
|
67
|
+
alter table "public"."group" rename column "deleted_at" to "deletedAt";
|
|
68
|
+
|
|
69
|
+
alter table "public"."group" rename column "display_name" to "displayName";
|
|
70
|
+
|
|
71
|
+
alter table "public"."group" rename column "intercom_id" to "intercomId";
|
|
72
|
+
|
|
73
|
+
alter table "public"."group" rename column "invitation_emails" to "invitationEmails";
|
|
74
|
+
|
|
75
|
+
alter table "public"."group" rename column "invitation_link" to "invitationLink";
|
|
76
|
+
|
|
77
|
+
alter table "public"."group" rename column "music_style" to "musicStyle";
|
|
78
|
+
|
|
79
|
+
alter table "public"."group" rename column "onboarding_messages" to "onboardingMessages";
|
|
80
|
+
|
|
81
|
+
alter table "public"."group" rename column "owner_user_id" to "owner";
|
|
82
|
+
|
|
83
|
+
alter table "public"."group" rename column "partnership_id" to "partnershipId";
|
|
84
|
+
|
|
85
|
+
alter table "public"."group" rename column "photo_url" to "photoURL";
|
|
86
|
+
|
|
87
|
+
alter table "public"."group" rename column "plan_id" to "planId";
|
|
88
|
+
|
|
89
|
+
alter table "public"."group" rename column "player_ids" to "playerIds";
|
|
90
|
+
|
|
91
|
+
alter table "public"."group" rename column "repertoire_tags" to "repertoireTags";
|
|
92
|
+
|
|
93
|
+
alter table "public"."group" rename column "satisfaction_index" to "satisfactionIndex";
|
|
94
|
+
|
|
95
|
+
alter table "public"."group" rename column "short_dynamic_link" to "shortDynamicLink";
|
|
96
|
+
|
|
97
|
+
alter table "public"."group" rename column "social_networks" to "socialNetworks";
|
|
98
|
+
|
|
99
|
+
alter table "public"."group" rename column "trial_end_at" to "trialEndAt";
|
|
100
|
+
|
|
101
|
+
alter table "public"."group" rename column "updated_at" to "updatedAt";
|
|
102
|
+
|
|
103
|
+
alter table "public"."group" rename column "visited_dashboard_at" to "visitedDashboardAt";
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
create type "public"."lonlat" as ("longitude" numeric, "latitude" numeric);
|
|
2
|
+
|
|
3
|
+
alter table "public"."event" add column "location_lonlat" lonlat generated always as (ROW((st_x((location)::geometry))::numeric, (st_y((location)::geometry))::numeric)::lonlat) stored;
|
|
4
|
+
|
|
5
|
+
alter table "public"."event" alter column "location_lonlat" set not null;
|
|
6
|
+
|
|
7
|
+
alter table "public"."event" add column "sites" boolean not null default false;
|
|
8
|
+
|
|
9
|
+
alter table "public"."group" add column "configSites" jsonb not null default '{"active": false, "showEvents": false, "showMembers": false}'::jsonb;
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
drop trigger if exists "handle_event__updated_at" on "public"."event";
|
|
2
|
+
|
|
3
|
+
drop trigger if exists "handle_group__updated_at" on "public"."group";
|
|
4
|
+
|
|
5
|
+
CREATE TRIGGER event__handle_updatedat BEFORE UPDATE ON public.event FOR EACH ROW EXECUTE FUNCTION moddatetime('updatedAt');
|
|
6
|
+
|
|
7
|
+
CREATE TRIGGER group__handle_updatedat BEFORE UPDATE ON public."group" FOR EACH ROW EXECUTE FUNCTION moddatetime('updatedAt');
|
|
8
|
+
|
|
9
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
create type "public"."offer_type" as enum ('group', 'event');
|
|
2
|
+
|
|
3
|
+
create table "public"."offer" (
|
|
4
|
+
"id" text not null,
|
|
5
|
+
"title" text not null,
|
|
6
|
+
"description" text not null,
|
|
7
|
+
"instrument" text not null,
|
|
8
|
+
"type" offer_type not null,
|
|
9
|
+
"group" text not null,
|
|
10
|
+
"event" text,
|
|
11
|
+
"applicantsIds" text[] not null,
|
|
12
|
+
"applicants" jsonb not null,
|
|
13
|
+
"deadlineAt" timestamp with time zone,
|
|
14
|
+
"selectionClosedAt" timestamp with time zone,
|
|
15
|
+
"selectionClosedBy" text,
|
|
16
|
+
"updatedAt" timestamp with time zone not null,
|
|
17
|
+
"updatedBy" text not null,
|
|
18
|
+
"deletedAt" timestamp with time zone,
|
|
19
|
+
"deletedBy" text,
|
|
20
|
+
"createdAt" timestamp with time zone not null,
|
|
21
|
+
"createdBy" text not null
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
alter table "public"."offer" enable row level security;
|
|
26
|
+
|
|
27
|
+
CREATE UNIQUE INDEX offer_pkey ON public.offer USING btree (id);
|
|
28
|
+
|
|
29
|
+
alter table "public"."offer" add constraint "offer_pkey" PRIMARY KEY using index "offer_pkey";
|
|
30
|
+
|
|
31
|
+
alter table "public"."offer" add constraint "public_offer_event_fkey" FOREIGN KEY (event) REFERENCES event(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
32
|
+
|
|
33
|
+
alter table "public"."offer" validate constraint "public_offer_event_fkey";
|
|
34
|
+
|
|
35
|
+
alter table "public"."offer" add constraint "public_offer_group_fkey" FOREIGN KEY ("group") REFERENCES "group"(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
36
|
+
|
|
37
|
+
alter table "public"."offer" validate constraint "public_offer_group_fkey";
|
|
38
|
+
|
|
39
|
+
grant delete on table "public"."offer" to "anon";
|
|
40
|
+
|
|
41
|
+
grant insert on table "public"."offer" to "anon";
|
|
42
|
+
|
|
43
|
+
grant references on table "public"."offer" to "anon";
|
|
44
|
+
|
|
45
|
+
grant select on table "public"."offer" to "anon";
|
|
46
|
+
|
|
47
|
+
grant trigger on table "public"."offer" to "anon";
|
|
48
|
+
|
|
49
|
+
grant truncate on table "public"."offer" to "anon";
|
|
50
|
+
|
|
51
|
+
grant update on table "public"."offer" to "anon";
|
|
52
|
+
|
|
53
|
+
grant delete on table "public"."offer" to "authenticated";
|
|
54
|
+
|
|
55
|
+
grant insert on table "public"."offer" to "authenticated";
|
|
56
|
+
|
|
57
|
+
grant references on table "public"."offer" to "authenticated";
|
|
58
|
+
|
|
59
|
+
grant select on table "public"."offer" to "authenticated";
|
|
60
|
+
|
|
61
|
+
grant trigger on table "public"."offer" to "authenticated";
|
|
62
|
+
|
|
63
|
+
grant truncate on table "public"."offer" to "authenticated";
|
|
64
|
+
|
|
65
|
+
grant update on table "public"."offer" to "authenticated";
|
|
66
|
+
|
|
67
|
+
grant delete on table "public"."offer" to "service_role";
|
|
68
|
+
|
|
69
|
+
grant insert on table "public"."offer" to "service_role";
|
|
70
|
+
|
|
71
|
+
grant references on table "public"."offer" to "service_role";
|
|
72
|
+
|
|
73
|
+
grant select on table "public"."offer" to "service_role";
|
|
74
|
+
|
|
75
|
+
grant trigger on table "public"."offer" to "service_role";
|
|
76
|
+
|
|
77
|
+
grant truncate on table "public"."offer" to "service_role";
|
|
78
|
+
|
|
79
|
+
grant update on table "public"."offer" to "service_role";
|
|
80
|
+
|
|
81
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
alter table "public"."offer" add column "country" text not null;
|
|
2
|
+
|
|
3
|
+
alter table "public"."offer" add column "locality" text not null;
|
|
4
|
+
|
|
5
|
+
alter table "public"."offer" add column "location" geography not null;
|
|
6
|
+
|
|
7
|
+
alter table "public"."offer" add column "location_lonlat" lonlat not null generated always as (ROW((st_x((location)::geometry))::numeric, (st_y((location)::geometry))::numeric)::lonlat) stored;
|
|
8
|
+
|
|
9
|
+
alter table "public"."offer" add column "timezone" text not null;
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
create type "public"."created_on" as enum ('app', 'dashboard', 'auth', 'web');
|
|
2
|
+
|
|
3
|
+
begin;
|
|
4
|
+
|
|
5
|
+
set local statement_timeout = 600000;
|
|
6
|
+
|
|
7
|
+
alter table "public"."event" alter column "createdOn" set data type created_on using "createdOn"::text::created_on;
|
|
8
|
+
|
|
9
|
+
alter table "public"."group" alter column "createdOn" set data type created_on using "createdOn"::text::created_on;
|
|
10
|
+
|
|
11
|
+
alter table "public"."offer" add column "createdOn" created_on not null;
|
|
12
|
+
|
|
13
|
+
commit;
|
|
14
|
+
|
|
15
|
+
drop type "public"."event_created_on";
|
|
16
|
+
|
|
17
|
+
drop type "public"."group_created_on";
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
alter table "public"."offer" drop constraint "public_offer_event_fkey";
|
|
2
|
+
|
|
3
|
+
alter table "public"."offer" drop constraint "public_offer_group_fkey";
|
|
4
|
+
|
|
5
|
+
alter table "public"."offer" rename column "event" to "eventId";
|
|
6
|
+
|
|
7
|
+
alter table "public"."offer" rename column "group" to "groupId";
|
|
8
|
+
|
|
9
|
+
alter table "public"."offer" add column "groupInfo" jsonb not null default '{}'::jsonb;
|
|
10
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
alter table "public"."offer" add constraint "public_offer_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES event(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
2
|
+
|
|
3
|
+
alter table "public"."offer" validate constraint "public_offer_eventId_fkey";
|
|
4
|
+
|
|
5
|
+
alter table "public"."offer" add constraint "public_offer_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "group"(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
6
|
+
|
|
7
|
+
alter table "public"."offer" validate constraint "public_offer_groupId_fkey";
|
|
8
|
+
|
|
9
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS "public"."user" (
|
|
2
|
+
"userId" TEXT PRIMARY KEY,
|
|
3
|
+
"username" TEXT,
|
|
4
|
+
"displayName" TEXT,
|
|
5
|
+
"photoURL" TEXT,
|
|
6
|
+
"name" TEXT,
|
|
7
|
+
"lastname" TEXT,
|
|
8
|
+
"email" TEXT,
|
|
9
|
+
"language" TEXT,
|
|
10
|
+
"role" TEXT,
|
|
11
|
+
"locality" TEXT,
|
|
12
|
+
"description" TEXT,
|
|
13
|
+
"fakeUser" BOOLEAN NOT NULL DEFAULT false,
|
|
14
|
+
"analyticsEnabled" BOOLEAN NOT NULL DEFAULT true,
|
|
15
|
+
"partnershipIds" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
16
|
+
"customerIds" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
17
|
+
"federationId" TEXT,
|
|
18
|
+
"groups" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
19
|
+
"groupsAdmin" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
20
|
+
"groupInvites" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
21
|
+
"notificationSettings" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
22
|
+
"emailSettings" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
23
|
+
"dashboardConfig" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
24
|
+
"appConfig" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
25
|
+
"devices" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
26
|
+
"whatsNew" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
27
|
+
"rawData" JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
28
|
+
"createdAt" TIMESTAMPTZ,
|
|
29
|
+
"updatedAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
30
|
+
"deletedAt" TIMESTAMPTZ,
|
|
31
|
+
"lastAppLoginAt" TIMESTAMPTZ,
|
|
32
|
+
"lastWebLoginAt" TIMESTAMPTZ,
|
|
33
|
+
"lastBiweeklyEmailAt" TIMESTAMPTZ
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
ALTER TABLE "public"."user" ENABLE ROW LEVEL SECURITY;
|
|
37
|
+
|
|
38
|
+
REVOKE ALL ON TABLE "public"."user" FROM "anon";
|
|
39
|
+
REVOKE ALL ON TABLE "public"."user" FROM "authenticated";
|
|
40
|
+
|
|
41
|
+
GRANT SELECT ON TABLE "public"."user" TO "authenticated";
|
|
42
|
+
GRANT ALL ON TABLE "public"."user" TO "service_role";
|
|
43
|
+
|
|
44
|
+
DROP POLICY IF EXISTS "Users can read own user" ON "public"."user";
|
|
45
|
+
|
|
46
|
+
CREATE POLICY "Users can read own user"
|
|
47
|
+
ON "public"."user"
|
|
48
|
+
FOR SELECT
|
|
49
|
+
TO "authenticated"
|
|
50
|
+
USING ("userId" = ((select auth.jwt()) ->> 'sub'));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS "public"."userGroup" (
|
|
2
|
+
"userId" TEXT NOT NULL,
|
|
3
|
+
"groupId" TEXT NOT NULL,
|
|
4
|
+
"role" TEXT NOT NULL CHECK ("role" IN ('admin', 'member', 'guest')),
|
|
5
|
+
"isAdmin" BOOLEAN NOT NULL DEFAULT false,
|
|
6
|
+
"permissions" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
7
|
+
"mainInstrument" TEXT,
|
|
8
|
+
"instruments" TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
|
9
|
+
"joinedAt" TIMESTAMPTZ,
|
|
10
|
+
"updatedAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
11
|
+
PRIMARY KEY ("userId", "groupId")
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
CREATE INDEX IF NOT EXISTS "userGroup_groupId_idx"
|
|
15
|
+
ON "public"."userGroup" ("groupId");
|
|
16
|
+
|
|
17
|
+
ALTER TABLE "public"."userGroup" ENABLE ROW LEVEL SECURITY;
|
|
18
|
+
|
|
19
|
+
REVOKE ALL ON TABLE "public"."userGroup" FROM "anon";
|
|
20
|
+
REVOKE ALL ON TABLE "public"."userGroup" FROM "authenticated";
|
|
21
|
+
|
|
22
|
+
GRANT SELECT ON TABLE "public"."userGroup" TO "authenticated";
|
|
23
|
+
GRANT ALL ON TABLE "public"."userGroup" TO "service_role";
|
|
24
|
+
|
|
25
|
+
DROP POLICY IF EXISTS "Users can read own user groups" ON "public"."userGroup";
|
|
26
|
+
|
|
27
|
+
CREATE POLICY "Users can read own user groups"
|
|
28
|
+
ON "public"."userGroup"
|
|
29
|
+
FOR SELECT
|
|
30
|
+
TO "authenticated"
|
|
31
|
+
USING ("userId" = ((select auth.jwt()) ->> 'sub'));
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
create type "public"."group_payment_type" as enum ('income', 'expense');
|
|
2
|
+
create type "public"."group_payment_status" as enum ('pending', 'paid', 'cancelled');
|
|
3
|
+
create type "public"."group_payment_method" as enum ('cash', 'transfer');
|
|
4
|
+
create type "public"."group_payment_history_action" as enum ('status', 'amount', 'concept', 'method');
|
|
5
|
+
|
|
6
|
+
create table "public"."group_payment" (
|
|
7
|
+
"id" uuid not null default gen_random_uuid(),
|
|
8
|
+
"groupId" text not null,
|
|
9
|
+
"type" group_payment_type not null,
|
|
10
|
+
"status" group_payment_status not null,
|
|
11
|
+
"eventId" text,
|
|
12
|
+
"playerId" text,
|
|
13
|
+
"concept" text not null,
|
|
14
|
+
"assignedTo" text not null,
|
|
15
|
+
"totalAmount" numeric(12, 2),
|
|
16
|
+
"baseAmount" numeric(12, 2),
|
|
17
|
+
"appliedRules" jsonb not null default '[]'::jsonb,
|
|
18
|
+
"currency" text not null default 'EUR',
|
|
19
|
+
"paymentMethod" group_payment_method,
|
|
20
|
+
"paidAt" timestamp with time zone,
|
|
21
|
+
"paidBy" text,
|
|
22
|
+
"note" text,
|
|
23
|
+
"createdAt" timestamp with time zone not null default now(),
|
|
24
|
+
"createdBy" text not null,
|
|
25
|
+
"updatedAt" timestamp with time zone not null default now(),
|
|
26
|
+
"editedBy" text
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
alter table "public"."group_payment" enable row level security;
|
|
30
|
+
|
|
31
|
+
CREATE UNIQUE INDEX group_payment_pkey ON public.group_payment USING btree (id);
|
|
32
|
+
alter table "public"."group_payment" add constraint "group_payment_pkey" PRIMARY KEY using index "group_payment_pkey";
|
|
33
|
+
|
|
34
|
+
CREATE INDEX group_payment_group_created_idx
|
|
35
|
+
ON public.group_payment USING btree ("groupId", "createdAt" desc);
|
|
36
|
+
CREATE INDEX group_payment_group_event_idx
|
|
37
|
+
ON public.group_payment USING btree ("groupId", "eventId")
|
|
38
|
+
WHERE "eventId" is not null;
|
|
39
|
+
CREATE INDEX group_payment_group_player_idx
|
|
40
|
+
ON public.group_payment USING btree ("groupId", "playerId")
|
|
41
|
+
WHERE "playerId" is not null;
|
|
42
|
+
CREATE INDEX group_payment_group_status_idx
|
|
43
|
+
ON public.group_payment USING btree ("groupId", "status");
|
|
44
|
+
CREATE INDEX group_payment_group_paid_idx
|
|
45
|
+
ON public.group_payment USING btree ("groupId", "paidAt" desc)
|
|
46
|
+
WHERE "paidAt" is not null;
|
|
47
|
+
|
|
48
|
+
CREATE TRIGGER group_payment__handle_updatedat
|
|
49
|
+
BEFORE UPDATE ON public.group_payment
|
|
50
|
+
FOR EACH ROW EXECUTE FUNCTION extensions.moddatetime('updatedAt');
|
|
51
|
+
|
|
52
|
+
create table "public"."group_payment_history" (
|
|
53
|
+
"id" uuid not null default gen_random_uuid(),
|
|
54
|
+
"payment_id" uuid not null,
|
|
55
|
+
"action" group_payment_history_action not null,
|
|
56
|
+
"old_value" text,
|
|
57
|
+
"new_value" text,
|
|
58
|
+
"changed_at" timestamp with time zone not null default now(),
|
|
59
|
+
"changed_by" text not null
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
alter table "public"."group_payment_history" enable row level security;
|
|
63
|
+
|
|
64
|
+
CREATE UNIQUE INDEX group_payment_history_pkey ON public.group_payment_history USING btree (id);
|
|
65
|
+
alter table "public"."group_payment_history" add constraint "group_payment_history_pkey" PRIMARY KEY using index "group_payment_history_pkey";
|
|
66
|
+
|
|
67
|
+
alter table "public"."group_payment_history"
|
|
68
|
+
add constraint "group_payment_history_payment_id_fkey"
|
|
69
|
+
FOREIGN KEY ("payment_id") REFERENCES public.group_payment(id)
|
|
70
|
+
ON UPDATE CASCADE ON DELETE CASCADE;
|
|
71
|
+
|
|
72
|
+
CREATE INDEX group_payment_history_payment_idx
|
|
73
|
+
ON public.group_payment_history USING btree ("payment_id", "changed_at" desc);
|
|
74
|
+
|
|
75
|
+
-- Grants (sin políticas RLS → solo service_role accede a los datos)
|
|
76
|
+
grant delete, insert, references, select, trigger, truncate, update
|
|
77
|
+
on table "public"."group_payment" to "anon", "authenticated", "service_role";
|
|
78
|
+
grant delete, insert, references, select, trigger, truncate, update
|
|
79
|
+
on table "public"."group_payment_history" to "anon", "authenticated", "service_role";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- Permitir lectura desde el dashboard (cliente autenticado con JWT).
|
|
2
|
+
-- Las escrituras siguen exclusivamente vía Cloud Functions con service_role,
|
|
3
|
+
-- que ignora RLS por definición.
|
|
4
|
+
create policy "Authenticated can read group_payment"
|
|
5
|
+
on "public"."group_payment"
|
|
6
|
+
as permissive
|
|
7
|
+
for select
|
|
8
|
+
to authenticated
|
|
9
|
+
using (true);
|
|
10
|
+
|
|
11
|
+
create policy "Authenticated can read group_payment_history"
|
|
12
|
+
on "public"."group_payment_history"
|
|
13
|
+
as permissive
|
|
14
|
+
for select
|
|
15
|
+
to authenticated
|
|
16
|
+
using (true);
|
|
17
|
+
|
|
18
|
+
-- Habilitar Postgres Changes (Realtime) sobre la tabla principal.
|
|
19
|
+
alter publication supabase_realtime add table public.group_payment;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- La app m\u00f3vil (React Native) y el dashboard cuando no est\u00e1n autenticados contra
|
|
2
|
+
-- Supabase Auth acceden con la clave anon. Las escrituras siguen yendo
|
|
3
|
+
-- exclusivamente v\u00eda Cloud Functions con service_role.
|
|
4
|
+
create policy "Anon can read group_payment"
|
|
5
|
+
on "public"."group_payment"
|
|
6
|
+
as permissive
|
|
7
|
+
for select
|
|
8
|
+
to anon
|
|
9
|
+
using (true);
|
|
10
|
+
|
|
11
|
+
create policy "Anon can read group_payment_history"
|
|
12
|
+
on "public"."group_payment_history"
|
|
13
|
+
as permissive
|
|
14
|
+
for select
|
|
15
|
+
to anon
|
|
16
|
+
using (true);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
create extension if not exists unaccent;
|
|
2
|
+
create extension if not exists pg_trgm;
|
|
3
|
+
|
|
4
|
+
create or replace function public.immutable_unaccent(text)
|
|
5
|
+
returns text
|
|
6
|
+
language sql
|
|
7
|
+
immutable
|
|
8
|
+
parallel safe
|
|
9
|
+
strict
|
|
10
|
+
as $$
|
|
11
|
+
select public.unaccent('public.unaccent', $1);
|
|
12
|
+
$$;
|
|
13
|
+
|
|
14
|
+
alter table "public"."group_payment"
|
|
15
|
+
add column "conceptNorm" text
|
|
16
|
+
generated always as (lower(public.immutable_unaccent("concept"))) stored;
|
|
17
|
+
|
|
18
|
+
create index group_payment_concept_norm_trgm_idx
|
|
19
|
+
on "public"."group_payment"
|
|
20
|
+
using gin ("conceptNorm" gin_trgm_ops);
|