@sellout/models 0.0.76 → 0.0.78
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/OrderChannelEnum.d.ts +1 -1
- package/.dist/enums/OrderChannelEnum.js +1 -1
- package/.dist/enums/OrderChannelEnum.js.map +1 -1
- package/.dist/graphql/fragments/order.fragment.js +2 -0
- package/.dist/graphql/fragments/order.fragment.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/{createStripeSetupIntent.js → setUserOrgContextId.js} +5 -3
- package/.dist/graphql/mutations/setUserOrgContextId.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/order.query.js +13 -0
- package/.dist/graphql/queries/order.query.js.map +1 -1
- package/.dist/graphql/queries/orders.query.js +13 -0
- package/.dist/graphql/queries/orders.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/IEventUpgrade.d.ts +0 -1
- package/.dist/interfaces/IOrder.d.ts +6 -0
- package/.dist/interfaces/IOrder.js +1 -0
- package/.dist/interfaces/IOrder.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/interfaces/ITicketType.d.ts +0 -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 +31 -14
- package/.dist/utils/OrderUtil.d.ts +2 -2
- package/.dist/utils/OrderUtil.js +17 -80
- package/.dist/utils/OrderUtil.js.map +1 -1
- package/.dist/utils/PaymentUtil.js +2 -2
- package/.dist/utils/PaymentUtil.js.map +1 -1
- package/package.json +4 -4
- package/src/enums/OrderChannelEnum.ts +1 -1
- package/src/graphql/fragments/order.fragment.ts +2 -0
- package/src/graphql/queries/order.query.ts +13 -0
- package/src/graphql/queries/orders.query.ts +13 -0
- package/src/interfaces/IEventUpgrade.ts +0 -1
- package/src/interfaces/IOrder.ts +8 -0
- package/src/interfaces/ITicketType.ts +0 -1
- package/src/proto/order.proto +1 -1
- package/src/utils/OrderUtil.ts +20 -84
- package/src/utils/PaymentUtil.ts +2 -2
- 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 +0 -21
- package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js.map +0 -1
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.d.ts +0 -2
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.js +0 -21
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.js.map +0 -1
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.d.ts +0 -2
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js +0 -13
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js.map +0 -1
- package/.dist/graphql/mutations/registerStripeTerminalReader.d.ts +0 -2
- 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 +0 -15
- 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.d.ts +0 -2
- 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 → setUserOrgContextId.d.ts} +0 -0
- /package/.dist/graphql/{mutations/verifyPhoneAuthentication.mutation.d.ts → queries/customerProfile.d.ts} +0 -0
- /package/.dist/graphql/{mutations/verifyUserPhoneAuthentication.d.ts → queries/organization.query.d.ts} +0 -0
- /package/.dist/graphql/queries/{metrics.query.d.ts → organizations.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ exports.OrderChannelEnum = void 0;
|
|
|
4
4
|
var OrderChannelEnum;
|
|
5
5
|
(function (OrderChannelEnum) {
|
|
6
6
|
OrderChannelEnum["Online"] = "Online";
|
|
7
|
-
OrderChannelEnum["BoxOffice"] = "
|
|
7
|
+
OrderChannelEnum["BoxOffice"] = "Box Office";
|
|
8
8
|
})(OrderChannelEnum = exports.OrderChannelEnum || (exports.OrderChannelEnum = {}));
|
|
9
9
|
;
|
|
10
10
|
//# sourceMappingURL=OrderChannelEnum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderChannelEnum.js","sourceRoot":"","sources":["../../src/enums/OrderChannelEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,
|
|
1
|
+
{"version":3,"file":"OrderChannelEnum.js","sourceRoot":"","sources":["../../src/enums/OrderChannelEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,4CAAwB,CAAA;AAC1B,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.fragment.js","sourceRoot":"","sources":["../../../src/graphql/fragments/order.fragment.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAW9B,MAAM,KAAK,GAAkB;IAC3B,SAAS,EAAE;QACT,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,kBAAe,KAAK,CAAC;AAErB,KAAK,CAAC,SAAS,GAAG;IAChB,OAAO,EAAE,qBAAG,CAAA
|
|
1
|
+
{"version":3,"file":"order.fragment.js","sourceRoot":"","sources":["../../../src/graphql/fragments/order.fragment.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAW9B,MAAM,KAAK,GAAkB;IAC3B,SAAS,EAAE;QACT,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,kBAAe,KAAK,CAAC;AAErB,KAAK,CAAC,SAAS,GAAG;IAChB,OAAO,EAAE,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBX;IACD,QAAQ,EAAE,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBZ;CACF,CAAC"}
|
package/.dist/graphql/mutations/{registerStripeTerminalReader.js → resetPasswordInApp.mutation.js}
RENAMED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
7
|
const mutation = graphql_tag_1.default `
|
|
8
|
-
mutation
|
|
9
|
-
|
|
8
|
+
mutation resetUserPasswordInApp($oldPassword: String!, $newPassword: String!) {
|
|
9
|
+
resetUserPasswordInApp(oldPassword: $oldPassword, newPassword: $newPassword)
|
|
10
10
|
}
|
|
11
11
|
`;
|
|
12
12
|
exports.default = mutation;
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=resetPasswordInApp.mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resetPasswordInApp.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/resetPasswordInApp.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;CAInB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -5,9 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
7
|
const mutation = graphql_tag_1.default `
|
|
8
|
-
mutation
|
|
9
|
-
|
|
8
|
+
mutation setUserOrgContextId($orgId: String) {
|
|
9
|
+
setUserOrgContextId(orgId: $orgId) {
|
|
10
|
+
token
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
`;
|
|
12
14
|
exports.default = mutation;
|
|
13
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=setUserOrgContextId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setUserOrgContextId.js","sourceRoot":"","sources":["../../../src/graphql/mutations/setUserOrgContextId.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;;;CAMnB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 userProfiles($query: UserProfileQueryInput) {
|
|
9
|
+
userProfiles(query: $query) {
|
|
10
|
+
_id
|
|
11
|
+
imageUrl
|
|
12
|
+
user {
|
|
13
|
+
_id
|
|
14
|
+
email
|
|
15
|
+
firstName
|
|
16
|
+
lastName
|
|
17
|
+
phoneNumber
|
|
18
|
+
phoneNumberVerifiedAt
|
|
19
|
+
}
|
|
20
|
+
metrics {
|
|
21
|
+
orgId
|
|
22
|
+
yearToDateValue
|
|
23
|
+
lifeTimeValue
|
|
24
|
+
createdAt
|
|
25
|
+
lifeTimeTicketsPurchased
|
|
26
|
+
lifeTimeUpgradesPurchased
|
|
27
|
+
}
|
|
28
|
+
stripeCustomerId
|
|
29
|
+
address {
|
|
30
|
+
address1
|
|
31
|
+
address2
|
|
32
|
+
city
|
|
33
|
+
state
|
|
34
|
+
zip
|
|
35
|
+
country
|
|
36
|
+
phone
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
exports.default = query;
|
|
42
|
+
//# sourceMappingURL=customerProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customerProfile.js","sourceRoot":"","sources":["../../../src/graphql/queries/customerProfile.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -71,6 +71,7 @@ const query = graphql_tag_1.default `
|
|
|
71
71
|
refundReason
|
|
72
72
|
promotionCode
|
|
73
73
|
type
|
|
74
|
+
channel
|
|
74
75
|
ipAddress
|
|
75
76
|
address {
|
|
76
77
|
lat
|
|
@@ -89,6 +90,18 @@ const query = graphql_tag_1.default `
|
|
|
89
90
|
firstName
|
|
90
91
|
lastName
|
|
91
92
|
}
|
|
93
|
+
payments {
|
|
94
|
+
_id
|
|
95
|
+
paymentIntentId
|
|
96
|
+
amount
|
|
97
|
+
transferAmount
|
|
98
|
+
feeAmount
|
|
99
|
+
feeIds
|
|
100
|
+
createdAt
|
|
101
|
+
createdBy
|
|
102
|
+
promotionCode
|
|
103
|
+
paymentMethodType
|
|
104
|
+
}
|
|
92
105
|
...OrderTickets
|
|
93
106
|
...OrderUpgrades
|
|
94
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/order.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAC9B,iFAAgD;AAEhD,MAAM,KAAK,GAAG,qBAAG,CAAA
|
|
1
|
+
{"version":3,"file":"order.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/order.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAC9B,iFAAgD;AAEhD,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqGb,wBAAK,CAAC,SAAS,CAAC,OAAO;IACvB,wBAAK,CAAC,SAAS,CAAC,QAAQ;CAC3B,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -57,12 +57,25 @@ const query = graphql_tag_1.default `
|
|
|
57
57
|
refundedAmount
|
|
58
58
|
promotionCode
|
|
59
59
|
type
|
|
60
|
+
channel
|
|
60
61
|
ipAddress
|
|
61
62
|
address {
|
|
62
63
|
lat
|
|
63
64
|
lng
|
|
64
65
|
zip
|
|
65
66
|
}
|
|
67
|
+
payments {
|
|
68
|
+
_id
|
|
69
|
+
paymentIntentId
|
|
70
|
+
amount
|
|
71
|
+
transferAmount
|
|
72
|
+
feeAmount
|
|
73
|
+
feeIds
|
|
74
|
+
createdAt
|
|
75
|
+
createdBy
|
|
76
|
+
promotionCode
|
|
77
|
+
paymentMethodType
|
|
78
|
+
}
|
|
66
79
|
...OrderTickets
|
|
67
80
|
...OrderUpgrades
|
|
68
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orders.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/orders.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAC9B,iFAAgD;AAEhD,MAAM,KAAK,GAAG,qBAAG,CAAA
|
|
1
|
+
{"version":3,"file":"orders.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/orders.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAC9B,iFAAgD;AAEhD,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4Eb,wBAAK,CAAC,SAAS,CAAC,OAAO;IACvB,wBAAK,CAAC,SAAS,CAAC,QAAQ;CAC3B,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 organizations {
|
|
9
|
+
organizations {
|
|
10
|
+
_id
|
|
11
|
+
orgName
|
|
12
|
+
orgUrls
|
|
13
|
+
orgLogoUrl
|
|
14
|
+
createdAt
|
|
15
|
+
address {
|
|
16
|
+
address1
|
|
17
|
+
address2
|
|
18
|
+
city
|
|
19
|
+
state
|
|
20
|
+
zip
|
|
21
|
+
country
|
|
22
|
+
}
|
|
23
|
+
user {
|
|
24
|
+
email
|
|
25
|
+
}
|
|
26
|
+
seating {
|
|
27
|
+
publicKey
|
|
28
|
+
secretKey
|
|
29
|
+
designerKey
|
|
30
|
+
}
|
|
31
|
+
webFlow {
|
|
32
|
+
sites {
|
|
33
|
+
name
|
|
34
|
+
webFlowId
|
|
35
|
+
enabled
|
|
36
|
+
createdAt
|
|
37
|
+
updatedAt
|
|
38
|
+
previewUrl
|
|
39
|
+
domains {
|
|
40
|
+
lastPublishedAt
|
|
41
|
+
name
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
exports.default = query;
|
|
49
|
+
//# sourceMappingURL=organization.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/organization.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 organizations {
|
|
9
|
+
organizations {
|
|
10
|
+
_id
|
|
11
|
+
orgName
|
|
12
|
+
orgUrls
|
|
13
|
+
orgLogoUrl
|
|
14
|
+
createdAt
|
|
15
|
+
address {
|
|
16
|
+
address1
|
|
17
|
+
address2
|
|
18
|
+
city
|
|
19
|
+
state
|
|
20
|
+
zip
|
|
21
|
+
country
|
|
22
|
+
}
|
|
23
|
+
user {
|
|
24
|
+
email
|
|
25
|
+
}
|
|
26
|
+
seating {
|
|
27
|
+
publicKey
|
|
28
|
+
secretKey
|
|
29
|
+
designerKey
|
|
30
|
+
}
|
|
31
|
+
webFlow {
|
|
32
|
+
sites {
|
|
33
|
+
name
|
|
34
|
+
webFlowId
|
|
35
|
+
enabled
|
|
36
|
+
createdAt
|
|
37
|
+
updatedAt
|
|
38
|
+
previewUrl
|
|
39
|
+
domains {
|
|
40
|
+
lastPublishedAt
|
|
41
|
+
name
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
exports.default = query;
|
|
49
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/graphql/queries/organizations.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -6,6 +6,8 @@ import IOrderCustomField from './IOrderCustomField';
|
|
|
6
6
|
import { OrderStateEnum } from './IOrderState';
|
|
7
7
|
import { OrderTypeEnum } from './IOrderType';
|
|
8
8
|
import { OrderChannelEnum } from '../enums/OrderChannelEnum';
|
|
9
|
+
import IUser from "./IUser";
|
|
10
|
+
import IFee from "./IFee";
|
|
9
11
|
export default interface IOrder {
|
|
10
12
|
_id?: string;
|
|
11
13
|
secretId?: string;
|
|
@@ -34,3 +36,7 @@ export default interface IOrder {
|
|
|
34
36
|
refundReason?: string;
|
|
35
37
|
payments: IPayment[];
|
|
36
38
|
}
|
|
39
|
+
export interface IOrderGraphQL extends IOrder {
|
|
40
|
+
user: IUser;
|
|
41
|
+
fees: IFee;
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOrder.js","sourceRoot":"","sources":["../../src/interfaces/IOrder.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"IOrder.js","sourceRoot":"","sources":["../../src/interfaces/IOrder.ts"],"names":[],"mappings":";;AAsCC,CAAC;AAMD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISecondaryEmail.js","sourceRoot":"","sources":["../../src/interfaces/ISecondaryEmail.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
email: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
verifiedAt: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: false,
|
|
11
|
+
default: 0,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=SecondaryEmail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondaryEmail.js","sourceRoot":"","sources":["../../src/schemas/SecondaryEmail.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACX;CACF,CAAC"}
|
package/.dist/sellout-proto.js
CHANGED
|
@@ -14878,7 +14878,7 @@ $root.Payment = (function() {
|
|
|
14878
14878
|
* @property {number|null} [amount] Payment amount
|
|
14879
14879
|
* @property {number|null} [transferAmount] Payment transferAmount
|
|
14880
14880
|
* @property {number|null} [feeAmount] Payment feeAmount
|
|
14881
|
-
* @property {string
|
|
14881
|
+
* @property {Array.<string>|null} [feeIds] Payment feeIds
|
|
14882
14882
|
* @property {number|null} [createdAt] Payment createdAt
|
|
14883
14883
|
* @property {string|null} [createdBy] Payment createdBy
|
|
14884
14884
|
* @property {string|null} [promotionCode] Payment promotionCode
|
|
@@ -14894,6 +14894,7 @@ $root.Payment = (function() {
|
|
|
14894
14894
|
* @param {IPayment=} [properties] Properties to set
|
|
14895
14895
|
*/
|
|
14896
14896
|
function Payment(properties) {
|
|
14897
|
+
this.feeIds = [];
|
|
14897
14898
|
if (properties)
|
|
14898
14899
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14899
14900
|
if (properties[keys[i]] != null)
|
|
@@ -14942,11 +14943,11 @@ $root.Payment = (function() {
|
|
|
14942
14943
|
|
|
14943
14944
|
/**
|
|
14944
14945
|
* Payment feeIds.
|
|
14945
|
-
* @member {string} feeIds
|
|
14946
|
+
* @member {Array.<string>} feeIds
|
|
14946
14947
|
* @memberof Payment
|
|
14947
14948
|
* @instance
|
|
14948
14949
|
*/
|
|
14949
|
-
Payment.prototype.feeIds =
|
|
14950
|
+
Payment.prototype.feeIds = $util.emptyArray;
|
|
14950
14951
|
|
|
14951
14952
|
/**
|
|
14952
14953
|
* Payment createdAt.
|
|
@@ -15014,8 +15015,9 @@ $root.Payment = (function() {
|
|
|
15014
15015
|
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.transferAmount);
|
|
15015
15016
|
if (message.feeAmount != null && Object.hasOwnProperty.call(message, "feeAmount"))
|
|
15016
15017
|
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.feeAmount);
|
|
15017
|
-
if (message.feeIds != null &&
|
|
15018
|
-
|
|
15018
|
+
if (message.feeIds != null && message.feeIds.length)
|
|
15019
|
+
for (var i = 0; i < message.feeIds.length; ++i)
|
|
15020
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.feeIds[i]);
|
|
15019
15021
|
if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
|
|
15020
15022
|
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.createdAt);
|
|
15021
15023
|
if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy"))
|
|
@@ -15074,7 +15076,9 @@ $root.Payment = (function() {
|
|
|
15074
15076
|
message.feeAmount = reader.int32();
|
|
15075
15077
|
break;
|
|
15076
15078
|
case 5:
|
|
15077
|
-
message.feeIds
|
|
15079
|
+
if (!(message.feeIds && message.feeIds.length))
|
|
15080
|
+
message.feeIds = [];
|
|
15081
|
+
message.feeIds.push(reader.string());
|
|
15078
15082
|
break;
|
|
15079
15083
|
case 6:
|
|
15080
15084
|
message.createdAt = reader.int32();
|
|
@@ -15138,9 +15142,13 @@ $root.Payment = (function() {
|
|
|
15138
15142
|
if (message.feeAmount != null && message.hasOwnProperty("feeAmount"))
|
|
15139
15143
|
if (!$util.isInteger(message.feeAmount))
|
|
15140
15144
|
return "feeAmount: integer expected";
|
|
15141
|
-
if (message.feeIds != null && message.hasOwnProperty("feeIds"))
|
|
15142
|
-
if (
|
|
15143
|
-
return "feeIds:
|
|
15145
|
+
if (message.feeIds != null && message.hasOwnProperty("feeIds")) {
|
|
15146
|
+
if (!Array.isArray(message.feeIds))
|
|
15147
|
+
return "feeIds: array expected";
|
|
15148
|
+
for (var i = 0; i < message.feeIds.length; ++i)
|
|
15149
|
+
if (!$util.isString(message.feeIds[i]))
|
|
15150
|
+
return "feeIds: string[] expected";
|
|
15151
|
+
}
|
|
15144
15152
|
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
15145
15153
|
if (!$util.isInteger(message.createdAt))
|
|
15146
15154
|
return "createdAt: integer expected";
|
|
@@ -15178,8 +15186,13 @@ $root.Payment = (function() {
|
|
|
15178
15186
|
message.transferAmount = object.transferAmount | 0;
|
|
15179
15187
|
if (object.feeAmount != null)
|
|
15180
15188
|
message.feeAmount = object.feeAmount | 0;
|
|
15181
|
-
if (object.feeIds
|
|
15182
|
-
|
|
15189
|
+
if (object.feeIds) {
|
|
15190
|
+
if (!Array.isArray(object.feeIds))
|
|
15191
|
+
throw TypeError(".Payment.feeIds: array expected");
|
|
15192
|
+
message.feeIds = [];
|
|
15193
|
+
for (var i = 0; i < object.feeIds.length; ++i)
|
|
15194
|
+
message.feeIds[i] = String(object.feeIds[i]);
|
|
15195
|
+
}
|
|
15183
15196
|
if (object.createdAt != null)
|
|
15184
15197
|
message.createdAt = object.createdAt | 0;
|
|
15185
15198
|
if (object.createdBy != null)
|
|
@@ -15204,13 +15217,14 @@ $root.Payment = (function() {
|
|
|
15204
15217
|
if (!options)
|
|
15205
15218
|
options = {};
|
|
15206
15219
|
var object = {};
|
|
15220
|
+
if (options.arrays || options.defaults)
|
|
15221
|
+
object.feeIds = [];
|
|
15207
15222
|
if (options.defaults) {
|
|
15208
15223
|
object._id = "";
|
|
15209
15224
|
object.paymentIntentId = "";
|
|
15210
15225
|
object.amount = 0;
|
|
15211
15226
|
object.transferAmount = 0;
|
|
15212
15227
|
object.feeAmount = 0;
|
|
15213
|
-
object.feeIds = "";
|
|
15214
15228
|
object.createdAt = 0;
|
|
15215
15229
|
object.createdBy = "";
|
|
15216
15230
|
object.promotionCode = "";
|
|
@@ -15226,8 +15240,11 @@ $root.Payment = (function() {
|
|
|
15226
15240
|
object.transferAmount = message.transferAmount;
|
|
15227
15241
|
if (message.feeAmount != null && message.hasOwnProperty("feeAmount"))
|
|
15228
15242
|
object.feeAmount = message.feeAmount;
|
|
15229
|
-
if (message.feeIds
|
|
15230
|
-
object.feeIds =
|
|
15243
|
+
if (message.feeIds && message.feeIds.length) {
|
|
15244
|
+
object.feeIds = [];
|
|
15245
|
+
for (var j = 0; j < message.feeIds.length; ++j)
|
|
15246
|
+
object.feeIds[j] = message.feeIds[j];
|
|
15247
|
+
}
|
|
15231
15248
|
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
15232
15249
|
object.createdAt = message.createdAt;
|
|
15233
15250
|
if (message.createdBy != null && message.hasOwnProperty("createdBy"))
|
|
@@ -7,10 +7,10 @@ declare const _default: {
|
|
|
7
7
|
/*****************************************************************************************
|
|
8
8
|
Order
|
|
9
9
|
*****************************************************************************************/
|
|
10
|
-
orderTotal(order:
|
|
10
|
+
orderTotal(order: IOrder, fees: any[]): number;
|
|
11
11
|
orderTotalWithRefund(order: any, fees: any): number;
|
|
12
12
|
orderTransferAmountWithRefund(order: any, fees: any): any;
|
|
13
|
-
orderSubtotal(order:
|
|
13
|
+
orderSubtotal(order: IOrder): number;
|
|
14
14
|
orderSubtotalWithRefund(order: any): any;
|
|
15
15
|
ticketsSubtotal(order: any): any;
|
|
16
16
|
ticketsSubtotalWithRefund(order: any): any;
|
package/.dist/utils/OrderUtil.js
CHANGED
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const FeeUtil_1 = __importDefault(require("./FeeUtil"));
|
|
7
7
|
const IOrderType_1 = require("../interfaces/IOrderType");
|
|
8
|
+
const PaymentUtil_1 = __importDefault(require("./PaymentUtil"));
|
|
9
|
+
// import IFee from '../interfaces/IFee';
|
|
8
10
|
exports.default = {
|
|
9
11
|
isComp(order) {
|
|
10
12
|
const { type = 'Online' } = order;
|
|
@@ -18,78 +20,14 @@ exports.default = {
|
|
|
18
20
|
Order
|
|
19
21
|
*****************************************************************************************/
|
|
20
22
|
orderTotal(order, fees) {
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (!order.tickets)
|
|
29
|
-
order.tickets = [];
|
|
30
|
-
if (!order.upgrades)
|
|
31
|
-
order.upgrades = [];
|
|
32
|
-
const ticketFees = fees.filter(f => f.appliedTo === 'Ticket');
|
|
33
|
-
const upgradeFees = fees.filter(f => f.appliedTo === 'Upgrade');
|
|
34
|
-
let orderFees = fees.filter(f => f.appliedTo === 'Order');
|
|
35
|
-
function applyTicketFee(ticket, fee) {
|
|
36
|
-
if (fee.filters && fee.filters.includes('Seated') && !ticket.seat)
|
|
37
|
-
return 0;
|
|
38
|
-
const noMax = fee.maxAppliedToPrice === 0;
|
|
39
|
-
if ((fee.minAppliedToPrice <= ticket.price && ticket.price <= fee.maxAppliedToPrice) || noMax) {
|
|
40
|
-
if (fee.type === 'Flat') {
|
|
41
|
-
return fee.value;
|
|
42
|
-
}
|
|
43
|
-
if (fee.type === 'Percent') {
|
|
44
|
-
return (ticket.price * fee.value / 100);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function applyUpgradeFee(upgrade, fee) {
|
|
52
|
-
const noMax = fee.maxAppliedToPrice === 0;
|
|
53
|
-
if ((fee.minAppliedToPrice <= upgrade.price && upgrade.price <= fee.minAppliedToPrice) || noMax) {
|
|
54
|
-
if (fee.type === 'Flat') {
|
|
55
|
-
return fee.value;
|
|
56
|
-
}
|
|
57
|
-
if (fee.type === 'Percent') {
|
|
58
|
-
return (upgrade.price * fee.value / 100);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return 0;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function applyOrderFee(orderSubtotal, fee) {
|
|
66
|
-
if (fee.type === 'Flat') {
|
|
67
|
-
return orderSubtotal + fee.value;
|
|
68
|
-
}
|
|
69
|
-
if (fee.type === 'Percent') {
|
|
70
|
-
return (orderSubtotal / (1 - fee.value / 100));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const ticketTotal = order.tickets.reduce((cur, ticket) => cur + ticket.price, 0);
|
|
74
|
-
const ticketFeeTotal = order.tickets.reduce((cur, ticket) => {
|
|
75
|
-
return cur + ticketFees.reduce((cur, fee) => cur + applyTicketFee(ticket, fee), 0);
|
|
23
|
+
return order.payments.reduce((cur, payment) => {
|
|
24
|
+
return cur + PaymentUtil_1.default.calculatePaymentTotal({
|
|
25
|
+
tickets: order.tickets.filter(ticket => ticket.paymentId === payment._id),
|
|
26
|
+
upgrades: order.upgrades.filter(upgrade => upgrade.paymentId === payment._id),
|
|
27
|
+
fees: fees,
|
|
28
|
+
paymentMethodType: payment.paymentMethodType,
|
|
29
|
+
});
|
|
76
30
|
}, 0);
|
|
77
|
-
const upgradeTotal = order.upgrades.reduce((cur, upgrade) => cur + upgrade.price, 0);
|
|
78
|
-
const upgradeFeeTotal = order.upgrades.reduce((cur, upgrade) => {
|
|
79
|
-
return cur + upgradeFees.reduce((cur, fee) => cur + applyUpgradeFee(upgrade, fee), 0);
|
|
80
|
-
}, 0);
|
|
81
|
-
const orderSubtotal = ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal;
|
|
82
|
-
// Order matters here. Flat type fees must be
|
|
83
|
-
// applied before Percent type fees
|
|
84
|
-
orderFees = orderFees.sort(({ type }) => {
|
|
85
|
-
if (type === 'Flat')
|
|
86
|
-
return -1;
|
|
87
|
-
return 1;
|
|
88
|
-
});
|
|
89
|
-
const orderTotal = orderFees.reduce((cur, fee) => {
|
|
90
|
-
return applyOrderFee(cur, fee);
|
|
91
|
-
}, orderSubtotal);
|
|
92
|
-
return Math.round(orderTotal);
|
|
93
31
|
},
|
|
94
32
|
orderTotalWithRefund(order, fees) {
|
|
95
33
|
return this.orderTotal(order, fees) - (order.refundedAmount || 0);
|
|
@@ -99,15 +37,14 @@ exports.default = {
|
|
|
99
37
|
return this.orderTotalWithRefund(order, promoterFees);
|
|
100
38
|
},
|
|
101
39
|
orderSubtotal(order) {
|
|
102
|
-
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return ticketTotal + upgradeTotal;
|
|
40
|
+
return order.payments.reduce((cur, payment) => {
|
|
41
|
+
return cur + PaymentUtil_1.default.calculatePaymentSubtotal({
|
|
42
|
+
tickets: order.tickets.filter(ticket => ticket.paymentId === payment._id),
|
|
43
|
+
upgrades: order.upgrades.filter(upgrade => upgrade.paymentId === payment._id),
|
|
44
|
+
fees: [],
|
|
45
|
+
paymentMethodType: payment.paymentMethodType,
|
|
46
|
+
});
|
|
47
|
+
}, 0);
|
|
111
48
|
},
|
|
112
49
|
orderSubtotalWithRefund(order) {
|
|
113
50
|
if (order.type === IOrderType_1.OrderTypeEnum.Complimentary)
|