@glissandoo/lib 1.114.0 → 1.115.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 +3 -1
- package/functions/composer.d.ts +13 -0
- package/functions/composerComposition.d.ts +102 -0
- package/functions/composerNotification.d.ts +38 -0
- package/functions/composerPayout.d.ts +20 -0
- package/functions/customer.d.ts +4 -0
- package/functions/event.js +1 -1
- package/functions/eventPlayer.js +1 -1
- package/functions/eventRepertory.d.ts +2 -0
- package/functions/eventRepertory.js +1 -1
- package/functions/groupRepertory.d.ts +110 -0
- package/functions/index.d.ts +30 -0
- package/functions/index.js +31 -1
- package/functions/misc.d.ts +6 -0
- package/functions/regions.js +31 -1
- package/helpers/appScenes.js +1 -1
- package/helpers/auth.d.ts +2 -9
- package/helpers/auth.js +33 -14
- package/helpers/badges.js +1 -1
- package/helpers/catalogBridge.d.ts +121 -0
- package/helpers/catalogBridge.js +95 -0
- package/helpers/collections.js +2 -2
- package/helpers/communicationTemplate/index.d.ts +3 -2
- package/helpers/communicationTemplate/index.js +5 -5
- package/helpers/compositionCategories/genres.d.ts +922 -0
- package/helpers/compositionCategories/genres.js +940 -0
- package/helpers/compositionCategories/index.d.ts +2 -0
- package/helpers/compositionCategories/index.js +18 -0
- package/helpers/compositionCategories/styles.d.ts +181 -0
- package/helpers/compositionCategories/styles.js +197 -0
- package/helpers/compositionSoloistOffstageParts/index.d.ts +34 -0
- package/helpers/compositionSoloistOffstageParts/index.js +117 -0
- package/helpers/currency.d.ts +19 -0
- package/helpers/currency.js +85 -0
- package/helpers/currencyConversion.d.ts +45 -0
- package/helpers/currencyConversion.js +119 -0
- package/helpers/dataStructures/trees/index.d.ts +12 -0
- package/helpers/dataStructures/trees/index.js +71 -0
- package/helpers/dataStructures/trees/types.d.ts +14 -0
- package/helpers/dataStructures/trees/types.js +5 -0
- package/helpers/dlinks.js +1 -1
- package/helpers/errors.d.ts +1 -0
- package/helpers/errors.js +2 -1
- package/helpers/externalUrls.d.ts +12 -0
- package/helpers/externalUrls.js +40 -0
- package/helpers/instruments/index.d.ts +17 -0
- package/helpers/instruments/index.js +5 -1
- package/helpers/instruments/lists.d.ts +3 -3
- package/helpers/instruments/lists.js +5 -5
- package/helpers/musicStyles/index.d.ts +22 -4
- package/helpers/musicStyles/index.js +114 -35
- package/helpers/notifications/index.js +1 -1
- package/helpers/objects.d.ts +5 -1
- package/helpers/objects.js +7 -6
- package/helpers/plans.js +2 -2
- package/helpers/rates.d.ts +1 -1
- package/helpers/slate.d.ts +64 -5
- package/helpers/slate.js +7 -1
- package/helpers/ts-extras/array-includes.js +1 -2
- package/helpers/ts-extras/as-mutable.js +1 -2
- package/helpers/ts-extras/assert-error.js +1 -2
- package/helpers/ts-extras/index.js +1 -1
- package/helpers/ts-extras/is-defined.js +1 -2
- package/helpers/ts-extras/is-empty.js +1 -2
- package/helpers/ts-extras/is-infinite.js +1 -2
- package/helpers/ts-extras/is-present.js +1 -2
- 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 +1 -2
- package/helpers/ts-extras/object-keys.d.ts +1 -1
- package/helpers/ts-extras/object-keys.js +0 -1
- package/helpers/ts-extras/set-has.js +1 -2
- package/helpers/types.d.ts +26 -0
- package/helpers/types.js +25 -5
- package/lang/ca.json +325 -91
- package/lang/de.json +325 -91
- package/lang/en.json +325 -91
- package/lang/es.json +325 -91
- package/lang/eu.json +325 -91
- package/lang/fr.json +325 -91
- package/lang/gl.json +325 -91
- package/lang/index.js +3 -2
- package/lang/it.json +325 -91
- package/lang/nl.json +325 -91
- package/lang/pt.json +325 -91
- package/models/Communication/types.d.ts +0 -16
- package/models/Communication/types.js +3 -9
- package/models/CompositionGenre/index.d.ts +9 -0
- package/models/CompositionGenre/index.js +16 -0
- package/models/CompositionStyle/index.d.ts +9 -0
- package/models/CompositionStyle/index.js +16 -0
- 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/types.js +3 -3
- package/models/Evento/Repertory/types.d.ts +2 -1
- package/models/Evento/index.d.ts +3 -2
- package/models/Evento/index.js +5 -4
- package/models/Evento/types.d.ts +2 -31
- package/models/Evento/types.js +8 -39
- 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/Player/types.js +1 -1
- package/models/Group/Repertory/File/Section/index.d.ts +3 -3
- package/models/Group/Repertory/File/Section/index.js +3 -2
- package/models/Group/Repertory/File/Section/types.d.ts +7 -0
- package/models/Group/Repertory/File/Section/types.js +1 -1
- package/models/Group/Repertory/File/index.d.ts +4 -2
- package/models/Group/Repertory/File/index.js +4 -4
- package/models/Group/Repertory/FilePath/index.d.ts +3 -4
- package/models/Group/Repertory/index.d.ts +12 -4
- package/models/Group/Repertory/index.js +9 -0
- package/models/Group/Repertory/types.d.ts +21 -32
- package/models/Group/Repertory/types.js +8 -18
- package/models/Group/index.d.ts +15 -17
- package/models/Group/index.js +16 -15
- package/models/Group/types.d.ts +6 -66
- package/models/Group/types.js +8 -50
- package/models/Instrument/{group.d.ts → fromRecord.d.ts} +4 -5
- package/models/Instrument/{group.js → fromRecord.js} +10 -10
- package/models/Instrument/index.d.ts +2 -0
- package/models/Instrument/index.js +38 -1
- package/models/Inventory/Item/types.js +2 -2
- package/models/Inventory/types.js +1 -1
- package/models/Notification/types.js +2 -2
- package/models/Offer/types.d.ts +0 -12
- package/models/Offer/types.js +2 -15
- 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 +12 -0
- package/models/Repertory/types.js +2 -2
- package/models/User/Group/index.js +1 -2
- package/models/User/index.d.ts +1 -1
- package/models/User/index.js +3 -3
- package/models/User/types.d.ts +2 -1
- package/models/User/types.js +7 -7
- package/models/WebhookEvent/types.js +1 -1
- package/models/supabase/Comm/index.d.ts +24 -0
- package/models/supabase/Comm/index.js +68 -0
- package/models/supabase/Comm/types.d.ts +6 -0
- package/models/supabase/CommHistory/index.d.ts +22 -0
- package/models/supabase/CommHistory/index.js +37 -0
- package/models/supabase/CommHistory/types.d.ts +11 -0
- package/models/supabase/CommHistory/types.js +9 -0
- package/models/supabase/Composer/Composition/Acquisition/index.d.ts +4 -0
- package/models/supabase/Composer/Composition/Acquisition/index.js +9 -0
- package/models/supabase/Composer/Composition/Acquisition/types.d.ts +36 -0
- package/models/supabase/Composer/Composition/Favorite/index.d.ts +4 -0
- package/models/supabase/Composer/Composition/Favorite/index.js +9 -0
- package/models/supabase/Composer/Composition/Favorite/types.d.ts +6 -0
- package/models/supabase/Composer/Composition/View/index.d.ts +4 -0
- package/models/supabase/Composer/Composition/View/index.js +9 -0
- package/models/supabase/Composer/Composition/View/types.d.ts +6 -0
- package/models/supabase/Composer/Composition/index.d.ts +5284 -0
- package/models/supabase/Composer/Composition/index.js +166 -0
- package/models/supabase/Composer/Composition/types.d.ts +96 -0
- package/models/supabase/Composer/Composition/types.js +32 -0
- package/models/supabase/Composer/Notification/index.d.ts +4 -0
- package/models/supabase/Composer/Notification/index.js +9 -0
- package/models/supabase/Composer/Notification/types.d.ts +39 -0
- package/models/supabase/Composer/Notification/types.js +27 -0
- package/models/supabase/Composer/Payout/index.d.ts +4 -0
- package/models/supabase/Composer/Payout/index.js +9 -0
- package/models/supabase/Composer/Payout/status.d.ts +1 -0
- package/models/supabase/Composer/Payout/types.d.ts +5 -0
- package/models/supabase/Composer/PerformanceAttendance/types.d.ts +4 -0
- package/models/supabase/Composer/index.d.ts +78 -0
- package/models/supabase/Composer/index.js +105 -0
- package/models/supabase/Composer/types.d.ts +6 -0
- package/models/supabase/Composer/types.js +2 -0
- package/models/supabase/EventHistory/index.d.ts +22 -0
- package/models/supabase/EventHistory/index.js +37 -0
- package/models/supabase/EventHistory/types.d.ts +36 -0
- package/models/supabase/EventHistory/types.js +34 -0
- package/models/supabase/GroupHistory/index.d.ts +21 -0
- package/models/supabase/GroupHistory/index.js +34 -0
- package/models/supabase/GroupHistory/types.d.ts +27 -0
- package/models/supabase/GroupHistory/types.js +25 -0
- package/models/supabase/Model/index.d.ts +10 -0
- package/models/supabase/Model/index.js +21 -0
- package/models/supabase/OfferHistory/index.d.ts +22 -0
- package/models/supabase/OfferHistory/index.js +37 -0
- package/models/supabase/OfferHistory/types.d.ts +18 -0
- package/models/supabase/OfferHistory/types.js +16 -0
- package/models/supabase/Repertoire/index.d.ts +16 -0
- package/models/supabase/Repertoire/index.js +43 -0
- package/models/supabase/Repertoire/types.d.ts +6 -0
- package/models/supabase/Repertoire/types.js +2 -0
- package/models/supabase/RepertoireHistory/index.d.ts +22 -0
- package/models/supabase/RepertoireHistory/index.js +37 -0
- package/models/supabase/RepertoireHistory/types.d.ts +21 -0
- package/models/supabase/RepertoireHistory/types.js +19 -0
- package/models/supabase/User/Group/index.d.ts +11 -0
- package/models/supabase/User/Group/index.js +30 -0
- package/models/supabase/User/Group/types.d.ts +6 -0
- package/models/supabase/User/Group/types.js +2 -0
- package/models/supabase/User/index.d.ts +13 -0
- package/models/supabase/User/index.js +37 -0
- package/models/supabase/User/types.d.ts +6 -0
- package/models/supabase/User/types.js +2 -0
- package/package.json +28 -20
- package/types/firestore.d.ts +0 -1
- package/types/firestore.js +1 -1
- package/types/supabase/catalog.d.ts +46 -0
- package/types/supabase/catalog.js +2 -0
- package/types/supabase/catalog.ts +67 -0
- package/types/supabase/composerMetrics.d.ts +27 -0
- package/types/supabase/composerMetrics.js +2 -0
- package/types/supabase/composerMetrics.ts +26 -0
- package/types/supabase/generated.d.ts +3158 -451
- package/types/supabase/generated.js +13 -0
- package/types/supabase/generated.ts +3116 -496
- package/types/supabase/index.d.ts +155 -19
- package/types/supabase/index.js +15 -0
- package/types/supabase/index.ts +288 -21
- package/types/supabase/overwrites/index.d.ts +1 -1
- package/types/supabase/overwrites/index.ts +1 -1
- package/types/supabase/overwrites/tables/comm/model.d.ts +4 -0
- package/types/supabase/overwrites/tables/comm/model.js +2 -0
- package/types/supabase/overwrites/tables/comm/model.ts +4 -0
- package/types/supabase/overwrites/tables/comm_history/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/comm_history/index.js +2 -0
- package/types/supabase/overwrites/tables/comm_history/index.ts +9 -0
- package/types/supabase/overwrites/tables/comm_history/model.d.ts +10 -0
- package/types/supabase/overwrites/tables/comm_history/model.js +2 -0
- package/types/supabase/overwrites/tables/comm_history/model.ts +13 -0
- package/types/supabase/overwrites/tables/common/index.js +2 -0
- package/types/supabase/overwrites/tables/composer/index.d.ts +9 -0
- package/types/supabase/overwrites/tables/composer/index.js +2 -0
- package/types/supabase/overwrites/tables/composer/index.ts +10 -0
- package/types/supabase/overwrites/tables/composer/model.d.ts +12 -0
- package/types/supabase/overwrites/tables/composer/model.js +2 -0
- package/types/supabase/overwrites/tables/composer/model.ts +15 -0
- package/types/supabase/overwrites/tables/composer/publicModel.d.ts +11 -0
- package/types/supabase/overwrites/tables/composer/publicModel.js +2 -0
- package/types/supabase/overwrites/tables/composer/publicModel.ts +15 -0
- package/types/supabase/overwrites/tables/composerComposition/index.d.ts +18 -0
- package/types/supabase/overwrites/tables/composerComposition/index.js +2 -0
- package/types/supabase/overwrites/tables/composerComposition/index.ts +24 -0
- package/types/supabase/overwrites/tables/composerComposition/model.d.ts +9 -0
- package/types/supabase/overwrites/tables/composerComposition/model.js +2 -0
- package/types/supabase/overwrites/tables/composerComposition/model.ts +26 -0
- package/types/supabase/overwrites/tables/composerComposition/publicModel.d.ts +9 -0
- package/types/supabase/overwrites/tables/composerComposition/publicModel.js +2 -0
- package/types/supabase/overwrites/tables/composerComposition/publicModel.ts +37 -0
- package/types/supabase/overwrites/tables/composerNotification/index.d.ts +19 -0
- package/types/supabase/overwrites/tables/composerNotification/index.js +2 -0
- package/types/supabase/overwrites/tables/composerNotification/index.ts +25 -0
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.d.ts +2 -0
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.js +2 -0
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.ts +3 -0
- package/types/supabase/overwrites/tables/composerPayout/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/composerPayout/index.js +2 -0
- package/types/supabase/overwrites/tables/composerPayout/index.ts +8 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/index.d.ts +4 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/index.js +2 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/index.ts +8 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/model.d.ts +6 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/model.js +2 -0
- package/types/supabase/overwrites/tables/compositionAcquisition/model.ts +11 -0
- package/types/supabase/overwrites/tables/compositionFavorite/index.d.ts +1 -0
- package/types/supabase/overwrites/tables/compositionFavorite/index.js +2 -0
- package/types/supabase/overwrites/tables/compositionFavorite/index.ts +2 -0
- package/types/supabase/overwrites/tables/compositionFavorite/model.d.ts +1 -0
- package/types/supabase/overwrites/tables/compositionFavorite/model.js +2 -0
- package/types/supabase/overwrites/tables/compositionFavorite/model.ts +1 -0
- package/types/supabase/overwrites/tables/compositionView/index.d.ts +1 -0
- package/types/supabase/overwrites/tables/compositionView/index.js +2 -0
- package/types/supabase/overwrites/tables/compositionView/index.ts +2 -0
- package/types/supabase/overwrites/tables/compositionView/model.d.ts +1 -0
- package/types/supabase/overwrites/tables/compositionView/model.js +2 -0
- package/types/supabase/overwrites/tables/compositionView/model.ts +1 -0
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.d.ts +16 -0
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.js +2 -0
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.ts +18 -0
- package/types/supabase/overwrites/{event.d.ts → tables/event/index.d.ts} +1 -1
- package/types/supabase/overwrites/tables/event/index.js +2 -0
- package/types/supabase/overwrites/{event.ts → tables/event/index.ts} +1 -1
- package/types/supabase/overwrites/tables/event_history/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/event_history/index.js +2 -0
- package/types/supabase/overwrites/tables/event_history/index.ts +9 -0
- package/types/supabase/overwrites/tables/event_history/model.d.ts +10 -0
- package/types/supabase/overwrites/tables/event_history/model.js +2 -0
- package/types/supabase/overwrites/tables/event_history/model.ts +13 -0
- package/types/supabase/overwrites/{group.d.ts → tables/group/index.d.ts} +2 -5
- package/types/supabase/overwrites/tables/group/index.js +2 -0
- package/types/supabase/overwrites/{group.ts → tables/group/index.ts} +2 -6
- package/types/supabase/overwrites/tables/group_history/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/group_history/index.js +2 -0
- package/types/supabase/overwrites/tables/group_history/index.ts +9 -0
- package/types/supabase/overwrites/tables/group_history/model.d.ts +10 -0
- package/types/supabase/overwrites/tables/group_history/model.js +2 -0
- package/types/supabase/overwrites/tables/group_history/model.ts +13 -0
- package/types/supabase/overwrites/{offer.d.ts → tables/offer/index.d.ts} +6 -2
- package/types/supabase/overwrites/tables/offer/index.js +2 -0
- package/types/supabase/overwrites/{offer.ts → tables/offer/index.ts} +7 -2
- package/types/supabase/overwrites/tables/offer_history/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/offer_history/index.js +2 -0
- package/types/supabase/overwrites/tables/offer_history/index.ts +9 -0
- package/types/supabase/overwrites/tables/offer_history/model.d.ts +10 -0
- package/types/supabase/overwrites/tables/offer_history/model.js +2 -0
- package/types/supabase/overwrites/tables/offer_history/model.ts +13 -0
- package/types/supabase/overwrites/tables/repertoire/model.d.ts +7 -0
- package/types/supabase/overwrites/tables/repertoire/model.js +2 -0
- package/types/supabase/overwrites/tables/repertoire/model.ts +7 -0
- package/types/supabase/overwrites/tables/repertoire_history/index.d.ts +7 -0
- package/types/supabase/overwrites/tables/repertoire_history/index.js +2 -0
- package/types/supabase/overwrites/tables/repertoire_history/index.ts +9 -0
- package/types/supabase/overwrites/tables/repertoire_history/model.d.ts +10 -0
- package/types/supabase/overwrites/tables/repertoire_history/model.js +2 -0
- package/types/supabase/overwrites/tables/repertoire_history/model.ts +13 -0
- package/types/supabase/overwrites/tables/user/index.d.ts +11 -0
- package/types/supabase/overwrites/tables/user/index.js +2 -0
- package/types/supabase/overwrites/tables/user/index.ts +13 -0
- package/helpers/glissandooAdmin.d.ts +0 -3
- package/helpers/glissandooAdmin.js +0 -6
- package/types/supabase/overwrites/comm.d.ts +0 -18
- package/types/supabase/overwrites/comm.ts +0 -18
- package/types/supabase/overwrites/comm_history.d.ts +0 -10
- package/types/supabase/overwrites/comm_history.ts +0 -10
- package/types/supabase/overwrites/event_history.d.ts +0 -10
- package/types/supabase/overwrites/event_history.ts +0 -10
- package/types/supabase/overwrites/group_history.d.ts +0 -9
- package/types/supabase/overwrites/group_history.ts +0 -9
- package/types/supabase/overwrites/offer_history.d.ts +0 -10
- package/types/supabase/overwrites/offer_history.ts +0 -10
- package/types/supabase/overwrites/repertoire.d.ts +0 -12
- package/types/supabase/overwrites/repertoire.ts +0 -12
- package/types/supabase/overwrites/repertoire_history.d.ts +0 -10
- package/types/supabase/overwrites/repertoire_history.ts +0 -10
- /package/{types/supabase/overwrites/comm.js → functions/composer.js} +0 -0
- /package/{types/supabase/overwrites/comm_history.js → functions/composerComposition.js} +0 -0
- /package/{types/supabase/overwrites/event.js → functions/composerNotification.js} +0 -0
- /package/{types/supabase/overwrites/event_history.js → functions/composerPayout.js} +0 -0
- /package/{types/supabase/overwrites/group.js → models/supabase/Comm/types.js} +0 -0
- /package/{types/supabase/overwrites/group_history.js → models/supabase/Composer/Composition/Acquisition/types.js} +0 -0
- /package/{types/supabase/overwrites/offer.js → models/supabase/Composer/Composition/Favorite/types.js} +0 -0
- /package/{types/supabase/overwrites/offer_history.js → models/supabase/Composer/Composition/View/types.js} +0 -0
- /package/{types/supabase/overwrites/repertoire.js → models/supabase/Composer/Payout/status.js} +0 -0
- /package/{types/supabase/overwrites/repertoire_history.js → models/supabase/Composer/Payout/types.js} +0 -0
- /package/{types/supabase/overwrites/utils.js → models/supabase/Composer/PerformanceAttendance/types.js} +0 -0
- /package/types/supabase/overwrites/{utils.d.ts → tables/common/index.d.ts} +0 -0
- /package/types/supabase/overwrites/{utils.ts → tables/common/index.ts} +0 -0
package/models/Group/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
+
import { CustomInstrumentId, CustomInstrument, AInstrument } from '../../helpers/instruments';
|
|
2
3
|
import { PlansGroup } from '../../helpers/plans';
|
|
3
4
|
import { LanguagesTypes } from '../../lang';
|
|
4
5
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
5
6
|
import { DocumentModel } from '../Model';
|
|
6
7
|
import GroupBasic from './basic';
|
|
7
|
-
import { AGroupCustomField, AdminPermissions,
|
|
8
|
+
import { AGroupCustomField, AdminPermissions, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus } from './types';
|
|
9
|
+
import { SocialNetwork } from '../../helpers/types';
|
|
8
10
|
export default class Group extends GroupBasic<GroupData> {
|
|
9
11
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
10
12
|
get owner(): DocumentReference;
|
|
@@ -15,9 +17,9 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
15
17
|
get addresses(): import("./types").GroupAddressData[];
|
|
16
18
|
get addressDefault(): import("./types").GroupAddressData | undefined;
|
|
17
19
|
get activeInvitationLink(): boolean;
|
|
18
|
-
|
|
20
|
+
getInvitationLink(landingHost: string): string;
|
|
19
21
|
get invitationEmails(): string[];
|
|
20
|
-
|
|
22
|
+
getShortDynamicLink(appHost: string): string;
|
|
21
23
|
get admins(): string[];
|
|
22
24
|
get adminPermissions(): Record<string, AdminPermissions[]>;
|
|
23
25
|
permissionsByAdmin(userId: string): AdminPermissions[];
|
|
@@ -47,7 +49,7 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
47
49
|
get intercomId(): string | null;
|
|
48
50
|
get partnershipId(): string | null;
|
|
49
51
|
get customerId(): string | null;
|
|
50
|
-
get socialNetworks():
|
|
52
|
+
get socialNetworks(): import("../../helpers/types").SocialNetworksRecord;
|
|
51
53
|
getSocialNetworkUrl(id: SocialNetwork): string | null;
|
|
52
54
|
get config(): {
|
|
53
55
|
includesMembersToEventsWhenJoined: boolean;
|
|
@@ -79,29 +81,25 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
79
81
|
get isOutOfMembersLimit(): boolean;
|
|
80
82
|
get isUpgradePlanRequired(): boolean;
|
|
81
83
|
get firstAnswerAt(): FirebaseFirestore.Timestamp | null;
|
|
82
|
-
get repertoireTags():
|
|
83
|
-
get repertoireTagsList(): (import("
|
|
84
|
+
get repertoireTags(): import("../../helpers/types").RepertoireTagsRecord;
|
|
85
|
+
get repertoireTagsList(): (import("../../helpers/types").RepertoireTag & {
|
|
84
86
|
id: string;
|
|
85
87
|
})[];
|
|
86
88
|
getRepertoireTagName(id: string): string | null;
|
|
87
89
|
get trialEndAt(): Date;
|
|
88
|
-
get glissandooAdminUrl(): string;
|
|
89
90
|
get createdOn(): import("../../helpers/types").CreatedOn;
|
|
90
|
-
|
|
91
|
-
get
|
|
92
|
-
|
|
93
|
-
}) | (CustomGroupInstrument & {
|
|
94
|
-
id: import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`;
|
|
95
|
-
}), "id">[];
|
|
91
|
+
getGlissandooAdminUrl(adminHost: string): string;
|
|
92
|
+
get instruments(): import("../../helpers/instruments").InstrumentsRecord;
|
|
93
|
+
get instrumentsList(): AInstrument[];
|
|
96
94
|
get instrumentsIds(): (import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`)[];
|
|
97
|
-
get customInstruments(): Record
|
|
98
|
-
get customInstrumentsList(): Pick<
|
|
95
|
+
get customInstruments(): Record<CustomInstrumentId, CustomInstrument>;
|
|
96
|
+
get customInstrumentsList(): Pick<CustomInstrument & {
|
|
99
97
|
id: `customInstrument-${string}`;
|
|
100
|
-
}, "
|
|
98
|
+
}, "id" | "icon" | "name" | "basedOnInstrument">[];
|
|
101
99
|
get customInstrumentsIds(): `customInstrument-${string}`[];
|
|
102
100
|
get visitedDashboardAt(): Record<string, FirebaseFirestore.Timestamp>;
|
|
103
101
|
get onboardingMessages(): import("./types").GroupOnboardingMessage[];
|
|
104
|
-
|
|
102
|
+
getRollcallLink(landingHost: string): string;
|
|
105
103
|
get subscriptionId(): string | null;
|
|
106
104
|
get questions(): Record<string, import("./types").GroupEventQuestion>;
|
|
107
105
|
get questionsList(): {
|
package/models/Group/index.js
CHANGED
|
@@ -6,13 +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 externalUrls_1 = require("../../helpers/externalUrls");
|
|
10
10
|
const orders_1 = require("../../helpers/instruments/orders");
|
|
11
11
|
const objects_1 = require("../../helpers/objects");
|
|
12
12
|
const plans_1 = require("../../helpers/plans");
|
|
13
13
|
const lang_1 = require("../../lang");
|
|
14
14
|
const basic_1 = __importDefault(require("./basic"));
|
|
15
15
|
const types_1 = require("./types");
|
|
16
|
+
const types_2 = require("../../helpers/types");
|
|
16
17
|
class Group extends basic_1.default {
|
|
17
18
|
constructor(doc, lang = lang_1.defaultLocale) {
|
|
18
19
|
super(doc, lang);
|
|
@@ -50,8 +51,8 @@ class Group extends basic_1.default {
|
|
|
50
51
|
get activeInvitationLink() {
|
|
51
52
|
return this.data.activeInvitationLink || false;
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
const link =
|
|
54
|
+
getInvitationLink(landingHost) {
|
|
55
|
+
const link = (0, externalUrls_1.buildGroupInvitationUrl)(landingHost, this.id);
|
|
55
56
|
if (lang_1.LanguagesTypes.ES === this.lang) {
|
|
56
57
|
return link;
|
|
57
58
|
}
|
|
@@ -60,8 +61,8 @@ class Group extends basic_1.default {
|
|
|
60
61
|
get invitationEmails() {
|
|
61
62
|
return this.data.invitationEmails || [];
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
return
|
|
64
|
+
getShortDynamicLink(appHost) {
|
|
65
|
+
return (0, externalUrls_1.buildGroupShortDynamicUrl)(appHost, this.username);
|
|
65
66
|
}
|
|
66
67
|
get admins() {
|
|
67
68
|
return this.data.administrators || [];
|
|
@@ -138,11 +139,11 @@ class Group extends basic_1.default {
|
|
|
138
139
|
return this.data.socialNetworks;
|
|
139
140
|
}
|
|
140
141
|
return {
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
142
|
+
[types_2.SocialNetwork.Facebook]: null,
|
|
143
|
+
[types_2.SocialNetwork.Twitter]: null,
|
|
144
|
+
[types_2.SocialNetwork.Instagram]: null,
|
|
145
|
+
[types_2.SocialNetwork.YouTube]: null,
|
|
146
|
+
[types_2.SocialNetwork.Web]: null,
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
149
|
getSocialNetworkUrl(id) {
|
|
@@ -236,12 +237,12 @@ class Group extends basic_1.default {
|
|
|
236
237
|
}
|
|
237
238
|
return (0, date_fns_1.addMonths)(this.createdAt.toDate(), 1);
|
|
238
239
|
}
|
|
239
|
-
get glissandooAdminUrl() {
|
|
240
|
-
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
|
|
241
|
-
}
|
|
242
240
|
get createdOn() {
|
|
243
241
|
return this.data.createdOn;
|
|
244
242
|
}
|
|
243
|
+
getGlissandooAdminUrl(adminHost) {
|
|
244
|
+
return (0, externalUrls_1.buildAdminEntityUrl)(adminHost, collections_1.CollectionNames.Group, this.id);
|
|
245
|
+
}
|
|
245
246
|
get instruments() {
|
|
246
247
|
return this.data.instruments || {};
|
|
247
248
|
}
|
|
@@ -266,8 +267,8 @@ class Group extends basic_1.default {
|
|
|
266
267
|
get onboardingMessages() {
|
|
267
268
|
return this.data.onboardingMessages || [];
|
|
268
269
|
}
|
|
269
|
-
|
|
270
|
-
return
|
|
270
|
+
getRollcallLink(landingHost) {
|
|
271
|
+
return (0, externalUrls_1.buildRollcallUrl)(landingHost, this.id);
|
|
271
272
|
}
|
|
272
273
|
get subscriptionId() {
|
|
273
274
|
return this.data.subscriptionId || null;
|
package/models/Group/types.d.ts
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
import { DocumentReference, GeoPoint, Timestamp } from '@google-cloud/firestore';
|
|
2
|
-
import {
|
|
2
|
+
import { InstrumentsRecord } from '../../helpers/instruments';
|
|
3
3
|
import { MusicStyleType } from '../../helpers/musicStyles';
|
|
4
4
|
import { PlansGroup } from '../../helpers/plans';
|
|
5
|
-
import { CreatedOn } from '../../helpers/types';
|
|
6
5
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
6
|
+
import { CreatedOn, RepertoireTagsRecord, SocialNetworksRecord } from '../../helpers/types';
|
|
7
7
|
import { EventType } from '../Evento/types';
|
|
8
8
|
import { PlayerBasicData } from '../Player/types';
|
|
9
|
-
export declare enum GroupHistoryAction {
|
|
10
|
-
Created = "created",
|
|
11
|
-
Deleted = "deleted",
|
|
12
|
-
MemberAdd = "member_add",
|
|
13
|
-
MemberJoin = "member_join",
|
|
14
|
-
MemberLeave = "member_leave",
|
|
15
|
-
MemberRemove = "member_remove",
|
|
16
|
-
MemberInstrumentChange = "member_instrument_change",
|
|
17
|
-
MemberPermissionsChange = "member_permissions_change",
|
|
18
|
-
TemplateCreated = "template_created",
|
|
19
|
-
TemplateDeleted = "template_deleted",
|
|
20
|
-
TemplateEdited = "template_edited",
|
|
21
|
-
EditInstruments = "edit_instruments",
|
|
22
|
-
EditName = "edit_name",
|
|
23
|
-
EditLocation = "edit_location",
|
|
24
|
-
EditMusicStyle = "edit_music_style",
|
|
25
|
-
EditUsername = "edit_username",
|
|
26
|
-
EditPhoto = "edit_photo",
|
|
27
|
-
LinkFakeAccount = "link_fake_account",
|
|
28
|
-
EditFakeAccountInfo = "edit_fake_account_info"
|
|
29
|
-
}
|
|
30
9
|
export declare enum GroupCustomFieldType {
|
|
31
10
|
TEXT = "text",
|
|
32
11
|
NUMBER = "number",
|
|
@@ -69,6 +48,7 @@ export declare enum AdminPermissions {
|
|
|
69
48
|
Rollcall = "rollcall",
|
|
70
49
|
Members = "members",
|
|
71
50
|
Repertoire = "repertoire",
|
|
51
|
+
Purchase = "purchase",
|
|
72
52
|
Communications = "communications",
|
|
73
53
|
Offers = "offers",
|
|
74
54
|
Billing = "billing",
|
|
@@ -97,13 +77,6 @@ export declare enum GroupStatus {
|
|
|
97
77
|
Inactive = "inactive",
|
|
98
78
|
Deleted = "deleted"
|
|
99
79
|
}
|
|
100
|
-
export declare enum SocialNetwork {
|
|
101
|
-
Facebook = "facebook",
|
|
102
|
-
Twitter = "twitter",
|
|
103
|
-
Instagram = "instagram",
|
|
104
|
-
YouTube = "youtube",
|
|
105
|
-
Web = "web"
|
|
106
|
-
}
|
|
107
80
|
export interface GroupAddressData {
|
|
108
81
|
address: string;
|
|
109
82
|
location: GeoPoint | null;
|
|
@@ -152,16 +125,6 @@ export interface GroupBasicData extends GroupTinyData {
|
|
|
152
125
|
locality: string;
|
|
153
126
|
location: GeoPoint;
|
|
154
127
|
}
|
|
155
|
-
export declare enum GroupRepertoireTagReserved {
|
|
156
|
-
NoTag = "$noTag"
|
|
157
|
-
}
|
|
158
|
-
export declare enum GroupRepertoireTagDefault {
|
|
159
|
-
First = "repertoireTags.1",
|
|
160
|
-
Second = "repertoireTags.2",
|
|
161
|
-
Third = "repertoireTags.3",
|
|
162
|
-
Fourth = "repertoireTags.4",
|
|
163
|
-
Principal = "repertoireTags.principal"
|
|
164
|
-
}
|
|
165
128
|
export interface GroupConfig {
|
|
166
129
|
[GroupConfigKey.IncludesMembersToEventsWhenJoined]: boolean;
|
|
167
130
|
[GroupConfigKey.AllowEditInstruments]: boolean;
|
|
@@ -173,28 +136,6 @@ export interface GroupConfigSites {
|
|
|
173
136
|
[GroupConfigSitesKey.ShowMembers]: boolean;
|
|
174
137
|
[GroupConfigSitesKey.ShowEvents]: boolean;
|
|
175
138
|
}
|
|
176
|
-
export interface GroupRepertoireTag {
|
|
177
|
-
title: string;
|
|
178
|
-
default: boolean;
|
|
179
|
-
}
|
|
180
|
-
export interface AGroupRepertoireTag extends GroupRepertoireTag {
|
|
181
|
-
id: string;
|
|
182
|
-
}
|
|
183
|
-
export interface DefaultGroupInstrument {
|
|
184
|
-
order: number;
|
|
185
|
-
}
|
|
186
|
-
export interface CustomGroupInstrument extends DefaultGroupInstrument {
|
|
187
|
-
icon: string;
|
|
188
|
-
name: string;
|
|
189
|
-
basedOnInstrument: DefaultInstrumentId;
|
|
190
|
-
}
|
|
191
|
-
export interface AGroupDefaultInstrument extends DefaultGroupInstrument {
|
|
192
|
-
id: DefaultInstrumentId;
|
|
193
|
-
}
|
|
194
|
-
export interface AGroupCustomInstrument extends CustomGroupInstrument {
|
|
195
|
-
id: CustomInstrumentId;
|
|
196
|
-
}
|
|
197
|
-
export type AGroupInstrument = AGroupDefaultInstrument | AGroupCustomInstrument;
|
|
198
139
|
export interface GroupEventQuestion {
|
|
199
140
|
updatedBy: string;
|
|
200
141
|
title: string;
|
|
@@ -210,7 +151,6 @@ export interface GroupEventQuestion {
|
|
|
210
151
|
export interface AGroupEventQuestion extends GroupEventQuestion {
|
|
211
152
|
id: string;
|
|
212
153
|
}
|
|
213
|
-
export type GroupInstruments = Partial<Record<DefaultInstrumentId, DefaultGroupInstrument>> & Record<CustomInstrumentId, CustomGroupInstrument>;
|
|
214
154
|
export interface GroupData extends GroupBasicData {
|
|
215
155
|
playerIds: string[];
|
|
216
156
|
players: Record<string, PlayerBasicData>;
|
|
@@ -227,7 +167,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
227
167
|
description: string | null;
|
|
228
168
|
deletedAt: Timestamp | null;
|
|
229
169
|
deletedBy: string | null;
|
|
230
|
-
socialNetworks?:
|
|
170
|
+
socialNetworks?: SocialNetworksRecord;
|
|
231
171
|
config: GroupConfig;
|
|
232
172
|
configSites: GroupConfigSites;
|
|
233
173
|
satisfactionIndex: {
|
|
@@ -242,10 +182,10 @@ export interface GroupData extends GroupBasicData {
|
|
|
242
182
|
eventCount: Record<EventType, number>;
|
|
243
183
|
communicationCount: number;
|
|
244
184
|
country: string;
|
|
245
|
-
instruments:
|
|
185
|
+
instruments: InstrumentsRecord;
|
|
246
186
|
metadata: Record<string, string>;
|
|
247
187
|
firstAnswerAt: Timestamp | null;
|
|
248
|
-
repertoireTags:
|
|
188
|
+
repertoireTags: RepertoireTagsRecord;
|
|
249
189
|
trialEndAt: Timestamp | null;
|
|
250
190
|
visitedDashboardAt: Record<string, Timestamp>;
|
|
251
191
|
onboardingMessages: GroupOnboardingMessage[];
|
package/models/Group/types.js
CHANGED
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var GroupHistoryAction;
|
|
5
|
-
(function (GroupHistoryAction) {
|
|
6
|
-
GroupHistoryAction["Created"] = "created";
|
|
7
|
-
GroupHistoryAction["Deleted"] = "deleted";
|
|
8
|
-
GroupHistoryAction["MemberAdd"] = "member_add";
|
|
9
|
-
GroupHistoryAction["MemberJoin"] = "member_join";
|
|
10
|
-
GroupHistoryAction["MemberLeave"] = "member_leave";
|
|
11
|
-
GroupHistoryAction["MemberRemove"] = "member_remove";
|
|
12
|
-
GroupHistoryAction["MemberInstrumentChange"] = "member_instrument_change";
|
|
13
|
-
GroupHistoryAction["MemberPermissionsChange"] = "member_permissions_change";
|
|
14
|
-
GroupHistoryAction["TemplateCreated"] = "template_created";
|
|
15
|
-
GroupHistoryAction["TemplateDeleted"] = "template_deleted";
|
|
16
|
-
GroupHistoryAction["TemplateEdited"] = "template_edited";
|
|
17
|
-
GroupHistoryAction["EditInstruments"] = "edit_instruments";
|
|
18
|
-
GroupHistoryAction["EditName"] = "edit_name";
|
|
19
|
-
GroupHistoryAction["EditLocation"] = "edit_location";
|
|
20
|
-
GroupHistoryAction["EditMusicStyle"] = "edit_music_style";
|
|
21
|
-
GroupHistoryAction["EditUsername"] = "edit_username";
|
|
22
|
-
GroupHistoryAction["EditPhoto"] = "edit_photo";
|
|
23
|
-
GroupHistoryAction["LinkFakeAccount"] = "link_fake_account";
|
|
24
|
-
GroupHistoryAction["EditFakeAccountInfo"] = "edit_fake_account_info";
|
|
25
|
-
})(GroupHistoryAction = exports.GroupHistoryAction || (exports.GroupHistoryAction = {}));
|
|
26
|
-
// types/CustomFields.ts
|
|
3
|
+
exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = exports.GroupCustomFieldType = void 0;
|
|
27
4
|
var GroupCustomFieldType;
|
|
28
5
|
(function (GroupCustomFieldType) {
|
|
29
6
|
GroupCustomFieldType["TEXT"] = "text";
|
|
@@ -34,7 +11,7 @@ var GroupCustomFieldType;
|
|
|
34
11
|
GroupCustomFieldType["PHONE"] = "phone";
|
|
35
12
|
GroupCustomFieldType["LINK"] = "link";
|
|
36
13
|
GroupCustomFieldType["PARAGRAPH"] = "paragraph";
|
|
37
|
-
})(GroupCustomFieldType
|
|
14
|
+
})(GroupCustomFieldType || (exports.GroupCustomFieldType = GroupCustomFieldType = {}));
|
|
38
15
|
var AdminPermissions;
|
|
39
16
|
(function (AdminPermissions) {
|
|
40
17
|
AdminPermissions["Owner"] = "owner";
|
|
@@ -42,55 +19,36 @@ var AdminPermissions;
|
|
|
42
19
|
AdminPermissions["Rollcall"] = "rollcall";
|
|
43
20
|
AdminPermissions["Members"] = "members";
|
|
44
21
|
AdminPermissions["Repertoire"] = "repertoire";
|
|
22
|
+
AdminPermissions["Purchase"] = "purchase";
|
|
45
23
|
AdminPermissions["Communications"] = "communications";
|
|
46
24
|
AdminPermissions["Offers"] = "offers";
|
|
47
25
|
AdminPermissions["Billing"] = "billing";
|
|
48
26
|
AdminPermissions["Inventory"] = "inventory";
|
|
49
|
-
})(AdminPermissions
|
|
27
|
+
})(AdminPermissions || (exports.AdminPermissions = AdminPermissions = {}));
|
|
50
28
|
var GroupConfigKey;
|
|
51
29
|
(function (GroupConfigKey) {
|
|
52
30
|
GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
|
|
53
31
|
GroupConfigKey["AllowEditInstruments"] = "allowEditInstruments";
|
|
54
32
|
GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
|
|
55
33
|
GroupConfigKey["AllowVerifyGeoLoc"] = "allowVerifyGeoLoc";
|
|
56
|
-
})(GroupConfigKey
|
|
34
|
+
})(GroupConfigKey || (exports.GroupConfigKey = GroupConfigKey = {}));
|
|
57
35
|
var GroupConfigSitesKey;
|
|
58
36
|
(function (GroupConfigSitesKey) {
|
|
59
37
|
GroupConfigSitesKey["Active"] = "active";
|
|
60
38
|
GroupConfigSitesKey["ShowMembers"] = "showMembers";
|
|
61
39
|
GroupConfigSitesKey["ShowEvents"] = "showEvents";
|
|
62
|
-
})(GroupConfigSitesKey
|
|
40
|
+
})(GroupConfigSitesKey || (exports.GroupConfigSitesKey = GroupConfigSitesKey = {}));
|
|
63
41
|
var GroupConfigShowAttendanceToMembers;
|
|
64
42
|
(function (GroupConfigShowAttendanceToMembers) {
|
|
65
43
|
GroupConfigShowAttendanceToMembers["None"] = "none";
|
|
66
44
|
GroupConfigShowAttendanceToMembers["OnlyConfirmed"] = "onlyConfirmed";
|
|
67
45
|
GroupConfigShowAttendanceToMembers["OnlyToSection"] = "onlyToSection";
|
|
68
46
|
GroupConfigShowAttendanceToMembers["All"] = "all";
|
|
69
|
-
})(GroupConfigShowAttendanceToMembers
|
|
47
|
+
})(GroupConfigShowAttendanceToMembers || (exports.GroupConfigShowAttendanceToMembers = GroupConfigShowAttendanceToMembers = {}));
|
|
70
48
|
var GroupStatus;
|
|
71
49
|
(function (GroupStatus) {
|
|
72
50
|
GroupStatus["Premium"] = "premium";
|
|
73
51
|
GroupStatus["Trial"] = "trial";
|
|
74
52
|
GroupStatus["Inactive"] = "inactive";
|
|
75
53
|
GroupStatus["Deleted"] = "deleted";
|
|
76
|
-
})(GroupStatus
|
|
77
|
-
var SocialNetwork;
|
|
78
|
-
(function (SocialNetwork) {
|
|
79
|
-
SocialNetwork["Facebook"] = "facebook";
|
|
80
|
-
SocialNetwork["Twitter"] = "twitter";
|
|
81
|
-
SocialNetwork["Instagram"] = "instagram";
|
|
82
|
-
SocialNetwork["YouTube"] = "youtube";
|
|
83
|
-
SocialNetwork["Web"] = "web";
|
|
84
|
-
})(SocialNetwork = exports.SocialNetwork || (exports.SocialNetwork = {}));
|
|
85
|
-
var GroupRepertoireTagReserved;
|
|
86
|
-
(function (GroupRepertoireTagReserved) {
|
|
87
|
-
GroupRepertoireTagReserved["NoTag"] = "$noTag";
|
|
88
|
-
})(GroupRepertoireTagReserved = exports.GroupRepertoireTagReserved || (exports.GroupRepertoireTagReserved = {}));
|
|
89
|
-
var GroupRepertoireTagDefault;
|
|
90
|
-
(function (GroupRepertoireTagDefault) {
|
|
91
|
-
GroupRepertoireTagDefault["First"] = "repertoireTags.1";
|
|
92
|
-
GroupRepertoireTagDefault["Second"] = "repertoireTags.2";
|
|
93
|
-
GroupRepertoireTagDefault["Third"] = "repertoireTags.3";
|
|
94
|
-
GroupRepertoireTagDefault["Fourth"] = "repertoireTags.4";
|
|
95
|
-
GroupRepertoireTagDefault["Principal"] = "repertoireTags.principal";
|
|
96
|
-
})(GroupRepertoireTagDefault = exports.GroupRepertoireTagDefault || (exports.GroupRepertoireTagDefault = {}));
|
|
54
|
+
})(GroupStatus || (exports.GroupStatus = GroupStatus = {}));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import Instrument from '.';
|
|
2
|
-
import { CustomInstrumentId, InstrumentId } from '../../helpers/instruments';
|
|
2
|
+
import { CustomInstrumentId, InstrumentId, InstrumentsRecord } from '../../helpers/instruments';
|
|
3
3
|
import { LanguagesTypes } from '../../lang';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructor(id: InstrumentId, lang: LanguagesTypes | undefined, groupInstruments: GroupData['instruments']);
|
|
4
|
+
export default class InstrumentFromRecord extends Instrument {
|
|
5
|
+
private instrumentsRecord;
|
|
6
|
+
constructor(id: InstrumentId, lang: LanguagesTypes | undefined, instrumentsRecord: InstrumentsRecord);
|
|
8
7
|
static isCustom(instrumentId: InstrumentId): instrumentId is CustomInstrumentId;
|
|
9
8
|
get isCustomInstrument(): boolean;
|
|
10
9
|
get name(): string;
|
|
@@ -5,29 +5,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _1 = __importDefault(require("."));
|
|
7
7
|
const lang_1 = require("../../lang");
|
|
8
|
-
class
|
|
9
|
-
constructor(id, lang = lang_1.defaultLocale,
|
|
8
|
+
class InstrumentFromRecord extends _1.default {
|
|
9
|
+
constructor(id, lang = lang_1.defaultLocale, instrumentsRecord) {
|
|
10
10
|
super(id, lang);
|
|
11
|
-
this.
|
|
11
|
+
this.instrumentsRecord = instrumentsRecord;
|
|
12
12
|
}
|
|
13
13
|
static isCustom(instrumentId) {
|
|
14
14
|
return (instrumentId || '').startsWith('customInstrument-');
|
|
15
15
|
}
|
|
16
16
|
get isCustomInstrument() {
|
|
17
|
-
return
|
|
17
|
+
return InstrumentFromRecord.isCustom(this.id);
|
|
18
18
|
}
|
|
19
19
|
get name() {
|
|
20
|
-
if (!
|
|
20
|
+
if (!InstrumentFromRecord.isCustom(this.id))
|
|
21
21
|
return super.name;
|
|
22
|
-
if (this.id in this.
|
|
23
|
-
return this.
|
|
22
|
+
if (this.id in this.instrumentsRecord) {
|
|
23
|
+
return this.instrumentsRecord[this.id].name;
|
|
24
24
|
}
|
|
25
25
|
return (0, lang_1.getTranslation)('instruments.unknown', this.lang) || this.id;
|
|
26
26
|
}
|
|
27
27
|
get icon() {
|
|
28
|
-
return
|
|
29
|
-
? this.
|
|
28
|
+
return InstrumentFromRecord.isCustom(this.id) && this.id in this.instrumentsRecord
|
|
29
|
+
? this.instrumentsRecord[this.id].icon
|
|
30
30
|
: super.icon;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
exports.default =
|
|
33
|
+
exports.default = InstrumentFromRecord;
|
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const instruments_1 = require("../../helpers/instruments");
|
|
4
4
|
const lang_1 = require("../../lang");
|
|
5
|
+
const getPluralBlock = (message, selector) => {
|
|
6
|
+
const startToken = `${selector} {`;
|
|
7
|
+
const start = message.indexOf(startToken);
|
|
8
|
+
if (start === -1)
|
|
9
|
+
return null;
|
|
10
|
+
let depth = 1;
|
|
11
|
+
let index = start + startToken.length;
|
|
12
|
+
const blockStart = index;
|
|
13
|
+
while (index < message.length) {
|
|
14
|
+
const character = message[index];
|
|
15
|
+
if (character === '{')
|
|
16
|
+
depth++;
|
|
17
|
+
if (character === '}')
|
|
18
|
+
depth--;
|
|
19
|
+
if (depth === 0) {
|
|
20
|
+
return message.slice(blockStart, index);
|
|
21
|
+
}
|
|
22
|
+
index++;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
const formatInstrumentMessage = (message, count, lang) => {
|
|
27
|
+
if (!message.includes('{count, plural,'))
|
|
28
|
+
return message;
|
|
29
|
+
const pluralCategory = new Intl.PluralRules(lang).select(count);
|
|
30
|
+
const selectedBlock = getPluralBlock(message, `=${count}`) ||
|
|
31
|
+
getPluralBlock(message, pluralCategory) ||
|
|
32
|
+
getPluralBlock(message, 'other');
|
|
33
|
+
return (selectedBlock || message).replace(/#/g, String(count));
|
|
34
|
+
};
|
|
5
35
|
class Instrument {
|
|
6
36
|
constructor(id, lang = lang_1.defaultLocale) {
|
|
7
37
|
this.id = id;
|
|
@@ -9,7 +39,14 @@ class Instrument {
|
|
|
9
39
|
}
|
|
10
40
|
get name() {
|
|
11
41
|
const translation = (0, lang_1.getTranslation)(`instruments.${this.id}`, this.lang);
|
|
12
|
-
return translation
|
|
42
|
+
return translation ? formatInstrumentMessage(translation, 1, this.lang) : this.id;
|
|
43
|
+
}
|
|
44
|
+
get pluralName() {
|
|
45
|
+
return this.getName(2);
|
|
46
|
+
}
|
|
47
|
+
getName(count) {
|
|
48
|
+
const translation = (0, lang_1.getTranslation)(`instruments.${this.id}`, this.lang);
|
|
49
|
+
return translation ? formatInstrumentMessage(translation, count, this.lang) : this.id;
|
|
13
50
|
}
|
|
14
51
|
get icon() {
|
|
15
52
|
return instruments_1.InstrumentIcons[this.id] || 'warning';
|
|
@@ -7,9 +7,9 @@ var InventoryItemStatus;
|
|
|
7
7
|
InventoryItemStatus["Assigned"] = "assigned";
|
|
8
8
|
InventoryItemStatus["OnHold"] = "onHold";
|
|
9
9
|
InventoryItemStatus["Retired"] = "retired";
|
|
10
|
-
})(InventoryItemStatus
|
|
10
|
+
})(InventoryItemStatus || (exports.InventoryItemStatus = InventoryItemStatus = {}));
|
|
11
11
|
var InventoryItemAssignmentKind;
|
|
12
12
|
(function (InventoryItemAssignmentKind) {
|
|
13
13
|
InventoryItemAssignmentKind["Member"] = "member";
|
|
14
14
|
InventoryItemAssignmentKind["Other"] = "other";
|
|
15
|
-
})(InventoryItemAssignmentKind
|
|
15
|
+
})(InventoryItemAssignmentKind || (exports.InventoryItemAssignmentKind = InventoryItemAssignmentKind = {}));
|
|
@@ -12,4 +12,4 @@ var InventoryTypeCustomFieldType;
|
|
|
12
12
|
InventoryTypeCustomFieldType["ASSIGNABLE"] = "assignable";
|
|
13
13
|
InventoryTypeCustomFieldType["IMAGES"] = "images";
|
|
14
14
|
InventoryTypeCustomFieldType["DOCUMENT"] = "document";
|
|
15
|
-
})(InventoryTypeCustomFieldType
|
|
15
|
+
})(InventoryTypeCustomFieldType || (exports.InventoryTypeCustomFieldType = InventoryTypeCustomFieldType = {}));
|
|
@@ -146,7 +146,7 @@ var NotificationActions;
|
|
|
146
146
|
NotificationActions["OfferApplicantAdd"] = "offer.applicant.add";
|
|
147
147
|
NotificationActions["OfferSelectApplicant"] = "offer.select.applicant";
|
|
148
148
|
NotificationActions["OfferAlarm"] = "offer.alarm";
|
|
149
|
-
})(NotificationActions
|
|
149
|
+
})(NotificationActions || (exports.NotificationActions = NotificationActions = {}));
|
|
150
150
|
var NotificationActionsFilter;
|
|
151
151
|
(function (NotificationActionsFilter) {
|
|
152
152
|
NotificationActionsFilter["EventCreated"] = "eventCreated";
|
|
@@ -165,7 +165,7 @@ var NotificationActionsFilter;
|
|
|
165
165
|
NotificationActionsFilter["Offers"] = "offers";
|
|
166
166
|
NotificationActionsFilter["ThemeClaims"] = "themeClaims";
|
|
167
167
|
NotificationActionsFilter["Permissions"] = "permissions";
|
|
168
|
-
})(NotificationActionsFilter
|
|
168
|
+
})(NotificationActionsFilter || (exports.NotificationActionsFilter = NotificationActionsFilter = {}));
|
|
169
169
|
exports.notificationByFilter = {
|
|
170
170
|
[NotificationActionsFilter.EventCreated]: [
|
|
171
171
|
NotificationActions.PerformanceCreate,
|
package/models/Offer/types.d.ts
CHANGED
|
@@ -4,18 +4,6 @@ import { Descendant } from '../../helpers/slate';
|
|
|
4
4
|
import { CreatedOn } from '../../helpers/types';
|
|
5
5
|
import { GroupBasicData } from '../Group/types';
|
|
6
6
|
import { UserBasicData } from '../User/types';
|
|
7
|
-
export declare enum OfferHistoryAction {
|
|
8
|
-
Created = "created",
|
|
9
|
-
Remove = "remove",
|
|
10
|
-
EditLocality = "edit_locality",
|
|
11
|
-
EditDescription = "edit_description",
|
|
12
|
-
EditDeadline = "edit_deadline",
|
|
13
|
-
SelectApplicant = "select_applicant",
|
|
14
|
-
CloseSelection = "close_selection",
|
|
15
|
-
ReopenSelection = "reopen_selection",
|
|
16
|
-
NewApplicant = "new_applicant",
|
|
17
|
-
RemoveApplicant = "remove_applicant"
|
|
18
|
-
}
|
|
19
7
|
export declare enum OfferType {
|
|
20
8
|
Group = "group",
|
|
21
9
|
Event = "event"
|
package/models/Offer/types.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OfferType =
|
|
4
|
-
var OfferHistoryAction;
|
|
5
|
-
(function (OfferHistoryAction) {
|
|
6
|
-
OfferHistoryAction["Created"] = "created";
|
|
7
|
-
OfferHistoryAction["Remove"] = "remove";
|
|
8
|
-
OfferHistoryAction["EditLocality"] = "edit_locality";
|
|
9
|
-
OfferHistoryAction["EditDescription"] = "edit_description";
|
|
10
|
-
OfferHistoryAction["EditDeadline"] = "edit_deadline";
|
|
11
|
-
OfferHistoryAction["SelectApplicant"] = "select_applicant";
|
|
12
|
-
OfferHistoryAction["CloseSelection"] = "close_selection";
|
|
13
|
-
OfferHistoryAction["ReopenSelection"] = "reopen_selection";
|
|
14
|
-
OfferHistoryAction["NewApplicant"] = "new_applicant";
|
|
15
|
-
OfferHistoryAction["RemoveApplicant"] = "remove_applicant";
|
|
16
|
-
})(OfferHistoryAction = exports.OfferHistoryAction || (exports.OfferHistoryAction = {}));
|
|
3
|
+
exports.OfferType = void 0;
|
|
17
4
|
var OfferType;
|
|
18
5
|
(function (OfferType) {
|
|
19
6
|
OfferType["Group"] = "group";
|
|
20
7
|
OfferType["Event"] = "event";
|
|
21
|
-
})(OfferType
|
|
8
|
+
})(OfferType || (exports.OfferType = OfferType = {}));
|
|
@@ -6,4 +6,4 @@ var PartnerStatus;
|
|
|
6
6
|
PartnerStatus["Active"] = "active";
|
|
7
7
|
PartnerStatus["Pending"] = "pending";
|
|
8
8
|
PartnerStatus["Inactive"] = "inactive";
|
|
9
|
-
})(PartnerStatus
|
|
9
|
+
})(PartnerStatus || (exports.PartnerStatus = PartnerStatus = {}));
|
|
@@ -6,11 +6,11 @@ var PaymentMethod;
|
|
|
6
6
|
PaymentMethod["Cash"] = "CASH";
|
|
7
7
|
PaymentMethod["Transfer"] = "TRANSFER";
|
|
8
8
|
PaymentMethod["SEPA"] = "SEPA";
|
|
9
|
-
})(PaymentMethod
|
|
9
|
+
})(PaymentMethod || (exports.PaymentMethod = PaymentMethod = {}));
|
|
10
10
|
var PaymentStatus;
|
|
11
11
|
(function (PaymentStatus) {
|
|
12
12
|
PaymentStatus["Pending"] = "pending";
|
|
13
13
|
PaymentStatus["Charged"] = "charged";
|
|
14
14
|
PaymentStatus["Returned"] = "returned";
|
|
15
15
|
PaymentStatus["Canceled"] = "canceled";
|
|
16
|
-
})(PaymentStatus
|
|
16
|
+
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
@@ -13,7 +13,7 @@ export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
|
13
13
|
get groupIds(): string[];
|
|
14
14
|
get sepaCreditorInfo(): import("./types").PartnershipSepaCreditorInfo | null;
|
|
15
15
|
get paymentMethodsConfig(): PartnershipPaymentMethodsConfig | null;
|
|
16
|
-
|
|
16
|
+
getGlissandooAdminUrl(adminHost: string): string;
|
|
17
17
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
18
18
|
get createdBy(): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>;
|
|
19
19
|
get editedAt(): FirebaseFirestore.Timestamp | null;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const collections_1 = require("../../helpers/collections");
|
|
7
|
-
const
|
|
7
|
+
const externalUrls_1 = require("../../helpers/externalUrls");
|
|
8
8
|
const types_1 = require("../../helpers/types");
|
|
9
9
|
const lang_1 = require("../../lang");
|
|
10
10
|
const basic_1 = __importDefault(require("./basic"));
|
|
@@ -46,8 +46,8 @@ class Partnership extends basic_1.default {
|
|
|
46
46
|
get paymentMethodsConfig() {
|
|
47
47
|
return this.data.paymentMethodsConfig || null;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
return (0,
|
|
49
|
+
getGlissandooAdminUrl(adminHost) {
|
|
50
|
+
return (0, externalUrls_1.buildAdminEntityUrl)(adminHost, collections_1.CollectionNames.Partnership, this.id);
|
|
51
51
|
}
|
|
52
52
|
get createdAt() {
|
|
53
53
|
return this.data.createdAt;
|