@sellout/models 0.0.57 → 0.0.59
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/.dist/enums/OrderDeliveryMethodEnum.d.ts +5 -0
- package/.dist/enums/OrderDeliveryMethodEnum.js +11 -0
- package/.dist/enums/OrderDeliveryMethodEnum.js.map +1 -0
- package/.dist/enums/PaymentMethodTypeEnum.d.ts +5 -0
- package/.dist/enums/PaymentMethodTypeEnum.js +10 -0
- package/.dist/enums/PaymentMethodTypeEnum.js.map +1 -0
- package/.dist/graphql/fragments/event.fragment.js +3 -0
- package/.dist/graphql/fragments/event.fragment.js.map +1 -1
- package/.dist/graphql/links/debounceLink.d.ts +3 -0
- package/.dist/graphql/links/debounceLink.js +9 -0
- package/.dist/graphql/links/debounceLink.js.map +1 -0
- package/.dist/graphql/mutations/acceptRole.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/acceptRole.mutation.js +21 -0
- package/.dist/graphql/mutations/acceptRole.mutation.js.map +1 -0
- package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js +13 -0
- package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createArtist.mutation.js +0 -8
- package/.dist/graphql/mutations/createArtist.mutation.js.map +1 -1
- package/.dist/graphql/mutations/createEvent.mutation.js +0 -2
- package/.dist/graphql/mutations/createEvent.mutation.js.map +1 -1
- package/.dist/graphql/mutations/createOrder.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createOrder.mutation.js +60 -0
- package/.dist/graphql/mutations/createOrder.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createOrganizationFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createOrganizationFee.mutation.js +30 -0
- package/.dist/graphql/mutations/createOrganizationFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createPlatformFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createPlatformFee.mutation.js +30 -0
- package/.dist/graphql/mutations/createPlatformFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createRole.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createRole.mutation.js +19 -0
- package/.dist/graphql/mutations/createRole.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createStripeSetupIntent.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createStripeSetupIntent.mutation.js +13 -0
- package/.dist/graphql/mutations/createStripeSetupIntent.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createStripeTerminalConnectionToken.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createStripeTerminalConnectionToken.mutation.js +13 -0
- package/.dist/graphql/mutations/createStripeTerminalConnectionToken.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createVenue.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createVenue.mutation.js +35 -0
- package/.dist/graphql/mutations/createVenue.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createWebFlowSite.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createWebFlowSite.mutation.js +42 -0
- package/.dist/graphql/mutations/createWebFlowSite.mutation.js.map +1 -0
- package/.dist/graphql/mutations/deleteOrganizationFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/deleteOrganizationFee.mutation.js +13 -0
- package/.dist/graphql/mutations/deleteOrganizationFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/deletePlatformFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/deletePlatformFee.mutation.js +13 -0
- package/.dist/graphql/mutations/deletePlatformFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/deleteRole.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/deleteRole.mutation.js +13 -0
- package/.dist/graphql/mutations/deleteRole.mutation.js.map +1 -0
- package/.dist/graphql/mutations/deleteStripeTerminalReader.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/deleteStripeTerminalReader.mutation.js +13 -0
- package/.dist/graphql/mutations/deleteStripeTerminalReader.mutation.js.map +1 -0
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.js +14 -0
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.js.map +1 -0
- package/.dist/graphql/mutations/forgotPassword.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/forgotPassword.mutation.js +13 -0
- package/.dist/graphql/mutations/forgotPassword.mutation.js.map +1 -0
- package/.dist/graphql/mutations/login.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/login.mutation.js +23 -0
- package/.dist/graphql/mutations/login.mutation.js.map +1 -0
- package/.dist/graphql/mutations/register.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/register.mutation.js +23 -0
- package/.dist/graphql/mutations/register.mutation.js.map +1 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.mutation.js +21 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.mutation.js.map +1 -0
- package/.dist/graphql/mutations/remapWebFlowSite.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/remapWebFlowSite.mutation.js +40 -0
- package/.dist/graphql/mutations/remapWebFlowSite.mutation.js.map +1 -0
- package/.dist/graphql/mutations/sendUserPhoneAuthentication.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/sendUserPhoneAuthentication.mutation.js +13 -0
- package/.dist/graphql/mutations/sendUserPhoneAuthentication.mutation.js.map +1 -0
- package/.dist/graphql/mutations/setUserOrgContextId.d.ts +2 -0
- package/.dist/graphql/mutations/setUserOrgContextId.js +15 -0
- package/.dist/graphql/mutations/setUserOrgContextId.js.map +1 -0
- package/.dist/graphql/mutations/setUserOrgContextId.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/setUserOrgContextId.mutation.js +15 -0
- package/.dist/graphql/mutations/setUserOrgContextId.mutation.js.map +1 -0
- package/.dist/graphql/mutations/setUserPassword.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/setUserPassword.mutation.js +15 -0
- package/.dist/graphql/mutations/setUserPassword.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateArtist.mutation.js +0 -8
- package/.dist/graphql/mutations/updateArtist.mutation.js.map +1 -1
- package/.dist/graphql/mutations/updateEvent.mutation.js +0 -2
- package/.dist/graphql/mutations/updateEvent.mutation.js.map +1 -1
- package/.dist/graphql/mutations/updateOrganizationFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateOrganizationFee.mutation.js +30 -0
- package/.dist/graphql/mutations/updateOrganizationFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updatePlatformFee.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updatePlatformFee.mutation.js +30 -0
- package/.dist/graphql/mutations/updatePlatformFee.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateVenue.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateVenue.mutation.js +35 -0
- package/.dist/graphql/mutations/updateVenue.mutation.js.map +1 -0
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.mutation.js +15 -0
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.mutation.js.map +1 -0
- package/.dist/graphql/queries/analytics.query.d.ts +2 -0
- package/.dist/graphql/queries/analytics.query.js +30 -0
- package/.dist/graphql/queries/analytics.query.js.map +1 -0
- package/.dist/graphql/queries/artist.query.js +0 -8
- package/.dist/graphql/queries/artist.query.js.map +1 -1
- package/.dist/graphql/queries/artists.query.js +0 -8
- package/.dist/graphql/queries/artists.query.js.map +1 -1
- package/.dist/graphql/queries/customerProfile.d.ts +2 -0
- package/.dist/graphql/queries/customerProfile.js +42 -0
- package/.dist/graphql/queries/customerProfile.js.map +1 -0
- package/.dist/graphql/queries/customerProfile.query.d.ts +2 -0
- package/.dist/graphql/queries/customerProfile.query.js +25 -0
- package/.dist/graphql/queries/customerProfile.query.js.map +1 -0
- package/.dist/graphql/queries/event.query.js +3 -2
- package/.dist/graphql/queries/event.query.js.map +1 -1
- package/.dist/graphql/queries/events.query.js +2 -7
- package/.dist/graphql/queries/events.query.js.map +1 -1
- package/.dist/graphql/queries/listStripeTerminalReaders.query.d.ts +2 -0
- package/.dist/graphql/queries/listStripeTerminalReaders.query.js +21 -0
- package/.dist/graphql/queries/listStripeTerminalReaders.query.js.map +1 -0
- package/.dist/graphql/queries/orders.query.js +14 -0
- package/.dist/graphql/queries/orders.query.js.map +1 -1
- package/.dist/graphql/queries/organization.query.d.ts +2 -0
- package/.dist/graphql/queries/organization.query.js +49 -0
- package/.dist/graphql/queries/organization.query.js.map +1 -0
- package/.dist/graphql/queries/organizationFees.query.d.ts +2 -0
- package/.dist/graphql/queries/organizationFees.query.js +30 -0
- package/.dist/graphql/queries/organizationFees.query.js.map +1 -0
- package/.dist/graphql/queries/organizations.d.ts +2 -0
- package/.dist/graphql/queries/organizations.js +49 -0
- package/.dist/graphql/queries/organizations.js.map +1 -0
- package/.dist/graphql/queries/organizations.query.d.ts +2 -0
- package/.dist/graphql/queries/organizations.query.js +49 -0
- package/.dist/graphql/queries/organizations.query.js.map +1 -0
- package/.dist/graphql/queries/platformFees.query.d.ts +2 -0
- package/.dist/graphql/queries/platformFees.query.js +30 -0
- package/.dist/graphql/queries/platformFees.query.js.map +1 -0
- package/.dist/graphql/queries/profile.query.js +4 -1
- package/.dist/graphql/queries/profile.query.js.map +1 -1
- package/.dist/graphql/queries/profiles.query.js +1 -8
- package/.dist/graphql/queries/profiles.query.js.map +1 -1
- package/.dist/graphql/queries/publicEvent.query.d.ts +2 -0
- package/.dist/graphql/queries/publicEvent.query.js +57 -0
- package/.dist/graphql/queries/publicEvent.query.js.map +1 -0
- package/.dist/graphql/queries/role.query.d.ts +2 -0
- package/.dist/graphql/queries/role.query.js +32 -0
- package/.dist/graphql/queries/role.query.js.map +1 -0
- package/.dist/graphql/queries/seating.query.d.ts +2 -0
- package/.dist/graphql/queries/seating.query.js +20 -0
- package/.dist/graphql/queries/seating.query.js.map +1 -0
- package/.dist/graphql/queries/userExists.query.d.ts +2 -0
- package/.dist/graphql/queries/userExists.query.js +18 -0
- package/.dist/graphql/queries/userExists.query.js.map +1 -0
- package/.dist/graphql/queries/userProfile.query.d.ts +2 -0
- package/.dist/graphql/queries/userProfile.query.js +33 -0
- package/.dist/graphql/queries/userProfile.query.js.map +1 -0
- package/.dist/graphql/queries/userRoles.query.d.ts +2 -0
- package/.dist/graphql/queries/userRoles.query.js +34 -0
- package/.dist/graphql/queries/userRoles.query.js.map +1 -0
- package/.dist/graphql/queries/venue.query.js +1 -2
- package/.dist/graphql/queries/venue.query.js.map +1 -1
- package/.dist/graphql/queries/venues.query.js +23 -36
- package/.dist/graphql/queries/venues.query.js.map +1 -1
- package/.dist/graphql/queries/webFlowSites.query.d.ts +2 -0
- package/.dist/graphql/queries/webFlowSites.query.js +24 -0
- package/.dist/graphql/queries/webFlowSites.query.js.map +1 -0
- package/.dist/interfaces/IAnalytics.d.ts +60 -0
- package/.dist/interfaces/IAnalytics.js +76 -0
- package/.dist/interfaces/IAnalytics.js.map +1 -0
- package/.dist/interfaces/IArtist.d.ts +0 -2
- package/.dist/interfaces/IArtist.js.map +1 -1
- package/.dist/interfaces/IEvent.d.ts +14 -2
- package/.dist/interfaces/IEvent.js.map +1 -1
- package/.dist/interfaces/IEventCustomField.d.ts +5 -2
- package/.dist/interfaces/IEventCustomField.js +2 -0
- package/.dist/interfaces/IEventCustomField.js.map +1 -1
- package/.dist/interfaces/IEventUpgrade.d.ts +1 -0
- package/.dist/interfaces/IFee.d.ts +3 -1
- package/.dist/interfaces/IFee.js +2 -4
- package/.dist/interfaces/IFee.js.map +1 -1
- package/.dist/interfaces/IOrder.d.ts +4 -0
- package/.dist/interfaces/IOrder.js.map +1 -1
- package/.dist/interfaces/IOrderState.d.ts +5 -5
- package/.dist/interfaces/IOrderState.js +5 -14
- package/.dist/interfaces/IOrderState.js.map +1 -1
- package/.dist/interfaces/IOrderTicket.d.ts +2 -0
- package/.dist/interfaces/IOrderTicket.js.map +1 -1
- package/.dist/interfaces/IOrderType.d.ts +1 -1
- package/.dist/interfaces/IOrderType.js +1 -1
- package/.dist/interfaces/IOrderType.js.map +1 -1
- package/.dist/interfaces/IOrderUpgrade.d.ts +2 -1
- package/.dist/interfaces/IPagination.d.ts +9 -0
- package/.dist/interfaces/IPagination.js +10 -0
- package/.dist/interfaces/IPagination.js.map +1 -1
- package/.dist/interfaces/IPayment.d.ts +13 -0
- package/.dist/interfaces/IPayment.js +3 -0
- package/.dist/interfaces/IPayment.js.map +1 -0
- package/.dist/interfaces/IRole.d.ts +15 -7
- package/.dist/interfaces/IRole.js +24 -0
- package/.dist/interfaces/IRole.js.map +1 -1
- package/.dist/interfaces/ISecondaryEmail.d.ts +4 -0
- package/.dist/interfaces/ISecondaryEmail.js +3 -0
- package/.dist/interfaces/ISecondaryEmail.js.map +1 -0
- package/.dist/interfaces/IStripeCustomer.d.ts +6 -0
- package/.dist/interfaces/IStripeCustomer.js +3 -0
- package/.dist/interfaces/IStripeCustomer.js.map +1 -0
- package/.dist/interfaces/IStripeSource.d.ts +10 -0
- package/.dist/interfaces/IStripeSource.js +3 -0
- package/.dist/interfaces/IStripeSource.js.map +1 -0
- package/.dist/interfaces/IStripeTerminalReader.d.ts +9 -0
- package/.dist/interfaces/IStripeTerminalReader.js +3 -0
- package/.dist/interfaces/IStripeTerminalReader.js.map +1 -0
- package/.dist/interfaces/ITicketTier.d.ts +2 -2
- package/.dist/interfaces/ITicketType.d.ts +1 -0
- package/.dist/interfaces/IUserProfile.d.ts +6 -2
- package/.dist/interfaces/IVenue.d.ts +2 -6
- package/.dist/schemas/Artist.d.ts +4 -130
- package/.dist/schemas/Artist.js +4 -2
- package/.dist/schemas/Artist.js.map +1 -1
- package/.dist/schemas/Event.d.ts +15 -0
- package/.dist/schemas/Event.js +15 -0
- package/.dist/schemas/Event.js.map +1 -1
- package/.dist/schemas/Order.d.ts +83 -0
- package/.dist/schemas/Order.js +84 -0
- package/.dist/schemas/Order.js.map +1 -1
- package/.dist/schemas/SecondaryEmail.d.ts +12 -0
- package/.dist/schemas/SecondaryEmail.js +14 -0
- package/.dist/schemas/SecondaryEmail.js.map +1 -0
- package/.dist/schemas/UserProfile.d.ts +0 -130
- package/.dist/schemas/UserProfile.js +0 -2
- package/.dist/schemas/UserProfile.js.map +1 -1
- package/.dist/schemas/Venue.d.ts +4 -141
- package/.dist/schemas/Venue.js +4 -15
- package/.dist/schemas/Venue.js.map +1 -1
- package/.dist/sellout-proto.js +29977 -22900
- package/.dist/utils/AnalyticsUtil.d.ts +37 -0
- package/.dist/utils/AnalyticsUtil.js +557 -0
- package/.dist/utils/AnalyticsUtil.js.map +1 -0
- package/.dist/utils/EventUtil.d.ts +35 -12
- package/.dist/utils/EventUtil.js +80 -15
- package/.dist/utils/EventUtil.js.map +1 -1
- package/.dist/utils/FeeUtil.d.ts +4 -4
- package/.dist/utils/FeeUtil.js +4 -4
- package/.dist/utils/FeeUtil.js.map +1 -1
- package/package.json +6 -5
- package/src/enums/OrderDeliveryMethodEnum.ts +5 -0
- package/src/enums/PaymentMethodTypeEnum.ts +5 -0
- package/src/graphql/fragments/event.fragment.ts +3 -0
- package/src/graphql/links/debounceLink.ts +4 -0
- package/src/graphql/mutations/acceptRole.mutation.ts +17 -0
- package/src/graphql/mutations/attachStripePaymentMethod.mutation.ts +9 -0
- package/src/graphql/mutations/createArtist.mutation.ts +0 -8
- package/src/graphql/mutations/createEvent.mutation.ts +0 -2
- package/src/graphql/mutations/createOrder.mutation.ts +56 -0
- package/src/graphql/mutations/createOrganizationFee.mutation.ts +26 -0
- package/src/graphql/mutations/createPlatformFee.mutation.ts +26 -0
- package/src/graphql/mutations/createRole.mutation.ts +15 -0
- package/src/graphql/mutations/createStripeSetupIntent.mutation.ts +9 -0
- package/src/graphql/mutations/createStripeTerminalConnectionToken.mutation.ts +9 -0
- package/src/graphql/mutations/createVenue.mutation.ts +31 -0
- package/src/graphql/mutations/createWebFlowSite.mutation.ts +38 -0
- package/src/graphql/mutations/deleteOrganizationFee.mutation.ts +9 -0
- package/src/graphql/mutations/deletePlatformFee.mutation.ts +9 -0
- package/src/graphql/mutations/deleteRole.mutation.ts +9 -0
- package/src/graphql/mutations/deleteStripeTerminalReader.mutation.ts +9 -0
- package/src/graphql/mutations/deleteUnverifiedUser.mutation.ts +10 -0
- package/src/graphql/mutations/registerStripeTerminalReader.mutation.ts +17 -0
- package/src/graphql/mutations/remapWebFlowSite.mutation.ts +36 -0
- package/src/graphql/mutations/sendUserPhoneAuthentication.mutation.ts +9 -0
- package/src/graphql/mutations/setUserOrgContextId.mutation.ts +11 -0
- package/src/graphql/mutations/setUserPassword.mutation.ts +11 -0
- package/src/graphql/mutations/updateArtist.mutation.ts +0 -8
- package/src/graphql/mutations/updateEvent.mutation.ts +0 -2
- package/src/graphql/mutations/updateOrganizationFee.mutation.ts +26 -0
- package/src/graphql/mutations/updatePlatformFee.mutation.ts +26 -0
- package/src/graphql/mutations/updateVenue.mutation.ts +31 -0
- package/src/graphql/mutations/verifyUserPhoneAuthentication.mutation.ts +11 -0
- package/src/graphql/queries/analytics.query.ts +26 -0
- package/src/graphql/queries/artist.query.ts +0 -8
- package/src/graphql/queries/artists.query.ts +0 -8
- package/src/graphql/queries/customerProfile.query.ts +21 -0
- package/src/graphql/queries/event.query.ts +3 -2
- package/src/graphql/queries/events.query.ts +2 -7
- package/src/graphql/queries/listStripeTerminalReaders.query.ts +17 -0
- package/src/graphql/queries/orders.query.ts +14 -0
- package/src/graphql/queries/organizationFees.query.ts +26 -0
- package/src/graphql/queries/organizations.query.ts +45 -0
- package/src/graphql/queries/platformFees.query.ts +26 -0
- package/src/graphql/queries/profile.query.ts +4 -1
- package/src/graphql/queries/profiles.query.ts +1 -8
- package/src/graphql/queries/publicEvent.query.ts +53 -0
- package/src/graphql/queries/role.query.ts +28 -0
- package/src/graphql/queries/seating.query.ts +16 -0
- package/src/graphql/queries/userExists.query.ts +14 -0
- package/src/graphql/queries/userProfile.query.ts +29 -0
- package/src/graphql/queries/userRoles.query.ts +30 -0
- package/src/graphql/queries/venue.query.ts +1 -2
- package/src/graphql/queries/venues.query.ts +23 -36
- package/src/graphql/queries/webFlowSites.query.ts +20 -0
- package/src/interfaces/IAnalytics.ts +96 -0
- package/src/interfaces/IArtist.ts +0 -2
- package/src/interfaces/IEvent.ts +17 -2
- package/src/interfaces/IEventCustomField.ts +4 -1
- package/src/interfaces/IEventUpgrade.ts +1 -0
- package/src/interfaces/IFee.ts +2 -4
- package/src/interfaces/IOrder.ts +8 -4
- package/src/interfaces/IOrderState.ts +5 -14
- package/src/interfaces/IOrderTicket.ts +2 -0
- package/src/interfaces/IOrderType.ts +1 -1
- package/src/interfaces/IOrderUpgrade.ts +2 -1
- package/src/interfaces/IPagination.ts +11 -0
- package/src/interfaces/IPayment.ts +13 -0
- package/src/interfaces/IRole.ts +26 -8
- package/src/interfaces/IStripeCustomer.ts +7 -0
- package/src/interfaces/IStripeSource.ts +10 -0
- package/src/interfaces/IStripeTerminalReader.ts +9 -0
- package/src/interfaces/ITicketTier.ts +2 -2
- package/src/interfaces/ITicketType.ts +1 -0
- package/src/interfaces/IUserProfile.ts +8 -2
- package/src/interfaces/IVenue.ts +2 -6
- package/src/proto/artist.proto +1 -2
- package/src/proto/broadcast.proto +0 -13
- package/src/proto/common.proto +15 -0
- package/src/proto/event.proto +4 -1
- package/src/proto/order.proto +78 -4
- package/src/proto/stripe.proto +135 -0
- package/src/proto/venue.proto +7 -10
- package/src/schemas/Artist.ts +4 -2
- package/src/schemas/Event.ts +15 -0
- package/src/schemas/Order.ts +85 -0
- package/src/schemas/UserProfile.ts +0 -2
- package/src/schemas/Venue.ts +4 -15
- package/src/utils/AnalyticsUtil.ts +838 -0
- package/src/utils/EventUtil.ts +110 -44
- package/src/utils/FeeUtil.ts +4 -4
- package/src/utils/fee-util-broken-but-why +36 -0
- package/src/interfaces/IMetrics.ts +0 -33
- /package/src/graphql/mutations/{forgotPassword.ts → forgotPassword.mutation.ts} +0 -0
- /package/src/graphql/mutations/{login.ts → login.mutation.ts} +0 -0
- /package/src/graphql/mutations/{register.ts → register.mutation.ts} +0 -0
package/src/utils/EventUtil.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import * as Time from
|
|
1
|
+
import * as Time from "@sellout/utils/.dist/time";
|
|
2
|
+
import IEvent, { EventProcessAsEnum } from "../interfaces/IEvent";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
5
|
+
/****************************************************************************************
|
|
6
|
+
* Schedule
|
|
7
|
+
****************************************************************************************/
|
|
4
8
|
hasBeenAnnouced(event): boolean {
|
|
5
9
|
const {
|
|
6
10
|
schedule: { announceAt },
|
|
@@ -43,13 +47,9 @@ export default {
|
|
|
43
47
|
const now = Time.now();
|
|
44
48
|
return endsAt < now;
|
|
45
49
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
.filter((promotion) => promotion.type === "Pre-Sale Code")
|
|
50
|
-
.filter((promotion) => promotion.active).length > 0
|
|
51
|
-
);
|
|
52
|
-
},
|
|
50
|
+
/****************************************************************************************
|
|
51
|
+
* QR Code
|
|
52
|
+
****************************************************************************************/
|
|
53
53
|
qrCodeEmailAt(event): number {
|
|
54
54
|
const {
|
|
55
55
|
performances: [performance],
|
|
@@ -88,8 +88,27 @@ export default {
|
|
|
88
88
|
return false;
|
|
89
89
|
},
|
|
90
90
|
/****************************************************************************************
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* Process As
|
|
92
|
+
****************************************************************************************/
|
|
93
|
+
isPaid(event: IEvent): boolean {
|
|
94
|
+
return event.processAs === EventProcessAsEnum.Paid;
|
|
95
|
+
},
|
|
96
|
+
isRSVP(event: IEvent): boolean {
|
|
97
|
+
return event.processAs === EventProcessAsEnum.RSVP;
|
|
98
|
+
},
|
|
99
|
+
isFree(event: IEvent): boolean {
|
|
100
|
+
return event.processAs === EventProcessAsEnum.Free;
|
|
101
|
+
},
|
|
102
|
+
/****************************************************************************************
|
|
103
|
+
* Seating
|
|
104
|
+
****************************************************************************************/
|
|
105
|
+
isSeated(event?: IEvent): boolean {
|
|
106
|
+
if(!event) return false;
|
|
107
|
+
return Boolean(event.seatingChartKey);
|
|
108
|
+
},
|
|
109
|
+
/****************************************************************************************
|
|
110
|
+
* Venue
|
|
111
|
+
****************************************************************************************/
|
|
93
112
|
venueIds(event): string[] {
|
|
94
113
|
let venueIds = [event.venueId];
|
|
95
114
|
event.performances.forEach((performance) => {
|
|
@@ -103,8 +122,8 @@ export default {
|
|
|
103
122
|
return event._id.replace("_", "SAMH");
|
|
104
123
|
},
|
|
105
124
|
/****************************************************************************************
|
|
106
|
-
|
|
107
|
-
|
|
125
|
+
* Artist
|
|
126
|
+
****************************************************************************************/
|
|
108
127
|
artistIds(event): string[] {
|
|
109
128
|
let artistIds = [];
|
|
110
129
|
event.performances.forEach((performance) => {
|
|
@@ -135,8 +154,8 @@ export default {
|
|
|
135
154
|
return artistIds;
|
|
136
155
|
},
|
|
137
156
|
/****************************************************************************************
|
|
138
|
-
|
|
139
|
-
|
|
157
|
+
* Tickets
|
|
158
|
+
****************************************************************************************/
|
|
140
159
|
ticketType(event, ticketTypeId): any {
|
|
141
160
|
return event.ticketTypes.find(
|
|
142
161
|
(ticketType) => ticketType._id === ticketTypeId
|
|
@@ -178,8 +197,8 @@ export default {
|
|
|
178
197
|
return tier._id;
|
|
179
198
|
},
|
|
180
199
|
/****************************************************************************************
|
|
181
|
-
|
|
182
|
-
|
|
200
|
+
* Upgrades
|
|
201
|
+
****************************************************************************************/
|
|
183
202
|
upgrade(event, upgradeId): any {
|
|
184
203
|
return event.upgrades.find((upgrades) => upgrades._id === upgradeId);
|
|
185
204
|
},
|
|
@@ -207,32 +226,79 @@ export default {
|
|
|
207
226
|
}, {});
|
|
208
227
|
},
|
|
209
228
|
/****************************************************************************************
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
promotion(event, promotionId): any {
|
|
213
|
-
return event.promotions.find(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
* Promotions
|
|
230
|
+
****************************************************************************************/
|
|
231
|
+
promotion(event, promotionId: string): any {
|
|
232
|
+
return event.promotions.find(
|
|
233
|
+
(promotions) => promotions._id === promotionId
|
|
234
|
+
);
|
|
235
|
+
},
|
|
236
|
+
/****************************************************************************************
|
|
237
|
+
* Custom Fields
|
|
238
|
+
****************************************************************************************/
|
|
239
|
+
customField(event, customFieldId: string): any {
|
|
240
|
+
return event.customFields.find(
|
|
241
|
+
(customField) => customField._id === customFieldId
|
|
242
|
+
);
|
|
243
|
+
},
|
|
244
|
+
hasCustomFields(event) {
|
|
245
|
+
return (
|
|
246
|
+
event.customFields.filter((customField) => customField.active).length > 0
|
|
247
|
+
);
|
|
248
|
+
},
|
|
249
|
+
hasActivePreSalePromotions(event): boolean {
|
|
250
|
+
return (
|
|
251
|
+
event.promotions
|
|
252
|
+
.filter((promotion) => promotion.type === "Pre-Sale Code")
|
|
253
|
+
.filter((promotion) => promotion.active).length > 0
|
|
254
|
+
);
|
|
255
|
+
},
|
|
256
|
+
customFieldsAreValid(event, order): boolean {
|
|
257
|
+
const { customFields: orderCustomFields } = order;
|
|
258
|
+
const activeFields = event.customFields.filter(
|
|
259
|
+
(eventCustomField) => eventCustomField.active
|
|
260
|
+
);
|
|
261
|
+
const validFields = activeFields?.filter((eventCustomField) => {
|
|
262
|
+
const {
|
|
263
|
+
_id,
|
|
264
|
+
minLength,
|
|
265
|
+
maxLength,
|
|
266
|
+
minValue,
|
|
267
|
+
maxValue,
|
|
268
|
+
required,
|
|
269
|
+
} = eventCustomField;
|
|
270
|
+
|
|
271
|
+
const orderCustomField = orderCustomFields.find(
|
|
272
|
+
(orderCustomField) => orderCustomField.customFieldId === _id
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
// Field has not been filled out
|
|
276
|
+
if (!orderCustomField) return false;
|
|
277
|
+
|
|
278
|
+
const { value } = orderCustomField;
|
|
279
|
+
|
|
280
|
+
if (eventCustomField.type === "Text") {
|
|
281
|
+
if (minLength === 0 && maxLength === 0) {
|
|
282
|
+
return !(required && value.length === 0);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (minLength <= value.length && value.length <= maxLength) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
if (minValue === 0 && maxValue === 0) {
|
|
292
|
+
return !(required && value === 0);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (minValue <= value && value <= maxValue) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return false;
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
return validFields.length === activeFields.length;
|
|
303
|
+
},
|
|
238
304
|
};
|
package/src/utils/FeeUtil.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
processingFees(fees) {
|
|
2
|
+
processingFees(fees: any[] = []) {
|
|
3
3
|
return fees.filter((fee) => {
|
|
4
4
|
if (fee.appliedBy === 'Sellout' || fee.appliedBy === 'Stripe') {
|
|
5
5
|
return true;
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
return false;
|
|
8
8
|
});
|
|
9
9
|
},
|
|
10
|
-
selloutFees(fees) {
|
|
10
|
+
selloutFees(fees: any[] = []) {
|
|
11
11
|
return fees.filter((fee) => {
|
|
12
12
|
if (fee.appliedBy === 'Sellout') {
|
|
13
13
|
return true;
|
|
@@ -15,7 +15,7 @@ export default {
|
|
|
15
15
|
return false;
|
|
16
16
|
});
|
|
17
17
|
},
|
|
18
|
-
stripeFees(fees) {
|
|
18
|
+
stripeFees(fees: any[] = []) {
|
|
19
19
|
return fees.filter((fee) => {
|
|
20
20
|
if (fee.appliedBy === 'Stripe') {
|
|
21
21
|
return false;
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
return true;
|
|
24
24
|
});
|
|
25
25
|
},
|
|
26
|
-
promoterFees(fees) {
|
|
26
|
+
promoterFees(fees: any[] = []) {
|
|
27
27
|
return fees.filter((fee) => {
|
|
28
28
|
if (fee.appliedBy === 'Sellout' || fee.appliedBy === 'Stripe') {
|
|
29
29
|
return false;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import IFee, { FeeAppliedByEnum } from '../interfaces/IFee";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
processingFees(fees: IFee[]) {
|
|
5
|
+
return fees.filter((fee: IFee) => {
|
|
6
|
+
if (fee.appliedBy === FeeAppliedByEnum.Sellout || fee.appliedBy === FeeAppliedByEnum.Stripe) {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
selloutFees(fees: IFee[]) {
|
|
13
|
+
return fees.filter((fee: IFee) => {
|
|
14
|
+
if (fee.appliedBy === FeeAppliedByEnum.Sellout) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
stripeFees(fees: IFee[]) {
|
|
21
|
+
return fees.filter((fee: IFee) => {
|
|
22
|
+
if (fee.appliedBy === FeeAppliedByEnum.Stripe) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
promoterFees(fees: IFee[]) {
|
|
29
|
+
return fees.filter((fee: IFee) => {
|
|
30
|
+
if (fee.appliedBy === FeeAppliedByEnum.Sellout || fee.appliedBy === FeeAppliedByEnum.Stripe) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export default interface IMetrics {
|
|
2
|
-
_id?: string;
|
|
3
|
-
orgId: string;
|
|
4
|
-
createdAt: number;
|
|
5
|
-
// Value
|
|
6
|
-
lifeTimeValue?: number;
|
|
7
|
-
yearToDateValue?: number;
|
|
8
|
-
lifeTimeValueRefunded?: number;
|
|
9
|
-
yearToDateValueRefunded?: number;
|
|
10
|
-
lifeTimeValueComped?: number;
|
|
11
|
-
yearToDateValueComped?: number;
|
|
12
|
-
// Tickets
|
|
13
|
-
lifeTimeTicketsPurchased?: number;
|
|
14
|
-
yearToDateTicketsPurchased?: number;
|
|
15
|
-
lifeTimeTicketsRefunded?: number;
|
|
16
|
-
yearToDateTicketsRefunded?: number;
|
|
17
|
-
lifeTimeTicketsComped?: number;
|
|
18
|
-
yearToDateTicketsComped?: number;
|
|
19
|
-
// Upgrades
|
|
20
|
-
lifeTimeUpgradesPurchased?: number;
|
|
21
|
-
yearToDateUpgradesPurchased?: number;
|
|
22
|
-
lifeTimeUpgradesRefunded?: number;
|
|
23
|
-
yearToDateUpgradesRefunded?: number;
|
|
24
|
-
lifeTimeUpgradesComped?: number;
|
|
25
|
-
yearToDateUpgradesComped?: number;
|
|
26
|
-
// Orders
|
|
27
|
-
lifeTimeOrdersPurchased?: number;
|
|
28
|
-
yearToDateOrdersPurchased?: number;
|
|
29
|
-
lifeTimeOrdersRefunded?: number;
|
|
30
|
-
yearToDateOrdersRefunded?: number;
|
|
31
|
-
lifeTimeOrdersComped?: number;
|
|
32
|
-
yearToDateOrdersComped?: number;
|
|
33
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|