@chevre/domain 25.2.0-alpha.5 → 25.2.0-alpha.51
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/eventEmitter/task.d.ts +2 -1
- package/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
- package/lib/chevre/factory/customerTelephone2COATelNum.js +22 -0
- package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
- package/lib/chevre/repo/action/acceptPay.js +47 -19
- package/lib/chevre/repo/action/actionProcess.js +57 -57
- package/lib/chevre/repo/action.d.ts +16 -9
- package/lib/chevre/repo/action.js +99 -180
- package/lib/chevre/repo/aggregateOffer.d.ts +3 -14
- package/lib/chevre/repo/aggregateOffer.js +16 -125
- package/lib/chevre/repo/asyncAction.d.ts +69 -0
- package/lib/chevre/repo/asyncAction.js +237 -0
- package/lib/chevre/repo/concurrentLock.d.ts +3 -1
- package/lib/chevre/repo/creativeWork.d.ts +2 -3
- package/lib/chevre/repo/credentials.d.ts +2 -1
- package/lib/chevre/repo/customerType.d.ts +2 -3
- package/lib/chevre/repo/event.d.ts +10 -11
- package/lib/chevre/repo/eventOffer.d.ts +4 -5
- package/lib/chevre/repo/eventSellerMakesOffer.d.ts +2 -3
- package/lib/chevre/repo/eventSeries.d.ts +4 -5
- package/lib/chevre/repo/message.d.ts +1 -1
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.js +67 -66
- package/lib/chevre/repo/mongoose/schemas/asyncAction.d.ts +11 -0
- package/lib/chevre/repo/mongoose/schemas/asyncAction.js +89 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
- package/lib/chevre/repo/note.d.ts +3 -4
- package/lib/chevre/repo/noteAboutOrder.d.ts +2 -3
- package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +2 -2
- package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +2 -2
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +59 -11
- package/lib/chevre/repo/offerCatalog.d.ts +2 -3
- package/lib/chevre/repo/offerCatalogItem.d.ts +2 -3
- package/lib/chevre/repo/order.d.ts +2 -0
- package/lib/chevre/repo/order.js +14 -14
- package/lib/chevre/repo/orderInTransaction.d.ts +68 -1
- package/lib/chevre/repo/orderInTransaction.js +181 -3
- package/lib/chevre/repo/passport.d.ts +2 -1
- package/lib/chevre/repo/person.d.ts +0 -15
- package/lib/chevre/repo/person.js +122 -108
- package/lib/chevre/repo/place/entranceGate.d.ts +4 -5
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +4 -5
- package/lib/chevre/repo/place/seat.d.ts +4 -5
- package/lib/chevre/repo/place/section.d.ts +3 -4
- package/lib/chevre/repo/priceSpecification.d.ts +4 -4
- package/lib/chevre/repo/product.d.ts +3 -4
- package/lib/chevre/repo/rateLimit/offer.d.ts +3 -1
- package/lib/chevre/repo/rateLimit/offer.js +0 -12
- package/lib/chevre/repo/reservation.d.ts +2 -3
- package/lib/chevre/repo/sellerMakesOffer.d.ts +3 -4
- package/lib/chevre/repo/stockHolder.d.ts +1 -1
- package/lib/chevre/repo/stockHolder.js +0 -146
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
- package/lib/chevre/repo/transaction/placeOrder.js +43 -83
- package/lib/chevre/repo/transaction.d.ts +2 -2
- package/lib/chevre/repo/transactionNumberCounter.js +0 -34
- package/lib/chevre/repo/transactionProcess.d.ts +2 -1
- package/lib/chevre/repo/transactionProcess.js +0 -13
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +12 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
- package/lib/chevre/service/asyncAction.d.ts +16 -0
- package/lib/chevre/service/asyncAction.js +36 -0
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.d.ts +15 -0
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.js +42 -0
- package/lib/chevre/service/asyncActionHandler.d.ts +13 -0
- package/lib/chevre/service/asyncActionHandler.js +89 -0
- package/lib/chevre/service/notification/factory.d.ts +2 -4
- package/lib/chevre/service/notification/factory.js +26 -24
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +11 -5
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +11 -3
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -5
- package/lib/chevre/service/offer/event/authorize/factory.js +93 -75
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
- package/lib/chevre/service/offer/event/authorize.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +15 -12
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +4 -0
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +22 -9
- package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionCanceled.js +19 -11
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -2
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +1 -7
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +95 -33
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +2 -6
- package/lib/chevre/service/order/payOrder.d.ts +2 -0
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +13 -58
- package/lib/chevre/service/order/placeOrder/factory.js +3 -21
- package/lib/chevre/service/order/placeOrder.d.ts +4 -5
- package/lib/chevre/service/order/placeOrder.js +20 -31
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
- package/lib/chevre/service/payment/any/authorize.js +13 -37
- package/lib/chevre/service/payment/any/factory.d.ts +7 -7
- package/lib/chevre/service/payment/any/factory.js +19 -22
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +3 -1
- package/lib/chevre/service/payment/any/findAcceptAction.js +14 -6
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +4 -66
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
- package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
- package/lib/chevre/service/reserve/adminFindReservations.d.ts +15 -0
- package/lib/chevre/service/reserve/adminFindReservations.js +35 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +17 -8
- package/lib/chevre/service/reserve/searchByOrder.js +2 -6
- package/lib/chevre/service/reserve.d.ts +2 -2
- package/lib/chevre/service/reserve.js +3 -3
- package/lib/chevre/service/task/aggregateOffers.d.ts +2 -2
- package/lib/chevre/service/task/aggregateOffers.js +2 -1
- package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +2 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -1
- package/lib/chevre/service/task/authorizePayment.js +3 -1
- package/lib/chevre/service/task/cancelReservation.d.ts +2 -2
- package/lib/chevre/service/task/cancelReservation.js +2 -1
- package/lib/chevre/service/task/confirmPayTransaction.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +2 -7
- package/lib/chevre/service/task/deleteTransaction.d.ts +2 -2
- package/lib/chevre/service/task/deleteTransaction.js +2 -1
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +2 -2
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -3
- package/lib/chevre/service/task/onEventChanged.d.ts +2 -2
- package/lib/chevre/service/task/onEventChanged.js +2 -1
- package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +2 -2
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -1
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated.js +2 -1
- package/lib/chevre/service/task/placeOrder.d.ts +2 -2
- package/lib/chevre/service/task/placeOrder.js +6 -3
- package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
- package/lib/chevre/service/task/refund.d.ts +2 -2
- package/lib/chevre/service/task/refund.js +4 -10
- package/lib/chevre/service/task/reserve.d.ts +2 -2
- package/lib/chevre/service/task/reserve.js +2 -1
- package/lib/chevre/service/task/returnOrder.d.ts +2 -2
- package/lib/chevre/service/task/returnOrder.js +2 -1
- package/lib/chevre/service/task/sendOrder.d.ts +2 -2
- package/lib/chevre/service/task/sendOrder.js +2 -1
- package/lib/chevre/service/task/voidPayTransaction.js +3 -7
- package/lib/chevre/service/task/voidPayment.d.ts +2 -2
- package/lib/chevre/service/task/voidPayment.js +2 -1
- package/lib/chevre/service/taskHandler/onOperationFailed.js +1 -1
- package/lib/chevre/service/taskHandler.d.ts +2 -2
- package/lib/chevre/service/taskHandler.js +36 -37
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +28 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +11 -12
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +4 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +6 -7
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +35 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +15 -11
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +11 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +53 -32
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +6 -5
- package/lib/chevre/service/transaction/placeOrder/confirm.js +33 -78
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
- package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.d.ts +20 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.js +63 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +17 -86
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/lib/chevre/service.d.ts +4 -0
- package/lib/chevre/service.js +12 -1
- package/lib/chevre/taskSettings.d.ts +1 -3
- package/package.json +8 -11
- package/lib/chevre/service/order/findConfirmedPlaceOrder.d.ts +0 -13
- package/lib/chevre/service/order/findConfirmedPlaceOrder.js +0 -32
- package/lib/chevre/service/reserve/findReservations.d.ts +0 -33
- package/lib/chevre/service/reserve/findReservations.js +0 -61
|
@@ -52,8 +52,10 @@ function call(params) {
|
|
|
52
52
|
const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
|
|
53
53
|
&& typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
|
|
54
54
|
try {
|
|
55
|
+
const { instrument: _instrument, project: _project, ...authorizeParams } = params.data;
|
|
55
56
|
await (0, any_1.authorize)({
|
|
56
|
-
...
|
|
57
|
+
...authorizeParams,
|
|
58
|
+
project: { id: params.project.id },
|
|
57
59
|
instrument: (Array.isArray(params.data.instrument)) ? params.data.instrument : [],
|
|
58
60
|
sameAs: { id: params.id } // タスクIDを関連付け(2024-04-20~)
|
|
59
61
|
})({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
2
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.cancelReservation.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -13,8 +13,9 @@ const cancelReservation_1 = require("../reserve/cancelReservation");
|
|
|
13
13
|
/**
|
|
14
14
|
* タスク実行関数
|
|
15
15
|
*/
|
|
16
|
-
function call(
|
|
16
|
+
function call(params) {
|
|
17
17
|
return async ({ connection, redisClient }) => {
|
|
18
|
+
const { data } = params;
|
|
18
19
|
if (redisClient === undefined) {
|
|
19
20
|
throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
|
|
20
21
|
}
|
|
@@ -15,7 +15,6 @@ const confirmPayTransaction_1 = require("../order/confirmPayTransaction");
|
|
|
15
15
|
* タスク実行関数
|
|
16
16
|
*/
|
|
17
17
|
function call(params) {
|
|
18
|
-
// export function call(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>): IOperationExecute<void> {
|
|
19
18
|
return async ({ connection }) => {
|
|
20
19
|
await (0, confirmPayTransaction_1.confirmPayTransaction)({
|
|
21
20
|
...params.data,
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.call = call;
|
|
4
4
|
exports.confirmReserveTransaction = confirmReserveTransaction;
|
|
5
5
|
const coa_service_1 = require("@motionpicture/coa-service");
|
|
6
|
-
const google_libphonenumber_1 = require("google-libphonenumber");
|
|
7
6
|
const util_1 = require("util");
|
|
7
|
+
const customerTelephone2COATelNum_1 = require("../../factory/customerTelephone2COATelNum");
|
|
8
8
|
const factory_1 = require("../../factory");
|
|
9
9
|
const confirm_1 = require("../assetTransaction/reserve/confirm");
|
|
10
10
|
const reserveCOA_1 = require("../assetTransaction/reserveCOA");
|
|
@@ -71,12 +71,7 @@ function createConfirmObject4COAByOrder(params) {
|
|
|
71
71
|
&& o.offeredThrough?.identifier === factory_1.factory.service.webAPI.Identifier.COA;
|
|
72
72
|
});
|
|
73
73
|
const customer = params.order.customer;
|
|
74
|
-
|
|
75
|
-
const phoneUtil = google_libphonenumber_1.PhoneNumberUtil.getInstance();
|
|
76
|
-
const phoneNumber = phoneUtil.parse(customer.telephone, 'JP');
|
|
77
|
-
let telNum = phoneUtil.format(phoneNumber, google_libphonenumber_1.PhoneNumberFormat.NATIONAL);
|
|
78
|
-
// COAでは数字のみ受け付けるので数字以外を除去
|
|
79
|
-
telNum = telNum.replace(/[^\d]/g, '');
|
|
74
|
+
const telNum = (0, customerTelephone2COATelNum_1.customerTelephone2COATelNum)({ telephone: String(customer.telephone) });
|
|
80
75
|
const mailAddr = customer.email;
|
|
81
76
|
if (mailAddr === undefined) {
|
|
82
77
|
throw new factory_1.factory.errors.Argument('order', 'order.customer.email undefined');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.deleteTransaction.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -49,8 +49,9 @@ const TransactionService = __importStar(require("../transaction"));
|
|
|
49
49
|
/**
|
|
50
50
|
* タスク実行関数
|
|
51
51
|
*/
|
|
52
|
-
function call(
|
|
52
|
+
function call(params) {
|
|
53
53
|
return async ({ connection }) => {
|
|
54
|
+
const { data } = params;
|
|
54
55
|
await TransactionService.deleteTransaction(data)({
|
|
55
56
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
56
57
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.onAssetTransactionStatusChanged.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -3,26 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
5
5
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
6
|
+
const message_1 = require("../../repo/message");
|
|
6
7
|
const order_1 = require("../../repo/order");
|
|
7
8
|
const setting_1 = require("../../repo/setting");
|
|
8
9
|
const integration_1 = require("../../repo/setting/integration");
|
|
9
10
|
const task_1 = require("../../repo/task");
|
|
10
|
-
// import { TransactionRepo } from '../../repo/transaction';
|
|
11
11
|
const placeOrder_1 = require("../../repo/transaction/placeOrder");
|
|
12
12
|
const onAssetTransactionStatusChanged_1 = require("../order/onAssetTransactionStatusChanged");
|
|
13
13
|
/**
|
|
14
14
|
* タスク実行関数
|
|
15
15
|
*/
|
|
16
|
-
function call(
|
|
16
|
+
function call(params) {
|
|
17
17
|
return async ({ connection }) => {
|
|
18
|
+
const { data } = params;
|
|
18
19
|
const settings = new integration_1.IntegrationSettingRepo({ connection });
|
|
19
20
|
await (0, onAssetTransactionStatusChanged_1.onAssetTransactionStatusChanged)(data)({
|
|
20
21
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
21
22
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
23
|
+
message: new message_1.MessageRepo(connection),
|
|
22
24
|
order: new order_1.OrderRepo(connection),
|
|
23
25
|
setting: new setting_1.SettingRepo(connection),
|
|
24
26
|
task: new task_1.TaskRepo(connection),
|
|
25
|
-
// transaction: new TransactionRepo(connection),
|
|
26
27
|
placeOrder: new placeOrder_1.PlaceOrderRepo(connection)
|
|
27
28
|
}, settings);
|
|
28
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
2
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.onEventChanged.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -11,8 +11,9 @@ const onEventChanged_1 = require("../offer/onEventChanged");
|
|
|
11
11
|
/**
|
|
12
12
|
* タスク実行関数
|
|
13
13
|
*/
|
|
14
|
-
function call(
|
|
14
|
+
function call(params) {
|
|
15
15
|
return async ({ connection }) => {
|
|
16
|
+
const { data } = params;
|
|
16
17
|
await (0, onEventChanged_1.onEventChanged)(data)({
|
|
17
18
|
event: new event_1.EventRepo(connection),
|
|
18
19
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.ITask<factory.taskName.OnOrderPaymentCompleted>, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
5
|
+
const message_1 = require("../../repo/message");
|
|
5
6
|
const order_1 = require("../../repo/order");
|
|
6
7
|
const setting_1 = require("../../repo/setting");
|
|
7
8
|
const integration_1 = require("../../repo/setting/integration");
|
|
@@ -11,11 +12,13 @@ const payOrder_1 = require("../order/payOrder");
|
|
|
11
12
|
/**
|
|
12
13
|
* タスク実行関数
|
|
13
14
|
*/
|
|
14
|
-
function call(
|
|
15
|
+
function call(params) {
|
|
15
16
|
return async ({ connection }) => {
|
|
17
|
+
const { data } = params;
|
|
16
18
|
const settings = new integration_1.IntegrationSettingRepo({ connection });
|
|
17
19
|
await (0, payOrder_1.payOrder)(data)({
|
|
18
20
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
21
|
+
message: new message_1.MessageRepo(connection),
|
|
19
22
|
order: new order_1.OrderRepo(connection),
|
|
20
23
|
setting: new setting_1.SettingRepo(connection),
|
|
21
24
|
task: new task_1.TaskRepo(connection),
|
|
@@ -11,7 +11,7 @@ function createInformOfferTasks(params, setting) {
|
|
|
11
11
|
}
|
|
12
12
|
// const informResources = settings.onResourceUpdated.informResource;
|
|
13
13
|
const informResources = setting?.onResourceUpdated?.informResource;
|
|
14
|
-
const offers = await repos.offer.
|
|
14
|
+
const offers = await repos.offer.findUnitPriceOffers({
|
|
15
15
|
id: { $in: params.ids }
|
|
16
16
|
}, { typeOf: 1, name: 1, priceSpecification: 1, additionalProperty: 1, identifier: 1, project: 1 });
|
|
17
17
|
const offers4inform = offers.map(({ id, typeOf, name, priceSpecification, additionalProperty, identifier, project }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
2
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.onResourceUpdated.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -29,8 +29,9 @@ const onOfferCatalogUpdated_1 = require("./onResourceUpdated/onOfferCatalogUpdat
|
|
|
29
29
|
/**
|
|
30
30
|
* タスク実行関数
|
|
31
31
|
*/
|
|
32
|
-
function call(
|
|
32
|
+
function call(params) {
|
|
33
33
|
return async ({ connection }) => {
|
|
34
|
+
const { data } = params;
|
|
34
35
|
await onResourceUpdated(data)({
|
|
35
36
|
accountTitle: new accountTitle_1.AccountTitleRepo(connection),
|
|
36
37
|
action: new action_1.ActionRepo(connection),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.ITask<factory.taskName.PlaceOrder>, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
|
+
const factory_1 = require("../../factory");
|
|
4
5
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
5
6
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
6
7
|
const action_1 = require("../../repo/action");
|
|
7
8
|
const authorizeOffer_1 = require("../../repo/action/authorizeOffer");
|
|
8
9
|
const authorizePaymentMethod_1 = require("../../repo/action/authorizePaymentMethod");
|
|
10
|
+
const message_1 = require("../../repo/message");
|
|
9
11
|
const order_1 = require("../../repo/order");
|
|
10
12
|
const orderInTransaction_1 = require("../../repo/orderInTransaction");
|
|
11
13
|
const setting_1 = require("../../repo/setting");
|
|
12
14
|
const integration_1 = require("../../repo/setting/integration");
|
|
13
15
|
const task_1 = require("../../repo/task");
|
|
14
|
-
// import { TransactionRepo } from '../../repo/transaction';
|
|
15
16
|
const placeOrder_1 = require("../../repo/transaction/placeOrder");
|
|
16
17
|
const placeOrder_2 = require("../order/placeOrder");
|
|
17
18
|
/**
|
|
18
19
|
* タスク実行関数
|
|
19
20
|
*/
|
|
20
|
-
function call(
|
|
21
|
+
function call(params) {
|
|
21
22
|
return async ({ connection }) => {
|
|
23
|
+
const { data } = params;
|
|
22
24
|
const settings = new integration_1.IntegrationSettingRepo({ connection });
|
|
23
25
|
await (0, placeOrder_2.placeOrder)({
|
|
24
26
|
...data,
|
|
27
|
+
agent: { id: data.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
25
28
|
useOnOrderStatusChanged: true
|
|
26
29
|
})({
|
|
27
30
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
@@ -29,11 +32,11 @@ function call(data) {
|
|
|
29
32
|
action: new action_1.ActionRepo(connection),
|
|
30
33
|
authorizeOfferAction: new authorizeOffer_1.AuthorizeOfferActionRepo(connection),
|
|
31
34
|
authorizePaymentMethodAction: new authorizePaymentMethod_1.AuthorizePaymentMethodActionRepo(connection),
|
|
35
|
+
message: new message_1.MessageRepo(connection),
|
|
32
36
|
order: new order_1.OrderRepo(connection),
|
|
33
37
|
orderInTransaction: new orderInTransaction_1.OrderInTransactionRepo(connection),
|
|
34
38
|
setting: new setting_1.SettingRepo(connection),
|
|
35
39
|
task: new task_1.TaskRepo(connection),
|
|
36
|
-
// transaction: new TransactionRepo(connection),
|
|
37
40
|
placeOrder: new placeOrder_1.PlaceOrderRepo(connection)
|
|
38
41
|
}, settings);
|
|
39
42
|
};
|
|
@@ -9,7 +9,7 @@ const authorization_1 = require("../../repo/authorization");
|
|
|
9
9
|
const event_1 = require("../../repo/event");
|
|
10
10
|
const eventSeries_1 = require("../../repo/eventSeries");
|
|
11
11
|
const issuer_1 = require("../../repo/issuer");
|
|
12
|
-
|
|
12
|
+
const orderInTransaction_1 = require("../../repo/orderInTransaction");
|
|
13
13
|
// import { OrderNumberRepo } from '../../repo/orderNumber';
|
|
14
14
|
const paymentService_1 = require("../../repo/paymentService");
|
|
15
15
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
@@ -36,10 +36,14 @@ function call(params) {
|
|
|
36
36
|
const actionRepo = new acceptPay_1.AcceptPayActionRepo(connection);
|
|
37
37
|
// const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
38
38
|
try {
|
|
39
|
+
const { savePaymentMethodIdInTransaction, project: _project, ...publishPaymentUrlParams } = params.data;
|
|
39
40
|
await (0, any_1.publishPaymentUrl)({
|
|
40
|
-
...
|
|
41
|
+
...publishPaymentUrlParams,
|
|
42
|
+
project: { id: params.project.id },
|
|
41
43
|
instrument: (Array.isArray(params.data.instrument)) ? params.data.instrument : [],
|
|
42
44
|
sameAs: { id: params.id }
|
|
45
|
+
}, {
|
|
46
|
+
savePaymentMethodIdInTransaction: savePaymentMethodIdInTransaction === true
|
|
43
47
|
})({
|
|
44
48
|
acceptPayAction: actionRepo,
|
|
45
49
|
authorizeInvoiceAction: new authorizeInvoice_1.AuthorizeInvoiceActionRepo(connection),
|
|
@@ -48,7 +52,7 @@ function call(params) {
|
|
|
48
52
|
event: new event_1.EventRepo(connection),
|
|
49
53
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
50
54
|
issuer: new issuer_1.IssuerRepo(connection),
|
|
51
|
-
|
|
55
|
+
orderInTransaction: new orderInTransaction_1.OrderInTransactionRepo(connection),
|
|
52
56
|
// orderNumber: new OrderNumberRepo({ connection }),
|
|
53
57
|
paymentAccepted: new sellerPaymentAccepted_1.SellerPaymentAcceptedRepo(connection),
|
|
54
58
|
paymentService: new paymentService_1.PaymentServiceRepo(connection),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(params:
|
|
6
|
+
export declare function call(params: Pick<factory.task.refund.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -26,16 +26,10 @@ function call(params) {
|
|
|
26
26
|
throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
|
|
27
27
|
}
|
|
28
28
|
const settings = new integration_1.IntegrationSettingRepo({ connection });
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
sameAs: { id: params.id } // タスクIDを関連付け(2024-04-20~)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
data = params;
|
|
38
|
-
}
|
|
29
|
+
const data = {
|
|
30
|
+
...params.data,
|
|
31
|
+
sameAs: { id: params.id } // タスクIDを関連付け(2024-04-20~)
|
|
32
|
+
};
|
|
39
33
|
const paymentServiceId = data.object.at(0)?.id;
|
|
40
34
|
const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
|
|
41
35
|
const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
2
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.reserve.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -11,8 +11,9 @@ const confirmReservation_1 = require("../reserve/confirmReservation");
|
|
|
11
11
|
/**
|
|
12
12
|
* タスク実行関数
|
|
13
13
|
*/
|
|
14
|
-
function call(
|
|
14
|
+
function call(params) {
|
|
15
15
|
return async ({ connection }) => {
|
|
16
|
+
const { data } = params;
|
|
16
17
|
await (0, confirmReservation_1.confirmReservation)({
|
|
17
18
|
// actionAttributesList: data.actionAttributes,
|
|
18
19
|
potentialReserveAction: data, // optimize(2024-07-01~)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.ITask<factory.taskName.ReturnOrder>, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -12,8 +12,9 @@ const returnOrder_2 = require("../order/returnOrder");
|
|
|
12
12
|
/**
|
|
13
13
|
* タスク実行関数
|
|
14
14
|
*/
|
|
15
|
-
function call(
|
|
15
|
+
function call(params) {
|
|
16
16
|
return async ({ connection }) => {
|
|
17
|
+
const { data } = params;
|
|
17
18
|
await (0, returnOrder_2.returnOrder)({
|
|
18
19
|
...data,
|
|
19
20
|
useOnOrderStatusChanged: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.ITask<factory.taskName.SendOrder>, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -13,8 +13,9 @@ const sendOrder_1 = require("../order/sendOrder");
|
|
|
13
13
|
/**
|
|
14
14
|
* タスク実行関数
|
|
15
15
|
*/
|
|
16
|
-
function call(
|
|
16
|
+
function call(params) {
|
|
17
17
|
return async ({ connection }) => {
|
|
18
|
+
const { data } = params;
|
|
18
19
|
await (0, sendOrder_1.sendOrder)({
|
|
19
20
|
...data,
|
|
20
21
|
object: {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
5
|
-
// import { ActionRepo } from '../../repo/action';
|
|
6
5
|
const acceptPay_1 = require("../../repo/action/acceptPay");
|
|
7
6
|
const authorizePaymentMethod_1 = require("../../repo/action/authorizePaymentMethod");
|
|
8
7
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
@@ -10,8 +9,8 @@ const paymentService_1 = require("../../repo/paymentService");
|
|
|
10
9
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
11
10
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
12
11
|
const task_1 = require("../../repo/task");
|
|
12
|
+
const orderInTransaction_1 = require("../../repo/orderInTransaction");
|
|
13
13
|
const placeOrder_1 = require("../../repo/transaction/placeOrder");
|
|
14
|
-
// import { TransactionRepo } from '../../repo/transaction';
|
|
15
14
|
const any_1 = require("../payment/any");
|
|
16
15
|
/**
|
|
17
16
|
* タスク実行関数
|
|
@@ -24,7 +23,6 @@ function call(params) {
|
|
|
24
23
|
sameAs: { id: params.id }
|
|
25
24
|
})({
|
|
26
25
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
27
|
-
// action: new ActionRepo(connection),
|
|
28
26
|
acceptPayAction: new acceptPay_1.AcceptPayActionRepo(connection),
|
|
29
27
|
authorizePaymentMethodAction: new authorizePaymentMethod_1.AuthorizePaymentMethodActionRepo(connection),
|
|
30
28
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
@@ -32,10 +30,8 @@ function call(params) {
|
|
|
32
30
|
paymentService: new paymentService_1.PaymentServiceRepo(connection),
|
|
33
31
|
paymentServiceProvider: new paymentServiceProvider_1.PaymentServiceProviderRepo(connection),
|
|
34
32
|
task: new task_1.TaskRepo(connection),
|
|
33
|
+
orderInTransaction: new orderInTransaction_1.OrderInTransactionRepo(connection),
|
|
35
34
|
placeOrder: new placeOrder_1.PlaceOrderRepo(connection)
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
// settings
|
|
39
|
-
);
|
|
35
|
+
});
|
|
40
36
|
};
|
|
41
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.voidPayment.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -19,8 +19,9 @@ const voidPaymentByTask_1 = require("./payment/voidPaymentByTask");
|
|
|
19
19
|
/**
|
|
20
20
|
* タスク実行関数
|
|
21
21
|
*/
|
|
22
|
-
function call(
|
|
22
|
+
function call(params) {
|
|
23
23
|
return async ({ connection, redisClient }) => {
|
|
24
|
+
const { data } = params;
|
|
24
25
|
if (redisClient === undefined) {
|
|
25
26
|
throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
|
|
26
27
|
}
|
|
@@ -10,7 +10,7 @@ function onOperationFailed(params) {
|
|
|
10
10
|
return async (repos) => {
|
|
11
11
|
let error = params.error;
|
|
12
12
|
const { task, now, next } = params;
|
|
13
|
-
if (typeof error !== 'object') {
|
|
13
|
+
if (error === null || typeof error !== 'object') {
|
|
14
14
|
error = { message: String(error) };
|
|
15
15
|
}
|
|
16
16
|
const endDate = new Date();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { INextFunction } from '../eventEmitter/task';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
|
-
import type { ICallResult, ICallableTaskOperation,
|
|
3
|
+
import type { ICallResult, ICallableTaskOperation, IExecutableTask, IExecutableTaskKeys, IOperationExecute } from '../taskSettings';
|
|
4
4
|
export declare const taskLoader: {
|
|
5
5
|
load: (taskName: string) => Promise<{
|
|
6
|
-
call:
|
|
6
|
+
call: ICallableTaskOperation;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
@@ -41,44 +41,43 @@ function executeTask(task, next) {
|
|
|
41
41
|
throw new factory_1.factory.errors.Internal(`task remainingNumberOfTries < 0 [remainingNumberOfTries:${remainingNumberOfTries}]`);
|
|
42
42
|
}
|
|
43
43
|
// タスク名の関数が定義されていなければ、TypeErrorとなる
|
|
44
|
-
let callResult;
|
|
45
|
-
// const { call } = await import(`./task/${task.name}.js`) as {
|
|
46
|
-
// call: ICallableTaskOperationSimple | ICallableTaskOperation;
|
|
47
|
-
// };
|
|
48
44
|
const { call } = await exports.taskLoader.load(task.name); // testが書きづらいのでtaskLoader経由で呼ぶ
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
45
|
+
const callResult = await call(task)(settings, options);
|
|
46
|
+
// ICallableTaskOperationSimpleを廃止(2026-07-22~)
|
|
47
|
+
// let callResult: ICallResult | undefined;
|
|
48
|
+
// switch (task.name) {
|
|
49
|
+
// case factory.taskName.AcceptCOAOffer:
|
|
50
|
+
// case factory.taskName.AggregateOnSystem:
|
|
51
|
+
// case factory.taskName.AuthorizePayment:
|
|
52
|
+
// case factory.taskName.CancelPendingReservation:
|
|
53
|
+
// case factory.taskName.CheckMovieTicket:
|
|
54
|
+
// case factory.taskName.CheckResource:
|
|
55
|
+
// case factory.taskName.CreateAccountingReport:
|
|
56
|
+
// case factory.taskName.HandleNotification:
|
|
57
|
+
// case factory.taskName.ImportEventCapacitiesFromCOA:
|
|
58
|
+
// case factory.taskName.ImportEventsFromCOA:
|
|
59
|
+
// case factory.taskName.ImportOffersFromCOA:
|
|
60
|
+
// case factory.taskName.InvalidatePaymentUrl:
|
|
61
|
+
// case factory.taskName.OnAuthorizationCreated:
|
|
62
|
+
// case factory.taskName.OnResourceDeleted:
|
|
63
|
+
// case factory.taskName.Pay:
|
|
64
|
+
// case factory.taskName.PublishPaymentUrl:
|
|
65
|
+
// case factory.taskName.Refund:
|
|
66
|
+
// case factory.taskName.VoidPayTransaction:
|
|
67
|
+
// case factory.taskName.VoidReserveTransaction:
|
|
68
|
+
// case factory.taskName.ConfirmPayTransaction:
|
|
69
|
+
// case factory.taskName.ConfirmReserveTransaction:
|
|
70
|
+
// case factory.taskName.ReturnPayTransaction:
|
|
71
|
+
// case factory.taskName.ReturnReserveTransaction:
|
|
72
|
+
// case factory.taskName.SendEmailMessage:
|
|
73
|
+
// case factory.taskName.SyncResourcesFromCOA:
|
|
74
|
+
// case factory.taskName.TriggerWebhook:
|
|
75
|
+
// case factory.taskName.UseReservation:
|
|
76
|
+
// callResult = await (call as ICallableTaskOperation)(task)(settings, options);
|
|
77
|
+
// break;
|
|
78
|
+
// default:
|
|
79
|
+
// await (call as ICallableTaskOperationSimple)(task.data)(settings); // TODO discontinue
|
|
80
|
+
// }
|
|
82
81
|
const result = {
|
|
83
82
|
executedAt: now,
|
|
84
83
|
endDate: new Date(),
|
package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { factory } from '../../../factory';
|
|
2
|
+
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
3
|
+
type IAuthorizeOfferAction = factory.action.authorize.offer.eventService.IAction;
|
|
4
|
+
type IAuthorizePaymentAction = factory.action.authorize.paymentMethod.any.IAction;
|
|
5
|
+
export declare function deletePayTransactionsByPlaceOrder(params: {
|
|
6
|
+
authorizeActions: (IAuthorizeOfferAction | IAuthorizePaymentAction)[];
|
|
7
|
+
transaction: Pick<factory.transaction.placeOrder.ITransaction, 'project'>;
|
|
8
|
+
}): (repos: {
|
|
9
|
+
assetTransaction: AssetTransactionRepo;
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
deletePayTransactionResult: any;
|
|
12
|
+
deleteRefundResult: any;
|
|
13
|
+
payTransactionNumbers: string[];
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|