@glissandoo/lib 1.115.0 → 1.116.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.js +1 -1
- package/functions/eventPlayer.js +1 -1
- package/functions/eventRepertory.d.ts +0 -2
- package/functions/eventRepertory.js +1 -1
- package/functions/groupRepertory.d.ts +0 -110
- package/functions/index.d.ts +0 -30
- package/functions/index.js +1 -31
- package/functions/misc.d.ts +0 -6
- package/functions/regions.js +1 -31
- package/helpers/appScenes.js +1 -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/dlinks.js +1 -1
- package/helpers/errors.d.ts +0 -1
- package/helpers/errors.js +1 -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/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 +91 -325
- package/lang/de.json +91 -325
- package/lang/en.json +91 -325
- package/lang/es.json +91 -325
- package/lang/eu.json +91 -325
- package/lang/fr.json +91 -325
- package/lang/gl.json +91 -325
- package/lang/index.js +2 -3
- package/lang/it.json +91 -325
- package/lang/nl.json +91 -325
- package/lang/pt.json +91 -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/types.js +3 -3
- package/models/Evento/Repertory/types.d.ts +1 -2
- package/models/Evento/index.d.ts +2 -3
- package/models/Evento/index.js +4 -5
- package/models/Evento/types.d.ts +31 -2
- package/models/Evento/types.js +39 -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/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 +13 -15
- package/models/Group/index.js +15 -16
- package/models/Group/types.d.ts +66 -6
- package/models/Group/types.js +50 -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.js +2 -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/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/currency.d.ts +0 -19
- package/helpers/currency.js +0 -85
- 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/Composer/types.js +0 -2
- 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/Repertoire/types.js +0 -2
- 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/Group/types.js +0 -2
- 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/models/supabase/User/types.js +0 -2
- 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 → types/supabase/overwrites/comm.js} +0 -0
- /package/{functions/composerComposition.js → types/supabase/overwrites/comm_history.js} +0 -0
- /package/{functions/composerNotification.js → types/supabase/overwrites/event.js} +0 -0
- /package/{functions/composerPayout.js → types/supabase/overwrites/event_history.js} +0 -0
- /package/{models/supabase/Comm/types.js → types/supabase/overwrites/group.js} +0 -0
- /package/{models/supabase/Composer/Composition/Acquisition/types.js → types/supabase/overwrites/group_history.js} +0 -0
- /package/{models/supabase/Composer/Composition/Favorite/types.js → types/supabase/overwrites/offer.js} +0 -0
- /package/{models/supabase/Composer/Composition/View/types.js → types/supabase/overwrites/offer_history.js} +0 -0
- /package/{models/supabase/Composer/Payout/status.js → types/supabase/overwrites/repertoire.js} +0 -0
- /package/{models/supabase/Composer/Payout/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/Composer/PerformanceAttendance/types.js → types/supabase/overwrites/utils.js} +0 -0
- /package/types/supabase/overwrites/{tables/common/index.ts → utils.ts} +0 -0
package/models/Group/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
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';
|
|
5
4
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
6
5
|
import { DocumentModel } from '../Model';
|
|
7
6
|
import GroupBasic from './basic';
|
|
8
|
-
import { AGroupCustomField, AdminPermissions, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus } from './types';
|
|
9
|
-
import { SocialNetwork } from '../../helpers/types';
|
|
7
|
+
import { AGroupCustomField, AGroupInstrument, AdminPermissions, CustomGroupInstrument, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus, SocialNetwork } from './types';
|
|
10
8
|
export default class Group extends GroupBasic<GroupData> {
|
|
11
9
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
12
10
|
get owner(): DocumentReference;
|
|
@@ -17,9 +15,9 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
17
15
|
get addresses(): import("./types").GroupAddressData[];
|
|
18
16
|
get addressDefault(): import("./types").GroupAddressData | undefined;
|
|
19
17
|
get activeInvitationLink(): boolean;
|
|
20
|
-
|
|
18
|
+
get invitationLink(): string;
|
|
21
19
|
get invitationEmails(): string[];
|
|
22
|
-
|
|
20
|
+
get shortDynamicLink(): string;
|
|
23
21
|
get admins(): string[];
|
|
24
22
|
get adminPermissions(): Record<string, AdminPermissions[]>;
|
|
25
23
|
permissionsByAdmin(userId: string): AdminPermissions[];
|
|
@@ -49,7 +47,7 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
49
47
|
get intercomId(): string | null;
|
|
50
48
|
get partnershipId(): string | null;
|
|
51
49
|
get customerId(): string | null;
|
|
52
|
-
get socialNetworks():
|
|
50
|
+
get socialNetworks(): Record<SocialNetwork, string | null>;
|
|
53
51
|
getSocialNetworkUrl(id: SocialNetwork): string | null;
|
|
54
52
|
get config(): {
|
|
55
53
|
includesMembersToEventsWhenJoined: boolean;
|
|
@@ -81,25 +79,25 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
81
79
|
get isOutOfMembersLimit(): boolean;
|
|
82
80
|
get isUpgradePlanRequired(): boolean;
|
|
83
81
|
get firstAnswerAt(): FirebaseFirestore.Timestamp | null;
|
|
84
|
-
get repertoireTags(): import("
|
|
85
|
-
get repertoireTagsList(): (import("
|
|
82
|
+
get repertoireTags(): Record<string, import("./types").GroupRepertoireTag>;
|
|
83
|
+
get repertoireTagsList(): (import("./types").GroupRepertoireTag & {
|
|
86
84
|
id: string;
|
|
87
85
|
})[];
|
|
88
86
|
getRepertoireTagName(id: string): string | null;
|
|
89
87
|
get trialEndAt(): Date;
|
|
88
|
+
get glissandooAdminUrl(): string;
|
|
90
89
|
get createdOn(): import("../../helpers/types").CreatedOn;
|
|
91
|
-
|
|
92
|
-
get
|
|
93
|
-
get instrumentsList(): AInstrument[];
|
|
90
|
+
get instruments(): import("./types").GroupInstruments;
|
|
91
|
+
get instrumentsList(): AGroupInstrument[];
|
|
94
92
|
get instrumentsIds(): (import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`)[];
|
|
95
|
-
get customInstruments(): Record
|
|
96
|
-
get customInstrumentsList(): Pick<
|
|
93
|
+
get customInstruments(): Record<`customInstrument-${string}`, CustomGroupInstrument>;
|
|
94
|
+
get customInstrumentsList(): Pick<CustomGroupInstrument & {
|
|
97
95
|
id: `customInstrument-${string}`;
|
|
98
|
-
}, "
|
|
96
|
+
}, "name" | "id" | "icon" | "basedOnInstrument">[];
|
|
99
97
|
get customInstrumentsIds(): `customInstrument-${string}`[];
|
|
100
98
|
get visitedDashboardAt(): Record<string, FirebaseFirestore.Timestamp>;
|
|
101
99
|
get onboardingMessages(): import("./types").GroupOnboardingMessage[];
|
|
102
|
-
|
|
100
|
+
get rollcallLink(): string;
|
|
103
101
|
get subscriptionId(): string | null;
|
|
104
102
|
get questions(): Record<string, import("./types").GroupEventQuestion>;
|
|
105
103
|
get questionsList(): {
|
package/models/Group/index.js
CHANGED
|
@@ -6,14 +6,13 @@ 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 glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
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");
|
|
17
16
|
class Group extends basic_1.default {
|
|
18
17
|
constructor(doc, lang = lang_1.defaultLocale) {
|
|
19
18
|
super(doc, lang);
|
|
@@ -51,8 +50,8 @@ class Group extends basic_1.default {
|
|
|
51
50
|
get activeInvitationLink() {
|
|
52
51
|
return this.data.activeInvitationLink || false;
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
const link =
|
|
53
|
+
get invitationLink() {
|
|
54
|
+
const link = `https://glissandoo.com/joingroup/${this.id}`;
|
|
56
55
|
if (lang_1.LanguagesTypes.ES === this.lang) {
|
|
57
56
|
return link;
|
|
58
57
|
}
|
|
@@ -61,8 +60,8 @@ class Group extends basic_1.default {
|
|
|
61
60
|
get invitationEmails() {
|
|
62
61
|
return this.data.invitationEmails || [];
|
|
63
62
|
}
|
|
64
|
-
|
|
65
|
-
return
|
|
63
|
+
get shortDynamicLink() {
|
|
64
|
+
return `https://app.glissandoo.com/group/${this.username}`;
|
|
66
65
|
}
|
|
67
66
|
get admins() {
|
|
68
67
|
return this.data.administrators || [];
|
|
@@ -139,11 +138,11 @@ class Group extends basic_1.default {
|
|
|
139
138
|
return this.data.socialNetworks;
|
|
140
139
|
}
|
|
141
140
|
return {
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
141
|
+
[types_1.SocialNetwork.Facebook]: null,
|
|
142
|
+
[types_1.SocialNetwork.Twitter]: null,
|
|
143
|
+
[types_1.SocialNetwork.Instagram]: null,
|
|
144
|
+
[types_1.SocialNetwork.YouTube]: null,
|
|
145
|
+
[types_1.SocialNetwork.Web]: null,
|
|
147
146
|
};
|
|
148
147
|
}
|
|
149
148
|
getSocialNetworkUrl(id) {
|
|
@@ -237,12 +236,12 @@ class Group extends basic_1.default {
|
|
|
237
236
|
}
|
|
238
237
|
return (0, date_fns_1.addMonths)(this.createdAt.toDate(), 1);
|
|
239
238
|
}
|
|
239
|
+
get glissandooAdminUrl() {
|
|
240
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
|
|
241
|
+
}
|
|
240
242
|
get createdOn() {
|
|
241
243
|
return this.data.createdOn;
|
|
242
244
|
}
|
|
243
|
-
getGlissandooAdminUrl(adminHost) {
|
|
244
|
-
return (0, externalUrls_1.buildAdminEntityUrl)(adminHost, collections_1.CollectionNames.Group, this.id);
|
|
245
|
-
}
|
|
246
245
|
get instruments() {
|
|
247
246
|
return this.data.instruments || {};
|
|
248
247
|
}
|
|
@@ -267,8 +266,8 @@ class Group extends basic_1.default {
|
|
|
267
266
|
get onboardingMessages() {
|
|
268
267
|
return this.data.onboardingMessages || [];
|
|
269
268
|
}
|
|
270
|
-
|
|
271
|
-
return
|
|
269
|
+
get rollcallLink() {
|
|
270
|
+
return `https://glissandoo.com/rollcall/${this.id}`;
|
|
272
271
|
}
|
|
273
272
|
get subscriptionId() {
|
|
274
273
|
return this.data.subscriptionId || null;
|
package/models/Group/types.d.ts
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { DocumentReference, GeoPoint, Timestamp } from '@google-cloud/firestore';
|
|
2
|
-
import {
|
|
2
|
+
import { CustomInstrumentId, DefaultInstrumentId } from '../../helpers/instruments';
|
|
3
3
|
import { MusicStyleType } from '../../helpers/musicStyles';
|
|
4
4
|
import { PlansGroup } from '../../helpers/plans';
|
|
5
|
+
import { CreatedOn } from '../../helpers/types';
|
|
5
6
|
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
|
+
}
|
|
9
30
|
export declare enum GroupCustomFieldType {
|
|
10
31
|
TEXT = "text",
|
|
11
32
|
NUMBER = "number",
|
|
@@ -48,7 +69,6 @@ export declare enum AdminPermissions {
|
|
|
48
69
|
Rollcall = "rollcall",
|
|
49
70
|
Members = "members",
|
|
50
71
|
Repertoire = "repertoire",
|
|
51
|
-
Purchase = "purchase",
|
|
52
72
|
Communications = "communications",
|
|
53
73
|
Offers = "offers",
|
|
54
74
|
Billing = "billing",
|
|
@@ -77,6 +97,13 @@ export declare enum GroupStatus {
|
|
|
77
97
|
Inactive = "inactive",
|
|
78
98
|
Deleted = "deleted"
|
|
79
99
|
}
|
|
100
|
+
export declare enum SocialNetwork {
|
|
101
|
+
Facebook = "facebook",
|
|
102
|
+
Twitter = "twitter",
|
|
103
|
+
Instagram = "instagram",
|
|
104
|
+
YouTube = "youtube",
|
|
105
|
+
Web = "web"
|
|
106
|
+
}
|
|
80
107
|
export interface GroupAddressData {
|
|
81
108
|
address: string;
|
|
82
109
|
location: GeoPoint | null;
|
|
@@ -125,6 +152,16 @@ export interface GroupBasicData extends GroupTinyData {
|
|
|
125
152
|
locality: string;
|
|
126
153
|
location: GeoPoint;
|
|
127
154
|
}
|
|
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
|
+
}
|
|
128
165
|
export interface GroupConfig {
|
|
129
166
|
[GroupConfigKey.IncludesMembersToEventsWhenJoined]: boolean;
|
|
130
167
|
[GroupConfigKey.AllowEditInstruments]: boolean;
|
|
@@ -136,6 +173,28 @@ export interface GroupConfigSites {
|
|
|
136
173
|
[GroupConfigSitesKey.ShowMembers]: boolean;
|
|
137
174
|
[GroupConfigSitesKey.ShowEvents]: boolean;
|
|
138
175
|
}
|
|
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;
|
|
139
198
|
export interface GroupEventQuestion {
|
|
140
199
|
updatedBy: string;
|
|
141
200
|
title: string;
|
|
@@ -151,6 +210,7 @@ export interface GroupEventQuestion {
|
|
|
151
210
|
export interface AGroupEventQuestion extends GroupEventQuestion {
|
|
152
211
|
id: string;
|
|
153
212
|
}
|
|
213
|
+
export type GroupInstruments = Partial<Record<DefaultInstrumentId, DefaultGroupInstrument>> & Record<CustomInstrumentId, CustomGroupInstrument>;
|
|
154
214
|
export interface GroupData extends GroupBasicData {
|
|
155
215
|
playerIds: string[];
|
|
156
216
|
players: Record<string, PlayerBasicData>;
|
|
@@ -167,7 +227,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
167
227
|
description: string | null;
|
|
168
228
|
deletedAt: Timestamp | null;
|
|
169
229
|
deletedBy: string | null;
|
|
170
|
-
socialNetworks?:
|
|
230
|
+
socialNetworks?: Record<SocialNetwork, string | null>;
|
|
171
231
|
config: GroupConfig;
|
|
172
232
|
configSites: GroupConfigSites;
|
|
173
233
|
satisfactionIndex: {
|
|
@@ -182,10 +242,10 @@ export interface GroupData extends GroupBasicData {
|
|
|
182
242
|
eventCount: Record<EventType, number>;
|
|
183
243
|
communicationCount: number;
|
|
184
244
|
country: string;
|
|
185
|
-
instruments:
|
|
245
|
+
instruments: GroupInstruments;
|
|
186
246
|
metadata: Record<string, string>;
|
|
187
247
|
firstAnswerAt: Timestamp | null;
|
|
188
|
-
repertoireTags:
|
|
248
|
+
repertoireTags: Record<string, GroupRepertoireTag>;
|
|
189
249
|
trialEndAt: Timestamp | null;
|
|
190
250
|
visitedDashboardAt: Record<string, Timestamp>;
|
|
191
251
|
onboardingMessages: GroupOnboardingMessage[];
|
package/models/Group/types.js
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = exports.GroupCustomFieldType = void 0;
|
|
3
|
+
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = exports.GroupCustomFieldType = exports.GroupHistoryAction = void 0;
|
|
4
|
+
var GroupHistoryAction;
|
|
5
|
+
(function (GroupHistoryAction) {
|
|
6
|
+
GroupHistoryAction["Created"] = "created";
|
|
7
|
+
GroupHistoryAction["Deleted"] = "deleted";
|
|
8
|
+
GroupHistoryAction["MemberAdd"] = "member_add";
|
|
9
|
+
GroupHistoryAction["MemberJoin"] = "member_join";
|
|
10
|
+
GroupHistoryAction["MemberLeave"] = "member_leave";
|
|
11
|
+
GroupHistoryAction["MemberRemove"] = "member_remove";
|
|
12
|
+
GroupHistoryAction["MemberInstrumentChange"] = "member_instrument_change";
|
|
13
|
+
GroupHistoryAction["MemberPermissionsChange"] = "member_permissions_change";
|
|
14
|
+
GroupHistoryAction["TemplateCreated"] = "template_created";
|
|
15
|
+
GroupHistoryAction["TemplateDeleted"] = "template_deleted";
|
|
16
|
+
GroupHistoryAction["TemplateEdited"] = "template_edited";
|
|
17
|
+
GroupHistoryAction["EditInstruments"] = "edit_instruments";
|
|
18
|
+
GroupHistoryAction["EditName"] = "edit_name";
|
|
19
|
+
GroupHistoryAction["EditLocation"] = "edit_location";
|
|
20
|
+
GroupHistoryAction["EditMusicStyle"] = "edit_music_style";
|
|
21
|
+
GroupHistoryAction["EditUsername"] = "edit_username";
|
|
22
|
+
GroupHistoryAction["EditPhoto"] = "edit_photo";
|
|
23
|
+
GroupHistoryAction["LinkFakeAccount"] = "link_fake_account";
|
|
24
|
+
GroupHistoryAction["EditFakeAccountInfo"] = "edit_fake_account_info";
|
|
25
|
+
})(GroupHistoryAction = exports.GroupHistoryAction || (exports.GroupHistoryAction = {}));
|
|
26
|
+
// types/CustomFields.ts
|
|
4
27
|
var GroupCustomFieldType;
|
|
5
28
|
(function (GroupCustomFieldType) {
|
|
6
29
|
GroupCustomFieldType["TEXT"] = "text";
|
|
@@ -11,7 +34,7 @@ var GroupCustomFieldType;
|
|
|
11
34
|
GroupCustomFieldType["PHONE"] = "phone";
|
|
12
35
|
GroupCustomFieldType["LINK"] = "link";
|
|
13
36
|
GroupCustomFieldType["PARAGRAPH"] = "paragraph";
|
|
14
|
-
})(GroupCustomFieldType
|
|
37
|
+
})(GroupCustomFieldType = exports.GroupCustomFieldType || (exports.GroupCustomFieldType = {}));
|
|
15
38
|
var AdminPermissions;
|
|
16
39
|
(function (AdminPermissions) {
|
|
17
40
|
AdminPermissions["Owner"] = "owner";
|
|
@@ -19,36 +42,55 @@ var AdminPermissions;
|
|
|
19
42
|
AdminPermissions["Rollcall"] = "rollcall";
|
|
20
43
|
AdminPermissions["Members"] = "members";
|
|
21
44
|
AdminPermissions["Repertoire"] = "repertoire";
|
|
22
|
-
AdminPermissions["Purchase"] = "purchase";
|
|
23
45
|
AdminPermissions["Communications"] = "communications";
|
|
24
46
|
AdminPermissions["Offers"] = "offers";
|
|
25
47
|
AdminPermissions["Billing"] = "billing";
|
|
26
48
|
AdminPermissions["Inventory"] = "inventory";
|
|
27
|
-
})(AdminPermissions
|
|
49
|
+
})(AdminPermissions = exports.AdminPermissions || (exports.AdminPermissions = {}));
|
|
28
50
|
var GroupConfigKey;
|
|
29
51
|
(function (GroupConfigKey) {
|
|
30
52
|
GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
|
|
31
53
|
GroupConfigKey["AllowEditInstruments"] = "allowEditInstruments";
|
|
32
54
|
GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
|
|
33
55
|
GroupConfigKey["AllowVerifyGeoLoc"] = "allowVerifyGeoLoc";
|
|
34
|
-
})(GroupConfigKey
|
|
56
|
+
})(GroupConfigKey = exports.GroupConfigKey || (exports.GroupConfigKey = {}));
|
|
35
57
|
var GroupConfigSitesKey;
|
|
36
58
|
(function (GroupConfigSitesKey) {
|
|
37
59
|
GroupConfigSitesKey["Active"] = "active";
|
|
38
60
|
GroupConfigSitesKey["ShowMembers"] = "showMembers";
|
|
39
61
|
GroupConfigSitesKey["ShowEvents"] = "showEvents";
|
|
40
|
-
})(GroupConfigSitesKey
|
|
62
|
+
})(GroupConfigSitesKey = exports.GroupConfigSitesKey || (exports.GroupConfigSitesKey = {}));
|
|
41
63
|
var GroupConfigShowAttendanceToMembers;
|
|
42
64
|
(function (GroupConfigShowAttendanceToMembers) {
|
|
43
65
|
GroupConfigShowAttendanceToMembers["None"] = "none";
|
|
44
66
|
GroupConfigShowAttendanceToMembers["OnlyConfirmed"] = "onlyConfirmed";
|
|
45
67
|
GroupConfigShowAttendanceToMembers["OnlyToSection"] = "onlyToSection";
|
|
46
68
|
GroupConfigShowAttendanceToMembers["All"] = "all";
|
|
47
|
-
})(GroupConfigShowAttendanceToMembers
|
|
69
|
+
})(GroupConfigShowAttendanceToMembers = exports.GroupConfigShowAttendanceToMembers || (exports.GroupConfigShowAttendanceToMembers = {}));
|
|
48
70
|
var GroupStatus;
|
|
49
71
|
(function (GroupStatus) {
|
|
50
72
|
GroupStatus["Premium"] = "premium";
|
|
51
73
|
GroupStatus["Trial"] = "trial";
|
|
52
74
|
GroupStatus["Inactive"] = "inactive";
|
|
53
75
|
GroupStatus["Deleted"] = "deleted";
|
|
54
|
-
})(GroupStatus
|
|
76
|
+
})(GroupStatus = exports.GroupStatus || (exports.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 = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import Instrument from '.';
|
|
2
|
-
import { CustomInstrumentId, InstrumentId
|
|
2
|
+
import { CustomInstrumentId, InstrumentId } from '../../helpers/instruments';
|
|
3
3
|
import { LanguagesTypes } from '../../lang';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { GroupData } from '../Group/types';
|
|
5
|
+
export default class GroupInstrument extends Instrument {
|
|
6
|
+
private groupInstruments;
|
|
7
|
+
constructor(id: InstrumentId, lang: LanguagesTypes | undefined, groupInstruments: GroupData['instruments']);
|
|
7
8
|
static isCustom(instrumentId: InstrumentId): instrumentId is CustomInstrumentId;
|
|
8
9
|
get isCustomInstrument(): boolean;
|
|
9
10
|
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 GroupInstrument extends _1.default {
|
|
9
|
+
constructor(id, lang = lang_1.defaultLocale, groupInstruments) {
|
|
10
10
|
super(id, lang);
|
|
11
|
-
this.
|
|
11
|
+
this.groupInstruments = groupInstruments;
|
|
12
12
|
}
|
|
13
13
|
static isCustom(instrumentId) {
|
|
14
14
|
return (instrumentId || '').startsWith('customInstrument-');
|
|
15
15
|
}
|
|
16
16
|
get isCustomInstrument() {
|
|
17
|
-
return
|
|
17
|
+
return GroupInstrument.isCustom(this.id);
|
|
18
18
|
}
|
|
19
19
|
get name() {
|
|
20
|
-
if (!
|
|
20
|
+
if (!GroupInstrument.isCustom(this.id))
|
|
21
21
|
return super.name;
|
|
22
|
-
if (this.id in this.
|
|
23
|
-
return this.
|
|
22
|
+
if (this.id in this.groupInstruments) {
|
|
23
|
+
return this.groupInstruments[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 GroupInstrument.isCustom(this.id) && this.id in this.groupInstruments
|
|
29
|
+
? this.groupInstruments[this.id].icon
|
|
30
30
|
: super.icon;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
exports.default =
|
|
33
|
+
exports.default = GroupInstrument;
|
|
@@ -2,36 +2,6 @@
|
|
|
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
|
-
};
|
|
35
5
|
class Instrument {
|
|
36
6
|
constructor(id, lang = lang_1.defaultLocale) {
|
|
37
7
|
this.id = id;
|
|
@@ -39,14 +9,7 @@ class Instrument {
|
|
|
39
9
|
}
|
|
40
10
|
get name() {
|
|
41
11
|
const translation = (0, lang_1.getTranslation)(`instruments.${this.id}`, this.lang);
|
|
42
|
-
return translation
|
|
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;
|
|
12
|
+
return translation || this.id;
|
|
50
13
|
}
|
|
51
14
|
get icon() {
|
|
52
15
|
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 || (exports.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 || (exports.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 || (exports.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 || (exports.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 || (exports.NotificationActionsFilter = {}));
|
|
169
169
|
exports.notificationByFilter = {
|
|
170
170
|
[NotificationActionsFilter.EventCreated]: [
|
|
171
171
|
NotificationActions.PerformanceCreate,
|
package/models/Offer/types.d.ts
CHANGED
|
@@ -4,6 +4,18 @@ 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
|
+
}
|
|
7
19
|
export declare enum OfferType {
|
|
8
20
|
Group = "group",
|
|
9
21
|
Event = "event"
|
package/models/Offer/types.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OfferType = void 0;
|
|
3
|
+
exports.OfferType = exports.OfferHistoryAction = void 0;
|
|
4
|
+
var OfferHistoryAction;
|
|
5
|
+
(function (OfferHistoryAction) {
|
|
6
|
+
OfferHistoryAction["Created"] = "created";
|
|
7
|
+
OfferHistoryAction["Remove"] = "remove";
|
|
8
|
+
OfferHistoryAction["EditLocality"] = "edit_locality";
|
|
9
|
+
OfferHistoryAction["EditDescription"] = "edit_description";
|
|
10
|
+
OfferHistoryAction["EditDeadline"] = "edit_deadline";
|
|
11
|
+
OfferHistoryAction["SelectApplicant"] = "select_applicant";
|
|
12
|
+
OfferHistoryAction["CloseSelection"] = "close_selection";
|
|
13
|
+
OfferHistoryAction["ReopenSelection"] = "reopen_selection";
|
|
14
|
+
OfferHistoryAction["NewApplicant"] = "new_applicant";
|
|
15
|
+
OfferHistoryAction["RemoveApplicant"] = "remove_applicant";
|
|
16
|
+
})(OfferHistoryAction = exports.OfferHistoryAction || (exports.OfferHistoryAction = {}));
|
|
4
17
|
var OfferType;
|
|
5
18
|
(function (OfferType) {
|
|
6
19
|
OfferType["Group"] = "group";
|
|
7
20
|
OfferType["Event"] = "event";
|
|
8
|
-
})(OfferType
|
|
21
|
+
})(OfferType = exports.OfferType || (exports.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 || (exports.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 || (exports.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 || (exports.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
|
+
get glissandooAdminUrl(): 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 glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
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
|
+
get glissandooAdminUrl() {
|
|
50
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Partnership, this.id);
|
|
51
51
|
}
|
|
52
52
|
get createdAt() {
|
|
53
53
|
return this.data.createdAt;
|
|
@@ -5,4 +5,4 @@ var PartnershipRoles;
|
|
|
5
5
|
(function (PartnershipRoles) {
|
|
6
6
|
PartnershipRoles["Admin"] = "admin";
|
|
7
7
|
PartnershipRoles["Partner"] = "partner";
|
|
8
|
-
})(PartnershipRoles
|
|
8
|
+
})(PartnershipRoles = exports.PartnershipRoles || (exports.PartnershipRoles = {}));
|