@chevre/domain 21.33.0 → 21.34.0-alpha.0
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/example/src/chevre/migratePayCreditCardRecipes.ts +1 -1
- package/example/src/chevre/migratePayMovieTicketRecipes.ts +1 -1
- package/example/src/chevre/migrateTransactionObjectPaymentMethods.ts +1 -1
- package/lib/chevre/repo/action.d.ts +6 -3
- package/lib/chevre/repo/action.js +20 -7
- package/lib/chevre/service/assetTransaction/pay.js +4 -4
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/factory.d.ts +16 -4
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/factory.js +23 -1
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +10 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.js +4 -3
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +4 -3
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +7 -8
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +4 -3
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
- package/package.json +2 -2
|
@@ -88,7 +88,7 @@ async function main() {
|
|
|
88
88
|
'saving recipe...',
|
|
89
89
|
payAction.project.id, payAction.id, payAction.startDate, i);
|
|
90
90
|
// console.dir(recipe, { depth: null });
|
|
91
|
-
await actionRepo.
|
|
91
|
+
await actionRepo.saveRecipeWithDateCreated(recipe);
|
|
92
92
|
saveRecipeCount += 1;
|
|
93
93
|
console.log('recipe saved.', payAction.project.id, payAction.id, payAction.startDate, i);
|
|
94
94
|
}
|
|
@@ -84,7 +84,7 @@ async function main() {
|
|
|
84
84
|
'saving recipe...',
|
|
85
85
|
payAction.project.id, payAction.id, payAction.startDate, i);
|
|
86
86
|
// console.dir(recipe, { depth: null });
|
|
87
|
-
await actionRepo.
|
|
87
|
+
await actionRepo.saveRecipeWithDateCreated(recipe);
|
|
88
88
|
saveRecipeCount += 1;
|
|
89
89
|
console.log('recipe saved.', payAction.project.id, payAction.id, payAction.startDate, i);
|
|
90
90
|
}
|
|
@@ -127,7 +127,7 @@ async function main() {
|
|
|
127
127
|
'saving recipe...',
|
|
128
128
|
placeOrder.project.id, placeOrder.id, placeOrder.startDate, i);
|
|
129
129
|
// console.dir(recipe, { depth: null });
|
|
130
|
-
await actionRepo.
|
|
130
|
+
await actionRepo.saveRecipeWithDateCreated(recipe);
|
|
131
131
|
saveRecipeCount += 1;
|
|
132
132
|
console.log('recipe saved.', placeOrder.project.id, placeOrder.id, placeOrder.startDate, i);
|
|
133
133
|
}
|
|
@@ -59,7 +59,7 @@ export interface ICancelActionAction {
|
|
|
59
59
|
typeOf: 'Task';
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
export type IActionRecipe<T extends factory.recipe.RecipeCategory> = T extends factory.recipe.RecipeCategory.checkMovieTicket ? factory.action.check.paymentMethod.movieTicket.IRecipe : T extends factory.recipe.RecipeCategory.payCreditCard ? factory.action.trade.pay.IPayCreditCardRecipe : T extends factory.recipe.RecipeCategory.payMovieTicket ? factory.action.trade.pay.IPayMovieTicketRecipe : T extends factory.recipe.RecipeCategory.publishPaymentUrl ? factory.action.accept.pay.IRecipe : T extends factory.recipe.RecipeCategory.refundCreditCard ? factory.action.trade.refund.IRefundCreditCardRecipe : T extends factory.recipe.RecipeCategory.refundMovieTicket ? factory.action.trade.refund.IRefundMovieTicketRecipe : never;
|
|
62
|
+
export type IActionRecipe<T extends factory.recipe.RecipeCategory> = T extends factory.recipe.RecipeCategory.checkMovieTicket ? factory.action.check.paymentMethod.movieTicket.IRecipe : T extends factory.recipe.RecipeCategory.payCreditCard ? factory.action.trade.pay.IPayCreditCardRecipe : T extends factory.recipe.RecipeCategory.payMovieTicket ? factory.action.trade.pay.IPayMovieTicketRecipe : T extends factory.recipe.RecipeCategory.publishPaymentUrl ? factory.action.accept.pay.IRecipe : T extends factory.recipe.RecipeCategory.refundCreditCard ? factory.action.trade.refund.IRefundCreditCardRecipe : T extends factory.recipe.RecipeCategory.refundMovieTicket ? factory.action.trade.refund.IRefundMovieTicketRecipe : T extends factory.recipe.RecipeCategory.acceptCOAOffer ? factory.action.accept.coaOffer.IRecipe : T extends factory.recipe.RecipeCategory.confirmCOAReserve ? factory.action.interact.confirm.reservation.IConfirmCOAReserveRecipe : never;
|
|
63
63
|
/**
|
|
64
64
|
* アクションリポジトリ
|
|
65
65
|
*/
|
|
@@ -83,11 +83,13 @@ export declare class MongoRepository {
|
|
|
83
83
|
typeOf: T;
|
|
84
84
|
id: string;
|
|
85
85
|
result: any;
|
|
86
|
+
recipe?: factory.recipe.IRecipe;
|
|
86
87
|
}): Promise<IAction<T>>;
|
|
87
88
|
completeWithVoid(params: {
|
|
88
89
|
typeOf: factory.actionType;
|
|
89
90
|
id: string;
|
|
90
91
|
result: any;
|
|
92
|
+
recipe?: factory.recipe.IRecipe;
|
|
91
93
|
}): Promise<void>;
|
|
92
94
|
/**
|
|
93
95
|
* アクション取消
|
|
@@ -314,8 +316,8 @@ export declare class MongoRepository {
|
|
|
314
316
|
}): Promise<{
|
|
315
317
|
deletedCount?: number;
|
|
316
318
|
} | null>;
|
|
317
|
-
|
|
318
|
-
dateCreated
|
|
319
|
+
saveRecipeWithDateCreated(savingRecipe: factory.recipe.IRecipe & {
|
|
320
|
+
dateCreated: Date;
|
|
319
321
|
}): Promise<import("mongodb").InsertManyResult<any>>;
|
|
320
322
|
findRecipeByAction<T extends factory.recipe.RecipeCategory>(params: {
|
|
321
323
|
project: {
|
|
@@ -415,5 +417,6 @@ export declare class MongoRepository {
|
|
|
415
417
|
};
|
|
416
418
|
}): Promise<void>;
|
|
417
419
|
private agggregateByStatus;
|
|
420
|
+
private saveRecipe;
|
|
418
421
|
}
|
|
419
422
|
export {};
|
|
@@ -469,7 +469,11 @@ class MongoRepository {
|
|
|
469
469
|
* アクション完了
|
|
470
470
|
*/
|
|
471
471
|
complete(params) {
|
|
472
|
+
var _a;
|
|
472
473
|
return __awaiter(this, void 0, void 0, function* () {
|
|
474
|
+
if (((_a = params.recipe) === null || _a === void 0 ? void 0 : _a.typeOf) === 'Recipe') {
|
|
475
|
+
yield this.saveRecipe(params.recipe);
|
|
476
|
+
}
|
|
473
477
|
const doc = yield this.actionModel.findOneAndUpdate({
|
|
474
478
|
typeOf: params.typeOf,
|
|
475
479
|
_id: params.id
|
|
@@ -487,7 +491,11 @@ class MongoRepository {
|
|
|
487
491
|
});
|
|
488
492
|
}
|
|
489
493
|
completeWithVoid(params) {
|
|
494
|
+
var _a;
|
|
490
495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
+
if (((_a = params.recipe) === null || _a === void 0 ? void 0 : _a.typeOf) === 'Recipe') {
|
|
497
|
+
yield this.saveRecipe(params.recipe);
|
|
498
|
+
}
|
|
491
499
|
const doc = yield this.actionModel.findOneAndUpdate({
|
|
492
500
|
_id: { $eq: params.id },
|
|
493
501
|
typeOf: { $eq: params.typeOf }
|
|
@@ -1046,15 +1054,9 @@ class MongoRepository {
|
|
|
1046
1054
|
});
|
|
1047
1055
|
});
|
|
1048
1056
|
}
|
|
1049
|
-
|
|
1057
|
+
saveRecipeWithDateCreated(savingRecipe) {
|
|
1050
1058
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1051
1059
|
return this.actionRecipeModel.insertMany(Object.assign(Object.assign({}, savingRecipe), { dateCreated: (savingRecipe.dateCreated instanceof Date) ? savingRecipe.dateCreated : new Date() }), { rawResult: true });
|
|
1052
|
-
// const result = await this.actionRecipeModel.insertMany<IRecipe>(savingRecipe, { rawResult: true });
|
|
1053
|
-
// const id = result.insertedIds?.[0]?.toHexString();
|
|
1054
|
-
// if (typeof id !== 'string') {
|
|
1055
|
-
// throw new factory.errors.ServiceUnavailable('recipe not saved');
|
|
1056
|
-
// }
|
|
1057
|
-
// return { id };
|
|
1058
1060
|
});
|
|
1059
1061
|
}
|
|
1060
1062
|
findRecipeByAction(params) {
|
|
@@ -1364,5 +1366,16 @@ class MongoRepository {
|
|
|
1364
1366
|
};
|
|
1365
1367
|
});
|
|
1366
1368
|
}
|
|
1369
|
+
saveRecipe(savingRecipe) {
|
|
1370
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1371
|
+
return this.actionRecipeModel.insertMany(Object.assign(Object.assign({}, savingRecipe), { dateCreated: new Date() }), { rawResult: true });
|
|
1372
|
+
// const result = await this.actionRecipeModel.insertMany<IRecipe>(savingRecipe, { rawResult: true });
|
|
1373
|
+
// const id = result.insertedIds?.[0]?.toHexString();
|
|
1374
|
+
// if (typeof id !== 'string') {
|
|
1375
|
+
// throw new factory.errors.ServiceUnavailable('recipe not saved');
|
|
1376
|
+
// }
|
|
1377
|
+
// return { id };
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1367
1380
|
}
|
|
1368
1381
|
exports.MongoRepository = MongoRepository;
|
|
@@ -85,6 +85,7 @@ function publishPaymentUrl(params, options) {
|
|
|
85
85
|
: undefined);
|
|
86
86
|
const action = yield repos.action.start(actionAttributes);
|
|
87
87
|
let result;
|
|
88
|
+
let recipe;
|
|
88
89
|
try {
|
|
89
90
|
switch (paymentServiceType) {
|
|
90
91
|
case factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
@@ -113,12 +114,11 @@ function publishPaymentUrl(params, options) {
|
|
|
113
114
|
execTranResult: authorizeResult.execTranResult
|
|
114
115
|
};
|
|
115
116
|
// create recipe(2024-06-02~)
|
|
116
|
-
|
|
117
|
+
recipe = publishPaymentUrlResult2recipe({
|
|
117
118
|
project: { id: params.project.id },
|
|
118
119
|
action: { id: action.id, typeOf: action.typeOf },
|
|
119
120
|
result
|
|
120
|
-
})
|
|
121
|
-
debug('publishPaymentUrl: recipe saved.', JSON.stringify(saveRecipeResult));
|
|
121
|
+
});
|
|
122
122
|
break;
|
|
123
123
|
default:
|
|
124
124
|
throw new factory.errors.NotImplemented(`Payment service '${paymentServiceType}' not implemented`);
|
|
@@ -137,7 +137,7 @@ function publishPaymentUrl(params, options) {
|
|
|
137
137
|
paymentMethodId: result.paymentMethodId,
|
|
138
138
|
paymentUrl: result.paymentUrl
|
|
139
139
|
};
|
|
140
|
-
yield repos.action.completeWithVoid({ typeOf: actionAttributes.typeOf, id: action.id, result: actionResult });
|
|
140
|
+
yield repos.action.completeWithVoid({ typeOf: actionAttributes.typeOf, id: action.id, result: actionResult, recipe });
|
|
141
141
|
return result;
|
|
142
142
|
});
|
|
143
143
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as COA from '@motionpicture/coa-service';
|
|
1
|
+
import * as factory from '../../../../factory';
|
|
3
2
|
type IAcceptedOfferWithoutDetail = factory.action.authorize.offer.eventService.IAcceptedOfferWithoutDetail<factory.service.webAPI.Identifier.COA> & {
|
|
4
3
|
additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
5
4
|
ticketInfo: factory.action.authorize.offer.eventService.ICOATicketInfo & {
|
|
@@ -11,5 +10,18 @@ type IAcceptedOfferWithoutDetail = factory.action.authorize.offer.eventService.I
|
|
|
11
10
|
declare function createUpdTmpReserveSeatArgs(params: {
|
|
12
11
|
object: factory.action.authorize.offer.eventService.IObjectWithoutDetail<factory.service.webAPI.Identifier.COA>;
|
|
13
12
|
coaInfo: Pick<factory.event.screeningEvent.ICOAInfo, 'dateJouei' | 'screenCode' | 'theaterCode' | 'timeBegin' | 'timeEnd' | 'titleBranchNum' | 'titleCode'>;
|
|
14
|
-
}):
|
|
15
|
-
|
|
13
|
+
}): factory.action.accept.coaOffer.IUpdTmpReserveSeatArgs;
|
|
14
|
+
declare function processUpdTmpReserveSeatResult2recipe(params: {
|
|
15
|
+
processUpdTmpReserveSeatResult: {
|
|
16
|
+
updTmpReserveSeatArgs?: factory.action.accept.coaOffer.IUpdTmpReserveSeatArgs;
|
|
17
|
+
updTmpReserveSeatResult?: factory.action.accept.coaOffer.IUpdTmpReserveSeatResult;
|
|
18
|
+
};
|
|
19
|
+
project: {
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
action: {
|
|
23
|
+
id: string;
|
|
24
|
+
typeOf: factory.actionType;
|
|
25
|
+
};
|
|
26
|
+
}): factory.action.accept.coaOffer.IRecipe;
|
|
27
|
+
export { IAcceptedOfferWithoutDetail, createUpdTmpReserveSeatArgs, processUpdTmpReserveSeatResult2recipe };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUpdTmpReserveSeatArgs = void 0;
|
|
3
|
+
exports.processUpdTmpReserveSeatResult2recipe = exports.createUpdTmpReserveSeatArgs = void 0;
|
|
4
|
+
const factory = require("../../../../factory");
|
|
4
5
|
function createUpdTmpReserveSeatArgs(params) {
|
|
5
6
|
return {
|
|
6
7
|
theaterCode: params.coaInfo.theaterCode,
|
|
@@ -18,3 +19,24 @@ function createUpdTmpReserveSeatArgs(params) {
|
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
exports.createUpdTmpReserveSeatArgs = createUpdTmpReserveSeatArgs;
|
|
22
|
+
function processUpdTmpReserveSeatResult2recipe(params) {
|
|
23
|
+
const { processUpdTmpReserveSeatResult, project, action } = params;
|
|
24
|
+
const { updTmpReserveSeatArgs, updTmpReserveSeatResult } = processUpdTmpReserveSeatResult;
|
|
25
|
+
return {
|
|
26
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
27
|
+
typeOf: 'Recipe',
|
|
28
|
+
recipeCategory: factory.recipe.RecipeCategory.acceptCOAOffer,
|
|
29
|
+
recipeFor: { id: action.id, typeOf: action.typeOf },
|
|
30
|
+
step: [{
|
|
31
|
+
typeOf: 'HowToSection',
|
|
32
|
+
itemListElement: [
|
|
33
|
+
{
|
|
34
|
+
typeOf: 'HowToStep',
|
|
35
|
+
identifier: factory.recipe.StepIdentifier.updTmpReserveSeat,
|
|
36
|
+
itemListElement: [Object.assign(Object.assign({ typeOf: 'HowToDirection' }, (updTmpReserveSeatArgs !== undefined) ? { beforeMedia: updTmpReserveSeatArgs } : undefined), (updTmpReserveSeatResult !== undefined) ? { afterMedia: updTmpReserveSeatResult } : undefined)]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.processUpdTmpReserveSeatResult2recipe = processUpdTmpReserveSeatResult2recipe;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.reAcceptOffer = exports.acceptOffer = void 0;
|
|
13
13
|
const errorHandler_1 = require("../../../errorHandler");
|
|
14
14
|
const factory = require("../../../factory");
|
|
15
|
+
const settings_1 = require("../../../settings");
|
|
15
16
|
const authorize_1 = require("./acceptOffer/authorize");
|
|
16
17
|
const factory_1 = require("./acceptOffer/factory");
|
|
17
18
|
function findCOAInfo(params) {
|
|
@@ -95,6 +96,14 @@ function acceptOffer(params) {
|
|
|
95
96
|
}
|
|
96
97
|
throw error;
|
|
97
98
|
}
|
|
99
|
+
const recipe = (0, factory_1.processUpdTmpReserveSeatResult2recipe)({
|
|
100
|
+
processUpdTmpReserveSeatResult: {
|
|
101
|
+
updTmpReserveSeatArgs: requestBody,
|
|
102
|
+
updTmpReserveSeatResult: responseBody
|
|
103
|
+
},
|
|
104
|
+
project: { id: transaction.project.id },
|
|
105
|
+
action: { id: action.id, typeOf: action.typeOf }
|
|
106
|
+
});
|
|
98
107
|
const result = {
|
|
99
108
|
object: {
|
|
100
109
|
acceptedOffer,
|
|
@@ -103,7 +112,7 @@ function acceptOffer(params) {
|
|
|
103
112
|
result: { responseBody },
|
|
104
113
|
typeOf: factory.actionType.AuthorizeAction
|
|
105
114
|
};
|
|
106
|
-
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result });
|
|
115
|
+
yield repos.action.completeWithVoid(Object.assign({ typeOf: action.typeOf, id: action.id, result }, (settings_1.USE_EXPERIMENTAL_FEATURE) ? { recipe } : undefined));
|
|
107
116
|
});
|
|
108
117
|
}
|
|
109
118
|
exports.acceptOffer = acceptOffer;
|
|
@@ -43,6 +43,7 @@ function payCreditCard(params) {
|
|
|
43
43
|
let action = yield repos.action.start(params);
|
|
44
44
|
const alterTranResults = [];
|
|
45
45
|
const processAlterTranResults = [];
|
|
46
|
+
let recipe;
|
|
46
47
|
try {
|
|
47
48
|
const creditService = new GMO.service.Credit({
|
|
48
49
|
endpoint: String(availableChannel.serviceUrl),
|
|
@@ -64,11 +65,11 @@ function payCreditCard(params) {
|
|
|
64
65
|
}
|
|
65
66
|
})));
|
|
66
67
|
// add recipe(2024-06-03~)
|
|
67
|
-
|
|
68
|
+
recipe = (0, factory_1.processAlterTranResult2payRecipe)({
|
|
68
69
|
processAlterTranResults,
|
|
69
70
|
project: { id: params.project.id },
|
|
70
71
|
action: { id: action.id, typeOf: action.typeOf }
|
|
71
|
-
})
|
|
72
|
+
});
|
|
72
73
|
}
|
|
73
74
|
catch (error) {
|
|
74
75
|
try {
|
|
@@ -80,7 +81,7 @@ function payCreditCard(params) {
|
|
|
80
81
|
throw error;
|
|
81
82
|
}
|
|
82
83
|
const actionResult = { creditCardSales: alterTranResults };
|
|
83
|
-
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult }));
|
|
84
|
+
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult, recipe }));
|
|
84
85
|
yield (0, onPaid_1.onPaid)(action)(repos);
|
|
85
86
|
return action;
|
|
86
87
|
});
|
|
@@ -66,6 +66,7 @@ function refundCreditCard(params, options) {
|
|
|
66
66
|
let action = yield repos.action.start(Object.assign(Object.assign({}, startingActionParams), (typeof ((_h = params.sameAs) === null || _h === void 0 ? void 0 : _h.id) === 'string') ? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } : undefined));
|
|
67
67
|
const alterTranResult = [];
|
|
68
68
|
let processAlterTranResult;
|
|
69
|
+
let recipe;
|
|
69
70
|
try {
|
|
70
71
|
const creditService = new GMO.service.Credit({
|
|
71
72
|
endpoint: String(availableChannel.serviceUrl),
|
|
@@ -90,11 +91,11 @@ function refundCreditCard(params, options) {
|
|
|
90
91
|
throw processAlterTranResult.processAlterTranError;
|
|
91
92
|
}
|
|
92
93
|
// add recipe(2024-06-04~)
|
|
93
|
-
|
|
94
|
+
recipe = (0, factory_1.processAlterTranResult2refundRecipe)({
|
|
94
95
|
processAlterTranResult,
|
|
95
96
|
project: { id: params.project.id },
|
|
96
97
|
action: { id: action.id, typeOf: action.typeOf }
|
|
97
|
-
})
|
|
98
|
+
});
|
|
98
99
|
}
|
|
99
100
|
catch (error) {
|
|
100
101
|
try {
|
|
@@ -106,7 +107,7 @@ function refundCreditCard(params, options) {
|
|
|
106
107
|
throw error;
|
|
107
108
|
}
|
|
108
109
|
const actionResult = { alterTranResult };
|
|
109
|
-
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult }));
|
|
110
|
+
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult, recipe }));
|
|
110
111
|
yield (0, onRefund_1.onRefund)(action)(repos);
|
|
111
112
|
return action;
|
|
112
113
|
});
|
|
@@ -52,6 +52,7 @@ function checkMovieTicket(params) {
|
|
|
52
52
|
: undefined);
|
|
53
53
|
const action = yield repos.action.start(actionAttributes);
|
|
54
54
|
let processPurchaseNumberAuthResult;
|
|
55
|
+
let recipe;
|
|
55
56
|
try {
|
|
56
57
|
const eventIds = [...new Set(optimizedCheckObject.reduce((a, b) => [
|
|
57
58
|
...a,
|
|
@@ -79,13 +80,11 @@ function checkMovieTicket(params) {
|
|
|
79
80
|
paymentServiceId
|
|
80
81
|
})(repos);
|
|
81
82
|
// add recipe(2024-06-07~)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
83
|
+
recipe = (0, factory_1.processPurchaseNumberAuthResult2checkRecipe)({
|
|
84
|
+
processPurchaseNumberAuthResult,
|
|
85
|
+
project: { id: params.project.id },
|
|
86
|
+
action: { id: action.id, typeOf: action.typeOf }
|
|
87
|
+
});
|
|
89
88
|
}
|
|
90
89
|
catch (error) {
|
|
91
90
|
// アクション保管用のエラーと両方保管(2024-05-22~)
|
|
@@ -102,7 +101,7 @@ function checkMovieTicket(params) {
|
|
|
102
101
|
purchaseNumberAuthIn: processPurchaseNumberAuthResult.purchaseNumberAuthIn,
|
|
103
102
|
purchaseNumberAuthResult: processPurchaseNumberAuthResult.purchaseNumberAuthResult
|
|
104
103
|
};
|
|
105
|
-
yield repos.action.completeWithVoid({ typeOf: actionAttributes.typeOf, id: action.id, result });
|
|
104
|
+
yield repos.action.completeWithVoid(Object.assign({ typeOf: actionAttributes.typeOf, id: action.id, result }, (settings_1.USE_EXPERIMENTAL_FEATURE) ? { recipe } : undefined));
|
|
106
105
|
return { result: processPurchaseNumberAuthResult };
|
|
107
106
|
});
|
|
108
107
|
}
|
|
@@ -30,6 +30,7 @@ function payMovieTicket(params) {
|
|
|
30
30
|
const startingAction = (0, factory_1.createStartingPayAction)(params, seatInfoSyncIn);
|
|
31
31
|
let action = yield repos.action.start(startingAction);
|
|
32
32
|
let processSeatInfoSyncResult;
|
|
33
|
+
let recipe;
|
|
33
34
|
try {
|
|
34
35
|
// 着券済に対する冪等性を確保する必要はあるが、
|
|
35
36
|
// その他のアクションとしての振る舞いは実行される必要もある
|
|
@@ -64,11 +65,11 @@ function payMovieTicket(params) {
|
|
|
64
65
|
processSeatInfoSyncResult = yield processSeatInfoSync({ seatInfoSyncIn })({ seatService });
|
|
65
66
|
}
|
|
66
67
|
// add recipe(2024-06-03~)
|
|
67
|
-
|
|
68
|
+
recipe = (0, factory_1.processSeatInfoSyncResult2payRecipe)({
|
|
68
69
|
processSeatInfoSyncResult,
|
|
69
70
|
project: { id: params.project.id },
|
|
70
71
|
action: { id: action.id, typeOf: action.typeOf }
|
|
71
|
-
})
|
|
72
|
+
});
|
|
72
73
|
}
|
|
73
74
|
catch (error) {
|
|
74
75
|
// アクション保管用のエラーと両方保管(2024-05-22~)
|
|
@@ -86,7 +87,7 @@ function payMovieTicket(params) {
|
|
|
86
87
|
&& seatInfoSyncResult.zskyykResult !== undefined)
|
|
87
88
|
? { seatInfoSyncResult: seatInfoSyncResult }
|
|
88
89
|
: undefined);
|
|
89
|
-
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result }));
|
|
90
|
+
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result, recipe }));
|
|
90
91
|
yield (0, onPaid_1.onPaid)(action)(repos);
|
|
91
92
|
return action;
|
|
92
93
|
});
|
|
@@ -95,13 +95,13 @@ function refundMovieTicket(params) {
|
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
97
97
|
// add recipe(2024-06-04~)
|
|
98
|
-
|
|
98
|
+
const recipe = (0, factory_1.processSeatInfoSyncResult2refundRecipe)(Object.assign(Object.assign({ project: { id: params.project.id }, action: { id: action.id, typeOf: action.typeOf } }, (processSeatInfoSyncResult !== undefined) ? { processSeatInfoSyncResult } : undefined), (processSeatInfoSyncCancelResult !== undefined) ? { processSeatInfoSyncCancelResult } : undefined));
|
|
99
99
|
const actionResult = Object.assign(Object.assign({}, ((processSeatInfoSyncResult === null || processSeatInfoSyncResult === void 0 ? void 0 : processSeatInfoSyncResult.seatInfoSyncResult) !== undefined)
|
|
100
100
|
? { seatInfoSyncResult: processSeatInfoSyncResult.seatInfoSyncResult }
|
|
101
101
|
: undefined), ((processSeatInfoSyncCancelResult === null || processSeatInfoSyncCancelResult === void 0 ? void 0 : processSeatInfoSyncCancelResult.seatInfoSyncCancelResult) !== undefined)
|
|
102
102
|
? { seatInfoSyncCancelResult: processSeatInfoSyncCancelResult.seatInfoSyncCancelResult }
|
|
103
103
|
: undefined);
|
|
104
|
-
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult }));
|
|
104
|
+
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult, recipe }));
|
|
105
105
|
}
|
|
106
106
|
yield (0, onRefund_1.onRefund)(action)(repos);
|
|
107
107
|
});
|
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.374.0-alpha.
|
|
13
|
+
"@chevre/factory": "4.374.0-alpha.9",
|
|
14
14
|
"@cinerino/sdk": "7.1.0",
|
|
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.34.0-alpha.0"
|
|
114
114
|
}
|