@chevre/domain 21.28.0 → 21.29.0-alpha.1
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/lib/chevre/repo/mongoose/schemas/order.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/reservation.js +1 -0
- package/lib/chevre/repo/order.d.ts +2 -4
- package/lib/chevre/repo/order.js +37 -37
- package/lib/chevre/service/assetTransaction/reserve/factory.js +12 -5
- package/lib/chevre/service/offer/event/factory.js +4 -4
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +7 -2
- package/lib/chevre/service/order/onOrderUpdated/factory.d.ts +1 -1
- package/lib/chevre/service/payment/any/factory.js +3 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +3 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +3 -1
- package/package.json +2 -2
|
@@ -32,7 +32,7 @@ const schemaDefinition = {
|
|
|
32
32
|
isGift: Boolean,
|
|
33
33
|
dateReturned: Date,
|
|
34
34
|
orderedItem: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
additionalProperty:
|
|
35
|
+
additionalProperty: mongoose_1.SchemaTypes.Mixed // 追加(2023-02-13~) // 廃止(2024-04-12~)
|
|
36
36
|
};
|
|
37
37
|
const schemaOptions = {
|
|
38
38
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
@@ -69,12 +69,10 @@ export declare class MongoRepository {
|
|
|
69
69
|
/**
|
|
70
70
|
* 変更可能な属性を更新する
|
|
71
71
|
*/
|
|
72
|
-
updateChangeableAttributes(params: {
|
|
72
|
+
updateChangeableAttributes(params: Pick<factory.order.IOrder, 'name'> & {
|
|
73
73
|
project: {
|
|
74
74
|
id: string;
|
|
75
75
|
};
|
|
76
|
-
additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
77
|
-
name?: string;
|
|
78
76
|
orderNumber: string;
|
|
79
77
|
}): Promise<{
|
|
80
78
|
updatedAt: Date;
|
|
@@ -144,7 +142,7 @@ export declare class MongoRepository {
|
|
|
144
142
|
})[]>;
|
|
145
143
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
146
144
|
unsetUnnecessaryFields(params: {
|
|
147
|
-
filter: FilterQuery<
|
|
145
|
+
filter: FilterQuery<factory.order.IOrder>;
|
|
148
146
|
$unset: any;
|
|
149
147
|
}): Promise<import("mongodb").UpdateResult>;
|
|
150
148
|
}
|
package/lib/chevre/repo/order.js
CHANGED
|
@@ -23,7 +23,7 @@ class MongoRepository {
|
|
|
23
23
|
}
|
|
24
24
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
25
25
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
|
|
27
27
|
const andConditions = [
|
|
28
28
|
{ typeOf: { $eq: factory.order.OrderType.Order } }
|
|
29
29
|
];
|
|
@@ -31,22 +31,22 @@ class MongoRepository {
|
|
|
31
31
|
if (typeof projectIdEq === 'string') {
|
|
32
32
|
andConditions.push({ 'project.id': { $eq: projectIdEq } });
|
|
33
33
|
}
|
|
34
|
-
const additionalPropertyAll =
|
|
35
|
-
if (Array.isArray(additionalPropertyAll)) {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
const additionalPropertyIn =
|
|
39
|
-
if (Array.isArray(additionalPropertyIn)) {
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
const additionalPropertyNin =
|
|
43
|
-
if (Array.isArray(additionalPropertyNin)) {
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
const additionalPropertyElemMatch =
|
|
47
|
-
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
48
|
-
|
|
49
|
-
}
|
|
34
|
+
// const additionalPropertyAll = params.additionalProperty?.$all; // 廃止(2024-04-12~)
|
|
35
|
+
// if (Array.isArray(additionalPropertyAll)) {
|
|
36
|
+
// andConditions.push({ additionalProperty: { $exists: true, $all: additionalPropertyAll } });
|
|
37
|
+
// }
|
|
38
|
+
// const additionalPropertyIn = params.additionalProperty?.$in; // 廃止(2024-04-12~)
|
|
39
|
+
// if (Array.isArray(additionalPropertyIn)) {
|
|
40
|
+
// andConditions.push({ additionalProperty: { $exists: true, $in: additionalPropertyIn } });
|
|
41
|
+
// }
|
|
42
|
+
// const additionalPropertyNin = params.additionalProperty?.$nin; // 廃止(2024-04-12~)
|
|
43
|
+
// if (Array.isArray(additionalPropertyNin)) {
|
|
44
|
+
// andConditions.push({ additionalProperty: { $nin: additionalPropertyNin } });
|
|
45
|
+
// }
|
|
46
|
+
// const additionalPropertyElemMatch = params.additionalProperty?.$elemMatch; // 廃止(2024-04-12~)
|
|
47
|
+
// if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
48
|
+
// andConditions.push({ additionalProperty: { $exists: true, $elemMatch: additionalPropertyElemMatch } });
|
|
49
|
+
// }
|
|
50
50
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
51
51
|
/* istanbul ignore else */
|
|
52
52
|
if (params.identifier !== undefined) {
|
|
@@ -71,15 +71,15 @@ class MongoRepository {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const providerIdEq = (
|
|
74
|
+
const providerIdEq = (_d = (_c = params.provider) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
|
|
75
75
|
if (typeof providerIdEq === 'string') {
|
|
76
76
|
andConditions.push({ 'seller.id': { $exists: true, $eq: providerIdEq } });
|
|
77
77
|
}
|
|
78
|
-
const sellerIdEq = (
|
|
78
|
+
const sellerIdEq = (_f = (_e = params.seller) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.$eq;
|
|
79
79
|
if (typeof sellerIdEq === 'string') {
|
|
80
80
|
andConditions.push({ 'seller.id': { $exists: true, $eq: sellerIdEq } });
|
|
81
81
|
}
|
|
82
|
-
const sellerIds = (
|
|
82
|
+
const sellerIds = (_g = params.seller) === null || _g === void 0 ? void 0 : _g.ids;
|
|
83
83
|
if (Array.isArray(sellerIds)) {
|
|
84
84
|
andConditions.push({ 'seller.id': { $exists: true, $in: sellerIds } });
|
|
85
85
|
}
|
|
@@ -87,7 +87,7 @@ class MongoRepository {
|
|
|
87
87
|
// if (typeof params.seller?.typeOf === 'string') {
|
|
88
88
|
// andConditions.push({ 'seller.typeOf': { $exists: true, $eq: params.seller.typeOf } });
|
|
89
89
|
// }
|
|
90
|
-
const brokerIdEq = (
|
|
90
|
+
const brokerIdEq = (_j = (_h = params.broker) === null || _h === void 0 ? void 0 : _h.id) === null || _j === void 0 ? void 0 : _j.$eq;
|
|
91
91
|
if (typeof brokerIdEq === 'string') {
|
|
92
92
|
andConditions.push({
|
|
93
93
|
'broker.id': {
|
|
@@ -304,7 +304,7 @@ class MongoRepository {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
const nameEq = (
|
|
307
|
+
const nameEq = (_k = params.name) === null || _k === void 0 ? void 0 : _k.$eq;
|
|
308
308
|
if (typeof nameEq === 'string') {
|
|
309
309
|
andConditions.push({
|
|
310
310
|
name: {
|
|
@@ -313,7 +313,7 @@ class MongoRepository {
|
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
const nameRegex = (
|
|
316
|
+
const nameRegex = (_l = params.name) === null || _l === void 0 ? void 0 : _l.$regex;
|
|
317
317
|
if (typeof nameRegex === 'string' && nameRegex.length > 0) {
|
|
318
318
|
andConditions.push({
|
|
319
319
|
name: {
|
|
@@ -346,19 +346,19 @@ class MongoRepository {
|
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
const orderedItemSize = (
|
|
349
|
+
const orderedItemSize = (_m = params.orderedItem) === null || _m === void 0 ? void 0 : _m.$size;
|
|
350
350
|
if (typeof orderedItemSize === 'number') {
|
|
351
351
|
andConditions.push({ orderedItem: { $size: orderedItemSize } });
|
|
352
352
|
}
|
|
353
|
-
const acceptedOffersSize = (
|
|
353
|
+
const acceptedOffersSize = (_o = params.acceptedOffers) === null || _o === void 0 ? void 0 : _o.$size;
|
|
354
354
|
if (typeof acceptedOffersSize === 'number') {
|
|
355
355
|
andConditions.push({ acceptedOffers: { $size: acceptedOffersSize } });
|
|
356
356
|
}
|
|
357
|
-
const serialNumberEq = (
|
|
357
|
+
const serialNumberEq = (_q = (_p = params.acceptedOffers) === null || _p === void 0 ? void 0 : _p.serialNumber) === null || _q === void 0 ? void 0 : _q.$eq;
|
|
358
358
|
if (typeof serialNumberEq === 'string') {
|
|
359
359
|
andConditions.push({ 'acceptedOffers.serialNumber': { $exists: true, $eq: serialNumberEq } });
|
|
360
360
|
}
|
|
361
|
-
const itemOfferedIdentifierIn = (
|
|
361
|
+
const itemOfferedIdentifierIn = (_t = (_s = (_r = params.acceptedOffers) === null || _r === void 0 ? void 0 : _r.itemOffered) === null || _s === void 0 ? void 0 : _s.identifier) === null || _t === void 0 ? void 0 : _t.$in;
|
|
362
362
|
if (Array.isArray(itemOfferedIdentifierIn)) {
|
|
363
363
|
andConditions.push({
|
|
364
364
|
'acceptedOffers.itemOffered.identifier': {
|
|
@@ -367,7 +367,7 @@ class MongoRepository {
|
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
const itemOfferedTypeOfIn = (
|
|
370
|
+
const itemOfferedTypeOfIn = (_w = (_v = (_u = params.acceptedOffers) === null || _u === void 0 ? void 0 : _u.itemOffered) === null || _v === void 0 ? void 0 : _v.typeOf) === null || _w === void 0 ? void 0 : _w.$in;
|
|
371
371
|
if (Array.isArray(itemOfferedTypeOfIn)) {
|
|
372
372
|
andConditions.push({
|
|
373
373
|
'acceptedOffers.itemOffered.typeOf': {
|
|
@@ -376,7 +376,7 @@ class MongoRepository {
|
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
const itemOfferedIssuedThroughTypeOfEq = (
|
|
379
|
+
const itemOfferedIssuedThroughTypeOfEq = (_0 = (_z = (_y = (_x = params.acceptedOffers) === null || _x === void 0 ? void 0 : _x.itemOffered) === null || _y === void 0 ? void 0 : _y.issuedThrough) === null || _z === void 0 ? void 0 : _z.typeOf) === null || _0 === void 0 ? void 0 : _0.$eq;
|
|
380
380
|
if (typeof itemOfferedIssuedThroughTypeOfEq === 'string') {
|
|
381
381
|
andConditions.push({
|
|
382
382
|
'acceptedOffers.itemOffered.issuedThrough.typeOf': {
|
|
@@ -385,7 +385,7 @@ class MongoRepository {
|
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
-
const itemOfferedIssuedThroughIdIn = (
|
|
388
|
+
const itemOfferedIssuedThroughIdIn = (_4 = (_3 = (_2 = (_1 = params.acceptedOffers) === null || _1 === void 0 ? void 0 : _1.itemOffered) === null || _2 === void 0 ? void 0 : _2.issuedThrough) === null || _3 === void 0 ? void 0 : _3.id) === null || _4 === void 0 ? void 0 : _4.$in;
|
|
389
389
|
if (Array.isArray(itemOfferedIssuedThroughIdIn)) {
|
|
390
390
|
andConditions.push({
|
|
391
391
|
'acceptedOffers.itemOffered.issuedThrough.id': {
|
|
@@ -394,7 +394,7 @@ class MongoRepository {
|
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
const itemOfferedProgramMembershipUsedIdentifierEq = (
|
|
397
|
+
const itemOfferedProgramMembershipUsedIdentifierEq = (_8 = (_7 = (_6 = (_5 = params.acceptedOffers) === null || _5 === void 0 ? void 0 : _5.itemOffered) === null || _6 === void 0 ? void 0 : _6.programMembershipUsed) === null || _7 === void 0 ? void 0 : _7.identifier) === null || _8 === void 0 ? void 0 : _8.$eq;
|
|
398
398
|
if (typeof itemOfferedProgramMembershipUsedIdentifierEq === 'string') {
|
|
399
399
|
andConditions.push({
|
|
400
400
|
'acceptedOffers.itemOffered.programMembershipUsed.identifier': {
|
|
@@ -403,7 +403,7 @@ class MongoRepository {
|
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
-
const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq = (
|
|
406
|
+
const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq = (_14 = (_13 = (_12 = (_11 = (_10 = (_9 = params.acceptedOffers) === null || _9 === void 0 ? void 0 : _9.itemOffered) === null || _10 === void 0 ? void 0 : _10.programMembershipUsed) === null || _11 === void 0 ? void 0 : _11.issuedThrough) === null || _12 === void 0 ? void 0 : _12.serviceType) === null || _13 === void 0 ? void 0 : _13.codeValue) === null || _14 === void 0 ? void 0 : _14.$eq;
|
|
407
407
|
if (typeof itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
|
|
408
408
|
andConditions.push({
|
|
409
409
|
'acceptedOffers.itemOffered.programMembershipUsed.issuedThrough.serviceType.codeValue': {
|
|
@@ -565,11 +565,11 @@ class MongoRepository {
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
const paymentMethodIdentifierIn = (
|
|
568
|
+
const paymentMethodIdentifierIn = (_17 = (_16 = (_15 = params.paymentMethods) === null || _15 === void 0 ? void 0 : _15.paymentMethod) === null || _16 === void 0 ? void 0 : _16.identifier) === null || _17 === void 0 ? void 0 : _17.$in;
|
|
569
569
|
if (Array.isArray(paymentMethodIdentifierIn)) {
|
|
570
570
|
andConditions.push({ 'paymentMethods.paymentMethod.identifier': { $exists: true, $in: paymentMethodIdentifierIn } });
|
|
571
571
|
}
|
|
572
|
-
const paymentMethodsTypeOfIn = (
|
|
572
|
+
const paymentMethodsTypeOfIn = (_18 = params.paymentMethods) === null || _18 === void 0 ? void 0 : _18.typeOfs;
|
|
573
573
|
if (Array.isArray(paymentMethodsTypeOfIn)) {
|
|
574
574
|
// paymentMethod.identifierで検索(2023-11-15~)
|
|
575
575
|
// andConditions.push({ 'paymentMethods.typeOf': { $exists: true, $in: paymentMethodsTypeOfIn } });
|
|
@@ -599,7 +599,7 @@ class MongoRepository {
|
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
const paymentMethodAdditionalPropertyAll = (
|
|
602
|
+
const paymentMethodAdditionalPropertyAll = (_20 = (_19 = params.paymentMethods) === null || _19 === void 0 ? void 0 : _19.additionalProperty) === null || _20 === void 0 ? void 0 : _20.$all;
|
|
603
603
|
if (Array.isArray(paymentMethodAdditionalPropertyAll)) {
|
|
604
604
|
andConditions.push({
|
|
605
605
|
'paymentMethods.additionalProperty': {
|
|
@@ -608,7 +608,7 @@ class MongoRepository {
|
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
-
const paymentMethodAdditionalPropertyIn = (
|
|
611
|
+
const paymentMethodAdditionalPropertyIn = (_22 = (_21 = params.paymentMethods) === null || _21 === void 0 ? void 0 : _21.additionalProperty) === null || _22 === void 0 ? void 0 : _22.$in;
|
|
612
612
|
if (Array.isArray(paymentMethodAdditionalPropertyIn)) {
|
|
613
613
|
andConditions.push({
|
|
614
614
|
'paymentMethods.additionalProperty': {
|
|
@@ -802,7 +802,7 @@ class MongoRepository {
|
|
|
802
802
|
'project.id': { $eq: params.project.id },
|
|
803
803
|
typeOf: { $eq: factory.order.OrderType.Order }
|
|
804
804
|
}, {
|
|
805
|
-
$set: Object.assign(
|
|
805
|
+
$set: Object.assign({}, (typeof params.name === 'string') ? { name: params.name } : undefined)
|
|
806
806
|
}, {
|
|
807
807
|
new: true,
|
|
808
808
|
projection: {
|
|
@@ -5,6 +5,7 @@ exports.createCancelPendingReservationAction = exports.createPotentialActions =
|
|
|
5
5
|
* 予約取引ファクトリー
|
|
6
6
|
*/
|
|
7
7
|
const moment = require("moment");
|
|
8
|
+
const util = require("util");
|
|
8
9
|
const factory = require("../../../factory");
|
|
9
10
|
const accountTransactionIdentifier_1 = require("../../../factory/accountTransactionIdentifier");
|
|
10
11
|
const settings_1 = require("../../../settings");
|
|
@@ -396,7 +397,7 @@ function createIssuedThrough(params) {
|
|
|
396
397
|
exports.createIssuedThrough = createIssuedThrough;
|
|
397
398
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
398
399
|
function createReservation(params) {
|
|
399
|
-
var _a, _b;
|
|
400
|
+
var _a, _b, _c, _d;
|
|
400
401
|
// 適用メンバーシップ確認
|
|
401
402
|
validateEligibleMembershipType({
|
|
402
403
|
availableOffer: params.availableOffer,
|
|
@@ -412,9 +413,12 @@ function createReservation(params) {
|
|
|
412
413
|
// priceを最適化
|
|
413
414
|
const price4reservation = (0, price_1.createPrice)(params);
|
|
414
415
|
if (params.reservationFor.typeOf === factory.eventType.ScreeningEvent) {
|
|
416
|
+
const reservationIdentifier = (typeof ((_a = params.reservedTicket.ticketedSeat) === null || _a === void 0 ? void 0 : _a.seatNumber) === 'string')
|
|
417
|
+
? util.format('%s:%s:%s:%s', params.reservationFor.typeOf, params.reservationFor.id, params.reservedTicket.ticketedSeat.seatSection, params.reservedTicket.ticketedSeat.seatNumber)
|
|
418
|
+
: util.format('%s:%s:%s', params.reservationFor.typeOf, params.reservationFor.id, params.id);
|
|
415
419
|
return Object.assign(Object.assign(Object.assign({
|
|
416
420
|
// project: params.project, // 廃止(2024-04-08~)
|
|
417
|
-
typeOf: factory.reservationType.EventReservation, id: params.id,
|
|
421
|
+
typeOf: factory.reservationType.EventReservation, id: params.id, identifier: reservationIdentifier,
|
|
418
422
|
// reservationPackage保管に移行(2023-06-06~)
|
|
419
423
|
// issuedThrough,
|
|
420
424
|
additionalProperty: params.additionalProperty,
|
|
@@ -435,14 +439,17 @@ function createReservation(params) {
|
|
|
435
439
|
};
|
|
436
440
|
})
|
|
437
441
|
}
|
|
438
|
-
: undefined), (typeof ((
|
|
442
|
+
: undefined), (typeof ((_b = params.programMembershipUsed) === null || _b === void 0 ? void 0 : _b.identifier) === 'string')
|
|
439
443
|
? { programMembershipUsed: params.programMembershipUsed }
|
|
440
444
|
: undefined);
|
|
441
445
|
}
|
|
442
446
|
else {
|
|
447
|
+
const reservationIdentifier = (typeof ((_c = params.reservedTicket.ticketedSeat) === null || _c === void 0 ? void 0 : _c.seatNumber) === 'string')
|
|
448
|
+
? util.format('%s:%s:%s:%s', params.reservationFor.typeOf, params.reservationFor.id, params.reservedTicket.ticketedSeat.seatSection, params.reservedTicket.ticketedSeat.seatNumber)
|
|
449
|
+
: util.format('%s:%s:%s', params.reservationFor.typeOf, params.reservationFor.id, params.id);
|
|
443
450
|
return Object.assign(Object.assign(Object.assign({
|
|
444
451
|
// project: params.project,
|
|
445
|
-
typeOf: factory.reservationType.BusReservation, id: params.id,
|
|
452
|
+
typeOf: factory.reservationType.BusReservation, id: params.id, identifier: reservationIdentifier,
|
|
446
453
|
// reservationPackage保管に移行(2023-06-06~)
|
|
447
454
|
// issuedThrough,
|
|
448
455
|
additionalProperty: params.additionalProperty,
|
|
@@ -463,7 +470,7 @@ function createReservation(params) {
|
|
|
463
470
|
};
|
|
464
471
|
})
|
|
465
472
|
}
|
|
466
|
-
: undefined), (typeof ((
|
|
473
|
+
: undefined), (typeof ((_d = params.programMembershipUsed) === null || _d === void 0 ? void 0 : _d.identifier) === 'string')
|
|
467
474
|
? { programMembershipUsed: params.programMembershipUsed }
|
|
468
475
|
: undefined);
|
|
469
476
|
}
|
|
@@ -240,8 +240,8 @@ function createReservation(params) {
|
|
|
240
240
|
if (params.issuedThrough.typeOf !== factory.product.ProductType.EventService) {
|
|
241
241
|
throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.EventService}`);
|
|
242
242
|
}
|
|
243
|
-
reservationItem = Object.assign({ typeOf: itemOffered.typeOf, additionalProperty: itemOffered.additionalProperty, additionalTicketText: itemOffered.additionalTicketText, id: itemOffered.id, issuedThrough: params.issuedThrough, reservationNumber: params.reservationNumber, reservationFor,
|
|
244
|
-
reservedTicket }, (typeof ((_a = itemOffered.programMembershipUsed) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
243
|
+
reservationItem = Object.assign(Object.assign({ typeOf: itemOffered.typeOf, additionalProperty: itemOffered.additionalProperty, additionalTicketText: itemOffered.additionalTicketText, id: itemOffered.id, issuedThrough: params.issuedThrough, reservationNumber: params.reservationNumber, reservationFor,
|
|
244
|
+
reservedTicket }, (typeof itemOffered.identifier === 'string') ? { identifier: itemOffered.identifier } : undefined), (typeof ((_a = itemOffered.programMembershipUsed) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
245
245
|
? { programMembershipUsed: itemOffered.programMembershipUsed }
|
|
246
246
|
: undefined);
|
|
247
247
|
}
|
|
@@ -268,8 +268,8 @@ function createReservation(params) {
|
|
|
268
268
|
if (params.issuedThrough.typeOf !== factory.product.ProductType.Transportation) {
|
|
269
269
|
throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.Transportation}`);
|
|
270
270
|
}
|
|
271
|
-
reservationItem = Object.assign({ typeOf: itemOffered.typeOf, additionalProperty: itemOffered.additionalProperty, additionalTicketText: itemOffered.additionalTicketText, id: itemOffered.id, issuedThrough: params.issuedThrough, reservationNumber: params.reservationNumber, reservationFor,
|
|
272
|
-
reservedTicket }, (typeof ((_d = itemOffered.programMembershipUsed) === null || _d === void 0 ? void 0 : _d.typeOf) === 'string')
|
|
271
|
+
reservationItem = Object.assign(Object.assign({ typeOf: itemOffered.typeOf, additionalProperty: itemOffered.additionalProperty, additionalTicketText: itemOffered.additionalTicketText, id: itemOffered.id, issuedThrough: params.issuedThrough, reservationNumber: params.reservationNumber, reservationFor,
|
|
272
|
+
reservedTicket }, (typeof itemOffered.identifier === 'string') ? { identifier: itemOffered.identifier } : undefined), (typeof ((_d = itemOffered.programMembershipUsed) === null || _d === void 0 ? void 0 : _d.typeOf) === 'string')
|
|
273
273
|
? { programMembershipUsed: itemOffered.programMembershipUsed }
|
|
274
274
|
: undefined);
|
|
275
275
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.responseBody2acceptedOffers4result = exports.offers2resultPrice = exports.createAuthorizeSeatReservationActionAttributes = exports.WebAPIIdentifier = void 0;
|
|
4
4
|
const moment = require("moment");
|
|
5
|
+
const util = require("util");
|
|
5
6
|
const factory = require("../../../factory");
|
|
6
7
|
exports.WebAPIIdentifier = factory.service.webAPI.Identifier;
|
|
7
8
|
function createAuthorizeSeatReservationActionAttributes(params) {
|
|
@@ -77,7 +78,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
77
78
|
// 座席仮予約からオファー情報を生成する
|
|
78
79
|
// tslint:disable-next-line:max-func-body-length
|
|
79
80
|
acceptedOffers4result.push(...params.responseBody.listTmpReserve.map((tmpReserve, index) => {
|
|
80
|
-
var _a, _b, _c, _d;
|
|
81
|
+
var _a, _b, _c, _d, _e;
|
|
81
82
|
const requestedOffer = params.acceptedOffer.find((o) => {
|
|
82
83
|
var _a, _b, _c, _d;
|
|
83
84
|
return ((_d = (_c = (_b = (_a = o.itemOffered) === null || _a === void 0 ? void 0 : _a.serviceOutput) === null || _b === void 0 ? void 0 : _b.reservedTicket) === null || _c === void 0 ? void 0 : _c.ticketedSeat) === null || _d === void 0 ? void 0 : _d.seatNumber) === tmpReserve.seatNum
|
|
@@ -172,7 +173,11 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
};
|
|
175
|
-
const
|
|
176
|
+
const reservationIdentifier = (typeof ((_e = reservedTicket.ticketedSeat) === null || _e === void 0 ? void 0 : _e.seatNumber) === 'string')
|
|
177
|
+
? util.format('%s:%s:%s:%s', reservationFor.typeOf, reservationFor.id, reservedTicket.ticketedSeat.seatSection, reservedTicket.ticketedSeat.seatNumber)
|
|
178
|
+
: util.format('%s:%s:%s', reservationFor.typeOf, reservationFor.id, reservationId);
|
|
179
|
+
const reservation = Object.assign(Object.assign(Object.assign({ typeOf: factory.reservationType.EventReservation, id: reservationId, identifier: reservationIdentifier, // 予約識別子追加(2024-04-14~)
|
|
180
|
+
issuedThrough }, (Array.isArray(additionalProperty)) ? { additionalProperty } : undefined), (typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined), {
|
|
176
181
|
// numSeats: 1, // 廃止(2022-08-18~)
|
|
177
182
|
reservationFor: reservationFor, reservationNumber: reservationNumber, reservedTicket: reservedTicket });
|
|
178
183
|
if (requestedOffer.priceSpecification === undefined) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
|
-
export type IUpdatedOrder4inform = Pick<factory.order.IOrder, 'typeOf' | 'orderNumber' | 'name' | '
|
|
2
|
+
export type IUpdatedOrder4inform = Pick<factory.order.IOrder, 'typeOf' | 'orderNumber' | 'name' | 'project'> & {
|
|
3
3
|
updatedAt: Date;
|
|
4
4
|
};
|
|
5
5
|
declare function createInformTasks(order: IUpdatedOrder4inform): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optimizeAction4inform = exports.createAuthorizeResult = exports.creatPayTransactionStartParams = void 0;
|
|
4
4
|
const moment = require("moment");
|
|
5
|
+
const util = require("util");
|
|
5
6
|
const factory = require("../../../factory");
|
|
6
7
|
function creatPayTransactionStartParams(params) {
|
|
7
8
|
var _a, _b, _c, _d;
|
|
@@ -65,7 +66,9 @@ function creatPayTransactionStartParams(params) {
|
|
|
65
66
|
exports.creatPayTransactionStartParams = creatPayTransactionStartParams;
|
|
66
67
|
function createMovieTicket(params) {
|
|
67
68
|
var _a;
|
|
69
|
+
const reservationIdentifier = util.format('%s:%s:%s:%s', params.serviceOutput.reservationFor.typeOf, params.serviceOutput.reservationFor.id, params.serviceOutput.reservedTicket.ticketedSeat.seatSection, params.serviceOutput.reservedTicket.ticketedSeat.seatNumber);
|
|
68
70
|
const serviceOutput = {
|
|
71
|
+
identifier: reservationIdentifier,
|
|
69
72
|
reservationFor: {
|
|
70
73
|
typeOf: params.serviceOutput.reservationFor.typeOf,
|
|
71
74
|
id: params.serviceOutput.reservationFor.id
|
package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../../factory';
|
|
2
|
-
export type IMovieTicket4validate = Pick<factory.paymentMethod.paymentCard.movieTicket.
|
|
3
|
-
serviceOutput: factory.paymentMethod.paymentCard.movieTicket.
|
|
4
|
-
reservationFor: factory.paymentMethod.paymentCard.movieTicket.
|
|
2
|
+
export type IMovieTicket4validate = Pick<factory.paymentMethod.paymentCard.movieTicket.IMovieTicketPaymentCard, 'identifier' | 'serviceOutput' | 'serviceType' | 'typeOf'> & {
|
|
3
|
+
serviceOutput: factory.paymentMethod.paymentCard.movieTicket.IMovieTicketServiceOutput & {
|
|
4
|
+
reservationFor: factory.paymentMethod.paymentCard.movieTicket.IMovieTicketReservationFor;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
/**
|
package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js
CHANGED
|
@@ -177,7 +177,6 @@ function authorizeSeatReservationActions2requiredMovieTickets(params) {
|
|
|
177
177
|
const reservationFor4movieTicket = {
|
|
178
178
|
typeOf: offer.itemOffered.reservationFor.typeOf,
|
|
179
179
|
id: offer.itemOffered.reservationFor.id
|
|
180
|
-
// offers: { offeredThrough: { identifier: eventOfferedThroughIdentifier } }
|
|
181
180
|
};
|
|
182
181
|
// 指定された決済方法の適用決済カードリスト
|
|
183
182
|
let appliesToMovieTickets4paymentMethod = [];
|
|
@@ -194,6 +193,9 @@ function authorizeSeatReservationActions2requiredMovieTickets(params) {
|
|
|
194
193
|
identifier: String(appliesToMovieTicket.identifier),
|
|
195
194
|
serviceType: appliesToMovieTicket.serviceType,
|
|
196
195
|
serviceOutput: {
|
|
196
|
+
identifier: (typeof offer.itemOffered.identifier === 'string')
|
|
197
|
+
? offer.itemOffered.identifier
|
|
198
|
+
: offer.itemOffered.id,
|
|
197
199
|
reservationFor: reservationFor4movieTicket,
|
|
198
200
|
reservedTicket: { ticketedSeat: ticketedSeat4MovieTicket }
|
|
199
201
|
}
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.
|
|
13
|
+
"@chevre/factory": "4.367.0-alpha.2",
|
|
14
14
|
"@cinerino/sdk": "5.17.1",
|
|
15
15
|
"@motionpicture/coa-service": "9.4.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"postversion": "git push origin --tags",
|
|
111
111
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
112
112
|
},
|
|
113
|
-
"version": "21.
|
|
113
|
+
"version": "21.29.0-alpha.1"
|
|
114
114
|
}
|