@glissandoo/lib 1.115.0 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/functions/auth.d.ts +1 -3
- package/functions/customer.d.ts +0 -4
- package/functions/event.d.ts +22 -0
- package/functions/event.js +1 -1
- package/functions/eventPlayer.d.ts +2 -0
- package/functions/eventPlayer.js +1 -1
- package/functions/eventRepertory.d.ts +0 -2
- package/functions/eventRepertory.js +1 -1
- package/functions/eventoPayout.d.ts +70 -0
- package/functions/groupModule.d.ts +13 -0
- package/functions/groupPayment.d.ts +62 -0
- package/functions/groupPayoutRule.d.ts +18 -0
- package/functions/groupRepertory.d.ts +0 -110
- package/functions/index.d.ts +12 -30
- package/functions/index.js +13 -31
- package/functions/misc.d.ts +0 -6
- package/functions/regions.js +13 -31
- package/helpers/appScenes.d.ts +2 -0
- package/helpers/appScenes.js +3 -1
- package/helpers/auth.d.ts +9 -2
- package/helpers/auth.js +14 -33
- package/helpers/badges.js +1 -1
- package/helpers/collections.js +2 -2
- package/helpers/communicationTemplate/index.d.ts +2 -3
- package/helpers/communicationTemplate/index.js +5 -5
- package/helpers/currency.d.ts +4 -19
- package/helpers/currency.js +264 -72
- package/helpers/dlinks.js +1 -1
- package/helpers/errors.d.ts +7 -2
- package/helpers/errors.js +7 -2
- package/helpers/glissandooAdmin.d.ts +3 -0
- package/helpers/glissandooAdmin.js +6 -0
- package/helpers/instruments/index.d.ts +0 -17
- package/helpers/instruments/index.js +1 -5
- package/helpers/instruments/lists.d.ts +3 -3
- package/helpers/instruments/lists.js +5 -5
- package/helpers/musicStyles/index.d.ts +4 -22
- package/helpers/musicStyles/index.js +35 -114
- package/helpers/notifications/index.js +1 -1
- package/helpers/objects.d.ts +1 -5
- package/helpers/objects.js +6 -7
- package/helpers/paymentForecast.d.ts +37 -0
- package/helpers/paymentForecast.js +58 -0
- package/helpers/payoutRules.d.ts +45 -0
- package/helpers/payoutRules.js +166 -0
- package/helpers/plans.js +2 -2
- package/helpers/rates.d.ts +1 -1
- package/helpers/slate.d.ts +5 -64
- package/helpers/slate.js +1 -7
- package/helpers/ts-extras/array-includes.js +2 -1
- package/helpers/ts-extras/as-mutable.js +2 -1
- package/helpers/ts-extras/assert-error.js +2 -1
- package/helpers/ts-extras/index.js +1 -1
- package/helpers/ts-extras/is-defined.js +2 -1
- package/helpers/ts-extras/is-empty.js +2 -1
- package/helpers/ts-extras/is-infinite.js +2 -1
- package/helpers/ts-extras/is-present.js +2 -1
- package/helpers/ts-extras/object-entries.d.ts +1 -1
- package/helpers/ts-extras/object-from-entries.d.ts +1 -1
- package/helpers/ts-extras/object-has-own.js +2 -1
- package/helpers/ts-extras/object-keys.d.ts +1 -1
- package/helpers/ts-extras/object-keys.js +1 -0
- package/helpers/ts-extras/set-has.js +2 -1
- package/helpers/types.d.ts +0 -26
- package/helpers/types.js +5 -25
- package/lang/ca.json +97 -325
- package/lang/de.json +97 -325
- package/lang/en.json +97 -325
- package/lang/es.json +97 -325
- package/lang/eu.json +97 -325
- package/lang/fr.json +97 -325
- package/lang/gl.json +97 -325
- package/lang/index.js +2 -3
- package/lang/it.json +97 -325
- package/lang/nl.json +97 -325
- package/lang/pt.json +97 -325
- package/models/Communication/types.d.ts +16 -0
- package/models/Communication/types.js +9 -3
- package/models/Counters/Group/Analytics/types.js +1 -1
- package/models/Customer/index.d.ts +1 -1
- package/models/Customer/index.js +3 -3
- package/models/Customer/types.js +1 -1
- package/models/Evento/Player/index.d.ts +1 -0
- package/models/Evento/Player/index.js +3 -0
- package/models/Evento/Player/types.d.ts +1 -0
- package/models/Evento/Player/types.js +3 -3
- package/models/Evento/Repertory/types.d.ts +1 -2
- package/models/Evento/index.d.ts +4 -3
- package/models/Evento/index.js +10 -5
- package/models/Evento/types.d.ts +43 -2
- package/models/Evento/types.js +42 -8
- package/models/Federation/index.d.ts +1 -1
- package/models/Federation/index.js +3 -3
- package/models/Group/Analytics/types.js +1 -1
- package/models/Group/Payment/index.d.ts +45 -0
- package/models/Group/Payment/index.js +110 -0
- package/models/Group/Payment/supabase.d.ts +16 -0
- package/models/Group/Payment/supabase.js +46 -0
- package/models/Group/Payment/types.d.ts +96 -0
- package/models/Group/Payment/types.js +26 -0
- package/models/Group/Player/types.js +1 -1
- package/models/Group/Repertory/File/Section/index.d.ts +3 -3
- package/models/Group/Repertory/File/Section/index.js +2 -3
- package/models/Group/Repertory/File/Section/types.d.ts +0 -7
- package/models/Group/Repertory/File/Section/types.js +1 -1
- package/models/Group/Repertory/File/index.d.ts +2 -4
- package/models/Group/Repertory/File/index.js +4 -4
- package/models/Group/Repertory/FilePath/index.d.ts +4 -3
- package/models/Group/Repertory/index.d.ts +4 -12
- package/models/Group/Repertory/index.js +0 -9
- package/models/Group/Repertory/types.d.ts +32 -21
- package/models/Group/Repertory/types.js +18 -8
- package/models/Group/index.d.ts +20 -15
- package/models/Group/index.js +34 -16
- package/models/Group/types.d.ts +96 -6
- package/models/Group/types.js +63 -8
- package/models/Instrument/{fromRecord.d.ts → group.d.ts} +5 -4
- package/models/Instrument/{fromRecord.js → group.js} +10 -10
- package/models/Instrument/index.d.ts +0 -2
- package/models/Instrument/index.js +1 -38
- package/models/Inventory/Item/types.js +2 -2
- package/models/Inventory/types.js +1 -1
- package/models/Notification/types.d.ts +4 -1
- package/models/Notification/types.js +5 -2
- package/models/Offer/types.d.ts +12 -0
- package/models/Offer/types.js +15 -2
- package/models/Partnership/Partner/types.js +1 -1
- package/models/Partnership/Payment/types.js +2 -2
- package/models/Partnership/index.d.ts +1 -1
- package/models/Partnership/index.js +3 -3
- package/models/Partnership/types.js +1 -1
- package/models/Repertory/types.d.ts +0 -12
- package/models/Repertory/types.js +2 -2
- package/models/User/Group/index.js +2 -1
- package/models/User/index.d.ts +1 -1
- package/models/User/index.js +3 -3
- package/models/User/types.d.ts +1 -2
- package/models/User/types.js +7 -7
- package/models/WebhookEvent/types.js +1 -1
- package/package.json +20 -28
- package/types/firestore.d.ts +1 -0
- package/types/firestore.js +1 -1
- package/types/payoutRule.d.ts +126 -0
- package/types/payoutRule.js +34 -0
- package/types/payoutRule.ts +132 -0
- package/types/supabase/generated.d.ts +545 -3113
- package/types/supabase/generated.js +0 -9
- package/types/supabase/generated.ts +581 -3080
- package/types/supabase/index.d.ts +19 -155
- package/types/supabase/index.js +0 -15
- package/types/supabase/index.ts +21 -288
- package/types/supabase/overwrites/comm.d.ts +18 -0
- package/types/supabase/overwrites/comm.ts +18 -0
- package/types/supabase/overwrites/comm_history.d.ts +10 -0
- package/types/supabase/overwrites/comm_history.ts +10 -0
- package/types/supabase/overwrites/{tables/event/index.d.ts → event.d.ts} +1 -1
- package/types/supabase/overwrites/{tables/event/index.ts → event.ts} +1 -1
- package/types/supabase/overwrites/event_history.d.ts +10 -0
- package/types/supabase/overwrites/event_history.ts +10 -0
- package/types/supabase/overwrites/{tables/group/index.d.ts → group.d.ts} +5 -2
- package/types/supabase/overwrites/{tables/group/index.ts → group.ts} +6 -2
- package/types/supabase/overwrites/group_history.d.ts +9 -0
- package/types/supabase/overwrites/group_history.ts +9 -0
- package/types/supabase/overwrites/index.d.ts +1 -1
- package/types/supabase/overwrites/index.ts +1 -1
- package/types/supabase/overwrites/{tables/offer/index.d.ts → offer.d.ts} +2 -6
- package/types/supabase/overwrites/{tables/offer/index.ts → offer.ts} +2 -7
- package/types/supabase/overwrites/offer_history.d.ts +10 -0
- package/types/supabase/overwrites/offer_history.ts +10 -0
- package/types/supabase/overwrites/repertoire.d.ts +12 -0
- package/types/supabase/overwrites/repertoire.ts +12 -0
- package/types/supabase/overwrites/repertoire_history.d.ts +10 -0
- package/types/supabase/overwrites/repertoire_history.ts +10 -0
- package/functions/composer.d.ts +0 -13
- package/functions/composerComposition.d.ts +0 -102
- package/functions/composerNotification.d.ts +0 -38
- package/functions/composerPayout.d.ts +0 -20
- package/helpers/catalogBridge.d.ts +0 -121
- package/helpers/catalogBridge.js +0 -95
- package/helpers/compositionCategories/genres.d.ts +0 -922
- package/helpers/compositionCategories/genres.js +0 -940
- package/helpers/compositionCategories/index.d.ts +0 -2
- package/helpers/compositionCategories/index.js +0 -18
- package/helpers/compositionCategories/styles.d.ts +0 -181
- package/helpers/compositionCategories/styles.js +0 -197
- package/helpers/compositionSoloistOffstageParts/index.d.ts +0 -34
- package/helpers/compositionSoloistOffstageParts/index.js +0 -117
- package/helpers/currencyConversion.d.ts +0 -45
- package/helpers/currencyConversion.js +0 -119
- package/helpers/dataStructures/trees/index.d.ts +0 -12
- package/helpers/dataStructures/trees/index.js +0 -71
- package/helpers/dataStructures/trees/types.d.ts +0 -14
- package/helpers/dataStructures/trees/types.js +0 -5
- package/helpers/externalUrls.d.ts +0 -12
- package/helpers/externalUrls.js +0 -40
- package/models/CompositionGenre/index.d.ts +0 -9
- package/models/CompositionGenre/index.js +0 -16
- package/models/CompositionStyle/index.d.ts +0 -9
- package/models/CompositionStyle/index.js +0 -16
- package/models/supabase/Comm/index.d.ts +0 -24
- package/models/supabase/Comm/index.js +0 -68
- package/models/supabase/Comm/types.d.ts +0 -6
- package/models/supabase/CommHistory/index.d.ts +0 -22
- package/models/supabase/CommHistory/index.js +0 -37
- package/models/supabase/CommHistory/types.d.ts +0 -11
- package/models/supabase/CommHistory/types.js +0 -9
- package/models/supabase/Composer/Composition/Acquisition/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/Acquisition/index.js +0 -9
- package/models/supabase/Composer/Composition/Acquisition/types.d.ts +0 -36
- package/models/supabase/Composer/Composition/Favorite/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/Favorite/index.js +0 -9
- package/models/supabase/Composer/Composition/Favorite/types.d.ts +0 -6
- package/models/supabase/Composer/Composition/View/index.d.ts +0 -4
- package/models/supabase/Composer/Composition/View/index.js +0 -9
- package/models/supabase/Composer/Composition/View/types.d.ts +0 -6
- package/models/supabase/Composer/Composition/index.d.ts +0 -5284
- package/models/supabase/Composer/Composition/index.js +0 -166
- package/models/supabase/Composer/Composition/types.d.ts +0 -96
- package/models/supabase/Composer/Composition/types.js +0 -32
- package/models/supabase/Composer/Notification/index.d.ts +0 -4
- package/models/supabase/Composer/Notification/index.js +0 -9
- package/models/supabase/Composer/Notification/types.d.ts +0 -39
- package/models/supabase/Composer/Notification/types.js +0 -27
- package/models/supabase/Composer/Payout/index.d.ts +0 -4
- package/models/supabase/Composer/Payout/index.js +0 -9
- package/models/supabase/Composer/Payout/status.d.ts +0 -1
- package/models/supabase/Composer/Payout/types.d.ts +0 -5
- package/models/supabase/Composer/PerformanceAttendance/types.d.ts +0 -4
- package/models/supabase/Composer/index.d.ts +0 -78
- package/models/supabase/Composer/index.js +0 -105
- package/models/supabase/Composer/types.d.ts +0 -6
- package/models/supabase/EventHistory/index.d.ts +0 -22
- package/models/supabase/EventHistory/index.js +0 -37
- package/models/supabase/EventHistory/types.d.ts +0 -36
- package/models/supabase/EventHistory/types.js +0 -34
- package/models/supabase/GroupHistory/index.d.ts +0 -21
- package/models/supabase/GroupHistory/index.js +0 -34
- package/models/supabase/GroupHistory/types.d.ts +0 -27
- package/models/supabase/GroupHistory/types.js +0 -25
- package/models/supabase/Model/index.d.ts +0 -10
- package/models/supabase/Model/index.js +0 -21
- package/models/supabase/OfferHistory/index.d.ts +0 -22
- package/models/supabase/OfferHistory/index.js +0 -37
- package/models/supabase/OfferHistory/types.d.ts +0 -18
- package/models/supabase/OfferHistory/types.js +0 -16
- package/models/supabase/Repertoire/index.d.ts +0 -16
- package/models/supabase/Repertoire/index.js +0 -43
- package/models/supabase/Repertoire/types.d.ts +0 -6
- package/models/supabase/RepertoireHistory/index.d.ts +0 -22
- package/models/supabase/RepertoireHistory/index.js +0 -37
- package/models/supabase/RepertoireHistory/types.d.ts +0 -21
- package/models/supabase/RepertoireHistory/types.js +0 -19
- package/models/supabase/User/Group/index.d.ts +0 -11
- package/models/supabase/User/Group/index.js +0 -30
- package/models/supabase/User/Group/types.d.ts +0 -6
- package/models/supabase/User/index.d.ts +0 -13
- package/models/supabase/User/index.js +0 -37
- package/models/supabase/User/types.d.ts +0 -6
- package/types/supabase/catalog.d.ts +0 -46
- package/types/supabase/catalog.js +0 -2
- package/types/supabase/catalog.ts +0 -67
- package/types/supabase/composerMetrics.d.ts +0 -27
- package/types/supabase/composerMetrics.js +0 -2
- package/types/supabase/composerMetrics.ts +0 -26
- package/types/supabase/overwrites/tables/comm/model.d.ts +0 -4
- package/types/supabase/overwrites/tables/comm/model.js +0 -2
- package/types/supabase/overwrites/tables/comm/model.ts +0 -4
- package/types/supabase/overwrites/tables/comm_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/comm_history/index.js +0 -2
- package/types/supabase/overwrites/tables/comm_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/comm_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/comm_history/model.js +0 -2
- package/types/supabase/overwrites/tables/comm_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/common/index.js +0 -2
- package/types/supabase/overwrites/tables/composer/index.d.ts +0 -9
- package/types/supabase/overwrites/tables/composer/index.js +0 -2
- package/types/supabase/overwrites/tables/composer/index.ts +0 -10
- package/types/supabase/overwrites/tables/composer/model.d.ts +0 -12
- package/types/supabase/overwrites/tables/composer/model.js +0 -2
- package/types/supabase/overwrites/tables/composer/model.ts +0 -15
- package/types/supabase/overwrites/tables/composer/publicModel.d.ts +0 -11
- package/types/supabase/overwrites/tables/composer/publicModel.js +0 -2
- package/types/supabase/overwrites/tables/composer/publicModel.ts +0 -15
- package/types/supabase/overwrites/tables/composerComposition/index.d.ts +0 -18
- package/types/supabase/overwrites/tables/composerComposition/index.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/index.ts +0 -24
- package/types/supabase/overwrites/tables/composerComposition/model.d.ts +0 -9
- package/types/supabase/overwrites/tables/composerComposition/model.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/model.ts +0 -26
- package/types/supabase/overwrites/tables/composerComposition/publicModel.d.ts +0 -9
- package/types/supabase/overwrites/tables/composerComposition/publicModel.js +0 -2
- package/types/supabase/overwrites/tables/composerComposition/publicModel.ts +0 -37
- package/types/supabase/overwrites/tables/composerNotification/index.d.ts +0 -19
- package/types/supabase/overwrites/tables/composerNotification/index.js +0 -2
- package/types/supabase/overwrites/tables/composerNotification/index.ts +0 -25
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.d.ts +0 -2
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.js +0 -2
- package/types/supabase/overwrites/tables/composerOwnedTransaction/model.ts +0 -3
- package/types/supabase/overwrites/tables/composerPayout/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/composerPayout/index.js +0 -2
- package/types/supabase/overwrites/tables/composerPayout/index.ts +0 -8
- package/types/supabase/overwrites/tables/compositionAcquisition/index.d.ts +0 -4
- package/types/supabase/overwrites/tables/compositionAcquisition/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionAcquisition/index.ts +0 -8
- package/types/supabase/overwrites/tables/compositionAcquisition/model.d.ts +0 -6
- package/types/supabase/overwrites/tables/compositionAcquisition/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionAcquisition/model.ts +0 -11
- package/types/supabase/overwrites/tables/compositionFavorite/index.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionFavorite/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/index.ts +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/model.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionFavorite/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionFavorite/model.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/index.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/index.js +0 -2
- package/types/supabase/overwrites/tables/compositionView/index.ts +0 -2
- package/types/supabase/overwrites/tables/compositionView/model.d.ts +0 -1
- package/types/supabase/overwrites/tables/compositionView/model.js +0 -2
- package/types/supabase/overwrites/tables/compositionView/model.ts +0 -1
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.d.ts +0 -16
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.js +0 -2
- package/types/supabase/overwrites/tables/currencyExchangeRate/index.ts +0 -18
- package/types/supabase/overwrites/tables/event/index.js +0 -2
- package/types/supabase/overwrites/tables/event_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/event_history/index.js +0 -2
- package/types/supabase/overwrites/tables/event_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/event_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/event_history/model.js +0 -2
- package/types/supabase/overwrites/tables/event_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/group/index.js +0 -2
- package/types/supabase/overwrites/tables/group_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/group_history/index.js +0 -2
- package/types/supabase/overwrites/tables/group_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/group_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/group_history/model.js +0 -2
- package/types/supabase/overwrites/tables/group_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/offer/index.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/offer_history/index.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/offer_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/offer_history/model.js +0 -2
- package/types/supabase/overwrites/tables/offer_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/repertoire/model.d.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire/model.js +0 -2
- package/types/supabase/overwrites/tables/repertoire/model.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire_history/index.d.ts +0 -7
- package/types/supabase/overwrites/tables/repertoire_history/index.js +0 -2
- package/types/supabase/overwrites/tables/repertoire_history/index.ts +0 -9
- package/types/supabase/overwrites/tables/repertoire_history/model.d.ts +0 -10
- package/types/supabase/overwrites/tables/repertoire_history/model.js +0 -2
- package/types/supabase/overwrites/tables/repertoire_history/model.ts +0 -13
- package/types/supabase/overwrites/tables/user/index.d.ts +0 -11
- package/types/supabase/overwrites/tables/user/index.js +0 -2
- package/types/supabase/overwrites/tables/user/index.ts +0 -13
- /package/functions/{composer.js → eventoPayout.js} +0 -0
- /package/functions/{composerComposition.js → groupModule.js} +0 -0
- /package/functions/{composerNotification.js → groupPayment.js} +0 -0
- /package/functions/{composerPayout.js → groupPayoutRule.js} +0 -0
- /package/{models/supabase/Comm/types.js → types/supabase/overwrites/comm.js} +0 -0
- /package/{models/supabase/Composer/Composition/Acquisition/types.js → types/supabase/overwrites/comm_history.js} +0 -0
- /package/{models/supabase/Composer/Composition/Favorite/types.js → types/supabase/overwrites/event.js} +0 -0
- /package/{models/supabase/Composer/Composition/View/types.js → types/supabase/overwrites/event_history.js} +0 -0
- /package/{models/supabase/Composer/Payout/status.js → types/supabase/overwrites/group.js} +0 -0
- /package/{models/supabase/Composer/Payout/types.js → types/supabase/overwrites/group_history.js} +0 -0
- /package/{models/supabase/Composer/PerformanceAttendance/types.js → types/supabase/overwrites/offer.js} +0 -0
- /package/{models/supabase/Composer/types.js → types/supabase/overwrites/offer_history.js} +0 -0
- /package/{models/supabase/Repertoire/types.js → types/supabase/overwrites/repertoire.js} +0 -0
- /package/{models/supabase/User/Group/types.js → types/supabase/overwrites/repertoire_history.js} +0 -0
- /package/types/supabase/overwrites/{tables/common/index.d.ts → utils.d.ts} +0 -0
- /package/{models/supabase/User/types.js → types/supabase/overwrites/utils.js} +0 -0
- /package/types/supabase/overwrites/{tables/common/index.ts → utils.ts} +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evaluateRulesForPlayer = exports.ruleMatchesPlayer = exports.evaluateCondition = void 0;
|
|
4
|
+
const payoutRule_1 = require("../types/payoutRule");
|
|
5
|
+
function resolveFieldValue(player, field) {
|
|
6
|
+
if (field === 'mainInstrument')
|
|
7
|
+
return player.mainInstrument;
|
|
8
|
+
if (field === 'isGuest')
|
|
9
|
+
return player.isGuest;
|
|
10
|
+
if (field.startsWith('custom.')) {
|
|
11
|
+
const key = field.slice('custom.'.length);
|
|
12
|
+
const v = player.customFields[key];
|
|
13
|
+
return v === undefined ? null : v;
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
function evaluateCondition(player, condition) {
|
|
18
|
+
const fieldValue = resolveFieldValue(player, condition.field);
|
|
19
|
+
const target = condition.value;
|
|
20
|
+
switch (condition.operator) {
|
|
21
|
+
case payoutRule_1.PayoutRuleConditionOperator.Eq:
|
|
22
|
+
return fieldValue === target;
|
|
23
|
+
case payoutRule_1.PayoutRuleConditionOperator.Neq:
|
|
24
|
+
return fieldValue !== target;
|
|
25
|
+
case payoutRule_1.PayoutRuleConditionOperator.Gt:
|
|
26
|
+
return (typeof fieldValue === 'number' && typeof target === 'number' && fieldValue > target);
|
|
27
|
+
case payoutRule_1.PayoutRuleConditionOperator.Gte:
|
|
28
|
+
return (typeof fieldValue === 'number' && typeof target === 'number' && fieldValue >= target);
|
|
29
|
+
case payoutRule_1.PayoutRuleConditionOperator.Lt:
|
|
30
|
+
return (typeof fieldValue === 'number' && typeof target === 'number' && fieldValue < target);
|
|
31
|
+
case payoutRule_1.PayoutRuleConditionOperator.Lte:
|
|
32
|
+
return (typeof fieldValue === 'number' && typeof target === 'number' && fieldValue <= target);
|
|
33
|
+
case payoutRule_1.PayoutRuleConditionOperator.In:
|
|
34
|
+
return Array.isArray(target) && target.includes(fieldValue);
|
|
35
|
+
case payoutRule_1.PayoutRuleConditionOperator.Nin:
|
|
36
|
+
return Array.isArray(target) && !target.includes(fieldValue);
|
|
37
|
+
default:
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.evaluateCondition = evaluateCondition;
|
|
42
|
+
function ruleMatchesPlayer(player, rule) {
|
|
43
|
+
if (!rule.conditions || rule.conditions.length === 0)
|
|
44
|
+
return true;
|
|
45
|
+
return rule.conditions.every((c) => evaluateCondition(player, c));
|
|
46
|
+
}
|
|
47
|
+
exports.ruleMatchesPlayer = ruleMatchesPlayer;
|
|
48
|
+
const PLAYER_EFFECT_TYPES = new Set([
|
|
49
|
+
payoutRule_1.PayoutRuleType.PlayerExclude,
|
|
50
|
+
payoutRule_1.PayoutRuleType.PlayerFixed,
|
|
51
|
+
payoutRule_1.PayoutRuleType.PlayerMultiplier,
|
|
52
|
+
payoutRule_1.PayoutRuleType.PlayerBonus,
|
|
53
|
+
]);
|
|
54
|
+
function round2(n) {
|
|
55
|
+
return Math.round(n * 100) / 100;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Pure function that evaluates the event payout rules against a single player.
|
|
59
|
+
*
|
|
60
|
+
* Apply order (after sorting rules by `order` asc):
|
|
61
|
+
* 1. `PlayerExclude` — short-circuits with `excluded: true`.
|
|
62
|
+
* 2. `PlayerFixed` — replaces the running amount.
|
|
63
|
+
* 3. `PlayerMultiplier` — multiplies the running amount.
|
|
64
|
+
* 4. `PlayerBonus` — adds a fixed amount.
|
|
65
|
+
*
|
|
66
|
+
* When `baseAmount === null` (importByMember "to be determined"):
|
|
67
|
+
* - Rules that depend on the base (Fixed, Multiplier) keep `runningAmount: null`
|
|
68
|
+
* in their `AppliedRuleEntry` and the result `finalAmount` stays `null`.
|
|
69
|
+
* - `PlayerBonus` is recorded with its `delta` but `runningAmount` stays `null`
|
|
70
|
+
* until the base is set.
|
|
71
|
+
*
|
|
72
|
+
* Non-player rules (`EntityShare`, `DefaultExpense`) are ignored here — they
|
|
73
|
+
* affect the global budget, not the per-player amount.
|
|
74
|
+
*/
|
|
75
|
+
function evaluateRulesForPlayer(player, rules, baseAmount) {
|
|
76
|
+
const playerRules = rules
|
|
77
|
+
.filter((r) => PLAYER_EFFECT_TYPES.has(r.effect.type))
|
|
78
|
+
.slice()
|
|
79
|
+
.sort((a, b) => a.order - b.order);
|
|
80
|
+
const appliedRules = [];
|
|
81
|
+
let running = baseAmount;
|
|
82
|
+
let excluded = false;
|
|
83
|
+
let excludedByRuleId = null;
|
|
84
|
+
for (const rule of playerRules) {
|
|
85
|
+
if (!ruleMatchesPlayer(player, rule))
|
|
86
|
+
continue;
|
|
87
|
+
if (rule.effect.type === payoutRule_1.PayoutRuleType.PlayerExclude) {
|
|
88
|
+
excluded = true;
|
|
89
|
+
excludedByRuleId = rule.id;
|
|
90
|
+
appliedRules.push({
|
|
91
|
+
ruleId: rule.id,
|
|
92
|
+
name: rule.name,
|
|
93
|
+
effect: rule.effect,
|
|
94
|
+
delta: null,
|
|
95
|
+
runningAmount: null,
|
|
96
|
+
});
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
if (rule.effect.type === payoutRule_1.PayoutRuleType.PlayerFixed) {
|
|
100
|
+
const next = round2(rule.effect.data.amount);
|
|
101
|
+
const delta = running === null ? null : round2(next - running);
|
|
102
|
+
appliedRules.push({
|
|
103
|
+
ruleId: rule.id,
|
|
104
|
+
name: rule.name,
|
|
105
|
+
effect: rule.effect,
|
|
106
|
+
delta,
|
|
107
|
+
runningAmount: next,
|
|
108
|
+
});
|
|
109
|
+
running = next;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (rule.effect.type === payoutRule_1.PayoutRuleType.PlayerMultiplier) {
|
|
113
|
+
if (running === null) {
|
|
114
|
+
appliedRules.push({
|
|
115
|
+
ruleId: rule.id,
|
|
116
|
+
name: rule.name,
|
|
117
|
+
effect: rule.effect,
|
|
118
|
+
delta: null,
|
|
119
|
+
runningAmount: null,
|
|
120
|
+
});
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const next = round2(running * rule.effect.data.multiplier);
|
|
124
|
+
appliedRules.push({
|
|
125
|
+
ruleId: rule.id,
|
|
126
|
+
name: rule.name,
|
|
127
|
+
effect: rule.effect,
|
|
128
|
+
delta: round2(next - running),
|
|
129
|
+
runningAmount: next,
|
|
130
|
+
});
|
|
131
|
+
running = next;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (rule.effect.type === payoutRule_1.PayoutRuleType.PlayerBonus) {
|
|
135
|
+
const delta = round2(rule.effect.data.amount);
|
|
136
|
+
if (running === null) {
|
|
137
|
+
appliedRules.push({
|
|
138
|
+
ruleId: rule.id,
|
|
139
|
+
name: rule.name,
|
|
140
|
+
effect: rule.effect,
|
|
141
|
+
delta,
|
|
142
|
+
runningAmount: null,
|
|
143
|
+
});
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
const next = round2(running + delta);
|
|
147
|
+
appliedRules.push({
|
|
148
|
+
ruleId: rule.id,
|
|
149
|
+
name: rule.name,
|
|
150
|
+
effect: rule.effect,
|
|
151
|
+
delta,
|
|
152
|
+
runningAmount: next,
|
|
153
|
+
});
|
|
154
|
+
running = next;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
excluded,
|
|
160
|
+
excludedByRuleId,
|
|
161
|
+
baseAmount,
|
|
162
|
+
finalAmount: excluded ? null : running,
|
|
163
|
+
appliedRules,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
exports.evaluateRulesForPlayer = evaluateRulesForPlayer;
|
package/helpers/plans.js
CHANGED
|
@@ -9,12 +9,12 @@ var PlansGroup;
|
|
|
9
9
|
PlansGroup["Forte"] = "forte";
|
|
10
10
|
PlansGroup["Fortissimo"] = "fortissimo";
|
|
11
11
|
PlansGroup["Tutti"] = "tutti";
|
|
12
|
-
})(PlansGroup
|
|
12
|
+
})(PlansGroup = exports.PlansGroup || (exports.PlansGroup = {}));
|
|
13
13
|
var PlanPeriod;
|
|
14
14
|
(function (PlanPeriod) {
|
|
15
15
|
PlanPeriod["Yearly"] = "yearly";
|
|
16
16
|
PlanPeriod["Monthly"] = "monthly";
|
|
17
|
-
})(PlanPeriod
|
|
17
|
+
})(PlanPeriod = exports.PlanPeriod || (exports.PlanPeriod = {}));
|
|
18
18
|
exports.membersPerPlan = {
|
|
19
19
|
[PlansGroup.Piano]: 20,
|
|
20
20
|
[PlansGroup.MezzoPiano]: 40,
|
package/helpers/rates.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const rateSteps: {
|
|
|
6
6
|
range: [number, number];
|
|
7
7
|
}[];
|
|
8
8
|
export declare const getStepRating: (rating: number) => {
|
|
9
|
-
id:
|
|
9
|
+
id: 'love' | 'like' | 'neutral' | 'dislike';
|
|
10
10
|
emoji: string;
|
|
11
11
|
value: VoteValue;
|
|
12
12
|
range: [number, number];
|
package/helpers/slate.d.ts
CHANGED
|
@@ -1,66 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
bold?: boolean;
|
|
3
|
-
italic?: boolean;
|
|
4
|
-
underline?: boolean;
|
|
5
|
-
strikethrough?: boolean;
|
|
6
|
-
code?: boolean;
|
|
7
|
-
subscript?: boolean;
|
|
8
|
-
superscript?: boolean;
|
|
9
|
-
color?: string;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
}
|
|
12
|
-
export type AlignableNode = 'left' | 'center' | 'right' | 'justify';
|
|
13
|
-
interface CommonBlockProps {
|
|
14
|
-
align?: AlignableNode;
|
|
15
|
-
id?: string;
|
|
16
|
-
}
|
|
17
|
-
export type ParagraphElement = CommonBlockProps & {
|
|
18
|
-
type: 'paragraph';
|
|
19
|
-
children: Descendant[];
|
|
20
|
-
};
|
|
21
|
-
export type HeadingElement = CommonBlockProps & {
|
|
22
|
-
type: 'heading-one' | 'heading-two' | 'heading-three' | 'heading-four';
|
|
23
|
-
children: Descendant[];
|
|
24
|
-
};
|
|
25
|
-
export type ListElement = CommonBlockProps & {
|
|
26
|
-
type: 'bulleted-list' | 'numbered-list';
|
|
27
|
-
children: ListItemElement[];
|
|
28
|
-
};
|
|
29
|
-
export type ListItemElement = CommonBlockProps & {
|
|
30
|
-
type: 'list-item';
|
|
31
|
-
children: Descendant[];
|
|
32
|
-
};
|
|
33
|
-
export type BlockQuoteElement = CommonBlockProps & {
|
|
34
|
-
type: 'block-quote';
|
|
35
|
-
children: Descendant[];
|
|
36
|
-
};
|
|
37
|
-
export type LinkElement = {
|
|
38
|
-
type: 'link';
|
|
39
|
-
url: string;
|
|
40
|
-
openInNewTab?: boolean;
|
|
41
|
-
children: Descendant[];
|
|
42
|
-
};
|
|
43
|
-
export type ImageElement = {
|
|
44
|
-
type: 'image';
|
|
45
|
-
url: string;
|
|
46
|
-
alt?: string;
|
|
47
|
-
caption?: string;
|
|
48
|
-
width?: number | string;
|
|
49
|
-
height?: number | string;
|
|
50
|
-
children: CustomText[];
|
|
51
|
-
};
|
|
52
|
-
export type CodeBlockElement = {
|
|
53
|
-
type: 'code-block';
|
|
54
|
-
language?: string;
|
|
55
|
-
children: Descendant[];
|
|
56
|
-
};
|
|
57
|
-
export type CustomElement = ParagraphElement | HeadingElement | ListElement | ListItemElement | BlockQuoteElement | LinkElement | ImageElement | CodeBlockElement;
|
|
58
|
-
export type SlateBlockType = CustomElement['type'];
|
|
59
|
-
export declare type Descendant = CustomElement | CustomText;
|
|
60
|
-
export interface CustomTypes {
|
|
61
|
-
Element: CustomElement;
|
|
62
|
-
Text: CustomText;
|
|
63
|
-
}
|
|
1
|
+
export declare type Descendant = Element | Text;
|
|
64
2
|
export declare type Element = ExtendedType<'Element', BaseElement>;
|
|
65
3
|
export interface BaseElement {
|
|
66
4
|
children: Descendant[];
|
|
@@ -69,7 +7,10 @@ export declare type Text = ExtendedType<'Text', BaseText>;
|
|
|
69
7
|
export interface BaseText {
|
|
70
8
|
text: string;
|
|
71
9
|
}
|
|
72
|
-
declare type ExtendableTypes = 'Element' | 'Text';
|
|
10
|
+
declare type ExtendableTypes = 'Editor' | 'Element' | 'Text';
|
|
11
|
+
export interface CustomTypes {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
73
14
|
export declare type ExtendedType<K extends ExtendableTypes, B> = unknown extends CustomTypes[K] ? B : CustomTypes[K];
|
|
74
15
|
export declare const serializeSlateBlock: (nodes: Descendant[]) => string;
|
|
75
16
|
export {};
|
package/helpers/slate.js
CHANGED
|
@@ -5,17 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.serializeSlateBlock = void 0;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
// ===========================================
|
|
9
|
-
// 5. SERIALIZER
|
|
10
|
-
// ===========================================
|
|
11
8
|
const serializeSlateBlock = (nodes) => {
|
|
12
9
|
return nodes
|
|
13
10
|
.map((node) => {
|
|
14
|
-
// Because we used Discriminated Unions, TypeScript allows specific property access
|
|
15
|
-
// if we narrowed the type. However, for a generic recursive serializer,
|
|
16
|
-
// lodash/get is still safe for runtime handling.
|
|
17
11
|
const children = (0, get_1.default)(node, 'children');
|
|
18
|
-
if (children
|
|
12
|
+
if (children) {
|
|
19
13
|
return (0, exports.serializeSlateBlock)(children);
|
|
20
14
|
}
|
|
21
15
|
const text = (0, get_1.default)(node, 'text');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.arrayIncludes =
|
|
3
|
+
exports.arrayIncludes = void 0;
|
|
4
4
|
/**
|
|
5
5
|
An alternative to `Array#includes()` that properly acts as a type guard.
|
|
6
6
|
|
|
@@ -24,3 +24,4 @@ if (arrayIncludes(values, valueToCheck)) {
|
|
|
24
24
|
function arrayIncludes(array, item, fromIndex) {
|
|
25
25
|
return array.includes(item, fromIndex);
|
|
26
26
|
}
|
|
27
|
+
exports.arrayIncludes = arrayIncludes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asMutable =
|
|
3
|
+
exports.asMutable = void 0;
|
|
4
4
|
/**
|
|
5
5
|
Cast the given value to be [`Mutable`](https://github.com/sindresorhus/type-fest/blob/main/source/mutable.d.ts).
|
|
6
6
|
|
|
@@ -18,3 +18,4 @@ const mutableContext = asMutable((await import('x')).context);
|
|
|
18
18
|
function asMutable(value) {
|
|
19
19
|
return value; // eslint-disable-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-explicit-any
|
|
20
20
|
}
|
|
21
|
+
exports.asMutable = asMutable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertError =
|
|
3
|
+
exports.assertError = void 0;
|
|
4
4
|
/**
|
|
5
5
|
Assert that the given value is an `Error`.
|
|
6
6
|
|
|
@@ -35,3 +35,4 @@ function assertError(value) {
|
|
|
35
35
|
throw new TypeError(`Expected an \`Error\`, got \`${JSON.stringify(value)}\` (${typeof value})`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
exports.assertError = assertError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setHas = exports.objectKeys = exports.objectHasOwn = exports.objectFromEntries = exports.objectEntries = exports.isSafeInteger = exports.isInteger = exports.isInfinite = exports.isEmpty = exports.isPresent = exports.isDefined = exports.assertError = exports.asMutable = exports.arrayIncludes = void 0;
|
|
3
|
+
exports.setHas = exports.objectKeys = exports.objectHasOwn = exports.objectFromEntries = exports.objectEntries = exports.isSafeInteger = exports.isInteger = exports.isInfinite = exports.isFinite = exports.isEmpty = exports.isPresent = exports.isDefined = exports.assertError = exports.asMutable = exports.arrayIncludes = void 0;
|
|
4
4
|
var array_includes_1 = require("./array-includes");
|
|
5
5
|
Object.defineProperty(exports, "arrayIncludes", { enumerable: true, get: function () { return array_includes_1.arrayIncludes; } });
|
|
6
6
|
var as_mutable_1 = require("./as-mutable");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDefined =
|
|
3
|
+
exports.isDefined = void 0;
|
|
4
4
|
/**
|
|
5
5
|
Check whether a value is defined, meaning it is not `undefined`.
|
|
6
6
|
|
|
@@ -19,3 +19,4 @@ import {isDefined} from 'ts-extras';
|
|
|
19
19
|
function isDefined(value) {
|
|
20
20
|
return value !== undefined;
|
|
21
21
|
}
|
|
22
|
+
exports.isDefined = isDefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isInfinite =
|
|
3
|
+
exports.isInfinite = void 0;
|
|
4
4
|
/**
|
|
5
5
|
Check whether a value is infinite.
|
|
6
6
|
|
|
@@ -9,3 +9,4 @@ Check whether a value is infinite.
|
|
|
9
9
|
function isInfinite(value) {
|
|
10
10
|
return !Number.isNaN(value) && !Number.isFinite(value);
|
|
11
11
|
}
|
|
12
|
+
exports.isInfinite = isInfinite;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPresent =
|
|
3
|
+
exports.isPresent = void 0;
|
|
4
4
|
/**
|
|
5
5
|
Check whether a value is present (non-nullable), meaning it is neither `null` or `undefined`.
|
|
6
6
|
|
|
@@ -19,3 +19,4 @@ import {isPresent} from 'ts-extras';
|
|
|
19
19
|
function isPresent(value) {
|
|
20
20
|
return value !== null && value !== undefined;
|
|
21
21
|
}
|
|
22
|
+
exports.isPresent = isPresent;
|
|
@@ -20,4 +20,4 @@ const untypedEntries = Object.entries(items);
|
|
|
20
20
|
@category Improved builtin
|
|
21
21
|
@category Type guard
|
|
22
22
|
*/
|
|
23
|
-
export declare const objectEntries: <Type extends Record<PropertyKey, unknown>>(value: Type) =>
|
|
23
|
+
export declare const objectEntries: <Type extends Record<PropertyKey, unknown>>(value: Type) => [`${Exclude<keyof Type, symbol>}`, Type[`${Exclude<keyof Type, symbol>}`]][];
|
|
@@ -23,4 +23,4 @@ const untypedEntries = Object.fromEntries(entries);
|
|
|
23
23
|
@category Improved builtin
|
|
24
24
|
@category Type guard
|
|
25
25
|
*/
|
|
26
|
-
export declare const objectFromEntries: <Key extends PropertyKey, Entries extends
|
|
26
|
+
export declare const objectFromEntries: <Key extends PropertyKey, Entries extends readonly (readonly [Key, unknown])[]>(values: Entries) => { [K in Extract<Entries[number], readonly [Key, unknown]>[0]]: Extract<Entries[number], readonly [K, unknown]>[1]; };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.objectHasOwn =
|
|
3
|
+
exports.objectHasOwn = void 0;
|
|
4
4
|
/**
|
|
5
5
|
A strongly-typed version of `Object.hasOwn()`.
|
|
6
6
|
|
|
@@ -23,3 +23,4 @@ objectHasOwn([1, 2, 3], 0);
|
|
|
23
23
|
function objectHasOwn(object, key) {
|
|
24
24
|
return Object.prototype.hasOwnProperty.call(object, key);
|
|
25
25
|
}
|
|
26
|
+
exports.objectHasOwn = objectHasOwn;
|
|
@@ -18,4 +18,4 @@ const untypedItems = Object.keys(items); // => Array<string>
|
|
|
18
18
|
@category Improved builtin
|
|
19
19
|
@category Type guard
|
|
20
20
|
*/
|
|
21
|
-
export declare const objectKeys: <Type extends object>(value: Type) =>
|
|
21
|
+
export declare const objectKeys: <Type extends object>(value: Type) => `${Exclude<keyof Type, symbol>}`[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setHas =
|
|
3
|
+
exports.setHas = void 0;
|
|
4
4
|
/**
|
|
5
5
|
An alternative to `Set#has()` that properly acts as a type guard.
|
|
6
6
|
|
|
@@ -25,3 +25,4 @@ if (setHas(valueSet, valueToCheck)) {
|
|
|
25
25
|
function setHas(set, item) {
|
|
26
26
|
return set.has(item);
|
|
27
27
|
}
|
|
28
|
+
exports.setHas = setHas;
|
package/helpers/types.d.ts
CHANGED
|
@@ -32,32 +32,6 @@ export declare enum CreatedOn {
|
|
|
32
32
|
export declare enum CreatedBy {
|
|
33
33
|
System = "system"
|
|
34
34
|
}
|
|
35
|
-
export declare enum SocialNetwork {
|
|
36
|
-
Facebook = "facebook",
|
|
37
|
-
Twitter = "twitter",
|
|
38
|
-
Instagram = "instagram",
|
|
39
|
-
YouTube = "youtube",
|
|
40
|
-
Web = "web"
|
|
41
|
-
}
|
|
42
|
-
export type SocialNetworksRecord = Record<SocialNetwork, string | null>;
|
|
43
|
-
export declare enum RepertoireTagReserved {
|
|
44
|
-
NoTag = "$noTag"
|
|
45
|
-
}
|
|
46
|
-
export declare enum RepertoireTagDefault {
|
|
47
|
-
First = "repertoireTags.1",
|
|
48
|
-
Second = "repertoireTags.2",
|
|
49
|
-
Third = "repertoireTags.3",
|
|
50
|
-
Fourth = "repertoireTags.4",
|
|
51
|
-
Principal = "repertoireTags.principal"
|
|
52
|
-
}
|
|
53
|
-
export interface RepertoireTag {
|
|
54
|
-
title: string;
|
|
55
|
-
default: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface ARepertoireTag extends RepertoireTag {
|
|
58
|
-
id: string;
|
|
59
|
-
}
|
|
60
|
-
export type RepertoireTagsRecord = Record<string, RepertoireTag>;
|
|
61
35
|
export interface BasicAddressData {
|
|
62
36
|
street?: string;
|
|
63
37
|
city?: string;
|
package/helpers/types.js
CHANGED
|
@@ -3,45 +3,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.displayBasicAddress = displayBasicAddress;
|
|
6
|
+
exports.displayBasicAddress = exports.CreatedBy = exports.CreatedOn = exports.AdminItemStatus = void 0;
|
|
8
7
|
const isString_1 = __importDefault(require("lodash/isString"));
|
|
9
8
|
var AdminItemStatus;
|
|
10
9
|
(function (AdminItemStatus) {
|
|
11
10
|
AdminItemStatus["Pending"] = "pending";
|
|
12
11
|
AdminItemStatus["Accepted"] = "accepted";
|
|
13
|
-
})(AdminItemStatus
|
|
12
|
+
})(AdminItemStatus = exports.AdminItemStatus || (exports.AdminItemStatus = {}));
|
|
14
13
|
var CreatedOn;
|
|
15
14
|
(function (CreatedOn) {
|
|
16
15
|
CreatedOn["Auth"] = "auth";
|
|
17
16
|
CreatedOn["Web"] = "web";
|
|
18
17
|
CreatedOn["App"] = "app";
|
|
19
18
|
CreatedOn["Dashboard"] = "dashboard";
|
|
20
|
-
})(CreatedOn
|
|
19
|
+
})(CreatedOn = exports.CreatedOn || (exports.CreatedOn = {}));
|
|
21
20
|
var CreatedBy;
|
|
22
21
|
(function (CreatedBy) {
|
|
23
22
|
CreatedBy["System"] = "system";
|
|
24
|
-
})(CreatedBy
|
|
25
|
-
var SocialNetwork;
|
|
26
|
-
(function (SocialNetwork) {
|
|
27
|
-
SocialNetwork["Facebook"] = "facebook";
|
|
28
|
-
SocialNetwork["Twitter"] = "twitter";
|
|
29
|
-
SocialNetwork["Instagram"] = "instagram";
|
|
30
|
-
SocialNetwork["YouTube"] = "youtube";
|
|
31
|
-
SocialNetwork["Web"] = "web";
|
|
32
|
-
})(SocialNetwork || (exports.SocialNetwork = SocialNetwork = {}));
|
|
33
|
-
var RepertoireTagReserved;
|
|
34
|
-
(function (RepertoireTagReserved) {
|
|
35
|
-
RepertoireTagReserved["NoTag"] = "$noTag";
|
|
36
|
-
})(RepertoireTagReserved || (exports.RepertoireTagReserved = RepertoireTagReserved = {}));
|
|
37
|
-
var RepertoireTagDefault;
|
|
38
|
-
(function (RepertoireTagDefault) {
|
|
39
|
-
RepertoireTagDefault["First"] = "repertoireTags.1";
|
|
40
|
-
RepertoireTagDefault["Second"] = "repertoireTags.2";
|
|
41
|
-
RepertoireTagDefault["Third"] = "repertoireTags.3";
|
|
42
|
-
RepertoireTagDefault["Fourth"] = "repertoireTags.4";
|
|
43
|
-
RepertoireTagDefault["Principal"] = "repertoireTags.principal";
|
|
44
|
-
})(RepertoireTagDefault || (exports.RepertoireTagDefault = RepertoireTagDefault = {}));
|
|
23
|
+
})(CreatedBy = exports.CreatedBy || (exports.CreatedBy = {}));
|
|
45
24
|
function displayBasicAddress(address) {
|
|
46
25
|
if (address === null || address === undefined)
|
|
47
26
|
return null;
|
|
@@ -51,3 +30,4 @@ function displayBasicAddress(address) {
|
|
|
51
30
|
.filter((field) => (0, isString_1.default)(field) && field.trim() !== '')
|
|
52
31
|
.join(', ');
|
|
53
32
|
}
|
|
33
|
+
exports.displayBasicAddress = displayBasicAddress;
|