@sellout/models 0.0.63 → 0.0.65
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 +4 -0
- package/.dist/enums/OrderChannelEnum.js +10 -0
- package/.dist/enums/OrderChannelEnum.js.map +1 -0
- package/.dist/enums/OrderItemTypeEnum.d.ts +4 -0
- package/.dist/enums/OrderItemTypeEnum.js +10 -0
- package/.dist/enums/OrderItemTypeEnum.js.map +1 -0
- package/.dist/enums/PaymentMethodEnum.d.ts +5 -0
- package/.dist/enums/PaymentMethodEnum.js +10 -0
- package/.dist/enums/PaymentMethodEnum.js.map +1 -0
- package/.dist/graphql/fragments/order.fragment.js +2 -0
- package/.dist/graphql/fragments/order.fragment.js.map +1 -1
- package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js +10 -1
- package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js.map +1 -1
- package/.dist/graphql/mutations/breakApartOrder.js +1 -8
- package/.dist/graphql/mutations/breakApartOrder.js.map +1 -1
- package/.dist/graphql/mutations/createOrder.mutation.js +0 -3
- package/.dist/graphql/mutations/createOrder.mutation.js.map +1 -1
- package/.dist/graphql/mutations/createOrderPaymentIntent.mutation.js +16 -0
- package/.dist/graphql/mutations/createOrderPaymentIntent.mutation.js.map +1 -0
- package/.dist/graphql/mutations/createStripeSetupIntent.d.ts +2 -0
- package/.dist/graphql/mutations/{setUserOrgContextId.js → createStripeSetupIntent.js} +3 -5
- package/.dist/graphql/mutations/createStripeSetupIntent.js.map +1 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js +21 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js.map +1 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.d.ts +2 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.js +21 -0
- package/.dist/graphql/mutations/listStripeTerminalReaders.query.js.map +1 -0
- package/.dist/graphql/mutations/register.mutation.js +2 -9
- package/.dist/graphql/mutations/register.mutation.js.map +1 -1
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js +13 -0
- package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js.map +1 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.d.ts +2 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.js +13 -0
- package/.dist/graphql/mutations/registerStripeTerminalReader.js.map +1 -0
- package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js +15 -0
- package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js.map +1 -0
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.js +15 -0
- package/.dist/graphql/mutations/verifyUserPhoneAuthentication.js.map +1 -0
- package/.dist/graphql/queries/metrics.query.js +29 -0
- package/.dist/graphql/queries/metrics.query.js.map +1 -0
- package/.dist/graphql/queries/metricsData.query.d.ts +2 -0
- package/.dist/graphql/queries/metricsData.query.js +29 -0
- package/.dist/graphql/queries/metricsData.query.js.map +1 -0
- package/.dist/graphql/queries/order.query.js +1 -0
- package/.dist/graphql/queries/order.query.js.map +1 -1
- package/.dist/graphql/queries/publicEvent.query.js +1 -0
- package/.dist/graphql/queries/publicEvent.query.js.map +1 -1
- package/.dist/graphql/queries/userProfile.query.js +3 -2
- package/.dist/graphql/queries/userProfile.query.js.map +1 -1
- package/.dist/interfaces/ICreateOrderParams.d.ts +3 -2
- package/.dist/interfaces/IMetricData.d.ts +57 -0
- package/.dist/interfaces/IMetricData.js +70 -0
- package/.dist/interfaces/IMetricData.js.map +1 -0
- package/.dist/interfaces/IOrder.d.ts +2 -2
- package/.dist/interfaces/IStripe.d.ts +9 -0
- package/.dist/interfaces/{ISecondaryEmail.js → IStripe.js} +1 -1
- package/.dist/interfaces/IStripe.js.map +1 -0
- package/.dist/interfaces/IStripeCustomer.d.ts +2 -2
- package/.dist/interfaces/IStripePaymentMethod.d.ts +10 -0
- package/.dist/interfaces/IStripePaymentMethod.js +3 -0
- package/.dist/interfaces/IStripePaymentMethod.js.map +1 -0
- package/.dist/interfaces/IStripeSource.d.ts +1 -1
- package/.dist/schemas/Order.d.ts +4 -4
- package/.dist/schemas/Order.js +4 -4
- package/.dist/schemas/Order.js.map +1 -1
- package/.dist/sellout-proto.js +5554 -3087
- package/.dist/utils/MetricsUtil.d.ts +7 -0
- package/.dist/utils/MetricsUtil.js +29 -0
- package/.dist/utils/MetricsUtil.js.map +1 -0
- package/.dist/utils/PaymentUtil.js +6 -6
- package/.dist/utils/PaymentUtil.js.map +1 -1
- package/.dist/utils/fee-util-broken-but-why.d.ts +8 -0
- package/.dist/utils/fee-util-broken-but-why.js +38 -0
- package/.dist/utils/fee-util-broken-but-why.js.map +1 -0
- package/package.json +4 -4
- package/src/enums/OrderChannelEnum.ts +4 -0
- package/src/enums/OrderItemTypeEnum.ts +4 -0
- package/src/graphql/fragments/order.fragment.ts +2 -0
- package/src/graphql/mutations/attachStripePaymentMethod.mutation.ts +10 -1
- package/src/graphql/mutations/breakApartOrder.ts +1 -8
- package/src/graphql/mutations/createOrder.mutation.ts +0 -3
- package/src/graphql/mutations/createOrderPaymentIntent.mutation.ts +12 -0
- package/src/graphql/mutations/register.mutation.ts +2 -9
- package/src/graphql/queries/order.query.ts +1 -0
- package/src/graphql/queries/publicEvent.query.ts +1 -0
- package/src/graphql/queries/userProfile.query.ts +3 -2
- package/src/interfaces/ICreateOrderParams.ts +3 -2
- package/src/interfaces/IOrder.ts +2 -2
- package/src/interfaces/IStripeCustomer.ts +2 -2
- package/src/interfaces/{IStripeSource.ts → IStripePaymentMethod.ts} +2 -2
- package/src/proto/order.proto +45 -13
- package/src/proto/stripe.proto +38 -3
- package/src/schemas/Order.ts +4 -4
- package/src/utils/PaymentUtil.ts +6 -7
- package/.dist/graphql/mutations/setUserOrgContextId.js.map +0 -1
- package/.dist/graphql/queries/customerProfile.js +0 -42
- package/.dist/graphql/queries/customerProfile.js.map +0 -1
- package/.dist/graphql/queries/organization.query.js +0 -49
- package/.dist/graphql/queries/organization.query.js.map +0 -1
- package/.dist/graphql/queries/organizations.js +0 -49
- package/.dist/graphql/queries/organizations.js.map +0 -1
- package/.dist/interfaces/ISecondaryEmail.d.ts +0 -4
- package/.dist/interfaces/ISecondaryEmail.js.map +0 -1
- package/.dist/schemas/SecondaryEmail.d.ts +0 -12
- package/.dist/schemas/SecondaryEmail.js +0 -14
- package/.dist/schemas/SecondaryEmail.js.map +0 -1
- package/src/enums/OrderDeliveryMethodEnum.ts +0 -5
- /package/.dist/graphql/mutations/{setUserOrgContextId.d.ts → createOrderPaymentIntent.mutation.d.ts} +0 -0
- /package/.dist/graphql/{queries/customerProfile.d.ts → mutations/verifyPhoneAuthentication.mutation.d.ts} +0 -0
- /package/.dist/graphql/{queries/organization.query.d.ts → mutations/verifyUserPhoneAuthentication.d.ts} +0 -0
- /package/.dist/graphql/queries/{organizations.d.ts → metrics.query.d.ts} +0 -0
package/src/utils/PaymentUtil.ts
CHANGED
|
@@ -74,7 +74,7 @@ export default {
|
|
|
74
74
|
// const maxFee = fee.maxAppliedToPrice || Infinity;
|
|
75
75
|
|
|
76
76
|
// if (minFee <= price && price <= maxFee) {
|
|
77
|
-
|
|
77
|
+
// console.log(fee);
|
|
78
78
|
// if (fee.type === FeeTypeEnum.Flat) {
|
|
79
79
|
// return price - fee.value;
|
|
80
80
|
// } if (fee.type === FeeTypeEnum.Percent) {
|
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
|
|
109
109
|
// tickets = tickets.map((ticket: ICreateOrderTicketParams): ICreateOrderTicketParams => {
|
|
110
110
|
// const price = Math.floor(calculateTicketPrice(ticket));
|
|
111
|
-
|
|
111
|
+
// console.log(`Ticket Price: `, price);
|
|
112
112
|
// return {
|
|
113
113
|
// ...ticket,
|
|
114
114
|
// price,
|
|
@@ -130,7 +130,6 @@ export default {
|
|
|
130
130
|
// };
|
|
131
131
|
// },
|
|
132
132
|
calculateTotal(params: IPaymentCalculatorParams): number {
|
|
133
|
-
|
|
134
133
|
let {
|
|
135
134
|
tickets = [],
|
|
136
135
|
upgrades = [],
|
|
@@ -221,7 +220,7 @@ export default {
|
|
|
221
220
|
const ticketFeeTotal = tickets.reduce((cur, ticket) => {
|
|
222
221
|
return cur + ticketFees.reduce((cur, fee) => {
|
|
223
222
|
const value = cur + applyTicketFee(ticket, fee);
|
|
224
|
-
console.log(`${fee.name}: ${value}`);
|
|
223
|
+
// console.log(`${fee.name}: ${value}`);
|
|
225
224
|
return value;
|
|
226
225
|
}, 0);
|
|
227
226
|
}, 0);
|
|
@@ -232,15 +231,15 @@ export default {
|
|
|
232
231
|
return cur + upgradeFees.reduce((cur, fee) => cur + applyUpgradeFee(upgrade, fee), 0);
|
|
233
232
|
}, 0);
|
|
234
233
|
|
|
235
|
-
const orderSubtotal = ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal;
|
|
234
|
+
const orderSubtotal = Math.round(ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal);
|
|
236
235
|
|
|
237
|
-
console.log(`Order SubTotal:`, orderSubtotal);
|
|
236
|
+
// console.log(`Order SubTotal:`, orderSubtotal);
|
|
238
237
|
|
|
239
238
|
const orderTotal = orderFees.reduce((cur, fee) => {
|
|
240
239
|
return applyOrderFee(cur, fee);
|
|
241
240
|
}, orderSubtotal);
|
|
242
241
|
|
|
243
|
-
console.log(`Order Total`, orderTotal);
|
|
242
|
+
// console.log(`Order Total`, orderTotal);
|
|
244
243
|
|
|
245
244
|
return orderTotal;
|
|
246
245
|
}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +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 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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +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 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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +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 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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISecondaryEmail.js","sourceRoot":"","sources":["../../src/interfaces/ISecondaryEmail.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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/graphql/mutations/{setUserOrgContextId.d.ts → createOrderPaymentIntent.mutation.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|