@glissandoo/lib 1.115.0 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/functions/auth.d.ts +1 -3
- package/functions/customer.d.ts +0 -4
- package/functions/event.d.ts +22 -0
- package/functions/event.js +1 -1
- package/functions/eventPlayer.d.ts +2 -0
- package/functions/eventPlayer.js +1 -1
- package/functions/eventRepertory.d.ts +0 -2
- package/functions/eventRepertory.js +1 -1
- package/functions/eventoPayout.d.ts +70 -0
- package/functions/groupModule.d.ts +13 -0
- package/functions/groupPayment.d.ts +62 -0
- package/functions/groupPayoutRule.d.ts +18 -0
- package/functions/groupRepertory.d.ts +0 -110
- package/functions/index.d.ts +12 -30
- package/functions/index.js +13 -31
- package/functions/misc.d.ts +0 -6
- package/functions/regions.js +13 -31
- package/helpers/appScenes.d.ts +2 -0
- package/helpers/appScenes.js +3 -1
- package/helpers/auth.d.ts +9 -2
- package/helpers/auth.js +14 -33
- package/helpers/badges.js +1 -1
- package/helpers/collections.js +2 -2
- package/helpers/communicationTemplate/index.d.ts +2 -3
- package/helpers/communicationTemplate/index.js +5 -5
- package/helpers/currency.d.ts +4 -19
- package/helpers/currency.js +264 -72
- package/helpers/dlinks.js +1 -1
- package/helpers/errors.d.ts +7 -2
- package/helpers/errors.js +7 -2
- package/helpers/glissandooAdmin.d.ts +3 -0
- package/helpers/glissandooAdmin.js +6 -0
- package/helpers/instruments/index.d.ts +0 -17
- package/helpers/instruments/index.js +1 -5
- package/helpers/instruments/lists.d.ts +3 -3
- package/helpers/instruments/lists.js +5 -5
- package/helpers/musicStyles/index.d.ts +4 -22
- package/helpers/musicStyles/index.js +35 -114
- package/helpers/notifications/index.js +1 -1
- package/helpers/objects.d.ts +1 -5
- package/helpers/objects.js +6 -7
- package/helpers/paymentForecast.d.ts +37 -0
- package/helpers/paymentForecast.js +58 -0
- package/helpers/payoutRules.d.ts +45 -0
- package/helpers/payoutRules.js +166 -0
- package/helpers/plans.js +2 -2
- package/helpers/rates.d.ts +1 -1
- package/helpers/slate.d.ts +5 -64
- package/helpers/slate.js +1 -7
- package/helpers/ts-extras/array-includes.js +2 -1
- package/helpers/ts-extras/as-mutable.js +2 -1
- package/helpers/ts-extras/assert-error.js +2 -1
- package/helpers/ts-extras/index.js +1 -1
- package/helpers/ts-extras/is-defined.js +2 -1
- package/helpers/ts-extras/is-empty.js +2 -1
- package/helpers/ts-extras/is-infinite.js +2 -1
- package/helpers/ts-extras/is-present.js +2 -1
- package/helpers/ts-extras/object-entries.d.ts +1 -1
- package/helpers/ts-extras/object-from-entries.d.ts +1 -1
- package/helpers/ts-extras/object-has-own.js +2 -1
- package/helpers/ts-extras/object-keys.d.ts +1 -1
- package/helpers/ts-extras/object-keys.js +1 -0
- package/helpers/ts-extras/set-has.js +2 -1
- package/helpers/types.d.ts +0 -26
- package/helpers/types.js +5 -25
- package/lang/ca.json +97 -325
- package/lang/de.json +97 -325
- package/lang/en.json +97 -325
- package/lang/es.json +97 -325
- package/lang/eu.json +97 -325
- package/lang/fr.json +97 -325
- package/lang/gl.json +97 -325
- package/lang/index.js +2 -3
- package/lang/it.json +97 -325
- package/lang/nl.json +97 -325
- package/lang/pt.json +97 -325
- package/models/Communication/types.d.ts +16 -0
- package/models/Communication/types.js +9 -3
- package/models/Counters/Group/Analytics/types.js +1 -1
- package/models/Customer/index.d.ts +1 -1
- package/models/Customer/index.js +3 -3
- package/models/Customer/types.js +1 -1
- package/models/Evento/Player/index.d.ts +1 -0
- package/models/Evento/Player/index.js +3 -0
- package/models/Evento/Player/types.d.ts +1 -0
- package/models/Evento/Player/types.js +3 -3
- package/models/Evento/Repertory/types.d.ts +1 -2
- package/models/Evento/index.d.ts +4 -3
- package/models/Evento/index.js +10 -5
- package/models/Evento/types.d.ts +43 -2
- package/models/Evento/types.js +42 -8
- package/models/Federation/index.d.ts +1 -1
- package/models/Federation/index.js +3 -3
- package/models/Group/Analytics/types.js +1 -1
- package/models/Group/Payment/index.d.ts +45 -0
- package/models/Group/Payment/index.js +110 -0
- package/models/Group/Payment/supabase.d.ts +16 -0
- package/models/Group/Payment/supabase.js +46 -0
- package/models/Group/Payment/types.d.ts +96 -0
- package/models/Group/Payment/types.js +26 -0
- package/models/Group/Player/types.js +1 -1
- package/models/Group/Repertory/File/Section/index.d.ts +3 -3
- package/models/Group/Repertory/File/Section/index.js +2 -3
- package/models/Group/Repertory/File/Section/types.d.ts +0 -7
- package/models/Group/Repertory/File/Section/types.js +1 -1
- package/models/Group/Repertory/File/index.d.ts +2 -4
- package/models/Group/Repertory/File/index.js +4 -4
- package/models/Group/Repertory/FilePath/index.d.ts +4 -3
- package/models/Group/Repertory/index.d.ts +4 -12
- package/models/Group/Repertory/index.js +0 -9
- package/models/Group/Repertory/types.d.ts +32 -21
- package/models/Group/Repertory/types.js +18 -8
- package/models/Group/index.d.ts +20 -15
- package/models/Group/index.js +34 -16
- package/models/Group/types.d.ts +96 -6
- package/models/Group/types.js +63 -8
- package/models/Instrument/{fromRecord.d.ts → group.d.ts} +5 -4
- package/models/Instrument/{fromRecord.js → group.js} +10 -10
- package/models/Instrument/index.d.ts +0 -2
- package/models/Instrument/index.js +1 -38
- package/models/Inventory/Item/types.js +2 -2
- package/models/Inventory/types.js +1 -1
- package/models/Notification/types.d.ts +4 -1
- package/models/Notification/types.js +5 -2
- package/models/Offer/types.d.ts +12 -0
- package/models/Offer/types.js +15 -2
- package/models/Partnership/Partner/types.js +1 -1
- package/models/Partnership/Payment/types.js +2 -2
- package/models/Partnership/index.d.ts +1 -1
- package/models/Partnership/index.js +3 -3
- package/models/Partnership/types.js +1 -1
- package/models/Repertory/types.d.ts +0 -12
- package/models/Repertory/types.js +2 -2
- package/models/User/Group/index.js +2 -1
- package/models/User/index.d.ts +1 -1
- package/models/User/index.js +3 -3
- package/models/User/types.d.ts +1 -2
- package/models/User/types.js +7 -7
- package/models/WebhookEvent/types.js +1 -1
- package/package.json +20 -28
- package/types/firestore.d.ts +1 -0
- package/types/firestore.js +1 -1
- package/types/payoutRule.d.ts +126 -0
- package/types/payoutRule.js +34 -0
- package/types/payoutRule.ts +132 -0
- package/types/supabase/generated.d.ts +545 -3113
- package/types/supabase/generated.js +0 -9
- package/types/supabase/generated.ts +581 -3080
- package/types/supabase/index.d.ts +19 -155
- package/types/supabase/index.js +0 -15
- package/types/supabase/index.ts +21 -288
- package/types/supabase/overwrites/comm.d.ts +18 -0
- package/types/supabase/overwrites/comm.ts +18 -0
- package/types/supabase/overwrites/comm_history.d.ts +10 -0
- package/types/supabase/overwrites/comm_history.ts +10 -0
- package/types/supabase/overwrites/{tables/event/index.d.ts → event.d.ts} +1 -1
- package/types/supabase/overwrites/{tables/event/index.ts → event.ts} +1 -1
- package/types/supabase/overwrites/event_history.d.ts +10 -0
- package/types/supabase/overwrites/event_history.ts +10 -0
- package/types/supabase/overwrites/{tables/group/index.d.ts → group.d.ts} +5 -2
- package/types/supabase/overwrites/{tables/group/index.ts → group.ts} +6 -2
- package/types/supabase/overwrites/group_history.d.ts +9 -0
- package/types/supabase/overwrites/group_history.ts +9 -0
- package/types/supabase/overwrites/index.d.ts +1 -1
- package/types/supabase/overwrites/index.ts +1 -1
- package/types/supabase/overwrites/{tables/offer/index.d.ts → offer.d.ts} +2 -6
- package/types/supabase/overwrites/{tables/offer/index.ts → offer.ts} +2 -7
- package/types/supabase/overwrites/offer_history.d.ts +10 -0
- package/types/supabase/overwrites/offer_history.ts +10 -0
- package/types/supabase/overwrites/repertoire.d.ts +12 -0
- package/types/supabase/overwrites/repertoire.ts +12 -0
- package/types/supabase/overwrites/repertoire_history.d.ts +10 -0
- package/types/supabase/overwrites/repertoire_history.ts +10 -0
- package/functions/composer.d.ts +0 -13
- package/functions/composerComposition.d.ts +0 -102
- package/functions/composerNotification.d.ts +0 -38
- package/functions/composerPayout.d.ts +0 -20
- package/helpers/catalogBridge.d.ts +0 -121
- package/helpers/catalogBridge.js +0 -95
- package/helpers/compositionCategories/genres.d.ts +0 -922
- package/helpers/compositionCategories/genres.js +0 -940
- package/helpers/compositionCategories/index.d.ts +0 -2
- package/helpers/compositionCategories/index.js +0 -18
- package/helpers/compositionCategories/styles.d.ts +0 -181
- package/helpers/compositionCategories/styles.js +0 -197
- package/helpers/compositionSoloistOffstageParts/index.d.ts +0 -34
- package/helpers/compositionSoloistOffstageParts/index.js +0 -117
- package/helpers/currencyConversion.d.ts +0 -45
- package/helpers/currencyConversion.js +0 -119
- package/helpers/dataStructures/trees/index.d.ts +0 -12
- package/helpers/dataStructures/trees/index.js +0 -71
- package/helpers/dataStructures/trees/types.d.ts +0 -14
- package/helpers/dataStructures/trees/types.js +0 -5
- package/helpers/externalUrls.d.ts +0 -12
- package/helpers/externalUrls.js +0 -40
- package/models/CompositionGenre/index.d.ts +0 -9
- package/models/CompositionGenre/index.js +0 -16
- package/models/CompositionStyle/index.d.ts +0 -9
- package/models/CompositionStyle/index.js +0 -16
- package/models/supabase/Comm/index.d.ts +0 -24
- package/models/supabase/Comm/index.js +0 -68
- package/models/supabase/Comm/types.d.ts +0 -6
- package/models/supabase/CommHistory/index.d.ts +0 -22
- package/models/supabase/CommHistory/index.js +0 -37
- package/models/supabase/CommHistory/types.d.ts +0 -11
- package/models/supabase/CommHistory/types.js +0 -9
- package/models/supabase/Composer/Composition/Acquisition/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/Acquisition/index.js +0 -9
- package/models/supabase/Composer/Composition/Acquisition/types.d.ts +0 -36
- package/models/supabase/Composer/Composition/Favorite/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/Favorite/index.js +0 -9
- package/models/supabase/Composer/Composition/Favorite/types.d.ts +0 -6
- package/models/supabase/Composer/Composition/View/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/View/index.js +0 -9
- package/models/supabase/Composer/Composition/View/types.d.ts +0 -6
- package/models/supabase/Composer/Composition/index.d.ts +0 -5284
- package/models/supabase/Composer/Composition/index.js +0 -166
- package/models/supabase/Composer/Composition/types.d.ts +0 -96
- package/models/supabase/Composer/Composition/types.js +0 -32
- package/models/supabase/Composer/Notification/index.d.ts +0 -4
- package/models/supabase/Composer/Notification/index.js +0 -9
- package/models/supabase/Composer/Notification/types.d.ts +0 -39
- package/models/supabase/Composer/Notification/types.js +0 -27
- package/models/supabase/Composer/Payout/index.d.ts +0 -4
- package/models/supabase/Composer/Payout/index.js +0 -9
- package/models/supabase/Composer/Payout/status.d.ts +0 -1
- package/models/supabase/Composer/Payout/types.d.ts +0 -5
- package/models/supabase/Composer/PerformanceAttendance/types.d.ts +0 -4
- package/models/supabase/Composer/index.d.ts +0 -78
- package/models/supabase/Composer/index.js +0 -105
- package/models/supabase/Composer/types.d.ts +0 -6
- package/models/supabase/EventHistory/index.d.ts +0 -22
- package/models/supabase/EventHistory/index.js +0 -37
- package/models/supabase/EventHistory/types.d.ts +0 -36
- package/models/supabase/EventHistory/types.js +0 -34
- package/models/supabase/GroupHistory/index.d.ts +0 -21
- package/models/supabase/GroupHistory/index.js +0 -34
- package/models/supabase/GroupHistory/types.d.ts +0 -27
- package/models/supabase/GroupHistory/types.js +0 -25
- package/models/supabase/Model/index.d.ts +0 -10
- package/models/supabase/Model/index.js +0 -21
- package/models/supabase/OfferHistory/index.d.ts +0 -22
- package/models/supabase/OfferHistory/index.js +0 -37
- package/models/supabase/OfferHistory/types.d.ts +0 -18
- package/models/supabase/OfferHistory/types.js +0 -16
- package/models/supabase/Repertoire/index.d.ts +0 -16
- package/models/supabase/Repertoire/index.js +0 -43
- package/models/supabase/Repertoire/types.d.ts +0 -6
- package/models/supabase/RepertoireHistory/index.d.ts +0 -22
- package/models/supabase/RepertoireHistory/index.js +0 -37
- package/models/supabase/RepertoireHistory/types.d.ts +0 -21
- package/models/supabase/RepertoireHistory/types.js +0 -19
- package/models/supabase/User/Group/index.d.ts +0 -11
- package/models/supabase/User/Group/index.js +0 -30
- package/models/supabase/User/Group/types.d.ts +0 -6
- package/models/supabase/User/index.d.ts +0 -13
- package/models/supabase/User/index.js +0 -37
- package/models/supabase/User/types.d.ts +0 -6
- package/types/supabase/catalog.d.ts +0 -46
- package/types/supabase/catalog.js +0 -2
- package/types/supabase/catalog.ts +0 -67
- package/types/supabase/composerMetrics.d.ts +0 -27
- package/types/supabase/composerMetrics.js +0 -2
- package/types/supabase/composerMetrics.ts +0 -26
- package/types/supabase/overwrites/tables/comm/model.d.ts +0 -4
- package/types/supabase/overwrites/tables/comm/model.js +0 -2
- package/types/supabase/overwrites/tables/comm/model.ts +0 -4
- package/types/supabase/overwrites/tables/comm_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/comm_history/index.js +0 -2
- package/types/supabase/overwrites/tables/comm_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/comm_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/comm_history/model.js +0 -2
- package/types/supabase/overwrites/tables/comm_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/common/index.js +0 -2
- package/types/supabase/overwrites/tables/composer/index.d.ts +0 -9
- package/types/supabase/overwrites/tables/composer/index.js +0 -2
- package/types/supabase/overwrites/tables/composer/index.ts +0 -10
- package/types/supabase/overwrites/tables/composer/model.d.ts +0 -12
- package/types/supabase/overwrites/tables/composer/model.js +0 -2
- package/types/supabase/overwrites/tables/composer/model.ts +0 -15
- package/types/supabase/overwrites/tables/composer/publicModel.d.ts +0 -11
- package/types/supabase/overwrites/tables/composer/publicModel.js +0 -2
- package/types/supabase/overwrites/tables/composer/publicModel.ts +0 -15
- package/types/supabase/overwrites/tables/composerComposition/index.d.ts +0 -18
- package/types/supabase/overwrites/tables/composerComposition/index.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/index.ts +0 -24
- package/types/supabase/overwrites/tables/composerComposition/model.d.ts +0 -9
- package/types/supabase/overwrites/tables/composerComposition/model.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/model.ts +0 -26
- package/types/supabase/overwrites/tables/composerComposition/publicModel.d.ts +0 -9
- package/types/supabase/overwrites/tables/composerComposition/publicModel.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/publicModel.ts +0 -37
- package/types/supabase/overwrites/tables/composerNotification/index.d.ts +0 -19
- package/types/supabase/overwrites/tables/composerNotification/index.js +0 -2
- package/types/supabase/overwrites/tables/composerNotification/index.ts +0 -25
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.d.ts +0 -2
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.js +0 -2
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.ts +0 -3
- package/types/supabase/overwrites/tables/composerPayout/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/composerPayout/index.js +0 -2
- package/types/supabase/overwrites/tables/composerPayout/index.ts +0 -8
- package/types/supabase/overwrites/tables/compositionAcquisition/index.d.ts +0 -4
- package/types/supabase/overwrites/tables/compositionAcquisition/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionAcquisition/index.ts +0 -8
- package/types/supabase/overwrites/tables/compositionAcquisition/model.d.ts +0 -6
- package/types/supabase/overwrites/tables/compositionAcquisition/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionAcquisition/model.ts +0 -11
- package/types/supabase/overwrites/tables/compositionFavorite/index.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionFavorite/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/index.ts +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/model.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionFavorite/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/model.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/index.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionView/index.ts +0 -2
- package/types/supabase/overwrites/tables/compositionView/model.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionView/model.ts +0 -1
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.d.ts +0 -16
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.js +0 -2
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.ts +0 -18
- package/types/supabase/overwrites/tables/event/index.js +0 -2
- package/types/supabase/overwrites/tables/event_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/event_history/index.js +0 -2
- package/types/supabase/overwrites/tables/event_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/event_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/event_history/model.js +0 -2
- package/types/supabase/overwrites/tables/event_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/group/index.js +0 -2
- package/types/supabase/overwrites/tables/group_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/group_history/index.js +0 -2
- package/types/supabase/overwrites/tables/group_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/group_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/group_history/model.js +0 -2
- package/types/supabase/overwrites/tables/group_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/offer/index.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/offer_history/index.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/offer_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/offer_history/model.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/repertoire/model.d.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire/model.js +0 -2
- package/types/supabase/overwrites/tables/repertoire/model.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire_history/index.js +0 -2
- package/types/supabase/overwrites/tables/repertoire_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/repertoire_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/repertoire_history/model.js +0 -2
- package/types/supabase/overwrites/tables/repertoire_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/user/index.d.ts +0 -11
- package/types/supabase/overwrites/tables/user/index.js +0 -2
- package/types/supabase/overwrites/tables/user/index.ts +0 -13
- /package/functions/{composer.js → eventoPayout.js} +0 -0
- /package/functions/{composerComposition.js → groupModule.js} +0 -0
- /package/functions/{composerNotification.js → groupPayment.js} +0 -0
- /package/functions/{composerPayout.js → groupPayoutRule.js} +0 -0
- /package/{models/supabase/Comm/types.js → types/supabase/overwrites/comm.js} +0 -0
- /package/{models/supabase/Composer/Composition/Acquisition/types.js → types/supabase/overwrites/comm_history.js} +0 -0
- /package/{models/supabase/Composer/Composition/Favorite/types.js → types/supabase/overwrites/event.js} +0 -0
- /package/{models/supabase/Composer/Composition/View/types.js → types/supabase/overwrites/event_history.js} +0 -0
- /package/{models/supabase/Composer/Payout/status.js → types/supabase/overwrites/group.js} +0 -0
- /package/{models/supabase/Composer/Payout/types.js → types/supabase/overwrites/group_history.js} +0 -0
- /package/{models/supabase/Composer/PerformanceAttendance/types.js → types/supabase/overwrites/offer.js} +0 -0
- /package/{models/supabase/Composer/types.js → types/supabase/overwrites/offer_history.js} +0 -0
- /package/{models/supabase/Repertoire/types.js → types/supabase/overwrites/repertoire.js} +0 -0
- /package/{models/supabase/User/Group/types.js → types/supabase/overwrites/repertoire_history.js} +0 -0
- /package/types/supabase/overwrites/{tables/common/index.d.ts → utils.d.ts} +0 -0
- /package/{models/supabase/User/types.js → types/supabase/overwrites/utils.js} +0 -0
- /package/types/supabase/overwrites/{tables/common/index.ts → utils.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupPaymentHistoryAction = exports.GroupPaymentMethod = exports.GroupPaymentStatus = exports.GroupPaymentType = void 0;
|
|
4
|
+
var GroupPaymentType;
|
|
5
|
+
(function (GroupPaymentType) {
|
|
6
|
+
GroupPaymentType["Income"] = "income";
|
|
7
|
+
GroupPaymentType["Expense"] = "expense";
|
|
8
|
+
})(GroupPaymentType = exports.GroupPaymentType || (exports.GroupPaymentType = {}));
|
|
9
|
+
var GroupPaymentStatus;
|
|
10
|
+
(function (GroupPaymentStatus) {
|
|
11
|
+
GroupPaymentStatus["Pending"] = "pending";
|
|
12
|
+
GroupPaymentStatus["Paid"] = "paid";
|
|
13
|
+
GroupPaymentStatus["Cancelled"] = "cancelled";
|
|
14
|
+
})(GroupPaymentStatus = exports.GroupPaymentStatus || (exports.GroupPaymentStatus = {}));
|
|
15
|
+
var GroupPaymentMethod;
|
|
16
|
+
(function (GroupPaymentMethod) {
|
|
17
|
+
GroupPaymentMethod["Cash"] = "cash";
|
|
18
|
+
GroupPaymentMethod["Transfer"] = "transfer";
|
|
19
|
+
})(GroupPaymentMethod = exports.GroupPaymentMethod || (exports.GroupPaymentMethod = {}));
|
|
20
|
+
var GroupPaymentHistoryAction;
|
|
21
|
+
(function (GroupPaymentHistoryAction) {
|
|
22
|
+
GroupPaymentHistoryAction["Status"] = "status";
|
|
23
|
+
GroupPaymentHistoryAction["Amount"] = "amount";
|
|
24
|
+
GroupPaymentHistoryAction["Concept"] = "concept";
|
|
25
|
+
GroupPaymentHistoryAction["Method"] = "method";
|
|
26
|
+
})(GroupPaymentHistoryAction = exports.GroupPaymentHistoryAction || (exports.GroupPaymentHistoryAction = {}));
|
|
@@ -6,4 +6,4 @@ var GroupPlayerRole;
|
|
|
6
6
|
GroupPlayerRole["Admin"] = "admin";
|
|
7
7
|
GroupPlayerRole["Member"] = "member";
|
|
8
8
|
GroupPlayerRole["Guest"] = "guest";
|
|
9
|
-
})(GroupPlayerRole
|
|
9
|
+
})(GroupPlayerRole = exports.GroupPlayerRole || (exports.GroupPlayerRole = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { InstrumentId } from '../../../../../helpers/instruments';
|
|
2
2
|
import { LanguagesTypes } from '../../../../../lang';
|
|
3
|
-
import {
|
|
3
|
+
import { GroupInstruments } from '../../../types';
|
|
4
4
|
import { FileSectionId } from './types';
|
|
5
5
|
export default class GroupRepertoryFileSection {
|
|
6
6
|
id: FileSectionId;
|
|
7
|
-
groupInstruments:
|
|
7
|
+
groupInstruments: GroupInstruments;
|
|
8
8
|
private lang;
|
|
9
|
-
constructor(id: FileSectionId, instruments:
|
|
9
|
+
constructor(id: FileSectionId, instruments: GroupInstruments, lang?: LanguagesTypes);
|
|
10
10
|
get name(): string;
|
|
11
11
|
getOrder(instrumentsIds: InstrumentId[]): number;
|
|
12
12
|
}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const orders_1 = require("../../../../../helpers/fileSections/orders");
|
|
7
7
|
const lang_1 = require("../../../../../lang");
|
|
8
|
-
const
|
|
8
|
+
const group_1 = __importDefault(require("../../../../Instrument/group"));
|
|
9
9
|
const types_1 = require("./types");
|
|
10
10
|
class GroupRepertoryFileSection {
|
|
11
11
|
constructor(id, instruments, lang = lang_1.defaultLocale) {
|
|
@@ -16,8 +16,7 @@ class GroupRepertoryFileSection {
|
|
|
16
16
|
get name() {
|
|
17
17
|
return ((this.id === types_1.FileSectionIdReserved.All
|
|
18
18
|
? (0, lang_1.getTranslation)(`sections.all`, this.lang)
|
|
19
|
-
: new
|
|
20
|
-
this.id);
|
|
19
|
+
: new group_1.default(this.id, this.lang, this.groupInstruments).name) || this.id);
|
|
21
20
|
}
|
|
22
21
|
getOrder(instrumentsIds) {
|
|
23
22
|
return (0, orders_1.getFileSectionsOrder)(instrumentsIds).indexOf(this.id) + 1 || Infinity;
|
|
@@ -3,10 +3,3 @@ export declare enum FileSectionIdReserved {
|
|
|
3
3
|
All = "all"
|
|
4
4
|
}
|
|
5
5
|
export type FileSectionId = InstrumentId | FileSectionIdReserved;
|
|
6
|
-
export type SectionRecord<T extends object = object> = Partial<Record<FileSectionId, T>>;
|
|
7
|
-
export type SectionRecordByTags<T extends object = object> = SectionRecord<{
|
|
8
|
-
tag: string;
|
|
9
|
-
} & T>;
|
|
10
|
-
export type SectionArrayRecordByTags<T extends object = object> = SectionRecord<({
|
|
11
|
-
tag: string;
|
|
12
|
-
} & T)[]>;
|
|
@@ -4,4 +4,4 @@ exports.FileSectionIdReserved = void 0;
|
|
|
4
4
|
var FileSectionIdReserved;
|
|
5
5
|
(function (FileSectionIdReserved) {
|
|
6
6
|
FileSectionIdReserved["All"] = "all";
|
|
7
|
-
})(FileSectionIdReserved
|
|
7
|
+
})(FileSectionIdReserved = exports.FileSectionIdReserved || (exports.FileSectionIdReserved = {}));
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { FileSectionId } from '../File/Section/types';
|
|
2
2
|
import { GroupRepertoireFile } from '../types';
|
|
3
|
-
import { RepertoireFileId } from '../../../Repertory/types';
|
|
4
|
-
import { FileSectionItem } from './types';
|
|
5
3
|
export default class ThemeFile {
|
|
6
|
-
id:
|
|
4
|
+
id: string;
|
|
7
5
|
private data;
|
|
8
6
|
constructor(id: string, data: GroupRepertoireFile);
|
|
9
7
|
get path(): string;
|
|
@@ -19,7 +17,7 @@ export default class ThemeFile {
|
|
|
19
17
|
get sectionsList(): {
|
|
20
18
|
sectionId: FileSectionId;
|
|
21
19
|
tagsByFile: string[];
|
|
22
|
-
tagsByPages:
|
|
20
|
+
tagsByPages: Record<string, number[]>;
|
|
23
21
|
}[];
|
|
24
22
|
get sectionListByTags(): {
|
|
25
23
|
sectionId: FileSectionId;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const lodash_1 = require("lodash");
|
|
4
4
|
const objects_1 = require("../../../../helpers/objects");
|
|
5
|
-
const types_1 = require("
|
|
5
|
+
const types_1 = require("../../types");
|
|
6
6
|
class ThemeFile {
|
|
7
7
|
constructor(id, data) {
|
|
8
8
|
this.id = id;
|
|
@@ -44,7 +44,7 @@ class ThemeFile {
|
|
|
44
44
|
const sectionId = section.id;
|
|
45
45
|
if (this.isFileByPages) {
|
|
46
46
|
const items = Object.entries(section.pages || {}).flatMap(([page, { tags }]) => this.isNoTag(tags)
|
|
47
|
-
? { page: Number(page), tag: types_1.
|
|
47
|
+
? { page: Number(page), tag: types_1.GroupRepertoireTagReserved.NoTag }
|
|
48
48
|
: tags.map((tag) => ({ page: Number(page), tag })));
|
|
49
49
|
const tagsByPages = (0, lodash_1.mapValues)((0, lodash_1.groupBy)(items, 'tag'), (v) => v.map((t) => t.page));
|
|
50
50
|
return {
|
|
@@ -55,7 +55,7 @@ class ThemeFile {
|
|
|
55
55
|
}
|
|
56
56
|
return {
|
|
57
57
|
sectionId,
|
|
58
|
-
tagsByFile: this.isNoTag(section.tags) ? [types_1.
|
|
58
|
+
tagsByFile: this.isNoTag(section.tags) ? [types_1.GroupRepertoireTagReserved.NoTag] : section.tags || [],
|
|
59
59
|
tagsByPages: {},
|
|
60
60
|
};
|
|
61
61
|
});
|
|
@@ -75,7 +75,7 @@ class ThemeFile {
|
|
|
75
75
|
return this.data.identifyAt || null;
|
|
76
76
|
}
|
|
77
77
|
isNoTag(tags = []) {
|
|
78
|
-
return tags.length === 0 || tags.includes(types_1.
|
|
78
|
+
return tags.length === 0 || tags.includes(types_1.GroupRepertoireTagReserved.NoTag);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
exports.default = ThemeFile;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import Group from '../../';
|
|
3
|
-
import { InstrumentsRecord } from '../../../../helpers/instruments';
|
|
4
4
|
import { LanguagesTypes } from '../../../../lang';
|
|
5
|
+
import { GroupInstruments } from '../../types';
|
|
5
6
|
import FileSection from '../File/Section';
|
|
6
7
|
import { FileSectionId } from '../File/Section/types';
|
|
7
8
|
import { GroupRepertoireFilePathItem } from '../types';
|
|
@@ -9,8 +10,8 @@ export default class ThemeFilePath {
|
|
|
9
10
|
sectionId: FileSectionId;
|
|
10
11
|
protected data: GroupRepertoireFilePathItem;
|
|
11
12
|
protected lang: LanguagesTypes;
|
|
12
|
-
protected instruments:
|
|
13
|
-
constructor(sectionId: FileSectionId, data: GroupRepertoireFilePathItem, instruments:
|
|
13
|
+
protected instruments: GroupInstruments;
|
|
14
|
+
constructor(sectionId: FileSectionId, data: GroupRepertoireFilePathItem, instruments: GroupInstruments, lang?: LanguagesTypes);
|
|
14
15
|
get path(): string;
|
|
15
16
|
get parsedPath(): path.ParsedPath;
|
|
16
17
|
get ext(): string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { InstrumentId } from '../../../helpers/instruments';
|
|
2
|
-
import { rateSteps } from '../../../helpers/rates';
|
|
3
2
|
import { LanguagesTypes } from '../../../lang';
|
|
4
3
|
import EventoTiny from '../../Evento/tiny';
|
|
5
4
|
import { DocumentModel } from '../../Model';
|
|
6
5
|
import Theme from '../../Repertory/basic';
|
|
7
6
|
import { FileSectionId } from './File/Section/types';
|
|
8
|
-
import { GroupRepertoireVisibility, GroupRepertoryData
|
|
7
|
+
import { GroupRepertoireVisibility, GroupRepertoryData } from './types';
|
|
9
8
|
export default class GroupRepertory extends Theme<GroupRepertoryData> {
|
|
10
9
|
lang: LanguagesTypes;
|
|
11
10
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
@@ -16,20 +15,16 @@ export default class GroupRepertory extends Theme<GroupRepertoryData> {
|
|
|
16
15
|
id: string;
|
|
17
16
|
})[];
|
|
18
17
|
get sectionIds(): FileSectionId[];
|
|
19
|
-
get filesPath(): Partial<Record<FileSectionId, (
|
|
20
|
-
tag: string;
|
|
21
|
-
} & {
|
|
22
|
-
path: string;
|
|
23
|
-
})[]>>;
|
|
18
|
+
get filesPath(): Partial<Record<FileSectionId, import("./types").GroupRepertoireFilePathItem[]>>;
|
|
24
19
|
get filesPathList(): {
|
|
25
|
-
tag: string;
|
|
26
20
|
path: string;
|
|
21
|
+
tag: string;
|
|
27
22
|
sectionId: FileSectionId;
|
|
28
23
|
}[];
|
|
29
24
|
get visibility(): GroupRepertoireVisibility;
|
|
30
25
|
get votes(): Record<string, import("./types").VoteValue>;
|
|
31
26
|
get votesCount(): number;
|
|
32
|
-
get votesCountByValues(): Record<
|
|
27
|
+
get votesCountByValues(): Record<"love" | "like" | "neutral" | "dislike", number>;
|
|
33
28
|
voteByUserId(userId: string): import("./types").VoteValue;
|
|
34
29
|
get rating(): number;
|
|
35
30
|
get events(): string[];
|
|
@@ -42,9 +37,6 @@ export default class GroupRepertory extends Theme<GroupRepertoryData> {
|
|
|
42
37
|
get thumbnailURL(): string | null;
|
|
43
38
|
get ownerId(): string;
|
|
44
39
|
get lastEventDatetime(): FirebaseFirestore.Timestamp | null;
|
|
45
|
-
get sourceComposition(): SourceComposition | null;
|
|
46
|
-
get acquisitionStatus(): AcquisitionStatus | null;
|
|
47
|
-
get isFromComposer(): boolean;
|
|
48
40
|
get claims(): Partial<Record<InstrumentId, Record<string, import("./types").GroupRepertoryClaimType>>>;
|
|
49
41
|
get claimsList(): {
|
|
50
42
|
createdAt: FirebaseFirestore.Timestamp;
|
|
@@ -95,15 +95,6 @@ class GroupRepertory extends basic_1.default {
|
|
|
95
95
|
get lastEventDatetime() {
|
|
96
96
|
return this.data.lastEventDatetime || null;
|
|
97
97
|
}
|
|
98
|
-
get sourceComposition() {
|
|
99
|
-
return this.data.sourceComposition || null;
|
|
100
|
-
}
|
|
101
|
-
get acquisitionStatus() {
|
|
102
|
-
return this.data.acquisitionStatus || null;
|
|
103
|
-
}
|
|
104
|
-
get isFromComposer() {
|
|
105
|
-
return !!this.data.sourceComposition;
|
|
106
|
-
}
|
|
107
98
|
get claims() {
|
|
108
99
|
return this.data.claims || {};
|
|
109
100
|
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { DocumentReference, Timestamp } from '@google-cloud/firestore';
|
|
2
2
|
import { InstrumentId } from '../../../helpers/instruments';
|
|
3
3
|
import { EventTinyData } from '../../Evento/types';
|
|
4
|
-
import {
|
|
5
|
-
import { FileSectionId
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { ThemeBasicData } from '../../Repertory/types';
|
|
5
|
+
import { FileSectionId } from './File/Section/types';
|
|
6
|
+
export declare enum RepertoireHistoryAction {
|
|
7
|
+
Created = "created",
|
|
8
|
+
Deleted = "deleted",
|
|
9
|
+
PlayerPlay = "player_play",
|
|
10
|
+
PlayerView = "player_view",
|
|
11
|
+
PlayerDownload = "player_download",
|
|
12
|
+
PlayerDownloadAll = "player_download_all",
|
|
13
|
+
PlayerClaim = "player_claim",
|
|
14
|
+
RemovedClaim = "removed_claim",
|
|
15
|
+
EditTitle = "edit_title",
|
|
16
|
+
EditTags = "edit_tags",
|
|
17
|
+
EditVisibility = "edit_visibility",
|
|
18
|
+
EditCompositor = "edit_compositor",
|
|
19
|
+
EditFile = "edit_file"
|
|
20
|
+
}
|
|
8
21
|
export declare enum GroupRepertoireVisibility {
|
|
9
22
|
Always = "always",
|
|
10
23
|
ByEvent = "byEvent"
|
|
@@ -37,34 +50,33 @@ export interface GroupRepertoireScoreFilePage {
|
|
|
37
50
|
export interface AGroupRepertoireScoreFilePage extends GroupRepertoireScoreFilePage {
|
|
38
51
|
id: FileSectionId;
|
|
39
52
|
}
|
|
40
|
-
|
|
53
|
+
type PageNumber = string;
|
|
54
|
+
type FileId = string;
|
|
55
|
+
type UserId = string;
|
|
41
56
|
export interface GroupRepertoireFileSections {
|
|
42
57
|
tags?: string[];
|
|
43
|
-
pages?: Record<
|
|
58
|
+
pages?: Record<PageNumber, GroupRepertoireScoreFilePage>;
|
|
44
59
|
}
|
|
45
|
-
export interface GroupRepertoireFile
|
|
60
|
+
export interface GroupRepertoireFile {
|
|
61
|
+
readonly path: string;
|
|
62
|
+
readonly filetype: string;
|
|
63
|
+
readonly uploadedAt: number;
|
|
46
64
|
readonly pageCount: number | null;
|
|
47
65
|
readonly isEncrypted: boolean;
|
|
48
66
|
identifyAt: number | null;
|
|
49
|
-
sections:
|
|
67
|
+
sections: Partial<Record<FileSectionId, GroupRepertoireFileSections>>;
|
|
50
68
|
}
|
|
51
|
-
export
|
|
69
|
+
export interface GroupRepertoireFilePathItem {
|
|
52
70
|
path: string;
|
|
53
|
-
|
|
54
|
-
export type GroupRepertoireFilePathItem = NonNullable<GroupRepertoireFilePath[keyof GroupRepertoireFilePath]>[number];
|
|
55
|
-
export type VoteValue = 1 | 2 | 3 | 4;
|
|
56
|
-
export type { AcquiredProduct, AcquiredProductsMap, } from '../../supabase/Composer/Composition/Acquisition/types';
|
|
57
|
-
export declare enum AcquisitionStatus {
|
|
58
|
-
Preparing = "preparing",
|
|
59
|
-
ActionsNeeded = "actionsNeeded",
|
|
60
|
-
Ready = "ready"
|
|
71
|
+
tag: string;
|
|
61
72
|
}
|
|
73
|
+
export type VoteValue = 1 | 2 | 3 | 4;
|
|
62
74
|
export interface GroupRepertoryData extends ThemeBasicData {
|
|
63
75
|
events: string[];
|
|
64
76
|
eventsTL: Record<string, EventTinyData>;
|
|
65
77
|
tagsAlgolia: GroupRepertoryTagAlgoliaData[];
|
|
66
|
-
files: Record<
|
|
67
|
-
filesPath:
|
|
78
|
+
files: Record<FileId, GroupRepertoireFile>;
|
|
79
|
+
filesPath: Partial<Record<FileSectionId, GroupRepertoireFilePathItem[]>>;
|
|
68
80
|
votes: Record<string, VoteValue>;
|
|
69
81
|
thumbnailURL: string | null;
|
|
70
82
|
editedAt: Timestamp | null;
|
|
@@ -73,8 +85,7 @@ export interface GroupRepertoryData extends ThemeBasicData {
|
|
|
73
85
|
lastEventDatetime: Timestamp | null;
|
|
74
86
|
claims: Partial<Record<InstrumentId, Record<UserId, GroupRepertoryClaimType>>>;
|
|
75
87
|
clonedFrom: DocumentReference | null;
|
|
76
|
-
sourceComposition?: SourceComposition | null;
|
|
77
|
-
acquisitionStatus?: AcquisitionStatus | null;
|
|
78
88
|
readonly owner: DocumentReference;
|
|
79
89
|
readonly createdAt: Timestamp;
|
|
80
90
|
}
|
|
91
|
+
export {};
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GroupRepertoireVisibility = exports.RepertoireHistoryAction = void 0;
|
|
4
|
+
var RepertoireHistoryAction;
|
|
5
|
+
(function (RepertoireHistoryAction) {
|
|
6
|
+
RepertoireHistoryAction["Created"] = "created";
|
|
7
|
+
RepertoireHistoryAction["Deleted"] = "deleted";
|
|
8
|
+
RepertoireHistoryAction["PlayerPlay"] = "player_play";
|
|
9
|
+
RepertoireHistoryAction["PlayerView"] = "player_view";
|
|
10
|
+
RepertoireHistoryAction["PlayerDownload"] = "player_download";
|
|
11
|
+
RepertoireHistoryAction["PlayerDownloadAll"] = "player_download_all";
|
|
12
|
+
RepertoireHistoryAction["PlayerClaim"] = "player_claim";
|
|
13
|
+
RepertoireHistoryAction["RemovedClaim"] = "removed_claim";
|
|
14
|
+
RepertoireHistoryAction["EditTitle"] = "edit_title";
|
|
15
|
+
RepertoireHistoryAction["EditTags"] = "edit_tags";
|
|
16
|
+
RepertoireHistoryAction["EditVisibility"] = "edit_visibility";
|
|
17
|
+
RepertoireHistoryAction["EditCompositor"] = "edit_compositor";
|
|
18
|
+
RepertoireHistoryAction["EditFile"] = "edit_file";
|
|
19
|
+
})(RepertoireHistoryAction = exports.RepertoireHistoryAction || (exports.RepertoireHistoryAction = {}));
|
|
4
20
|
var GroupRepertoireVisibility;
|
|
5
21
|
(function (GroupRepertoireVisibility) {
|
|
6
22
|
GroupRepertoireVisibility["Always"] = "always";
|
|
7
23
|
GroupRepertoireVisibility["ByEvent"] = "byEvent";
|
|
8
|
-
})(GroupRepertoireVisibility
|
|
9
|
-
var AcquisitionStatus;
|
|
10
|
-
(function (AcquisitionStatus) {
|
|
11
|
-
AcquisitionStatus["Preparing"] = "preparing";
|
|
12
|
-
AcquisitionStatus["ActionsNeeded"] = "actionsNeeded";
|
|
13
|
-
AcquisitionStatus["Ready"] = "ready";
|
|
14
|
-
})(AcquisitionStatus || (exports.AcquisitionStatus = AcquisitionStatus = {}));
|
|
24
|
+
})(GroupRepertoireVisibility = exports.GroupRepertoireVisibility || (exports.GroupRepertoireVisibility = {}));
|
package/models/Group/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
-
import { CustomInstrumentId, CustomInstrument, AInstrument } from '../../helpers/instruments';
|
|
3
2
|
import { PlansGroup } from '../../helpers/plans';
|
|
4
3
|
import { LanguagesTypes } from '../../lang';
|
|
4
|
+
import { GroupPayoutRuleEntry } from '../../types/payoutRule';
|
|
5
5
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
6
6
|
import { DocumentModel } from '../Model';
|
|
7
7
|
import GroupBasic from './basic';
|
|
8
|
-
import { AGroupCustomField, AdminPermissions, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus } from './types';
|
|
9
|
-
import { SocialNetwork } from '../../helpers/types';
|
|
8
|
+
import { AGroupCustomField, AGroupInstrument, AdminPermissions, CustomGroupInstrument, GroupConfigShowAttendanceToMembers, GroupData, GroupModuleData, GroupModuleId, GroupModules, GroupStatus, SocialNetwork } from './types';
|
|
10
9
|
export default class Group extends GroupBasic<GroupData> {
|
|
11
10
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
12
11
|
get owner(): DocumentReference;
|
|
@@ -17,9 +16,9 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
17
16
|
get addresses(): import("./types").GroupAddressData[];
|
|
18
17
|
get addressDefault(): import("./types").GroupAddressData | undefined;
|
|
19
18
|
get activeInvitationLink(): boolean;
|
|
20
|
-
|
|
19
|
+
get invitationLink(): string;
|
|
21
20
|
get invitationEmails(): string[];
|
|
22
|
-
|
|
21
|
+
get shortDynamicLink(): string;
|
|
23
22
|
get admins(): string[];
|
|
24
23
|
get adminPermissions(): Record<string, AdminPermissions[]>;
|
|
25
24
|
permissionsByAdmin(userId: string): AdminPermissions[];
|
|
@@ -34,6 +33,8 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
34
33
|
get eventTotalCount(): number;
|
|
35
34
|
get communicationCount(): number;
|
|
36
35
|
get country(): string;
|
|
36
|
+
get currency(): string;
|
|
37
|
+
get currencySymbol(): string;
|
|
37
38
|
get activePlayers(): string[];
|
|
38
39
|
get playersList(): {
|
|
39
40
|
id: string;
|
|
@@ -49,7 +50,7 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
49
50
|
get intercomId(): string | null;
|
|
50
51
|
get partnershipId(): string | null;
|
|
51
52
|
get customerId(): string | null;
|
|
52
|
-
get socialNetworks():
|
|
53
|
+
get socialNetworks(): Record<SocialNetwork, string | null>;
|
|
53
54
|
getSocialNetworkUrl(id: SocialNetwork): string | null;
|
|
54
55
|
get config(): {
|
|
55
56
|
includesMembersToEventsWhenJoined: boolean;
|
|
@@ -81,25 +82,25 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
81
82
|
get isOutOfMembersLimit(): boolean;
|
|
82
83
|
get isUpgradePlanRequired(): boolean;
|
|
83
84
|
get firstAnswerAt(): FirebaseFirestore.Timestamp | null;
|
|
84
|
-
get repertoireTags(): import("
|
|
85
|
-
get repertoireTagsList(): (import("
|
|
85
|
+
get repertoireTags(): Record<string, import("./types").GroupRepertoireTag>;
|
|
86
|
+
get repertoireTagsList(): (import("./types").GroupRepertoireTag & {
|
|
86
87
|
id: string;
|
|
87
88
|
})[];
|
|
88
89
|
getRepertoireTagName(id: string): string | null;
|
|
89
90
|
get trialEndAt(): Date;
|
|
91
|
+
get glissandooAdminUrl(): string;
|
|
90
92
|
get createdOn(): import("../../helpers/types").CreatedOn;
|
|
91
|
-
|
|
92
|
-
get
|
|
93
|
-
get instrumentsList(): AInstrument[];
|
|
93
|
+
get instruments(): import("./types").GroupInstruments;
|
|
94
|
+
get instrumentsList(): AGroupInstrument[];
|
|
94
95
|
get instrumentsIds(): (import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`)[];
|
|
95
|
-
get customInstruments(): Record
|
|
96
|
-
get customInstrumentsList(): Pick<
|
|
96
|
+
get customInstruments(): Record<`customInstrument-${string}`, CustomGroupInstrument>;
|
|
97
|
+
get customInstrumentsList(): Pick<CustomGroupInstrument & {
|
|
97
98
|
id: `customInstrument-${string}`;
|
|
98
|
-
}, "
|
|
99
|
+
}, "name" | "id" | "icon" | "basedOnInstrument">[];
|
|
99
100
|
get customInstrumentsIds(): `customInstrument-${string}`[];
|
|
100
101
|
get visitedDashboardAt(): Record<string, FirebaseFirestore.Timestamp>;
|
|
101
102
|
get onboardingMessages(): import("./types").GroupOnboardingMessage[];
|
|
102
|
-
|
|
103
|
+
get rollcallLink(): string;
|
|
103
104
|
get subscriptionId(): string | null;
|
|
104
105
|
get questions(): Record<string, import("./types").GroupEventQuestion>;
|
|
105
106
|
get questionsList(): {
|
|
@@ -132,4 +133,8 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
132
133
|
get customFieldsList(): AGroupCustomField[];
|
|
133
134
|
get inventoryId(): string;
|
|
134
135
|
get coverURL(): string | null;
|
|
136
|
+
get modules(): GroupModules;
|
|
137
|
+
getModule(id: GroupModuleId): GroupModuleData | null;
|
|
138
|
+
isModuleEnabled(id: GroupModuleId): boolean;
|
|
139
|
+
get payoutRules(): GroupPayoutRuleEntry[];
|
|
135
140
|
}
|
package/models/Group/index.js
CHANGED
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const date_fns_1 = require("date-fns");
|
|
7
7
|
const lodash_1 = require("lodash");
|
|
8
8
|
const collections_1 = require("../../helpers/collections");
|
|
9
|
-
const
|
|
9
|
+
const currency_1 = require("../../helpers/currency");
|
|
10
|
+
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
10
11
|
const orders_1 = require("../../helpers/instruments/orders");
|
|
11
12
|
const objects_1 = require("../../helpers/objects");
|
|
12
13
|
const plans_1 = require("../../helpers/plans");
|
|
13
14
|
const lang_1 = require("../../lang");
|
|
14
15
|
const basic_1 = __importDefault(require("./basic"));
|
|
15
16
|
const types_1 = require("./types");
|
|
16
|
-
const types_2 = require("../../helpers/types");
|
|
17
17
|
class Group extends basic_1.default {
|
|
18
18
|
constructor(doc, lang = lang_1.defaultLocale) {
|
|
19
19
|
super(doc, lang);
|
|
@@ -51,8 +51,8 @@ class Group extends basic_1.default {
|
|
|
51
51
|
get activeInvitationLink() {
|
|
52
52
|
return this.data.activeInvitationLink || false;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
const link =
|
|
54
|
+
get invitationLink() {
|
|
55
|
+
const link = `https://glissandoo.com/joingroup/${this.id}`;
|
|
56
56
|
if (lang_1.LanguagesTypes.ES === this.lang) {
|
|
57
57
|
return link;
|
|
58
58
|
}
|
|
@@ -61,8 +61,8 @@ class Group extends basic_1.default {
|
|
|
61
61
|
get invitationEmails() {
|
|
62
62
|
return this.data.invitationEmails || [];
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
return
|
|
64
|
+
get shortDynamicLink() {
|
|
65
|
+
return `https://app.glissandoo.com/group/${this.username}`;
|
|
66
66
|
}
|
|
67
67
|
get admins() {
|
|
68
68
|
return this.data.administrators || [];
|
|
@@ -109,6 +109,12 @@ class Group extends basic_1.default {
|
|
|
109
109
|
get country() {
|
|
110
110
|
return this.data.country || 'ES';
|
|
111
111
|
}
|
|
112
|
+
get currency() {
|
|
113
|
+
return this.data.currency || currency_1.DEFAULT_CURRENCY;
|
|
114
|
+
}
|
|
115
|
+
get currencySymbol() {
|
|
116
|
+
return (0, currency_1.getCurrencySymbol)(this.currency, this.lang);
|
|
117
|
+
}
|
|
112
118
|
get activePlayers() {
|
|
113
119
|
return Object.keys(this.players);
|
|
114
120
|
}
|
|
@@ -139,11 +145,11 @@ class Group extends basic_1.default {
|
|
|
139
145
|
return this.data.socialNetworks;
|
|
140
146
|
}
|
|
141
147
|
return {
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
148
|
+
[types_1.SocialNetwork.Facebook]: null,
|
|
149
|
+
[types_1.SocialNetwork.Twitter]: null,
|
|
150
|
+
[types_1.SocialNetwork.Instagram]: null,
|
|
151
|
+
[types_1.SocialNetwork.YouTube]: null,
|
|
152
|
+
[types_1.SocialNetwork.Web]: null,
|
|
147
153
|
};
|
|
148
154
|
}
|
|
149
155
|
getSocialNetworkUrl(id) {
|
|
@@ -237,12 +243,12 @@ class Group extends basic_1.default {
|
|
|
237
243
|
}
|
|
238
244
|
return (0, date_fns_1.addMonths)(this.createdAt.toDate(), 1);
|
|
239
245
|
}
|
|
246
|
+
get glissandooAdminUrl() {
|
|
247
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
|
|
248
|
+
}
|
|
240
249
|
get createdOn() {
|
|
241
250
|
return this.data.createdOn;
|
|
242
251
|
}
|
|
243
|
-
getGlissandooAdminUrl(adminHost) {
|
|
244
|
-
return (0, externalUrls_1.buildAdminEntityUrl)(adminHost, collections_1.CollectionNames.Group, this.id);
|
|
245
|
-
}
|
|
246
252
|
get instruments() {
|
|
247
253
|
return this.data.instruments || {};
|
|
248
254
|
}
|
|
@@ -267,8 +273,8 @@ class Group extends basic_1.default {
|
|
|
267
273
|
get onboardingMessages() {
|
|
268
274
|
return this.data.onboardingMessages || [];
|
|
269
275
|
}
|
|
270
|
-
|
|
271
|
-
return
|
|
276
|
+
get rollcallLink() {
|
|
277
|
+
return `https://glissandoo.com/rollcall/${this.id}`;
|
|
272
278
|
}
|
|
273
279
|
get subscriptionId() {
|
|
274
280
|
return this.data.subscriptionId || null;
|
|
@@ -302,5 +308,17 @@ class Group extends basic_1.default {
|
|
|
302
308
|
get coverURL() {
|
|
303
309
|
return this.data.coverURL || null;
|
|
304
310
|
}
|
|
311
|
+
get modules() {
|
|
312
|
+
return this.data.modules || {};
|
|
313
|
+
}
|
|
314
|
+
getModule(id) {
|
|
315
|
+
return this.modules[id] || null;
|
|
316
|
+
}
|
|
317
|
+
isModuleEnabled(id) {
|
|
318
|
+
return !!this.getModule(id)?.enabled;
|
|
319
|
+
}
|
|
320
|
+
get payoutRules() {
|
|
321
|
+
return this.data.payoutRules || [];
|
|
322
|
+
}
|
|
305
323
|
}
|
|
306
324
|
exports.default = Group;
|