@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
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -56,7 +56,7 @@ exports.default = {
|
|
|
56
56
|
// const minFee = fee.minAppliedToPrice || 0;
|
|
57
57
|
// const maxFee = fee.maxAppliedToPrice || Infinity;
|
|
58
58
|
// if (minFee <= price && price <= maxFee) {
|
|
59
|
-
//
|
|
59
|
+
// console.log(fee);
|
|
60
60
|
// if (fee.type === FeeTypeEnum.Flat) {
|
|
61
61
|
// return price - fee.value;
|
|
62
62
|
// } if (fee.type === FeeTypeEnum.Percent) {
|
|
@@ -81,7 +81,7 @@ exports.default = {
|
|
|
81
81
|
// }
|
|
82
82
|
// tickets = tickets.map((ticket: ICreateOrderTicketParams): ICreateOrderTicketParams => {
|
|
83
83
|
// const price = Math.floor(calculateTicketPrice(ticket));
|
|
84
|
-
//
|
|
84
|
+
// console.log(`Ticket Price: `, price);
|
|
85
85
|
// return {
|
|
86
86
|
// ...ticket,
|
|
87
87
|
// price,
|
|
@@ -178,7 +178,7 @@ exports.default = {
|
|
|
178
178
|
const ticketFeeTotal = tickets.reduce((cur, ticket) => {
|
|
179
179
|
return cur + ticketFees.reduce((cur, fee) => {
|
|
180
180
|
const value = cur + applyTicketFee(ticket, fee);
|
|
181
|
-
console.log(`${fee.name}: ${value}`);
|
|
181
|
+
// console.log(`${fee.name}: ${value}`);
|
|
182
182
|
return value;
|
|
183
183
|
}, 0);
|
|
184
184
|
}, 0);
|
|
@@ -186,12 +186,12 @@ exports.default = {
|
|
|
186
186
|
const upgradeFeeTotal = upgrades.reduce((cur, upgrade) => {
|
|
187
187
|
return cur + upgradeFees.reduce((cur, fee) => cur + applyUpgradeFee(upgrade, fee), 0);
|
|
188
188
|
}, 0);
|
|
189
|
-
const orderSubtotal = ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal;
|
|
190
|
-
console.log(`Order SubTotal:`, orderSubtotal);
|
|
189
|
+
const orderSubtotal = Math.round(ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal);
|
|
190
|
+
// console.log(`Order SubTotal:`, orderSubtotal);
|
|
191
191
|
const orderTotal = orderFees.reduce((cur, fee) => {
|
|
192
192
|
return applyOrderFee(cur, fee);
|
|
193
193
|
}, orderSubtotal);
|
|
194
|
-
console.log(`Order Total`, orderTotal);
|
|
194
|
+
// console.log(`Order Total`, orderTotal);
|
|
195
195
|
return orderTotal;
|
|
196
196
|
}
|
|
197
197
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentUtil.js","sourceRoot":"","sources":["../../src/utils/PaymentUtil.ts"],"names":[],"mappings":";;AACA,6CAAyF;AACzF,0EAAuE;AAUvE,0BAA0B;AAC1B,yCAAyC;AACzC,2CAA2C;AAC3C,IAAI;AAEJ,kBAAe;IACb,qCAAqC;IACrC,4EAA4E;IAE5E,UAAU;IACV,qBAAqB;IACrB,qBAAqB;IACrB,iBAAiB;IACjB,yBAAyB;IACzB,gBAAgB;IAGhB,mBAAmB;IACnB,wCAAwC;IACxC,8DAA8D;IAC9D,sIAAsI;IACtI,sBAAsB;IACtB,QAAQ;IAER,4DAA4D;IAC5D,oIAAoI;IACpI,sBAAsB;IACtB,QAAQ;IAER,mBAAmB;IACnB,QAAQ;IAER,iFAAiF;IACjF,4BAA4B;IAC5B,kDAAkD;IAClD,uBAAuB;IACvB,UAAU;IACV,oFAAoF;IACpF,mFAAmF;IACnF,+EAA+E;IAC/E,0BAA0B;IAC1B,mDAAmD;IACnD,qBAAqB;IACrB,OAAO;IACP,kBAAkB;IAClB,0CAA0C;IAC1C,iBAAiB;IACjB,kBAAkB;IAClB,6CAA6C;IAC7C,UAAU;IACV,QAAQ;IACR,uBAAuB;IACvB,QAAQ;IAER,sGAAsG;IACtG,4BAA4B;IAC5B,wFAAwF;IACxF,sBAAsB;IACtB,QAAQ;IAER,iDAAiD;IACjD,wDAAwD;IAExD,gDAAgD;
|
|
1
|
+
{"version":3,"file":"PaymentUtil.js","sourceRoot":"","sources":["../../src/utils/PaymentUtil.ts"],"names":[],"mappings":";;AACA,6CAAyF;AACzF,0EAAuE;AAUvE,0BAA0B;AAC1B,yCAAyC;AACzC,2CAA2C;AAC3C,IAAI;AAEJ,kBAAe;IACb,qCAAqC;IACrC,4EAA4E;IAE5E,UAAU;IACV,qBAAqB;IACrB,qBAAqB;IACrB,iBAAiB;IACjB,yBAAyB;IACzB,gBAAgB;IAGhB,mBAAmB;IACnB,wCAAwC;IACxC,8DAA8D;IAC9D,sIAAsI;IACtI,sBAAsB;IACtB,QAAQ;IAER,4DAA4D;IAC5D,oIAAoI;IACpI,sBAAsB;IACtB,QAAQ;IAER,mBAAmB;IACnB,QAAQ;IAER,iFAAiF;IACjF,4BAA4B;IAC5B,kDAAkD;IAClD,uBAAuB;IACvB,UAAU;IACV,oFAAoF;IACpF,mFAAmF;IACnF,+EAA+E;IAC/E,0BAA0B;IAC1B,mDAAmD;IACnD,qBAAqB;IACrB,OAAO;IACP,kBAAkB;IAClB,0CAA0C;IAC1C,iBAAiB;IACjB,kBAAkB;IAClB,6CAA6C;IAC7C,UAAU;IACV,QAAQ;IACR,uBAAuB;IACvB,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AG,cAAc,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC;QAEhG,iDAAiD;QAEjD,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC/C,OAAO,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC,EAAE,aAAa,CAAC,CAAC;QAElB,0CAA0C;QAE1C,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"author": "samheutmaker@gmail.com",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@sellout/service": "^0.0.
|
|
20
|
-
"@sellout/utils": "^0.0.
|
|
19
|
+
"@sellout/service": "^0.0.65",
|
|
20
|
+
"@sellout/utils": "^0.0.65",
|
|
21
21
|
"@types/shortid": "0.0.29",
|
|
22
22
|
"apollo-link-debounce": "^2.1.0",
|
|
23
23
|
"graphql": "^14.6.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"protobufjs": "~6.10.1",
|
|
31
31
|
"typescript": "^3.8.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "3583bb33aa76ed973c7253a31eeb39d3f1206f36"
|
|
34
34
|
}
|
|
@@ -2,7 +2,16 @@ import gql from 'graphql-tag';
|
|
|
2
2
|
|
|
3
3
|
const mutation = gql`
|
|
4
4
|
mutation attachStripePaymentMethod($paymentMethodId: String!) {
|
|
5
|
-
attachStripePaymentMethod(paymentMethodId: $paymentMethodId)
|
|
5
|
+
attachStripePaymentMethod(paymentMethodId: $paymentMethodId) {
|
|
6
|
+
paymentMethodId
|
|
7
|
+
brand
|
|
8
|
+
last4
|
|
9
|
+
expMonth
|
|
10
|
+
expYear
|
|
11
|
+
funding
|
|
12
|
+
country
|
|
13
|
+
type
|
|
14
|
+
}
|
|
6
15
|
}
|
|
7
16
|
`;
|
|
8
17
|
|
|
@@ -8,17 +8,13 @@ const mutation = gql`
|
|
|
8
8
|
event {
|
|
9
9
|
_id
|
|
10
10
|
name
|
|
11
|
-
|
|
12
|
-
sendQRCode
|
|
11
|
+
subtitle
|
|
13
12
|
performances {
|
|
14
13
|
schedule {
|
|
15
14
|
doorsAt
|
|
16
15
|
startsAt
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
schedule {
|
|
20
|
-
startsAt
|
|
21
|
-
}
|
|
22
18
|
venue {
|
|
23
19
|
name
|
|
24
20
|
address {
|
|
@@ -31,9 +27,6 @@ const mutation = gql`
|
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
29
|
state
|
|
34
|
-
refundedAmount
|
|
35
|
-
refundReason
|
|
36
|
-
promotionCode
|
|
37
30
|
type
|
|
38
31
|
...OrderTickets
|
|
39
32
|
...OrderUpgrades
|
|
@@ -3,8 +3,6 @@ import gql from 'graphql-tag';
|
|
|
3
3
|
const mutation = gql`
|
|
4
4
|
mutation createOrder($params: OrderInput!) {
|
|
5
5
|
createOrder(params: $params) {
|
|
6
|
-
clientSecret
|
|
7
|
-
order {
|
|
8
6
|
_id
|
|
9
7
|
userId
|
|
10
8
|
orgId
|
|
@@ -48,7 +46,6 @@ const mutation = gql`
|
|
|
48
46
|
scannedBy
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
}
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
`;
|
|
@@ -3,15 +3,8 @@ import gql from 'graphql-tag';
|
|
|
3
3
|
const mutation = gql`
|
|
4
4
|
mutation Register($user: UserInput!) {
|
|
5
5
|
register(user: $user) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
firstName
|
|
9
|
-
lastName
|
|
10
|
-
email
|
|
11
|
-
phoneNumber
|
|
12
|
-
createdAt
|
|
13
|
-
}
|
|
14
|
-
token
|
|
6
|
+
registered
|
|
7
|
+
emailVerified
|
|
15
8
|
}
|
|
16
9
|
}
|
|
17
10
|
`;
|
|
@@ -4,6 +4,7 @@ const query = gql`
|
|
|
4
4
|
query userProfile {
|
|
5
5
|
userProfile {
|
|
6
6
|
user {
|
|
7
|
+
_id
|
|
7
8
|
firstName
|
|
8
9
|
lastName
|
|
9
10
|
phoneNumber
|
|
@@ -11,8 +12,8 @@ const query = gql`
|
|
|
11
12
|
}
|
|
12
13
|
stripeCustomerId
|
|
13
14
|
stripeCustomer {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
paymentMethods {
|
|
16
|
+
paymentMethodId
|
|
16
17
|
brand
|
|
17
18
|
last4
|
|
18
19
|
expMonth
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import IOrderCustomField from "../interfaces/IOrderCustomField";
|
|
2
2
|
import { OrderTypeEnum } from "../interfaces/IOrderType";
|
|
3
|
-
import {
|
|
3
|
+
import { OrderChannelEnum } from '../enums/OrderChannelEnum';
|
|
4
4
|
import { PaymentMethodTypeEnum } from '../enums/PaymentMethodTypeEnum';
|
|
5
5
|
|
|
6
6
|
export default interface ICreateOrderParams {
|
|
@@ -10,10 +10,11 @@ export default interface ICreateOrderParams {
|
|
|
10
10
|
tickets: ICreateOrderTicketParams[];
|
|
11
11
|
upgrades: ICreateOrderUpgradeParams[];
|
|
12
12
|
type: OrderTypeEnum;
|
|
13
|
+
channel: OrderChannelEnum;
|
|
13
14
|
promotionCode: string;
|
|
14
15
|
customFields: IOrderCustomField[];
|
|
15
|
-
deliveryMethod: OrderDeliveryMethodEnum;
|
|
16
16
|
paymentMethodType: PaymentMethodTypeEnum;
|
|
17
|
+
paymentIntentId: string;
|
|
17
18
|
holdToken?: string;
|
|
18
19
|
}
|
|
19
20
|
|
package/src/interfaces/IOrder.ts
CHANGED
|
@@ -5,7 +5,7 @@ import IOrderUpgrade from './IOrderUpgrade';
|
|
|
5
5
|
import IOrderCustomField from './IOrderCustomField'
|
|
6
6
|
import { OrderStateEnum } from './IOrderState';
|
|
7
7
|
import { OrderTypeEnum } from './IOrderType';
|
|
8
|
-
import {
|
|
8
|
+
import { OrderChannelEnum } from '../enums/OrderChannelEnum';
|
|
9
9
|
|
|
10
10
|
export default interface IOrder {
|
|
11
11
|
_id?: string;
|
|
@@ -25,6 +25,7 @@ export default interface IOrder {
|
|
|
25
25
|
state?: OrderStateEnum,
|
|
26
26
|
refundedAmount?: number; // BACKFILL
|
|
27
27
|
type?: OrderTypeEnum;
|
|
28
|
+
channel: OrderChannelEnum,
|
|
28
29
|
createdAt?: number;
|
|
29
30
|
createdBy?: string;
|
|
30
31
|
promotionCode?: string;
|
|
@@ -33,5 +34,4 @@ export default interface IOrder {
|
|
|
33
34
|
customFields?: IOrderCustomField[];
|
|
34
35
|
refundReason?: string; // BACKFILL
|
|
35
36
|
payments: IPayment[];
|
|
36
|
-
deliveryMethod: OrderDeliveryMethodEnum,
|
|
37
37
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import IStripePaymentMethod from './IStripePaymentMethod';
|
|
2
2
|
|
|
3
3
|
export default interface IStripeCustomer {
|
|
4
4
|
stripeCustomerId: string;
|
|
5
5
|
email: string;
|
|
6
|
-
|
|
6
|
+
paymentMethods: IStripePaymentMethod[];
|
|
7
7
|
}
|
package/src/proto/order.proto
CHANGED
|
@@ -25,14 +25,14 @@ message Order {
|
|
|
25
25
|
string state = 14;
|
|
26
26
|
int32 refundedAmount = 15;
|
|
27
27
|
string type = 16;
|
|
28
|
-
string
|
|
29
|
-
string
|
|
30
|
-
string
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
string channel = 17;
|
|
29
|
+
string createdBy = 18;
|
|
30
|
+
string promotionCode = 19;
|
|
31
|
+
string ipAddress = 20;
|
|
32
|
+
Address address = 21;
|
|
33
|
+
repeated OrderCustomField customFields = 22;
|
|
34
|
+
string refundReason = 23;
|
|
35
|
+
repeated Payment payments = 24;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
message OrderTicket {
|
|
@@ -47,6 +47,7 @@ message OrderTicket {
|
|
|
47
47
|
Refund refund = 8;
|
|
48
48
|
Scan scan = 9;
|
|
49
49
|
string state = 10;
|
|
50
|
+
string qrCodeUrl = 11;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
message OrderUpgrade {
|
|
@@ -59,6 +60,7 @@ message OrderUpgrade {
|
|
|
59
60
|
Refund refund = 6;
|
|
60
61
|
Scan scan = 7;
|
|
61
62
|
string state = 8;
|
|
63
|
+
string qrCodeUrl = 9;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
message Scan {
|
|
@@ -106,12 +108,13 @@ message CreateOrderParams {
|
|
|
106
108
|
repeated CreateOrderTicketParams tickets = 3;
|
|
107
109
|
repeated CreateOrderUpgradeParams upgrades = 4;
|
|
108
110
|
string type = 5;
|
|
109
|
-
string
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
string channel = 6;
|
|
112
|
+
string promotionCode = 7;
|
|
113
|
+
repeated OrderCustomField customFields = 8;
|
|
112
114
|
string paymentMethodType = 9;
|
|
113
|
-
string
|
|
114
|
-
string
|
|
115
|
+
string paymentIntentId = 10;
|
|
116
|
+
string holdToken = 11;
|
|
117
|
+
string ipAddress = 12;
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
message CreateOrderTicketParams {
|
|
@@ -139,6 +142,34 @@ message CreateOrderResponse {
|
|
|
139
142
|
StatusCode status = 1;
|
|
140
143
|
repeated Error errors = 2;
|
|
141
144
|
Order order = 3;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/****************************************************************************************
|
|
148
|
+
Create Order Payment Intent
|
|
149
|
+
****************************************************************************************/
|
|
150
|
+
|
|
151
|
+
message CreateOrderPaymentIntentParams {
|
|
152
|
+
string userId = 0;
|
|
153
|
+
string orgId = 1;
|
|
154
|
+
string eventId = 2;
|
|
155
|
+
repeated CreateOrderTicketParams tickets = 3;
|
|
156
|
+
repeated CreateOrderUpgradeParams upgrades = 4;
|
|
157
|
+
string promotionCode = 5;
|
|
158
|
+
string paymentMethodType = 6;
|
|
159
|
+
string paymentMethodId = 7;
|
|
160
|
+
string stalePaymentIntentId = 8;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
message CreateOrderPaymentIntentRequest {
|
|
164
|
+
string spanContext = 0;
|
|
165
|
+
string requestorId = 1;
|
|
166
|
+
CreateOrderPaymentIntentParams params = 2;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
message CreateOrderPaymentIntentResponse {
|
|
170
|
+
StatusCode status = 1;
|
|
171
|
+
repeated Error errors = 2;
|
|
172
|
+
string paymentIntentId = 3;
|
|
142
173
|
string clientSecret = 4;
|
|
143
174
|
}
|
|
144
175
|
|
|
@@ -345,6 +376,7 @@ message BreakApartOrderResponse {
|
|
|
345
376
|
service OrderService {
|
|
346
377
|
// Create
|
|
347
378
|
rpc createOrder(CreateOrderRequest) returns (CreateOrderResponse) {}
|
|
379
|
+
rpc createOrderPaymentIntent(CreateOrderPaymentIntentRequest) returns (CreateOrderPaymentIntentResponse) {}
|
|
348
380
|
// QR Code
|
|
349
381
|
rpc sendOrderQRCodeEmail(SendOrderQRCodeEmailRequest) returns (SendOrderQRCodeEmailResponse) {}
|
|
350
382
|
rpc sendOrderReceiptEmail(SendOrderReceiptEmailRequest) returns (SendOrderReceiptEmailResponse) {}
|
package/src/proto/stripe.proto
CHANGED
|
@@ -22,7 +22,7 @@ message StripeCharge {
|
|
|
22
22
|
message StripeCustomer {
|
|
23
23
|
string stripeCustomerId = 0;
|
|
24
24
|
string email = 1;
|
|
25
|
-
repeated
|
|
25
|
+
repeated StripePaymentMethod paymentMethods = 2;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
message StripeSource {
|
|
@@ -36,6 +36,17 @@ message StripeSource {
|
|
|
36
36
|
string type = 7;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
message StripePaymentMethod {
|
|
40
|
+
string paymentMethodId = 0;
|
|
41
|
+
string brand = 1;
|
|
42
|
+
string last4 = 2;
|
|
43
|
+
string expMonth = 3;
|
|
44
|
+
string expYear = 4;
|
|
45
|
+
string funding = 5;
|
|
46
|
+
string country = 6;
|
|
47
|
+
string type = 7;
|
|
48
|
+
}
|
|
49
|
+
|
|
39
50
|
/***************************************************************************************
|
|
40
51
|
Connect Account
|
|
41
52
|
****************************************************************************************/
|
|
@@ -122,7 +133,6 @@ message RetrieveStripeChargeResponse {
|
|
|
122
133
|
message CreateStripeCustomerRequest {
|
|
123
134
|
string spanContext = 0;
|
|
124
135
|
string userId = 1;
|
|
125
|
-
string stripeToken = 2;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
message CreateStripeCustomerResponse {
|
|
@@ -189,7 +199,7 @@ message AttachStripePaymentMethodRequest {
|
|
|
189
199
|
message AttachStripePaymentMethodResponse {
|
|
190
200
|
StatusCode status = 0;
|
|
191
201
|
repeated Error errors = 1;
|
|
192
|
-
|
|
202
|
+
StripePaymentMethod paymentMethod = 2;
|
|
193
203
|
}
|
|
194
204
|
|
|
195
205
|
/***************************************************************************************
|
|
@@ -210,6 +220,7 @@ message CreateStripePaymentIntentRequest {
|
|
|
210
220
|
int32 feeAmount = 5;
|
|
211
221
|
string description = 6;
|
|
212
222
|
string currency = 7;
|
|
223
|
+
string paymentMethodId = 8;
|
|
213
224
|
}
|
|
214
225
|
|
|
215
226
|
message CreateStripePaymentIntentResponse {
|
|
@@ -219,6 +230,28 @@ message CreateStripePaymentIntentResponse {
|
|
|
219
230
|
string clientSecret = 3;
|
|
220
231
|
}
|
|
221
232
|
|
|
233
|
+
message CaptureStripePaymentIntentRequest {
|
|
234
|
+
string spanContext = 0;
|
|
235
|
+
string orgId = 1;
|
|
236
|
+
string paymentIntentId = 2;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
message CaptureStripePaymentIntentResponse {
|
|
240
|
+
StatusCode status = 0;
|
|
241
|
+
repeated Error errors = 1;
|
|
242
|
+
bool success = 2;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
message CancelStripePaymentIntentRequest {
|
|
246
|
+
string spanContext = 0;
|
|
247
|
+
string paymentIntentId = 1;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
message CancelStripePaymentIntentResponse {
|
|
251
|
+
StatusCode status = 0;
|
|
252
|
+
repeated Error errors = 1;
|
|
253
|
+
}
|
|
254
|
+
|
|
222
255
|
/***************************************************************************************
|
|
223
256
|
Terminal
|
|
224
257
|
****************************************************************************************/
|
|
@@ -304,6 +337,8 @@ service StripeService {
|
|
|
304
337
|
rpc deleteStripeSource(DeleteStripeSourceRequest) returns (DeleteStripeSourceResponse) {}
|
|
305
338
|
// Payment Intent
|
|
306
339
|
rpc createStripePaymentIntent(CreateStripePaymentIntentRequest) returns (CreateStripePaymentIntentResponse) {}
|
|
340
|
+
rpc captureStripePaymentIntent(CaptureStripePaymentIntentRequest) returns (CaptureStripePaymentIntentResponse) {}
|
|
341
|
+
rpc cancelStripePaymentIntent(CancelStripePaymentIntentRequest) returns (CancelStripePaymentIntentResponse) {}
|
|
307
342
|
// Payment Method
|
|
308
343
|
rpc createStripeSetupIntent(CreateStripeSetupIntentRequest) returns (CreateStripeSetupIntentResponse) {}
|
|
309
344
|
rpc attachStripePaymentMethod(AttachStripePaymentMethodRequest) returns (AttachStripePaymentMethodResponse) {}
|
package/src/schemas/Order.ts
CHANGED
|
@@ -281,6 +281,10 @@ export default {
|
|
|
281
281
|
type: String,
|
|
282
282
|
required: false,
|
|
283
283
|
},
|
|
284
|
+
channel: {
|
|
285
|
+
type: String,
|
|
286
|
+
required: false,
|
|
287
|
+
},
|
|
284
288
|
promotionCode: {
|
|
285
289
|
type: String,
|
|
286
290
|
required: false,
|
|
@@ -290,10 +294,6 @@ export default {
|
|
|
290
294
|
type: String,
|
|
291
295
|
required: true,
|
|
292
296
|
},
|
|
293
|
-
deliveryMethod: {
|
|
294
|
-
type: String,
|
|
295
|
-
required: true,
|
|
296
|
-
},
|
|
297
297
|
address: Address,
|
|
298
298
|
customFields: [OrderCustomField],
|
|
299
299
|
payments: [Payment],
|