@sellout/models 0.0.65 → 0.0.67
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/CustomFieldTypeEnum.d.ts +6 -0
- package/.dist/enums/CustomFieldTypeEnum.js +11 -0
- package/.dist/enums/CustomFieldTypeEnum.js.map +1 -0
- package/.dist/enums/PaymentMethodTypeEnum.d.ts +2 -1
- package/.dist/enums/PaymentMethodTypeEnum.js +1 -0
- package/.dist/enums/PaymentMethodTypeEnum.js.map +1 -1
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.d.ts +2 -2
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.js +2 -2
- package/.dist/graphql/mutations/deleteUnverifiedUser.mutation.js.map +1 -1
- package/.dist/graphql/mutations/{registerStripeTerminalReader.js → resetPasswordInApp.mutation.js} +3 -3
- package/.dist/graphql/mutations/resetPasswordInApp.mutation.js.map +1 -0
- package/.dist/graphql/mutations/{registerStripeTermainlReader.mutation.js → resetUserPassword.mutation.js} +3 -3
- package/.dist/graphql/mutations/resetUserPassword.mutation.js.map +1 -0
- package/.dist/graphql/mutations/resetUserPasswordInApp.mutation.js +13 -0
- package/.dist/graphql/mutations/resetUserPasswordInApp.mutation.js.map +1 -0
- package/.dist/graphql/mutations/{verifyUserPhoneAuthentication.js → sendUserEmailVerification.mutation.js} +4 -4
- package/.dist/graphql/mutations/sendUserEmailVerification.mutation.js.map +1 -0
- package/.dist/graphql/mutations/{createStripeSetupIntent.js → sendUserPhoneVerification.mutation.js} +5 -3
- package/.dist/graphql/mutations/sendUserPhoneVerification.mutation.js.map +1 -0
- package/.dist/graphql/mutations/{listStripeTerminalReaders.query.js → setUserOrgContextId.js} +4 -10
- package/.dist/graphql/mutations/setUserOrgContextId.js.map +1 -0
- package/.dist/graphql/mutations/updateBasicUserInfo.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateBasicUserInfo.mutation.js +15 -0
- package/.dist/graphql/mutations/updateBasicUserInfo.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateOrganization.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/{listStripeTerminalReaders.mutation.js → updateOrganization.mutation.js} +4 -10
- package/.dist/graphql/mutations/updateOrganization.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateUserPhoneNumber.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateUserPhoneNumber.mutation.js +27 -0
- package/.dist/graphql/mutations/updateUserPhoneNumber.mutation.js.map +1 -0
- package/.dist/graphql/mutations/verifyUserEmail.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/verifyUserEmail.mutation.js +15 -0
- package/.dist/graphql/mutations/verifyUserEmail.mutation.js.map +1 -0
- package/.dist/graphql/mutations/verifyUserPhoneNumber.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/verifyUserPhoneNumber.mutation.js +15 -0
- package/.dist/graphql/mutations/verifyUserPhoneNumber.mutation.js.map +1 -0
- package/.dist/graphql/queries/customerProfile.js +42 -0
- package/.dist/graphql/queries/customerProfile.js.map +1 -0
- package/.dist/graphql/queries/customerProfile.query.js +12 -0
- package/.dist/graphql/queries/customerProfile.query.js.map +1 -1
- package/.dist/graphql/queries/organization.query.js +49 -0
- package/.dist/graphql/queries/organization.query.js.map +1 -0
- package/.dist/graphql/queries/organizations.js +49 -0
- package/.dist/graphql/queries/organizations.js.map +1 -0
- package/.dist/interfaces/IEventCustomField.d.ts +2 -7
- package/.dist/interfaces/IEventCustomField.js +0 -8
- package/.dist/interfaces/IEventCustomField.js.map +1 -1
- package/.dist/interfaces/IOrderCustomField.d.ts +3 -2
- package/.dist/interfaces/IOrderCustomField.js.map +1 -1
- package/.dist/interfaces/ISecondaryEmail.d.ts +4 -0
- package/.dist/interfaces/{IStripe.js → ISecondaryEmail.js} +1 -1
- package/.dist/interfaces/ISecondaryEmail.js.map +1 -0
- package/.dist/interfaces/IStripeSource.d.ts +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/sellout-proto.js +15 -15
- package/.dist/utils/AnalyticsUtil.js +1 -1
- package/.dist/utils/EventUtil.d.ts +10 -3
- package/.dist/utils/EventUtil.js +38 -20
- package/.dist/utils/EventUtil.js.map +1 -1
- package/.dist/utils/OrderUtil.d.ts +7 -0
- package/.dist/utils/OrderUtil.js +7 -0
- package/.dist/utils/OrderUtil.js.map +1 -1
- package/.dist/utils/TierUtil.js +1 -1
- package/package.json +4 -4
- package/src/enums/CustomFieldTypeEnum.ts +6 -0
- package/src/enums/PaymentMethodTypeEnum.ts +1 -0
- package/src/graphql/mutations/deleteUnverifiedUser.mutation.ts +2 -2
- package/src/graphql/mutations/resetUserPassword.mutation.ts +9 -0
- package/src/graphql/mutations/resetUserPasswordInApp.mutation.ts +9 -0
- package/src/graphql/mutations/sendUserPhoneVerification.mutation.ts +11 -0
- package/src/graphql/mutations/updateBasicUserInfo.mutation.ts +11 -0
- package/src/graphql/mutations/updateOrganization.mutation.ts +11 -0
- package/src/graphql/mutations/updateUserPhoneNumber.mutation.ts +23 -0
- package/src/graphql/mutations/verifyUserEmail.mutation.ts +11 -0
- package/src/graphql/mutations/verifyUserPhoneNumber.mutation.ts +11 -0
- package/src/graphql/queries/customerProfile.query.ts +12 -0
- package/src/interfaces/IEventCustomField.ts +2 -7
- package/src/interfaces/IOrderCustomField.ts +3 -2
- package/src/proto/email.proto +1 -1
- package/src/proto/event.proto +4 -4
- package/src/utils/EventUtil.ts +43 -25
- package/src/utils/OrderUtil.ts +11 -0
- package/.dist/enums/PaymentMethodEnum.d.ts +0 -5
- package/.dist/enums/PaymentMethodEnum.js +0 -10
- package/.dist/enums/PaymentMethodEnum.js.map +0 -1
- package/.dist/graphql/mutations/createStripeSetupIntent.js.map +0 -1
- package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js.map +0 -1
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.js.map +0 -1
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js.map +0 -1
- package/.dist/graphql/mutations/registerStripeTerminalReader.js.map +0 -1
- package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js +0 -15
- package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js.map +0 -1
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.js.map +0 -1
- package/.dist/graphql/queries/metrics.query.js +0 -29
- package/.dist/graphql/queries/metrics.query.js.map +0 -1
- package/.dist/graphql/queries/metricsData.query.js +0 -29
- package/.dist/graphql/queries/metricsData.query.js.map +0 -1
- package/.dist/interfaces/IMetricData.d.ts +0 -57
- package/.dist/interfaces/IMetricData.js +0 -70
- package/.dist/interfaces/IMetricData.js.map +0 -1
- package/.dist/interfaces/IStripe.d.ts +0 -9
- package/.dist/interfaces/IStripe.js.map +0 -1
- package/.dist/utils/MetricsUtil.d.ts +0 -7
- package/.dist/utils/MetricsUtil.js +0 -29
- package/.dist/utils/MetricsUtil.js.map +0 -1
- package/.dist/utils/fee-util-broken-but-why.d.ts +0 -8
- package/.dist/utils/fee-util-broken-but-why.js +0 -38
- package/.dist/utils/fee-util-broken-but-why.js.map +0 -1
- /package/.dist/graphql/mutations/{createStripeSetupIntent.d.ts → resetPasswordInApp.mutation.d.ts} +0 -0
- /package/.dist/graphql/mutations/{listStripeTerminalReaders.mutation.d.ts → resetUserPassword.mutation.d.ts} +0 -0
- /package/.dist/graphql/mutations/{listStripeTerminalReaders.query.d.ts → resetUserPasswordInApp.mutation.d.ts} +0 -0
- /package/.dist/graphql/mutations/{verifyPhoneAuthentication.mutation.d.ts → sendUserEmailVerification.mutation.d.ts} +0 -0
- /package/.dist/graphql/mutations/{registerStripeTermainlReader.mutation.d.ts → sendUserPhoneVerification.mutation.d.ts} +0 -0
- /package/.dist/graphql/mutations/{registerStripeTerminalReader.d.ts → setUserOrgContextId.d.ts} +0 -0
- /package/.dist/graphql/{mutations/verifyUserPhoneAuthentication.d.ts → queries/customerProfile.d.ts} +0 -0
- /package/.dist/graphql/queries/{metrics.query.d.ts → organization.query.d.ts} +0 -0
- /package/.dist/graphql/queries/{metricsData.query.d.ts → organizations.d.ts} +0 -0
- /package/src/graphql/mutations/{sendUserEmailVerification.ts → sendUserEmailVerification.mutation.ts} +0 -0
package/src/utils/EventUtil.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as Time from "@sellout/utils/.dist/time";
|
|
2
|
+
import IEventCustomField from "../interfaces/IEventCustomField";
|
|
2
3
|
import IEvent, { EventProcessAsEnum } from "../interfaces/IEvent";
|
|
4
|
+
import { CustomFieldTypeEnum } from '../enums/CustomFieldTypeEnum';
|
|
5
|
+
import IOrderCustomField from "../interfaces/IOrderCustomField";
|
|
6
|
+
import IEventUpgrade from "../interfaces/IEventUpgrade";
|
|
7
|
+
import ITicketType from "../interfaces/ITicketType";
|
|
3
8
|
|
|
4
9
|
export default {
|
|
5
10
|
/****************************************************************************************
|
|
@@ -161,6 +166,9 @@ export default {
|
|
|
161
166
|
(ticketType) => ticketType._id === ticketTypeId
|
|
162
167
|
);
|
|
163
168
|
},
|
|
169
|
+
activeTicketTypes(event: IEvent): ITicketType[] {
|
|
170
|
+
return event.ticketTypes?.filter(ticketType => ticketType.visible) ?? [];
|
|
171
|
+
},
|
|
164
172
|
remainingTicketQty(event, ticketTypeId: string | null = null): number {
|
|
165
173
|
if (ticketTypeId) {
|
|
166
174
|
let ticketType = event.ticketTypes.find(
|
|
@@ -202,6 +210,9 @@ export default {
|
|
|
202
210
|
upgrade(event, upgradeId): any {
|
|
203
211
|
return event.upgrades.find((upgrades) => upgrades._id === upgradeId);
|
|
204
212
|
},
|
|
213
|
+
activeUpgrades(event: IEvent): IEventUpgrade[] {
|
|
214
|
+
return event.upgrades?.filter(upgrade => upgrade.visible) ?? [];
|
|
215
|
+
},
|
|
205
216
|
remainingUpgradeQty(event, upgradeId: string | null = null): number {
|
|
206
217
|
if (upgradeId) {
|
|
207
218
|
let upgrade = event.upgrades.find((upgrade) => upgrade._id === upgradeId);
|
|
@@ -233,31 +244,34 @@ export default {
|
|
|
233
244
|
(promotions) => promotions._id === promotionId
|
|
234
245
|
);
|
|
235
246
|
},
|
|
247
|
+
hasActivePreSalePromotions(event): boolean {
|
|
248
|
+
return (
|
|
249
|
+
event.promotions
|
|
250
|
+
.filter((promotion) => promotion.type === "Pre-Sale Code")
|
|
251
|
+
.filter((promotion) => promotion.active).length > 0
|
|
252
|
+
);
|
|
253
|
+
},
|
|
236
254
|
/****************************************************************************************
|
|
237
255
|
* Custom Fields
|
|
238
256
|
****************************************************************************************/
|
|
239
|
-
customField(event, customFieldId: string):
|
|
240
|
-
return event
|
|
257
|
+
customField(event: IEvent, customFieldId: string): IEventCustomField | null {
|
|
258
|
+
return event?.customFields?.find(
|
|
241
259
|
(customField) => customField._id === customFieldId
|
|
242
|
-
);
|
|
260
|
+
) ?? null;
|
|
261
|
+
},
|
|
262
|
+
activeCustomFields(event: IEvent): IEventCustomField[] {
|
|
263
|
+
return event.customFields?.filter(customField => customField.active) ?? [];
|
|
243
264
|
},
|
|
244
265
|
hasCustomFields(event) {
|
|
245
266
|
return (
|
|
246
267
|
event.customFields.filter((customField) => customField.active).length > 0
|
|
247
268
|
);
|
|
248
269
|
},
|
|
249
|
-
|
|
250
|
-
|
|
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(
|
|
270
|
+
customFieldsAreValid(eventCustomFields: IEventCustomField[], orderCustomFields: IOrderCustomField[] ): boolean {
|
|
271
|
+
const activeFields = eventCustomFields?.filter(
|
|
259
272
|
(eventCustomField) => eventCustomField.active
|
|
260
|
-
);
|
|
273
|
+
) ?? [];
|
|
274
|
+
|
|
261
275
|
const validFields = activeFields?.filter((eventCustomField) => {
|
|
262
276
|
const {
|
|
263
277
|
_id,
|
|
@@ -275,9 +289,10 @@ export default {
|
|
|
275
289
|
// Field has not been filled out
|
|
276
290
|
if (!orderCustomField) return false;
|
|
277
291
|
|
|
278
|
-
|
|
292
|
+
let { value } = orderCustomField;
|
|
279
293
|
|
|
280
|
-
if (eventCustomField.type ===
|
|
294
|
+
if (eventCustomField.type === CustomFieldTypeEnum.Text) {
|
|
295
|
+
value = <string>value;
|
|
281
296
|
if (minLength === 0 && maxLength === 0) {
|
|
282
297
|
return !(required && value.length === 0);
|
|
283
298
|
}
|
|
@@ -287,17 +302,20 @@ export default {
|
|
|
287
302
|
}
|
|
288
303
|
|
|
289
304
|
return false;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
305
|
+
} else {
|
|
306
|
+
value = <number>value;
|
|
307
|
+
if (minValue === 0 && maxValue === 0) {
|
|
308
|
+
return !(required && value === 0);
|
|
309
|
+
}
|
|
294
310
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
311
|
+
if (minValue <= value && value <= maxValue) {
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
298
314
|
|
|
299
|
-
|
|
300
|
-
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
}) ?? [];
|
|
301
319
|
|
|
302
320
|
return validFields.length === activeFields.length;
|
|
303
321
|
},
|
package/src/utils/OrderUtil.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import FeeUtil from './FeeUtil';
|
|
2
|
+
import IOrder from "../interfaces/IOrder";
|
|
2
3
|
import { OrderTypeEnum } from "../interfaces/IOrderType";
|
|
4
|
+
import IOrderCustomField from '../interfaces/IOrderCustomField';
|
|
5
|
+
import ICreateOrderParams from '../interfaces/ICreateOrderParams';
|
|
3
6
|
|
|
4
7
|
export default {
|
|
5
8
|
isComp(order) {
|
|
@@ -262,4 +265,12 @@ export default {
|
|
|
262
265
|
if (refund.refunded && refund.refundedAt > 0) return false;
|
|
263
266
|
return true;
|
|
264
267
|
},
|
|
268
|
+
/*****************************************************************************************
|
|
269
|
+
Custom Field
|
|
270
|
+
*****************************************************************************************/
|
|
271
|
+
customField(order: IOrder | ICreateOrderParams, eventCustomFieldId: string): IOrderCustomField | null {
|
|
272
|
+
return order?.customFields?.find(
|
|
273
|
+
(customField) => customField.customFieldId === eventCustomFieldId
|
|
274
|
+
) ?? null;
|
|
275
|
+
}
|
|
265
276
|
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentMethodEnum = void 0;
|
|
4
|
-
var PaymentMethodEnum;
|
|
5
|
-
(function (PaymentMethodEnum) {
|
|
6
|
-
PaymentMethodEnum["CardEntry"] = "Card Entry";
|
|
7
|
-
PaymentMethodEnum["CardReader"] = "Card Reader";
|
|
8
|
-
PaymentMethodEnum["Cash"] = "Cash";
|
|
9
|
-
})(PaymentMethodEnum = exports.PaymentMethodEnum || (exports.PaymentMethodEnum = {}));
|
|
10
|
-
//# sourceMappingURL=PaymentMethodEnum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentMethodEnum.js","sourceRoot":"","sources":["../../src/enums/PaymentMethodEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6CAAwB,CAAA;IACxB,+CAA0B,CAAA;IAC1B,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createStripeSetupIntent.js","sourceRoot":"","sources":["../../../src/graphql/mutations/createStripeSetupIntent.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;CAInB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listStripeTerminalReaders.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/listStripeTerminalReaders.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;;;;;;;;;CAYnB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listStripeTerminalReaders.query.js","sourceRoot":"","sources":["../../../src/graphql/mutations/listStripeTerminalReaders.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;;;;;;;;;CAYnB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerStripeTermainlReader.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/registerStripeTermainlReader.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;CAInB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerStripeTerminalReader.js","sourceRoot":"","sources":["../../../src/graphql/mutations/registerStripeTerminalReader.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;CAInB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const query = graphql_tag_1.default `
|
|
8
|
-
mutation verifyUserPhoneAuthentication($email: String, $phoneNumber: String, $phoneVerificationToken: String!){
|
|
9
|
-
verifyUserPhoneAuthentication(email: $email, phoneNumber: $phoneNumber, phoneVerificationToken: $phoneVerificationToken) {
|
|
10
|
-
token
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
exports.default = query;
|
|
15
|
-
//# sourceMappingURL=verifyPhoneAuthentication.mutation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifyPhoneAuthentication.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/verifyPhoneAuthentication.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;CAMhB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifyUserPhoneAuthentication.js","sourceRoot":"","sources":["../../../src/graphql/mutations/verifyUserPhoneAuthentication.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;CAMhB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const query = graphql_tag_1.default `
|
|
8
|
-
query metrics($params: MetricParamsInput!) {
|
|
9
|
-
metrics(params: $params) {
|
|
10
|
-
label
|
|
11
|
-
type
|
|
12
|
-
interval
|
|
13
|
-
coordinates {
|
|
14
|
-
x
|
|
15
|
-
y
|
|
16
|
-
}
|
|
17
|
-
segments {
|
|
18
|
-
label
|
|
19
|
-
type
|
|
20
|
-
coordinates {
|
|
21
|
-
x
|
|
22
|
-
y
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
exports.default = query;
|
|
29
|
-
//# sourceMappingURL=metrics.query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/metrics.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;CAoBhB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const query = graphql_tag_1.default `
|
|
8
|
-
query Analytics($params: MetricParamsInput!) {
|
|
9
|
-
analytics(params: $params) {
|
|
10
|
-
label
|
|
11
|
-
type
|
|
12
|
-
interval
|
|
13
|
-
coordinates {
|
|
14
|
-
x
|
|
15
|
-
y
|
|
16
|
-
}
|
|
17
|
-
segments {
|
|
18
|
-
label
|
|
19
|
-
type
|
|
20
|
-
coordinates {
|
|
21
|
-
x
|
|
22
|
-
y
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
exports.default = query;
|
|
29
|
-
//# sourceMappingURL=metricsData.query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metricsData.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/metricsData.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;CAoBhB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
declare enum MetricDataIntervalEnum {
|
|
2
|
-
Hour = "Hour",
|
|
3
|
-
Day = "Day",
|
|
4
|
-
Week = "Week",
|
|
5
|
-
Month = "Month",
|
|
6
|
-
Year = "Year"
|
|
7
|
-
}
|
|
8
|
-
declare enum MetricDataDurationEnum {
|
|
9
|
-
AllTime = "All Time",
|
|
10
|
-
Today = "Today",
|
|
11
|
-
OneWeek = "One Week",
|
|
12
|
-
OneMonth = "One Month",
|
|
13
|
-
MonthToDate = "MTD",
|
|
14
|
-
YearToDate = "YTD",
|
|
15
|
-
OneYear = "One Year",
|
|
16
|
-
Custom = "Custom"
|
|
17
|
-
}
|
|
18
|
-
declare enum MetricDataCardTypeEnum {
|
|
19
|
-
TicketSales = "Ticket Sales",
|
|
20
|
-
UpgradeSales = "Upgrades Sales",
|
|
21
|
-
ExtraFeeRevenue = "Extra Fee Revenue",
|
|
22
|
-
TicketsSold = "Tickets Sold",
|
|
23
|
-
TotalOrders = "Total Orders",
|
|
24
|
-
Promotions = "Promotioins",
|
|
25
|
-
TicketComps = "Ticket Comps",
|
|
26
|
-
UpgradeComps = "Upgrade Comps",
|
|
27
|
-
OnlineSessions = "Online Sessions",
|
|
28
|
-
OnlineConversationRate = "Online Converstation Rate",
|
|
29
|
-
AvgOrderValue = "Avg. Order Value"
|
|
30
|
-
}
|
|
31
|
-
declare enum MetricDataValueTypeEnum {
|
|
32
|
-
Quantity = "Quantity",
|
|
33
|
-
Currency = "Currency",
|
|
34
|
-
Percent = "Percent"
|
|
35
|
-
}
|
|
36
|
-
interface IMetricDataParams {
|
|
37
|
-
eventId?: string;
|
|
38
|
-
venueId?: string;
|
|
39
|
-
artistId?: string;
|
|
40
|
-
startAt?: number;
|
|
41
|
-
endAt?: number;
|
|
42
|
-
interval?: MetricDataIntervalEnum;
|
|
43
|
-
types: MetricDataCardTypeEnum[];
|
|
44
|
-
}
|
|
45
|
-
interface Coordinate {
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
}
|
|
49
|
-
interface DataPoint {
|
|
50
|
-
label: string;
|
|
51
|
-
interval?: MetricDataIntervalEnum;
|
|
52
|
-
coordinates?: Coordinate[];
|
|
53
|
-
segments?: DataPoint[];
|
|
54
|
-
type: MetricDataValueTypeEnum;
|
|
55
|
-
totalValue?: number;
|
|
56
|
-
}
|
|
57
|
-
declare const TicketSalesCard: DataPoint;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
var MetricDataIntervalEnum;
|
|
2
|
-
(function (MetricDataIntervalEnum) {
|
|
3
|
-
MetricDataIntervalEnum["Hour"] = "Hour";
|
|
4
|
-
MetricDataIntervalEnum["Day"] = "Day";
|
|
5
|
-
MetricDataIntervalEnum["Week"] = "Week";
|
|
6
|
-
MetricDataIntervalEnum["Month"] = "Month";
|
|
7
|
-
MetricDataIntervalEnum["Year"] = "Year";
|
|
8
|
-
})(MetricDataIntervalEnum || (MetricDataIntervalEnum = {}));
|
|
9
|
-
var MetricDataDurationEnum;
|
|
10
|
-
(function (MetricDataDurationEnum) {
|
|
11
|
-
MetricDataDurationEnum["AllTime"] = "All Time";
|
|
12
|
-
MetricDataDurationEnum["Today"] = "Today";
|
|
13
|
-
MetricDataDurationEnum["OneWeek"] = "One Week";
|
|
14
|
-
MetricDataDurationEnum["OneMonth"] = "One Month";
|
|
15
|
-
MetricDataDurationEnum["MonthToDate"] = "MTD";
|
|
16
|
-
MetricDataDurationEnum["YearToDate"] = "YTD";
|
|
17
|
-
MetricDataDurationEnum["OneYear"] = "One Year";
|
|
18
|
-
MetricDataDurationEnum["Custom"] = "Custom";
|
|
19
|
-
})(MetricDataDurationEnum || (MetricDataDurationEnum = {}));
|
|
20
|
-
;
|
|
21
|
-
var MetricDataCardTypeEnum;
|
|
22
|
-
(function (MetricDataCardTypeEnum) {
|
|
23
|
-
MetricDataCardTypeEnum["TicketSales"] = "Ticket Sales";
|
|
24
|
-
MetricDataCardTypeEnum["UpgradeSales"] = "Upgrades Sales";
|
|
25
|
-
MetricDataCardTypeEnum["ExtraFeeRevenue"] = "Extra Fee Revenue";
|
|
26
|
-
MetricDataCardTypeEnum["TicketsSold"] = "Tickets Sold";
|
|
27
|
-
MetricDataCardTypeEnum["TotalOrders"] = "Total Orders";
|
|
28
|
-
MetricDataCardTypeEnum["Promotions"] = "Promotioins";
|
|
29
|
-
MetricDataCardTypeEnum["TicketComps"] = "Ticket Comps";
|
|
30
|
-
MetricDataCardTypeEnum["UpgradeComps"] = "Upgrade Comps";
|
|
31
|
-
MetricDataCardTypeEnum["OnlineSessions"] = "Online Sessions";
|
|
32
|
-
MetricDataCardTypeEnum["OnlineConversationRate"] = "Online Converstation Rate";
|
|
33
|
-
MetricDataCardTypeEnum["AvgOrderValue"] = "Avg. Order Value";
|
|
34
|
-
})(MetricDataCardTypeEnum || (MetricDataCardTypeEnum = {}));
|
|
35
|
-
var MetricDataValueTypeEnum;
|
|
36
|
-
(function (MetricDataValueTypeEnum) {
|
|
37
|
-
MetricDataValueTypeEnum["Quantity"] = "Quantity";
|
|
38
|
-
MetricDataValueTypeEnum["Currency"] = "Currency";
|
|
39
|
-
MetricDataValueTypeEnum["Percent"] = "Percent";
|
|
40
|
-
})(MetricDataValueTypeEnum || (MetricDataValueTypeEnum = {}));
|
|
41
|
-
const TicketSalesCard = {
|
|
42
|
-
label: MetricDataCardTypeEnum.TicketSales,
|
|
43
|
-
type: MetricDataValueTypeEnum.Currency,
|
|
44
|
-
interval: MetricDataIntervalEnum.Hour,
|
|
45
|
-
totalValue: 1000,
|
|
46
|
-
coordinates: [
|
|
47
|
-
{
|
|
48
|
-
x: 1,
|
|
49
|
-
y: 1,
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
segments: [
|
|
53
|
-
{
|
|
54
|
-
label: 'General Admission',
|
|
55
|
-
type: MetricDataValueTypeEnum.Currency,
|
|
56
|
-
totalValue: 300,
|
|
57
|
-
coordinates: [
|
|
58
|
-
{
|
|
59
|
-
x: 1,
|
|
60
|
-
y: 1,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
x: 2,
|
|
64
|
-
y: 1,
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=IMetricData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IMetricData.js","sourceRoot":"","sources":["../../src/interfaces/IMetricData.ts"],"names":[],"mappings":"AAAA,IAAK,sBAMJ;AAND,WAAK,sBAAsB;IACzB,uCAAa,CAAA;IACb,qCAAW,CAAA;IACX,uCAAa,CAAA;IACb,yCAAe,CAAA;IACf,uCAAa,CAAA;AACf,CAAC,EANI,sBAAsB,KAAtB,sBAAsB,QAM1B;AAED,IAAK,sBASJ;AATD,WAAK,sBAAsB;IACzB,8CAAoB,CAAA;IACpB,yCAAe,CAAA;IACf,8CAAoB,CAAA;IACpB,gDAAsB,CAAA;IACtB,6CAAmB,CAAA;IACnB,4CAAkB,CAAA;IAClB,8CAAoB,CAAA;IACpB,2CAAiB,CAAA;AACnB,CAAC,EATI,sBAAsB,KAAtB,sBAAsB,QAS1B;AAAA,CAAC;AAGF,IAAK,sBAYJ;AAZD,WAAK,sBAAsB;IACzB,sDAA4B,CAAA;IAC5B,yDAA+B,CAAA;IAC/B,+DAAqC,CAAA;IACrC,sDAA4B,CAAA;IAC5B,sDAA4B,CAAA;IAC5B,oDAA0B,CAAA;IAC1B,sDAA4B,CAAA;IAC5B,wDAA8B,CAAA;IAC9B,4DAAkC,CAAA;IAClC,8EAAoD,CAAA;IACpD,4DAAkC,CAAA;AACpC,CAAC,EAZI,sBAAsB,KAAtB,sBAAsB,QAY1B;AAED,IAAK,uBAIJ;AAJD,WAAK,uBAAuB;IAC1B,gDAAqB,CAAA;IACrB,gDAAqB,CAAA;IACrB,8CAAmB,CAAA;AACrB,CAAC,EAJI,uBAAuB,KAAvB,uBAAuB,QAI3B;AA0BD,MAAM,eAAe,GAAc;IACjC,KAAK,EAAE,sBAAsB,CAAC,WAAW;IACzC,IAAI,EAAE,uBAAuB,CAAC,QAAQ;IACtC,QAAQ,EAAE,sBAAsB,CAAC,IAAI;IACrC,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE;QACX;YACE,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;SACL;KACF;IACD,QAAQ,EAAE;QACR;YACE,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;YACtC,UAAU,EAAE,GAAG;YACf,WAAW,EAAE;gBACX;oBACE,CAAC,EAAE,CAAC;oBACJ,CAAC,EAAE,CAAC;iBACL;gBACD;oBACE,CAAC,EAAE,CAAC;oBACJ,CAAC,EAAE,CAAC;iBACL;aACF;SACF;KACF;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IStripe.js","sourceRoot":"","sources":["../../src/interfaces/IStripe.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
// Returns start and end date
|
|
5
|
-
const: getMetricsTimespan = {
|
|
6
|
-
[MetricTimespanEnum.AllTime]: () => null,
|
|
7
|
-
[MetricTimespanEnum.Today]: () => null,
|
|
8
|
-
[MetricTimespanEnum.OneWeek]: () => null,
|
|
9
|
-
[MetricTimespanEnum.OneMonth]: () => null,
|
|
10
|
-
[MetricTimespanEnum.MonthToDate]: () => null,
|
|
11
|
-
[MetricTimespanEnum.YearToDate]: () => null,
|
|
12
|
-
[MetricTimespanEnum.OneYear]: () => null,
|
|
13
|
-
[MetricTimespanEnum.Custom]: () => null,
|
|
14
|
-
},
|
|
15
|
-
// Returns available intervals
|
|
16
|
-
timeSpanIntervals(interval) {
|
|
17
|
-
const intervals = {
|
|
18
|
-
[MetricTimespanEnum.AllTime]: () => [],
|
|
19
|
-
[MetricTimespanEnum.Today]: () => [],
|
|
20
|
-
[MetricTimespanEnum.OneWeek]: () => [],
|
|
21
|
-
[MetricTimespanEnum.OneMonth]: () => [],
|
|
22
|
-
[MetricTimespanEnum.MonthToDate]: () => [],
|
|
23
|
-
[MetricTimespanEnum.YearToDate]: () => [],
|
|
24
|
-
[MetricTimespanEnum.OneYear]: () => [],
|
|
25
|
-
[MetricTimespanEnum.Custom]: () => [],
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=MetricsUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsUtil.js","sourceRoot":"","sources":["../../src/utils/MetricsUtil.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,6BAA6B;IAC/B,KAAK,EAAC,kBAAkB,GAAG;QACzB,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACxC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACtC,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACxC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACzC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QAC5C,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QAC3C,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACxC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;KACxC;IAED,8BAA8B;IAC9B,iBAAiB,CAAC,QAAS;QACzB,MAAM,SAAS,GAAG;YAChB,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC5D,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC1D,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC5D,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC7D,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAChE,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC/D,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;YAC5D,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,GAAyB,EAAE,CAAC,EAAE;SAC5D,CAAC;IACJ,CAAC;CAEA,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const IFee__1 = require("../interfaces/IFee\";");
|
|
4
|
-
exports.default = {
|
|
5
|
-
processingFees(fees) {
|
|
6
|
-
return fees.filter((fee) => {
|
|
7
|
-
if (fee.appliedBy === IFee__1.FeeAppliedByEnum.Sellout || fee.appliedBy === IFee__1.FeeAppliedByEnum.Stripe) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
return false;
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
selloutFees(fees) {
|
|
14
|
-
return fees.filter((fee) => {
|
|
15
|
-
if (fee.appliedBy === IFee__1.FeeAppliedByEnum.Sellout) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
stripeFees(fees) {
|
|
22
|
-
return fees.filter((fee) => {
|
|
23
|
-
if (fee.appliedBy === IFee__1.FeeAppliedByEnum.Stripe) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
promoterFees(fees) {
|
|
30
|
-
return fees.filter((fee) => {
|
|
31
|
-
if (fee.appliedBy === IFee__1.FeeAppliedByEnum.Sellout || fee.appliedBy === IFee__1.FeeAppliedByEnum.Stripe) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=fee-util-broken-but-why.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fee-util-broken-but-why.js","sourceRoot":"","sources":["../../src/utils/fee-util-broken-but-why.ts"],"names":[],"mappings":";;AAAA,iDAA4D;AAE5D,kBAAe;IACb,cAAc,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAS,EAAE,EAAE;YAC/B,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,OAAO,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,MAAM,EAAE;gBAC3F,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IACD,WAAW,CAAC,IAAY;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAS,EAAE,EAAE;YAC/B,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,OAAO,EAAE;gBAC9C,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IACD,UAAU,CAAC,IAAY;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAS,EAAE,EAAE;YAC/B,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,MAAM,EAAE;gBAC7C,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IACD,YAAY,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAS,EAAE,EAAE;YAC/B,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,OAAO,IAAI,GAAG,CAAC,SAAS,KAAK,wBAAgB,CAAC,MAAM,EAAE;gBAC3F,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
/package/.dist/graphql/mutations/{createStripeSetupIntent.d.ts → resetPasswordInApp.mutation.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/.dist/graphql/mutations/{registerStripeTerminalReader.d.ts → setUserOrgContextId.d.ts}
RENAMED
|
File without changes
|
/package/.dist/graphql/{mutations/verifyUserPhoneAuthentication.d.ts → queries/customerProfile.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|