@chevre/domain 21.20.0-alpha.2 → 21.20.0-alpha.20
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/onAssetTransactionStatusChanged.ts +36 -0
- package/example/src/chevre/retryTasks.ts +39 -0
- package/example/src/chevre/searchOrders.ts +13 -15
- package/example/src/chevre/searchSlicedAcceptedOffersByOrderNumber.ts +28 -0
- package/example/src/chevre/sendOrder.ts +37 -0
- package/example/src/chevre/transaction/processAcceptOffer.ts +48 -0
- package/example/src/chevre/transaction/processPlaceOrder.ts +82 -53
- package/lib/chevre/repo/acceptedOffer.d.ts +21 -1
- package/lib/chevre/repo/acceptedOffer.js +32 -2
- package/lib/chevre/repo/action.d.ts +3 -3
- package/lib/chevre/repo/action.js +4 -6
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/order.js +20 -11
- package/lib/chevre/repo/order.js +28 -9
- package/lib/chevre/repo/orderInTransaction.d.ts +27 -0
- package/lib/chevre/repo/orderInTransaction.js +77 -0
- package/lib/chevre/repo/task.d.ts +0 -2
- package/lib/chevre/repo/task.js +56 -46
- package/lib/chevre/repo/transaction.d.ts +1 -1
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +15 -2
- package/lib/chevre/service/assetTransaction/pay.d.ts +0 -10
- package/lib/chevre/service/assetTransaction/pay.js +4 -4
- package/lib/chevre/service/code.js +1 -1
- package/lib/chevre/service/delivery.js +2 -2
- package/lib/chevre/service/event/createEvent.js +1 -1
- package/lib/chevre/service/event.js +2 -2
- package/lib/chevre/service/moneyTransfer.js +1 -1
- package/lib/chevre/service/notification.js +2 -5
- package/lib/chevre/service/offer/any.d.ts +29 -0
- package/lib/chevre/service/offer/any.js +55 -0
- package/lib/chevre/service/offer/event/authorize.d.ts +7 -0
- package/lib/chevre/service/offer/event/authorize.js +11 -0
- package/lib/chevre/service/offer/event/cancel.d.ts +2 -0
- package/lib/chevre/service/offer/event/cancel.js +12 -1
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +12 -5
- package/lib/chevre/service/offer/eventServiceByCOA.js +2 -2
- package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +6 -1
- package/lib/chevre/service/offer/moneyTransfer/authorize.js +2 -1
- package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.js +1 -1
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.js +1 -1
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
- package/lib/chevre/service/offer/product.js +1 -1
- package/lib/chevre/service/order/confirmPayTransaction.js +3 -3
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +11 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +113 -5
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +18 -19
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +38 -25
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +11 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +45 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.d.ts +14 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +37 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +86 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +18 -12
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +3 -1
- package/lib/chevre/service/order/onOrderStatusChanged.js +5 -1
- package/lib/chevre/service/order/placeOrder.d.ts +2 -0
- package/lib/chevre/service/order/placeOrder.js +28 -29
- package/lib/chevre/service/order/returnOrder.js +25 -16
- package/lib/chevre/service/order/sendOrder.d.ts +5 -0
- package/lib/chevre/service/order/sendOrder.js +68 -30
- package/lib/chevre/service/payment/any.d.ts +6 -8
- package/lib/chevre/service/payment/any.js +46 -10
- package/lib/chevre/service/payment/creditCard.d.ts +9 -8
- package/lib/chevre/service/payment/creditCard.js +102 -133
- package/lib/chevre/service/payment/faceToFace.d.ts +0 -4
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +1 -0
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket.d.ts +0 -6
- package/lib/chevre/service/payment/movieTicket.js +1 -1
- package/lib/chevre/service/payment/paymentCard.d.ts +0 -2
- package/lib/chevre/service/payment/paymentCard.js +6 -6
- package/lib/chevre/service/payment.js +1 -1
- package/lib/chevre/service/product.js +1 -1
- package/lib/chevre/service/reserve/cancelReservation.js +2 -2
- package/lib/chevre/service/reserve/confirmReservation.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +4 -4
- package/lib/chevre/service/reserve/useReservation.d.ts +1 -2
- package/lib/chevre/service/reserve/useReservation.js +4 -4
- package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -0
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +4 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +42 -3
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -7
- package/lib/chevre/service/task/placeOrder.js +9 -10
- package/lib/chevre/service/task/returnOrder.js +0 -3
- package/lib/chevre/service/task/returnPayTransaction.js +1 -1
- package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
- package/lib/chevre/service/task/sendOrder.js +8 -4
- package/lib/chevre/service/task/voidPayTransaction.js +2 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +8 -12
- package/lib/chevre/service/transaction/deleteTransaction.js +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +6 -2
- package/lib/chevre/service/transaction/placeOrderInProgress.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.d.ts +32 -0
- package/lib/chevre/service/transaction/returnOrder/preStart.js +632 -0
- package/lib/chevre/service/transaction/returnOrder.d.ts +8 -6
- package/lib/chevre/service/transaction/returnOrder.js +4 -616
- package/lib/chevre/settings.d.ts +3 -1
- package/lib/chevre/settings.js +7 -2
- package/package.json +3 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.voidAcceptedOffer = exports.acceptOffer = void 0;
|
|
13
|
+
const createDebug = require("debug");
|
|
14
|
+
const factory = require("../../factory");
|
|
15
|
+
const placeOrderInProgress_1 = require("../transaction/placeOrderInProgress");
|
|
16
|
+
const debug = createDebug('chevre-domain:service:offer');
|
|
17
|
+
function acceptOffer(params) {
|
|
18
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const now = new Date();
|
|
20
|
+
const orderNumber = yield (0, placeOrderInProgress_1.publishOrderNumberIfNotExist)({
|
|
21
|
+
project: { id: params.project.id },
|
|
22
|
+
id: params.purpose.id,
|
|
23
|
+
object: { orderDate: now }
|
|
24
|
+
})(repos);
|
|
25
|
+
yield repos.orderInTransaction.acceptOffer({
|
|
26
|
+
orderNumber,
|
|
27
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
28
|
+
acceptedOffers: params.acceptedOffers
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.acceptOffer = acceptOffer;
|
|
33
|
+
function voidAcceptedOffer(params) {
|
|
34
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const { authorizeActions, orderNumber } = params;
|
|
36
|
+
let reservationNumbers = [];
|
|
37
|
+
authorizeActions.forEach((authorizeAction) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const reserveTransactionNumberByAction = (_a = authorizeAction.object.pendingTransaction) === null || _a === void 0 ? void 0 : _a.transactionNumber;
|
|
40
|
+
if (typeof reserveTransactionNumberByAction === 'string') {
|
|
41
|
+
reservationNumbers.push(reserveTransactionNumberByAction);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
reservationNumbers = [...new Set(reservationNumbers)];
|
|
45
|
+
debug('removing acceptedOffers from PlaceOrder...', orderNumber, reservationNumbers);
|
|
46
|
+
if (reservationNumbers.length > 0) {
|
|
47
|
+
const result = yield repos.orderInTransaction.voidAcceptedOfferByReservationNumber({
|
|
48
|
+
orderNumber,
|
|
49
|
+
acceptedOffers: { reservationNumber: { $in: reservationNumbers } }
|
|
50
|
+
});
|
|
51
|
+
debug('acceptedOffers removed from PlaceOrder.', result);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
exports.voidAcceptedOffer = voidAcceptedOffer;
|
|
@@ -5,6 +5,8 @@ import type { MongoRepository as EventRepo } from '../../../repo/event';
|
|
|
5
5
|
import type { MongoRepository as OfferRepo } from '../../../repo/offer';
|
|
6
6
|
import type { MongoRepository as OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
7
7
|
import type { MongoRepository as OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
|
|
8
|
+
import type { MongoRepository as OrderInTransactionRepo } from '../../../repo/orderInTransaction';
|
|
9
|
+
import type { RedisRepository as OrderNumberRepo } from '../../../repo/orderNumber';
|
|
8
10
|
import type { MongoRepository as PaymentServiceRepo } from '../../../repo/paymentService';
|
|
9
11
|
import type { MongoRepository as PlaceRepo } from '../../../repo/place';
|
|
10
12
|
import type { MongoRepository as PriceSpecificationRepo } from '../../../repo/priceSpecification';
|
|
@@ -27,6 +29,8 @@ interface IAuthorizeRepos {
|
|
|
27
29
|
offerCatalog: OfferCatalogRepo;
|
|
28
30
|
offerCatalogItem: OfferCatalogItemRepo;
|
|
29
31
|
offerRateLimit: OfferRateLimitRepo;
|
|
32
|
+
orderInTransaction: OrderInTransactionRepo;
|
|
33
|
+
orderNumber: OrderNumberRepo;
|
|
30
34
|
paymentService: PaymentServiceRepo;
|
|
31
35
|
place: PlaceRepo;
|
|
32
36
|
priceSpecification: PriceSpecificationRepo;
|
|
@@ -69,5 +73,8 @@ declare function authorize(params: {
|
|
|
69
73
|
* オファーID指定なしに座席をおさえる場合true
|
|
70
74
|
*/
|
|
71
75
|
noOfferSpecified: boolean;
|
|
76
|
+
options: {
|
|
77
|
+
useCreateOrderOnOfferAccepted: boolean;
|
|
78
|
+
};
|
|
72
79
|
}): IAuthorizeOperation<IAuthorizeOfferAction>;
|
|
73
80
|
export { authorize };
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.authorize = void 0;
|
|
13
13
|
const factory = require("../../../factory");
|
|
14
|
+
const any_1 = require("../any");
|
|
14
15
|
const defaultOffer_1 = require("./defaultOffer");
|
|
15
16
|
const processStartReserve4chevre_1 = require("./processStartReserve4chevre");
|
|
16
17
|
const searchEventTicketOffers_1 = require("./searchEventTicketOffers");
|
|
@@ -73,6 +74,16 @@ function authorize(params) {
|
|
|
73
74
|
stockHoldUntilDaysAfterEventEnd: params.stockHoldUntilDaysAfterEventEnd
|
|
74
75
|
})(repos);
|
|
75
76
|
acceptedOffers4result = processStartReserveResult.acceptedOffers4result;
|
|
77
|
+
// add orderInTransaction(2024-01-15~)
|
|
78
|
+
if (!noOfferSpecified) {
|
|
79
|
+
if (params.options.useCreateOrderOnOfferAccepted) {
|
|
80
|
+
yield (0, any_1.acceptOffer)({
|
|
81
|
+
project: transaction.project,
|
|
82
|
+
purpose: { id: transaction.id },
|
|
83
|
+
acceptedOffers: acceptedOffers4result
|
|
84
|
+
})(repos);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
76
87
|
break;
|
|
77
88
|
default:
|
|
78
89
|
throw new factory.errors.Argument('Event', `Unknown booking service '${bookingServiceIdentifire}'`);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import type { MongoRepository as ActionRepo } from '../../../repo/action';
|
|
3
3
|
import type { MongoRepository as AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
|
+
import type { MongoRepository as OrderInTransactionRepo } from '../../../repo/orderInTransaction';
|
|
4
5
|
import type { RedisRepository as OfferRateLimitRepo } from '../../../repo/rateLimit/offer';
|
|
5
6
|
import type { MongoRepository as ReservationRepo } from '../../../repo/reservation';
|
|
6
7
|
import type { StockHolderRepository as StockHolderRepo } from '../../../repo/stockHolder';
|
|
@@ -11,6 +12,7 @@ interface ICancelRepos {
|
|
|
11
12
|
assetTransaction: AssetTransactionRepo;
|
|
12
13
|
stockHolder: StockHolderRepo;
|
|
13
14
|
offerRateLimit: OfferRateLimitRepo;
|
|
15
|
+
orderInTransaction: OrderInTransactionRepo;
|
|
14
16
|
reservation: ReservationRepo;
|
|
15
17
|
task: TaskRepo;
|
|
16
18
|
transaction: TransactionRepo;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.cancel = void 0;
|
|
13
13
|
const factory = require("../../../factory");
|
|
14
14
|
const ReserveTransactionService = require("../../assetTransaction/reserve");
|
|
15
|
+
const any_1 = require("../any");
|
|
15
16
|
/**
|
|
16
17
|
* イベントオファー承認取消(apiから実行)
|
|
17
18
|
* 特定の承認アクションについて処理する
|
|
@@ -28,12 +29,22 @@ function cancel(params) {
|
|
|
28
29
|
}
|
|
29
30
|
// MongoDBでcompleteステータスであるにも関わらず、Chevreでは削除されている、というのが最悪の状況
|
|
30
31
|
// それだけは回避するためにMongoDBを先に変更
|
|
31
|
-
|
|
32
|
+
yield repos.action.cancelWithVoid({ typeOf: factory.actionType.AuthorizeAction, id: params.id });
|
|
33
|
+
const action = yield repos.action.findById({ typeOf: factory.actionType.AuthorizeAction, id: params.id });
|
|
32
34
|
switch (action.instrument.identifier) {
|
|
33
35
|
case factory.service.webAPI.Identifier.COA:
|
|
34
36
|
// 実質使用する予定なしなので廃止(2022-05-12~)
|
|
35
37
|
throw new factory.errors.NotImplemented(`booking service '${action.instrument.identifier}' not implemented`);
|
|
36
38
|
default:
|
|
39
|
+
// add orderInTransaction(2024-01-15~)
|
|
40
|
+
// USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
41
|
+
const orderNumberByTransaction = transaction.object.orderNumber;
|
|
42
|
+
if (typeof orderNumberByTransaction === 'string') {
|
|
43
|
+
yield (0, any_1.voidAcceptedOffer)({
|
|
44
|
+
authorizeActions: [action],
|
|
45
|
+
orderNumber: orderNumberByTransaction
|
|
46
|
+
})(repos);
|
|
47
|
+
}
|
|
37
48
|
const transactionNumber = (_a = action.object.pendingTransaction) === null || _a === void 0 ? void 0 : _a.transactionNumber;
|
|
38
49
|
if (typeof transactionNumber === 'string') {
|
|
39
50
|
// すでに取消済であったとしても、すべて取消処理(actionStatusに関係なく)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import type { MongoRepository as ActionRepo } from '../../../repo/action';
|
|
3
3
|
import type { MongoRepository as AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
|
+
import type { MongoRepository as OrderInTransactionRepo } from '../../../repo/orderInTransaction';
|
|
4
5
|
import type { RedisRepository as OfferRateLimitRepo } from '../../../repo/rateLimit/offer';
|
|
5
6
|
import type { MongoRepository as ReservationRepo } from '../../../repo/reservation';
|
|
6
7
|
import type { StockHolderRepository as StockHolderRepo } from '../../../repo/stockHolder';
|
|
@@ -12,6 +13,7 @@ interface IVoidTransactionRepos {
|
|
|
12
13
|
assetTransaction: AssetTransactionRepo;
|
|
13
14
|
stockHolder: StockHolderRepo;
|
|
14
15
|
offerRateLimit: OfferRateLimitRepo;
|
|
16
|
+
orderInTransaction: OrderInTransactionRepo;
|
|
15
17
|
reservation: ReservationRepo;
|
|
16
18
|
task: TaskRepo;
|
|
17
19
|
transaction: TransactionRepo;
|
|
@@ -15,6 +15,7 @@ const http_status_1 = require("http-status");
|
|
|
15
15
|
const credentials_1 = require("../../../credentials");
|
|
16
16
|
const factory = require("../../../factory");
|
|
17
17
|
const ReserveTransactionService = require("../../assetTransaction/reserve");
|
|
18
|
+
const any_1 = require("../any");
|
|
18
19
|
const coaAuthClient = new COA.auth.RefreshToken({
|
|
19
20
|
endpoint: credentials_1.credentials.coa.endpoint,
|
|
20
21
|
refreshToken: credentials_1.credentials.coa.refreshToken
|
|
@@ -30,7 +31,7 @@ function voidTransaction(params) {
|
|
|
30
31
|
const transaction = yield repos.transaction.findById({
|
|
31
32
|
typeOf: params.purpose.typeOf,
|
|
32
33
|
id: params.purpose.id,
|
|
33
|
-
inclusion: ['_id', 'typeOf', 'status']
|
|
34
|
+
inclusion: ['_id', 'typeOf', 'status', 'object.orderNumber']
|
|
34
35
|
});
|
|
35
36
|
// 興行オファー承認アクション検索
|
|
36
37
|
let authorizeActions = yield repos.action.searchByPurpose({
|
|
@@ -41,9 +42,6 @@ function voidTransaction(params) {
|
|
|
41
42
|
},
|
|
42
43
|
object: { typeOf: { $eq: factory.action.authorize.offer.eventService.ObjectType.SeatReservation } }
|
|
43
44
|
});
|
|
44
|
-
// .then((actions) => actions
|
|
45
|
-
// .filter((a) => a.object.typeOf === factory.action.authorize.offer.eventService.ObjectType.SeatReservation)
|
|
46
|
-
// );
|
|
47
45
|
switch (transaction.status) {
|
|
48
46
|
case factory.transactionStatusType.InProgress:
|
|
49
47
|
throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
|
|
@@ -59,8 +57,17 @@ function voidTransaction(params) {
|
|
|
59
57
|
default:
|
|
60
58
|
// no op
|
|
61
59
|
}
|
|
60
|
+
// add orderInTransaction(2024-01-15~)
|
|
61
|
+
// USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
62
|
+
const orderNumberByTransaction = transaction.object.orderNumber;
|
|
63
|
+
if (typeof orderNumberByTransaction === 'string') {
|
|
64
|
+
yield (0, any_1.voidAcceptedOffer)({
|
|
65
|
+
authorizeActions,
|
|
66
|
+
orderNumber: orderNumberByTransaction
|
|
67
|
+
})(repos);
|
|
68
|
+
}
|
|
62
69
|
yield Promise.all(authorizeActions.map((action) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
yield repos.action.
|
|
70
|
+
yield repos.action.cancelWithVoid({ typeOf: action.typeOf, id: action.id });
|
|
64
71
|
switch (action.instrument.identifier) {
|
|
65
72
|
case exports.WebAPIIdentifier.COA:
|
|
66
73
|
yield processVoidTransaction4coa({
|
|
@@ -143,13 +143,13 @@ function cancel(params) {
|
|
|
143
143
|
throw new factory.errors.Forbidden('Transaction not yours');
|
|
144
144
|
}
|
|
145
145
|
// 取引内のアクションかどうか確認
|
|
146
|
-
|
|
146
|
+
const action = yield repos.action.findById({ typeOf: factory.actionType.AuthorizeAction, id: params.id });
|
|
147
147
|
if (action.purpose.typeOf !== transaction.typeOf || action.purpose.id !== transaction.id) {
|
|
148
148
|
throw new factory.errors.Argument('Transaction', 'Action not found in the transaction');
|
|
149
149
|
}
|
|
150
150
|
// MongoDBでcompleteステータスであるにも関わらず、COAでは削除されている、というのが最悪の状況
|
|
151
151
|
// それだけは回避するためにMongoDBを先に変更
|
|
152
|
-
|
|
152
|
+
yield repos.action.cancelWithVoid({ typeOf: factory.actionType.AuthorizeAction, id: params.id });
|
|
153
153
|
let cancelResult;
|
|
154
154
|
const actionResult = action.result;
|
|
155
155
|
if ((actionResult === null || actionResult === void 0 ? void 0 : actionResult.requestBody) !== undefined && actionResult.responseBody !== undefined) {
|
|
@@ -24,5 +24,10 @@ export declare function authorize(params: {
|
|
|
24
24
|
};
|
|
25
25
|
object: factory.action.authorize.offer.moneyTransfer.IObject;
|
|
26
26
|
purpose: factory.action.authorize.offer.moneyTransfer.IPurpose;
|
|
27
|
-
}): IAuthorizeOperation<
|
|
27
|
+
}): IAuthorizeOperation<{
|
|
28
|
+
/**
|
|
29
|
+
* 承認アクションID
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
}>;
|
|
28
33
|
export {};
|
|
@@ -64,7 +64,8 @@ function authorize(params) {
|
|
|
64
64
|
requestBody: requestBody,
|
|
65
65
|
responseBody: responseBody
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: result });
|
|
68
|
+
return { id: action.id };
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
exports.authorize = authorize;
|
|
@@ -74,7 +74,7 @@ function returnMoneyTransfer(params) {
|
|
|
74
74
|
throw error;
|
|
75
75
|
}
|
|
76
76
|
const actionResult = {};
|
|
77
|
-
yield repos.action.
|
|
77
|
+
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
exports.returnMoneyTransfer = returnMoneyTransfer;
|
|
@@ -27,7 +27,7 @@ function settleTransaction(params) {
|
|
|
27
27
|
throw error;
|
|
28
28
|
}
|
|
29
29
|
const actionResult = {};
|
|
30
|
-
yield repos.action.
|
|
30
|
+
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
exports.settleTransaction = settleTransaction;
|
|
@@ -45,7 +45,7 @@ function voidTransaction(params) {
|
|
|
45
45
|
}
|
|
46
46
|
yield Promise.all(authorizeActions.map((action) => __awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
var _a, _b;
|
|
48
|
-
yield repos.action.
|
|
48
|
+
yield repos.action.cancelWithVoid({ typeOf: action.typeOf, id: action.id });
|
|
49
49
|
const pendingTransactionTransactionNumber = (_b = (_a = action.object.itemOffered.object) === null || _a === void 0 ? void 0 : _a.pendingTransaction) === null || _b === void 0 ? void 0 : _b.transactionNumber;
|
|
50
50
|
if (typeof pendingTransactionTransactionNumber === 'string') {
|
|
51
51
|
// 取引が存在すれば中止
|
|
@@ -247,7 +247,7 @@ function voidTransaction(params) {
|
|
|
247
247
|
// purpose: params.purpose
|
|
248
248
|
// })(repos);
|
|
249
249
|
}
|
|
250
|
-
yield repos.action.
|
|
250
|
+
yield repos.action.cancelWithVoid({ typeOf: action.typeOf, id: action.id });
|
|
251
251
|
yield processVoidRegisterServiceTransaction({
|
|
252
252
|
action,
|
|
253
253
|
project: params.project
|
|
@@ -36,7 +36,7 @@ function confirmPayTransaction(data) {
|
|
|
36
36
|
assetTransaction: repos.assetTransaction,
|
|
37
37
|
event: repos.event,
|
|
38
38
|
order: repos.order,
|
|
39
|
-
project: repos.project,
|
|
39
|
+
// project: repos.project,
|
|
40
40
|
task: repos.task
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -52,7 +52,7 @@ function confirmPayTransaction(data) {
|
|
|
52
52
|
}
|
|
53
53
|
// アクション完了
|
|
54
54
|
const actionResult = {};
|
|
55
|
-
yield repos.action.
|
|
55
|
+
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
56
56
|
// processOrder連携(2023-08-23~)
|
|
57
57
|
yield onConfirmed(data)({
|
|
58
58
|
task: repos.task
|
|
@@ -74,7 +74,7 @@ function onConfirmed(params) {
|
|
|
74
74
|
purpose: {
|
|
75
75
|
confirmationNumber: params.purpose.confirmationNumber,
|
|
76
76
|
orderNumber: params.purpose.orderNumber,
|
|
77
|
-
typeOf:
|
|
77
|
+
typeOf: factory.order.OrderType.Order
|
|
78
78
|
},
|
|
79
79
|
useOnOrderStatusChanged: params.useOnOrderStatusChanged === true
|
|
80
80
|
};
|
|
@@ -24,4 +24,14 @@ declare function paymentDue2Processing(params: {
|
|
|
24
24
|
task: TaskRepo;
|
|
25
25
|
transaction: TransactionRepo;
|
|
26
26
|
}) => Promise<void>;
|
|
27
|
-
|
|
27
|
+
declare function processing2inTransit(params: {
|
|
28
|
+
project: {
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
orderNumber: string;
|
|
32
|
+
useOnOrderStatusChanged: boolean;
|
|
33
|
+
}): (repos: {
|
|
34
|
+
order: OrderRepo;
|
|
35
|
+
task: TaskRepo;
|
|
36
|
+
}) => Promise<void>;
|
|
37
|
+
export { onAssetTransactionStatusChanged, paymentDue2Processing, processing2inTransit };
|
|
@@ -9,10 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.paymentDue2Processing = exports.onAssetTransactionStatusChanged = void 0;
|
|
12
|
+
exports.processing2inTransit = exports.paymentDue2Processing = exports.onAssetTransactionStatusChanged = void 0;
|
|
13
13
|
const findPlaceOrderTransaction_1 = require("./findPlaceOrderTransaction");
|
|
14
14
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
15
15
|
const factory = require("../../factory");
|
|
16
|
+
const settings_1 = require("../../settings");
|
|
17
|
+
// tslint:disable-next-line:max-func-body-length
|
|
16
18
|
function onAssetTransactionStatusChanged(params) {
|
|
17
19
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
18
20
|
var _a, _b, _c, _d, _e;
|
|
@@ -21,10 +23,10 @@ function onAssetTransactionStatusChanged(params) {
|
|
|
21
23
|
}
|
|
22
24
|
switch (params.object.status) {
|
|
23
25
|
case factory.transactionStatusType.Confirmed:
|
|
26
|
+
const orderNumber = (_a = params.purpose) === null || _a === void 0 ? void 0 : _a.orderNumber;
|
|
27
|
+
const confirmationNumber = (_b = params.purpose) === null || _b === void 0 ? void 0 : _b.confirmationNumber;
|
|
24
28
|
switch (params.object.typeOf) {
|
|
25
29
|
case factory.assetTransactionType.Pay:
|
|
26
|
-
const orderNumber = (_a = params.purpose) === null || _a === void 0 ? void 0 : _a.orderNumber;
|
|
27
|
-
const confirmationNumber = (_b = params.purpose) === null || _b === void 0 ? void 0 : _b.confirmationNumber;
|
|
28
30
|
// 確定時の決済方法区分指定(2023-08-29~)
|
|
29
31
|
const specifiedPaymentMethodIdentifire = (_e = (_d = (_c = params.object) === null || _c === void 0 ? void 0 : _c.object) === null || _d === void 0 ? void 0 : _d.paymentMethod) === null || _e === void 0 ? void 0 : _e.identifier;
|
|
30
32
|
if (typeof specifiedPaymentMethodIdentifire === 'string' && specifiedPaymentMethodIdentifire.length > 0) {
|
|
@@ -48,6 +50,34 @@ function onAssetTransactionStatusChanged(params) {
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
break;
|
|
53
|
+
case 'COAReserveTransaction':
|
|
54
|
+
if (typeof orderNumber === 'string' && typeof confirmationNumber === 'string') {
|
|
55
|
+
// 基本的に1注文に1予約番号なのでdeliverable = true
|
|
56
|
+
const deliverable = true;
|
|
57
|
+
if (deliverable) {
|
|
58
|
+
yield processing2inTransit({
|
|
59
|
+
project: { id: params.project.id },
|
|
60
|
+
// confirmationNumber,
|
|
61
|
+
orderNumber,
|
|
62
|
+
useOnOrderStatusChanged: params.useOnOrderStatusChanged
|
|
63
|
+
})(repos);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
case factory.assetTransactionType.Reserve:
|
|
68
|
+
if (typeof orderNumber === 'string' && typeof confirmationNumber === 'string') {
|
|
69
|
+
// ReserveTransactionのステータス検証
|
|
70
|
+
const deliverable = yield isDeliverable({ project: { id: params.project.id }, orderNumber })(repos);
|
|
71
|
+
if (deliverable) {
|
|
72
|
+
yield processing2inTransit({
|
|
73
|
+
project: { id: params.project.id },
|
|
74
|
+
// confirmationNumber,
|
|
75
|
+
orderNumber,
|
|
76
|
+
useOnOrderStatusChanged: params.useOnOrderStatusChanged
|
|
77
|
+
})(repos);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
51
81
|
default:
|
|
52
82
|
// no op
|
|
53
83
|
}
|
|
@@ -150,14 +180,15 @@ function paymentDue2Processing(params) {
|
|
|
150
180
|
}
|
|
151
181
|
catch (error) {
|
|
152
182
|
let throwsError = true;
|
|
153
|
-
//
|
|
183
|
+
// すでにステータスが進行していた場合、OrderPaymentDue->OrderProcessingの処理自体は成功しているので、後処理を続行する
|
|
154
184
|
order = yield repos.order.findByOrderNumber({
|
|
155
185
|
orderNumber: params.orderNumber,
|
|
156
186
|
project: { id: params.project.id },
|
|
157
187
|
inclusion: [],
|
|
158
188
|
exclusion: ['acceptedOffers']
|
|
159
189
|
});
|
|
160
|
-
if (order.orderStatus === factory.orderStatus.
|
|
190
|
+
if (order.orderStatus === factory.orderStatus.OrderInTransit
|
|
191
|
+
|| order.orderStatus === factory.orderStatus.OrderDelivered
|
|
161
192
|
|| order.orderStatus === factory.orderStatus.OrderReturned) {
|
|
162
193
|
throwsError = false;
|
|
163
194
|
}
|
|
@@ -230,3 +261,80 @@ function cancelOrderIfExist(params) {
|
|
|
230
261
|
}
|
|
231
262
|
});
|
|
232
263
|
}
|
|
264
|
+
function isDeliverable(params) {
|
|
265
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
// 注文のreservationNumberを取得
|
|
267
|
+
const reservationNumbers = yield repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.orderNumber] } }, 'acceptedOffers.itemOffered.reservationNumber');
|
|
268
|
+
// ReserveTransactionのステータス検証
|
|
269
|
+
let allReserveTransactionConfirmed = false;
|
|
270
|
+
if (reservationNumbers.length > 0) {
|
|
271
|
+
// console.log('is deliverable?...', params.orderNumber, reservationNumbers);
|
|
272
|
+
const referencedReserveTransactions = yield repos.assetTransaction.search({
|
|
273
|
+
project: { id: { $eq: params.project.id } },
|
|
274
|
+
typeOf: factory.assetTransactionType.Reserve,
|
|
275
|
+
transactionNumber: { $in: reservationNumbers }
|
|
276
|
+
}, ['status']);
|
|
277
|
+
// console.log('referencedReserveTransactions:', referencedReserveTransactions);
|
|
278
|
+
allReserveTransactionConfirmed =
|
|
279
|
+
referencedReserveTransactions.length === reservationNumbers.length
|
|
280
|
+
&& referencedReserveTransactions.every(({ status }) => status === factory.transactionStatusType.Confirmed);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
allReserveTransactionConfirmed = true;
|
|
284
|
+
}
|
|
285
|
+
return allReserveTransactionConfirmed;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function processing2inTransit(params) {
|
|
289
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
// const placeOrderTransaction = await findPlaceOrderTransaction({
|
|
291
|
+
// project: { id: params.project.id },
|
|
292
|
+
// confirmationNumber: params.confirmationNumber,
|
|
293
|
+
// orderNumber: params.orderNumber
|
|
294
|
+
// })({ transaction: repos.transaction });
|
|
295
|
+
let order = yield repos.order.findByOrderNumber({
|
|
296
|
+
orderNumber: params.orderNumber,
|
|
297
|
+
project: { id: params.project.id },
|
|
298
|
+
inclusion: [],
|
|
299
|
+
exclusion: ['acceptedOffers']
|
|
300
|
+
});
|
|
301
|
+
try {
|
|
302
|
+
if (settings_1.USE_ORDER_IN_TRANSIT) {
|
|
303
|
+
order = yield repos.order.changeStatus({
|
|
304
|
+
project: { id: order.project.id },
|
|
305
|
+
orderNumber: params.orderNumber,
|
|
306
|
+
orderStatus: factory.orderStatus.OrderInTransit,
|
|
307
|
+
previousOrderStatus: factory.orderStatus.OrderProcessing
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
catch (error) {
|
|
312
|
+
let throwsError = true;
|
|
313
|
+
// すでにステータスが進行していた場合、OrderProcessing->OrderInTransitの処理自体は成功しているので、後処理を続行する
|
|
314
|
+
order = yield repos.order.findByOrderNumber({
|
|
315
|
+
orderNumber: params.orderNumber,
|
|
316
|
+
project: { id: params.project.id },
|
|
317
|
+
inclusion: [],
|
|
318
|
+
exclusion: ['acceptedOffers']
|
|
319
|
+
});
|
|
320
|
+
if (order.orderStatus === factory.orderStatus.OrderDelivered
|
|
321
|
+
|| order.orderStatus === factory.orderStatus.OrderReturned) {
|
|
322
|
+
throwsError = false;
|
|
323
|
+
}
|
|
324
|
+
if (throwsError) {
|
|
325
|
+
throw error;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (params.useOnOrderStatusChanged) {
|
|
329
|
+
yield (0, onOrderStatusChanged_1.onOrderInTransit)({
|
|
330
|
+
order: Object.assign(Object.assign({}, order), { orderStatus: (settings_1.USE_ORDER_IN_TRANSIT)
|
|
331
|
+
? factory.orderStatus.OrderInTransit
|
|
332
|
+
: factory.orderStatus.OrderProcessing })
|
|
333
|
+
// placeOrderTransaction
|
|
334
|
+
})({
|
|
335
|
+
task: repos.task
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
exports.processing2inTransit = processing2inTransit;
|
|
@@ -86,25 +86,24 @@ function createOnOrderSentTasksByTransaction(params) {
|
|
|
86
86
|
};
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
89
|
+
// createSendEmailMessageTaskIfNotExistへ移行(2024-01-12~)
|
|
90
|
+
// if (Array.isArray(potentialActions.sendEmailMessage)) {
|
|
91
|
+
// potentialActions.sendEmailMessage.forEach((s) => {
|
|
92
|
+
// const sendEmailMessageTask: factory.task.IAttributes<factory.taskName.SendEmailMessage> = {
|
|
93
|
+
// project: s.project,
|
|
94
|
+
// name: factory.taskName.SendEmailMessage,
|
|
95
|
+
// status: factory.taskStatus.Ready,
|
|
96
|
+
// runsAt: now, // なるはやで実行
|
|
97
|
+
// remainingNumberOfTries: 3,
|
|
98
|
+
// numberOfTried: 0,
|
|
99
|
+
// executionResults: [],
|
|
100
|
+
// data: {
|
|
101
|
+
// actionAttributes: s
|
|
102
|
+
// }
|
|
103
|
+
// };
|
|
104
|
+
// taskAttributes.push(sendEmailMessageTask);
|
|
105
|
+
// });
|
|
106
|
+
// }
|
|
108
107
|
}
|
|
109
108
|
return taskAttributes;
|
|
110
109
|
}
|
|
@@ -14,6 +14,7 @@ exports.onOrderDelivered = void 0;
|
|
|
14
14
|
* 注文ステータス変更時処理
|
|
15
15
|
*/
|
|
16
16
|
const createDebug = require("debug");
|
|
17
|
+
const util = require("util");
|
|
17
18
|
const factory = require("../../../factory");
|
|
18
19
|
const factory_1 = require("./onOrderDelivered/factory");
|
|
19
20
|
const debug = createDebug('chevre-domain:service:order');
|
|
@@ -22,43 +23,55 @@ function onOrderDelivered(params) {
|
|
|
22
23
|
var _a, _b, _c, _d, _e;
|
|
23
24
|
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
24
25
|
let tasks = [];
|
|
26
|
+
const sendOrderPotentialActions = (_e = (_d = (_c = (_b = (_a = params.placeOrderTransaction) === null || _a === void 0 ? void 0 : _a.potentialActions) === null || _b === void 0 ? void 0 : _b.order) === null || _c === void 0 ? void 0 : _c.potentialActions) === null || _d === void 0 ? void 0 : _d.sendOrder) === null || _e === void 0 ? void 0 : _e.potentialActions;
|
|
25
27
|
switch (params.order.orderStatus) {
|
|
26
28
|
case factory.orderStatus.OrderDelivered:
|
|
27
29
|
tasks = [
|
|
28
30
|
...(0, factory_1.createInformTasks)(params.order),
|
|
29
|
-
// 取引のpotentialActionsを適用(2023-08-17~)
|
|
30
31
|
...(0, factory_1.createOnOrderSentTasksByTransaction)({
|
|
31
|
-
potentialActions:
|
|
32
|
+
potentialActions: sendOrderPotentialActions
|
|
32
33
|
})
|
|
33
34
|
];
|
|
34
|
-
// プロダクト登録プロセスロック解除
|
|
35
|
-
try {
|
|
36
|
-
const placeOrderTransaction = params.placeOrderTransaction;
|
|
37
|
-
if (typeof (placeOrderTransaction === null || placeOrderTransaction === void 0 ? void 0 : placeOrderTransaction.id) === 'string') {
|
|
38
|
-
// 廃止(2023-12-07~)
|
|
39
|
-
// プロダクト登録プロセスロック解除(orderからproductIdを抽出する)
|
|
40
|
-
// const productIds4unlock = params.order.acceptedOffers
|
|
41
|
-
// .filter((o) => o.itemOffered.typeOf === factory.permit.PermitType.Permit
|
|
42
|
-
// && typeof o.itemOffered.issuedThrough?.id === 'string'
|
|
43
|
-
// && o.itemOffered.issuedThrough.id.length > 0)
|
|
44
|
-
// .map((o) => String((<factory.order.IPermit>o.itemOffered).issuedThrough?.id));
|
|
45
|
-
// await Promise.all(productIds4unlock.map(async (productId) => {
|
|
46
|
-
// await processUnlockRegisterMembershipService({
|
|
47
|
-
// agent: { id: String(params.order.customer.id) },
|
|
48
|
-
// product: { id: productId },
|
|
49
|
-
// purpose: { typeOf: placeOrderTransaction.typeOf, id: placeOrderTransaction.id }
|
|
50
|
-
// })(repos);
|
|
51
|
-
// }));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
throw error;
|
|
56
|
-
}
|
|
57
35
|
break;
|
|
58
36
|
default:
|
|
59
37
|
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
60
38
|
}
|
|
61
39
|
yield repos.task.saveMany(tasks, { emitImmediately: true });
|
|
40
|
+
switch (params.order.orderStatus) {
|
|
41
|
+
case factory.orderStatus.OrderDelivered:
|
|
42
|
+
yield createSendEmailMessageTaskIfNotExist({
|
|
43
|
+
potentialActions: sendOrderPotentialActions
|
|
44
|
+
})(repos);
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
48
|
+
}
|
|
62
49
|
});
|
|
63
50
|
}
|
|
64
51
|
exports.onOrderDelivered = onOrderDelivered;
|
|
52
|
+
function createSendEmailMessageTaskIfNotExist(params) {
|
|
53
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a;
|
|
55
|
+
const sendEmailMessageActions = (_a = params.potentialActions) === null || _a === void 0 ? void 0 : _a.sendEmailMessage;
|
|
56
|
+
const now = new Date();
|
|
57
|
+
if (Array.isArray(sendEmailMessageActions)) {
|
|
58
|
+
yield Promise.all(sendEmailMessageActions.map((sendEmailMessageAction, index) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s', sendEmailMessageAction.project.id, factory.taskName.SendEmailMessage, sendEmailMessageAction.purpose.typeOf, sendEmailMessageAction.purpose.orderNumber, factory.orderStatus.OrderDelivered, index);
|
|
60
|
+
const sendEmailMessageTask = {
|
|
61
|
+
identifier: taskIdentifier,
|
|
62
|
+
project: sendEmailMessageAction.project,
|
|
63
|
+
name: factory.taskName.SendEmailMessage,
|
|
64
|
+
status: factory.taskStatus.Ready,
|
|
65
|
+
runsAt: now,
|
|
66
|
+
remainingNumberOfTries: 10,
|
|
67
|
+
numberOfTried: 0,
|
|
68
|
+
executionResults: [],
|
|
69
|
+
data: {
|
|
70
|
+
actionAttributes: sendEmailMessageAction
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
yield repos.task.createIfNotExistByIdentifier(sendEmailMessageTask, { emitImmediately: true });
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|