@chevre/domain 24.1.0-alpha.4 → 24.1.0-alpha.40
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/README.md +0 -2
- package/lib/chevre/credentials.d.ts +4 -16
- package/lib/chevre/credentials.js +11 -39
- package/lib/chevre/emailMessageBuilder.js +4 -12
- package/lib/chevre/index.d.ts +1 -1
- package/lib/chevre/index.js +2 -2
- package/lib/chevre/repo/acceptedOffer.d.ts +14 -13
- package/lib/chevre/repo/acceptedOffer.js +128 -51
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +32 -0
- package/lib/chevre/repo/acceptedOfferInReserve.js +84 -0
- package/lib/chevre/repo/accountingReport.d.ts +9 -2
- package/lib/chevre/repo/accountingReport.js +6 -34
- package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
- package/lib/chevre/repo/assetTransaction/reserve.d.ts +0 -1
- package/lib/chevre/repo/assetTransaction/reserve.js +4 -50
- package/lib/chevre/repo/event.js +12 -8
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +7 -0
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.js +74 -0
- package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +1 -1
- package/lib/chevre/repo/factory/reservation/createMongoConditions.js +171 -362
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +42 -42
- package/lib/chevre/repo/mongoose/schemas/order.js +108 -108
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +3 -1
- package/lib/chevre/repo/mongoose/schemas/reservation.js +128 -146
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +45 -0
- package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
- package/lib/chevre/repo/order.d.ts +2 -83
- package/lib/chevre/repo/order.js +171 -364
- package/lib/chevre/repo/orderInTransaction.d.ts +48 -6
- package/lib/chevre/repo/orderInTransaction.js +58 -4
- package/lib/chevre/repo/place/hasPOS.js +2 -1
- package/lib/chevre/repo/reservation.d.ts +20 -7
- package/lib/chevre/repo/reservation.js +16 -12
- package/lib/chevre/repo/role.d.ts +1 -15
- package/lib/chevre/repo/role.js +7 -14
- package/lib/chevre/repo/setting/integration.d.ts +25 -0
- package/lib/chevre/repo/setting/integration.js +86 -0
- package/lib/chevre/repo/transaction.d.ts +6 -6
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +11 -0
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +6 -1
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
- package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +14 -11
- package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation/start.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -12
- package/lib/chevre/service/assetTransaction/reserve/start/factory/price.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
- package/lib/chevre/service/delivery/factory.d.ts +6 -1
- package/lib/chevre/service/delivery/factory.js +1 -1
- package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -3
- package/lib/chevre/service/delivery/reservation/factory.js +0 -17
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +2 -2
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +1 -1
- package/lib/chevre/service/notification/notifyByEmail.js +0 -6
- package/lib/chevre/service/offer/any.d.ts +7 -2
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +13 -15
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +6 -1
- package/lib/chevre/service/offer/event/authorize.js +51 -4
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -3
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -3
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +67 -72
- package/lib/chevre/service/order/deleteOrder.js +23 -44
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +9 -11
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +6 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +2 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
- package/lib/chevre/service/order/onOrderUpdated.js +0 -1
- package/lib/chevre/service/order/payOrder.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +4 -1
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +0 -5
- package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder.d.ts +1 -1
- package/lib/chevre/service/order/returnOrder.js +0 -1
- package/lib/chevre/service/order/sendOrder.js +4 -5
- package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/any/person2username.js +0 -1
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize.js +4 -3
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.js +1 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
- package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/searchGMOTrade.js +1 -1
- package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +8 -1
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +1 -1
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
- package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/reserve/confirmReservation.js +7 -7
- package/lib/chevre/service/reserve/factory.js +2 -1
- package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
- package/lib/chevre/service/reserve/findByCode.js +4 -1
- package/lib/chevre/service/reserve/findReservations.d.ts +4 -4
- package/lib/chevre/service/reserve/findReservations.js +16 -26
- package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +4 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -10
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
- package/lib/chevre/service/reserve/searchByOrder.js +10 -3
- package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
- package/lib/chevre/service/task/acceptCOAOffer.js +3 -2
- package/lib/chevre/service/task/authorizePayment.js +1 -1
- package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
- package/lib/chevre/service/task/checkMovieTicket.js +1 -1
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +5 -2
- package/lib/chevre/service/task/createAccountingReport.js +7 -9
- package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +1 -1
- package/lib/chevre/service/task/importOffersFromCOA.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
- package/lib/chevre/service/task/pay.js +1 -1
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/payByTask.js +5 -2
- package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
- package/lib/chevre/service/task/refund.js +1 -1
- package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
- package/lib/chevre/service/task/useReservation.d.ts +2 -2
- package/lib/chevre/service/task/useReservation.js +5 -16
- package/lib/chevre/service/task/voidPayment.js +1 -1
- package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
- package/lib/chevre/service/task.d.ts +0 -2
- package/lib/chevre/service/task.js +10 -2
- package/lib/chevre/service/taskHandler.js +1 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +5 -3
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/preStart.js +4 -4
- package/lib/chevre/service/validation/validateOrder.js +7 -79
- package/lib/chevre/settings.d.ts +0 -55
- package/lib/chevre/settings.js +1 -29
- package/lib/chevre/taskSettings.d.ts +5 -2
- package/package.json +2 -2
- package/lib/chevre/credentials/customSearch.d.ts +0 -13
- package/lib/chevre/credentials/customSearch.js +0 -16
- package/lib/chevre/credentials/lineNotify.d.ts +0 -17
- package/lib/chevre/credentials/lineNotify.js +0 -20
|
@@ -19,84 +19,79 @@ function createAccountingReportIfNotExist(params) {
|
|
|
19
19
|
}
|
|
20
20
|
// 最適化(2023-06-30~)
|
|
21
21
|
function createOrder4report(params) {
|
|
22
|
-
if (!Array.isArray(params.acceptedOffers)) {
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const numItems = params.acceptedOffers.length;
|
|
26
|
-
// 必要な属性についてDate型に変換(でないと検索クエリを効率的に使えない)
|
|
27
|
-
const acceptedOffers = (Array.isArray(params.acceptedOffers))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
};
|
|
22
|
+
// if (!Array.isArray(params.acceptedOffers)) {
|
|
23
|
+
// throw new factory.errors.ArgumentNull('order.acceptedOffers');
|
|
24
|
+
// }
|
|
25
|
+
// const numItems: number = params.acceptedOffers.length;
|
|
26
|
+
// // 必要な属性についてDate型に変換(でないと検索クエリを効率的に使えない)
|
|
27
|
+
// const acceptedOffers = (Array.isArray(params.acceptedOffers))
|
|
28
|
+
// ? params.acceptedOffers.map((o) => {
|
|
29
|
+
// if (o.itemOffered.typeOf === factory.reservationType.EventReservation) {
|
|
30
|
+
// let itemOffered = o.itemOffered;
|
|
31
|
+
// const reservationFor = itemOffered.reservationFor;
|
|
32
|
+
// itemOffered = {
|
|
33
|
+
// ...itemOffered,
|
|
34
|
+
// reservationFor: {
|
|
35
|
+
// ...reservationFor,
|
|
36
|
+
// ...(reservationFor.doorTime !== undefined)
|
|
37
|
+
// ? {
|
|
38
|
+
// doorTime: moment(reservationFor.doorTime)
|
|
39
|
+
// .toDate()
|
|
40
|
+
// }
|
|
41
|
+
// : undefined,
|
|
42
|
+
// ...(reservationFor.endDate !== undefined)
|
|
43
|
+
// ? {
|
|
44
|
+
// endDate: moment(reservationFor.endDate)
|
|
45
|
+
// .toDate()
|
|
46
|
+
// }
|
|
47
|
+
// : undefined,
|
|
48
|
+
// ...(reservationFor.startDate !== undefined)
|
|
49
|
+
// ? {
|
|
50
|
+
// startDate: moment(reservationFor.startDate)
|
|
51
|
+
// .toDate()
|
|
52
|
+
// }
|
|
53
|
+
// : undefined
|
|
54
|
+
// }
|
|
55
|
+
// } as factory.order.IReservation;
|
|
56
|
+
// return {
|
|
57
|
+
// ...o,
|
|
58
|
+
// itemOffered
|
|
59
|
+
// };
|
|
60
|
+
// } else {
|
|
61
|
+
// return o;
|
|
62
|
+
// }
|
|
63
|
+
// })
|
|
64
|
+
// : [];
|
|
65
|
+
// const customer: factory.report.accountingReport.IOptimizedCustomer = {
|
|
66
|
+
// id: params.customer.id,
|
|
67
|
+
// typeOf: params.customer.typeOf,
|
|
68
|
+
// additionalProperty: (Array.isArray(params.customer.additionalProperty))
|
|
69
|
+
// ? params.customer.additionalProperty
|
|
70
|
+
// : [],
|
|
71
|
+
// identifier: (Array.isArray(params.customer.identifier))
|
|
72
|
+
// ? params.customer.identifier
|
|
73
|
+
// : []
|
|
74
|
+
// };
|
|
77
75
|
return {
|
|
78
|
-
// ...params,
|
|
79
|
-
confirmationNumber: params.confirmationNumber,
|
|
80
76
|
id: params.id,
|
|
81
77
|
orderNumber: params.orderNumber,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
paymentMethods: params.paymentMethods.map(({ paymentMethodId }) => ({ paymentMethodId })),
|
|
79
|
+
seller: {
|
|
80
|
+
id: params.seller.id,
|
|
81
|
+
name: params.seller.name,
|
|
82
|
+
typeOf: params.seller.typeOf
|
|
83
|
+
},
|
|
87
84
|
typeOf: params.typeOf,
|
|
88
|
-
customer,
|
|
89
85
|
orderDate: (0, moment_timezone_1.default)(params.orderDate)
|
|
90
86
|
.toDate(),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
// : undefined
|
|
87
|
+
// confirmationNumber: params.confirmationNumber, // discontinue(2026-05-06~)
|
|
88
|
+
// price: params.price, // discontinue(2026-05-06~)
|
|
89
|
+
// priceCurrency: params.priceCurrency, // discontinue(2026-05-06~)
|
|
90
|
+
// customer, // discontinue(2026-05-06~)
|
|
91
|
+
// numItems, // discontinue(2026-05-06~)
|
|
92
|
+
// orderedItem: params.orderedItem, // discontinue(2026-05-06~)
|
|
93
|
+
// acceptedOffers, // discontinue(2026-05-06~)
|
|
94
|
+
// ...(typeof params.broker?.typeOf === 'string') ? { broker: params.broker } : undefined // discontinue(2026-05-06~)
|
|
100
95
|
};
|
|
101
96
|
}
|
|
102
97
|
function createAccountingReport(params) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deleteOrder = deleteOrder;
|
|
4
|
-
|
|
5
|
-
const
|
|
4
|
+
// import { createOwnershipInfosFromOrder } from '../delivery/factory';
|
|
5
|
+
const factory_1 = require("../../factory");
|
|
6
6
|
/**
|
|
7
7
|
* 注文に関わるリソースを削除する
|
|
8
8
|
* 冪等性を確保すること
|
|
@@ -20,24 +20,24 @@ function deleteOrder(params) {
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
if (typeof order.id !== 'string') {
|
|
23
|
-
throw new
|
|
23
|
+
throw new factory_1.factory.errors.Internal(`order.id undefined. orderNumber: ${params.object.orderNumber}`);
|
|
24
24
|
}
|
|
25
25
|
// 注文アイテムの予約を削除
|
|
26
26
|
await deleteReservationsByOrder(order)(repos);
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
catch (error) {
|
|
32
|
-
|
|
33
|
-
}
|
|
27
|
+
// 所有権は所有期限でcleanされるので、注文削除時連動はひとまず廃止(2026-05-17~)
|
|
28
|
+
// // 所有権削除
|
|
29
|
+
// try {
|
|
30
|
+
// await deleteOwnershipInfosByOrder(order)(repos);
|
|
31
|
+
// } catch (error) {
|
|
32
|
+
// console.error('deleteOwnershipInfosByOrder throws', error);
|
|
33
|
+
// }
|
|
34
34
|
// 経理レポート削除
|
|
35
35
|
await repos.accountingReport.deleteByOrderNumber({ mainEntity: { orderNumber: order.orderNumber } });
|
|
36
36
|
// メモ削除(2024-02-15~)
|
|
37
37
|
await repos.note.deleteNotesByAbout({
|
|
38
38
|
about: {
|
|
39
39
|
id: order.id,
|
|
40
|
-
typeOf:
|
|
40
|
+
typeOf: factory_1.factory.order.OrderType.Order
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
// 注文削除
|
|
@@ -49,7 +49,7 @@ function deleteOrder(params) {
|
|
|
49
49
|
function deletePersonIfNecessary(order) {
|
|
50
50
|
return async (repos) => {
|
|
51
51
|
// 代理注文を除く
|
|
52
|
-
const isCustomerPerson = order.customer.typeOf ===
|
|
52
|
+
const isCustomerPerson = order.customer.typeOf === factory_1.factory.personType.Person
|
|
53
53
|
&& typeof order.broker?.typeOf !== 'string';
|
|
54
54
|
if (isCustomerPerson) {
|
|
55
55
|
const ordersByPerson = await repos.order.projectFields({
|
|
@@ -60,12 +60,12 @@ function deletePersonIfNecessary(order) {
|
|
|
60
60
|
if (ordersByPerson.length === 0) {
|
|
61
61
|
const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['userPoolIdNew']);
|
|
62
62
|
if (typeof setting?.userPoolIdNew !== 'string') {
|
|
63
|
-
throw new
|
|
63
|
+
throw new factory_1.factory.errors.NotFound('setting.userPoolIdNew');
|
|
64
64
|
}
|
|
65
65
|
const deletePersonTask = {
|
|
66
|
-
project: { typeOf:
|
|
67
|
-
name:
|
|
68
|
-
status:
|
|
66
|
+
project: { typeOf: factory_1.factory.organizationType.Project, id: order.project.id },
|
|
67
|
+
name: factory_1.factory.taskName.DeletePerson,
|
|
68
|
+
status: factory_1.factory.taskStatus.Ready,
|
|
69
69
|
runsAt: new Date(),
|
|
70
70
|
remainingNumberOfTries: 10,
|
|
71
71
|
numberOfTried: 0,
|
|
@@ -74,8 +74,8 @@ function deletePersonIfNecessary(order) {
|
|
|
74
74
|
id: order.customer.id,
|
|
75
75
|
agent: {
|
|
76
76
|
id: order.project.id,
|
|
77
|
-
typeOf:
|
|
78
|
-
name:
|
|
77
|
+
typeOf: factory_1.factory.organizationType.Project,
|
|
78
|
+
name: factory_1.factory.organizationType.Project
|
|
79
79
|
},
|
|
80
80
|
physically: true,
|
|
81
81
|
userPoolId: setting.userPoolIdNew,
|
|
@@ -94,36 +94,15 @@ function deleteReservationsByOrder(order) {
|
|
|
94
94
|
orderNumber: { $eq: order.orderNumber },
|
|
95
95
|
project: { id: { $eq: order.project.id } },
|
|
96
96
|
acceptedOffers: {
|
|
97
|
-
|
|
97
|
+
// itemOffered: { typeOf: { $in: [factory.reservationType.EventReservation] } }
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
}, {
|
|
100
|
+
useItemOfferedByReserve: true // 2026-05-25~
|
|
101
|
+
} // 予約取引参照(2026-05-18~)
|
|
102
|
+
);
|
|
100
103
|
const reservationIds = acceptedOffers.map((o) => String(o.itemOffered.id));
|
|
101
104
|
if (reservationIds.length > 0) {
|
|
102
105
|
await repos.reservation.deleteByIds({ project: { id: order.project.id }, ids: reservationIds });
|
|
103
106
|
}
|
|
104
107
|
};
|
|
105
108
|
}
|
|
106
|
-
function deleteOwnershipInfosByOrder(order) {
|
|
107
|
-
return async (repos) => {
|
|
108
|
-
const now = new Date();
|
|
109
|
-
const ownershipInfos = (0, factory_1.createOwnershipInfosFromOrder)({
|
|
110
|
-
order: {
|
|
111
|
-
...order,
|
|
112
|
-
acceptedOffers: await repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
|
|
113
|
-
orderNumber: { $eq: order.orderNumber },
|
|
114
|
-
project: { id: { $eq: order.project.id } }
|
|
115
|
-
})
|
|
116
|
-
},
|
|
117
|
-
offerIndexBase: 0
|
|
118
|
-
});
|
|
119
|
-
const ownershipIdentifiers = ownershipInfos.map((o) => String(o.identifier));
|
|
120
|
-
if (ownershipIdentifiers.length > 0) {
|
|
121
|
-
await repos.ownershipInfo.deleteExpiredByIdentifiers({
|
|
122
|
-
project: { id: order.project.id },
|
|
123
|
-
identifiers: ownershipIdentifiers,
|
|
124
|
-
// 所有期限切れのもの(ownedThroughの存在しないものは削除してはいけない)
|
|
125
|
-
ownedThrough: { $lte: now }
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
}
|
package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { SettingRepo } from '../../../repo/setting';
|
|
|
5
5
|
import type { TaskRepo } from '../../../repo/task';
|
|
6
6
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IOnPayTransactionConfirmedRepos {
|
|
10
10
|
acceptedOffer: AcceptedOfferRepo;
|
|
11
11
|
assetTransaction: AssetTransactionRepo;
|
package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { SettingRepo } from '../../../repo/setting';
|
|
|
5
5
|
import type { TaskRepo } from '../../../repo/task';
|
|
6
6
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IOnReserveTransactionConfirmedRepos {
|
|
10
10
|
acceptedOffer: AcceptedOfferRepo;
|
|
11
11
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -3,7 +3,7 @@ import type { OrderRepo } from '../../../repo/order';
|
|
|
3
3
|
import type { SettingRepo } from '../../../repo/setting';
|
|
4
4
|
import type { TaskRepo } from '../../../repo/task';
|
|
5
5
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
6
|
-
import { Settings } from '../../../
|
|
6
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
7
7
|
interface IPaymentDue2ProcessingRepos {
|
|
8
8
|
acceptedOffer: AcceptedOfferRepo;
|
|
9
9
|
order: OrderRepo;
|
|
@@ -55,28 +55,26 @@ function paymentDue2Processing(params) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
if (params.useOnOrderStatusChanged) {
|
|
58
|
-
// 全acceptedOffersを検索(2023-12-08~)
|
|
59
|
-
// const acceptedOffers = await repos.acceptedOffer.searchAcceptedOffersByOrderNumber(
|
|
60
|
-
// {
|
|
61
|
-
// orderNumber: { $eq: order.orderNumber },
|
|
62
|
-
// project: { id: { $eq: params.project.id } }
|
|
63
|
-
// },
|
|
64
|
-
// ['itemOffered', 'offeredThrough']
|
|
65
|
-
// );
|
|
66
58
|
const { numAcceptedOffers } = await repos.acceptedOffer.countByOrderNumber({
|
|
67
59
|
orderNumber: { $eq: order.orderNumber },
|
|
68
60
|
project: { id: { $eq: params.project.id } }
|
|
69
61
|
});
|
|
70
|
-
const itemOfferedTypeOfs = await repos.acceptedOffer.distinctValues(
|
|
62
|
+
// const itemOfferedTypeOfs = await repos.acceptedOffer.distinctValues(
|
|
63
|
+
// { orderNumber: { $in: [params.orderNumber] } },
|
|
64
|
+
// 'acceptedOffers.itemOffered.typeOf'
|
|
65
|
+
// ) as factory.order.IItemOffered['typeOf'][];
|
|
71
66
|
const serialNumbers = await repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.orderNumber] } }, 'acceptedOffers.serialNumber');
|
|
72
67
|
const offeredThroughIdentifier = (await repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.orderNumber] } }, 'acceptedOffers.offeredThrough.identifier')).shift();
|
|
73
|
-
debug('onAssetTransactionStatusChanged paymentDue2Processing: calling onOrderProcessing...', 'numAcceptedOffers:', numAcceptedOffers,
|
|
68
|
+
debug('onAssetTransactionStatusChanged paymentDue2Processing: calling onOrderProcessing...', 'numAcceptedOffers:', numAcceptedOffers,
|
|
69
|
+
// 'itemOfferedTypeOfs:', itemOfferedTypeOfs,
|
|
70
|
+
'serialNumbers:', serialNumbers, 'offeredThroughIdentifier:', offeredThroughIdentifier);
|
|
74
71
|
await (0, onOrderStatusChanged_1.onOrderProcessing)({
|
|
75
72
|
order: {
|
|
76
73
|
...order,
|
|
77
74
|
// acceptedOffers,
|
|
78
75
|
numAcceptedOffers,
|
|
79
|
-
itemOfferedTypeOf: itemOfferedTypeOfs[0], // 1つしかない前提
|
|
76
|
+
// itemOfferedTypeOf: itemOfferedTypeOfs[0], // 1つしかない前提
|
|
77
|
+
itemOfferedTypeOf: factory_1.factory.reservationType.EventReservation, // EventReservationしか存在しないので固定でよし
|
|
80
78
|
serialNumbers,
|
|
81
79
|
offeredThroughIdentifier,
|
|
82
80
|
orderStatus: factory_1.factory.orderStatus.OrderProcessing // 強制的にOrderProcessingとして処理する
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OrderRepo } from '../../../repo/order';
|
|
2
2
|
import type { TaskRepo } from '../../../repo/task';
|
|
3
3
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
declare function processing2inTransit(params: {
|
|
6
6
|
project: {
|
|
7
7
|
id: string;
|
|
@@ -7,7 +7,7 @@ import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
|
7
7
|
import { paymentDue2Processing } from './onAssetTransactionStatusChanged/paymentDue2Processing';
|
|
8
8
|
import { processing2inTransit } from './onAssetTransactionStatusChanged/processing2inTransit';
|
|
9
9
|
import { factory } from '../../factory';
|
|
10
|
-
import { Settings } from '../../
|
|
10
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
11
11
|
interface IOnAssetTransactionStatusChangedRepos {
|
|
12
12
|
acceptedOffer: AcceptedOfferRepo;
|
|
13
13
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -9,7 +9,6 @@ exports.onOrderDelivered = onOrderDelivered;
|
|
|
9
9
|
*/
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("./onOrderDelivered/factory");
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
function onOrderDelivered(params) {
|
package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts
CHANGED
|
@@ -5,7 +5,12 @@ type IInTransitOrder = Pick<factory.order.IOrder, 'confirmationNumber' | 'projec
|
|
|
5
5
|
limit: number;
|
|
6
6
|
page: number;
|
|
7
7
|
};
|
|
8
|
-
deliveredAcceptedOffers: factory.order.IAcceptedOffer
|
|
8
|
+
deliveredAcceptedOffers: (Omit<factory.order.IAcceptedOffer, 'priceSpecification'> & {
|
|
9
|
+
/**
|
|
10
|
+
* COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
|
|
11
|
+
*/
|
|
12
|
+
priceSpecification?: factory.order.ITicketPriceSpecification;
|
|
13
|
+
})[];
|
|
9
14
|
orderStatus: factory.orderStatus.OrderInTransit;
|
|
10
15
|
};
|
|
11
16
|
declare function createInformTasks(params: {
|
|
@@ -9,7 +9,6 @@ exports.onOrderDeliveredPartially = onOrderDeliveredPartially;
|
|
|
9
9
|
*/
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("./onOrderDeliveredPartially/factory");
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
function onOrderDeliveredPartially(params) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TaskRepo } from '../../../repo/task';
|
|
2
2
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
3
3
|
import { factory } from '../../../factory';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
interface IOnOrderInTransitRepos {
|
|
6
6
|
task: TaskRepo;
|
|
7
7
|
placeOrder: PlaceOrderRepo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SettingRepo } from '../../../repo/setting';
|
|
2
2
|
import type { TaskRepo } from '../../../repo/task';
|
|
3
3
|
import { factory } from '../../../factory';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
import { IExternalOrder, IProcessingOrder } from './onOrderProcessing/factory';
|
|
6
6
|
import { processOrder } from './onOrderProcessing/processOrder';
|
|
7
7
|
type IPlaceOrderTransaction = Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'typeOf' | 'potentialActions'>;
|
|
@@ -18,7 +18,8 @@ const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
|
18
18
|
function onOrderProcessing(params) {
|
|
19
19
|
return async (repos, settings) => {
|
|
20
20
|
const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['onOrderStatusChanged']);
|
|
21
|
-
const { numTryConfirmReserveTransaction } = settings;
|
|
21
|
+
// const { numTryConfirmReserveTransaction } = settings;
|
|
22
|
+
const numTryConfirmReserveTransaction = await settings.getByKey('numTryConfirmReserveTransaction');
|
|
22
23
|
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
23
24
|
let tasks;
|
|
24
25
|
let creatingCheckResourceTask;
|
|
@@ -10,7 +10,6 @@ exports.onOrderReturned = onOrderReturned;
|
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const google_libphonenumber_1 = require("google-libphonenumber");
|
|
12
12
|
const factory_1 = require("../../../factory");
|
|
13
|
-
// import { Settings } from '../../../settings';
|
|
14
13
|
// import { createMaskedCustomer } from '../../../factory/order';
|
|
15
14
|
const factory_2 = require("./onOrderReturned/factory");
|
|
16
15
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onOrderUpdated = onOrderUpdated;
|
|
4
4
|
const factory_1 = require("../../factory");
|
|
5
|
-
// import { Settings } from '../../settings';
|
|
6
5
|
const factory_2 = require("./onOrderUpdated/factory");
|
|
7
6
|
function onOrderUpdated(params) {
|
|
8
7
|
return async (repos
|
|
@@ -4,7 +4,7 @@ import type { SettingRepo } from '../../repo/setting';
|
|
|
4
4
|
import type { TaskRepo } from '../../repo/task';
|
|
5
5
|
import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
6
6
|
import { factory } from '../../factory';
|
|
7
|
-
import { Settings } from '../../
|
|
7
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
8
8
|
/**
|
|
9
9
|
* 注文を決済する
|
|
10
10
|
*/
|
|
@@ -80,7 +80,10 @@ function createPlacingOrderFromExistingTransaction(params) {
|
|
|
80
80
|
.map(({ instrument }) => String(instrument.transactionNumber));
|
|
81
81
|
try {
|
|
82
82
|
// すでにtypeOf: Orderに変更済の場合acceptedOffersは空になるが、そもそもorderedItemはその後上書きされないので、空のまま処理して問題なし
|
|
83
|
-
acceptedOffers = (await repos.orderInTransaction.
|
|
83
|
+
acceptedOffers = (await repos.orderInTransaction.findAcceptedOffersWithPriceByOrderNumber({
|
|
84
|
+
orderNumber,
|
|
85
|
+
project: { id: params.project.id }
|
|
86
|
+
}))
|
|
84
87
|
.filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
|
|
85
88
|
}
|
|
86
89
|
catch (error) {
|
|
@@ -3,6 +3,6 @@ import { factory } from '../../../../factory';
|
|
|
3
3
|
* 受入オファーを注文アイテムに変換する
|
|
4
4
|
*/
|
|
5
5
|
declare function acceptedOffers2orderedItem(params: {
|
|
6
|
-
eventReservationAcceptedOffers: factory.order.IAcceptedOffer[];
|
|
6
|
+
eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered'>[];
|
|
7
7
|
}): factory.order.IOrderedItem[];
|
|
8
8
|
export { acceptedOffers2orderedItem };
|
|
@@ -9,11 +9,6 @@ function acceptedOffers2orderedItem(params) {
|
|
|
9
9
|
// 予約がある場合
|
|
10
10
|
const { reservationOrderItems } = createReservationAcceptedOffers(params);
|
|
11
11
|
// 通貨転送がある場合
|
|
12
|
-
// const { moneyTransferOrderItems } = createMoneyTransferAcceptedOffers(params);
|
|
13
|
-
// プロダクトがある場合
|
|
14
|
-
// const { productOrderItems } = createProductItems(params);
|
|
15
|
-
// return [...reservationOrderItems, ...moneyTransferOrderItems, ...productOrderItems];
|
|
16
|
-
// return [...reservationOrderItems, ...productOrderItems];
|
|
17
12
|
return reservationOrderItems;
|
|
18
13
|
}
|
|
19
14
|
function createReservationAcceptedOffers(params) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IPlacingOrder } from '../../../repo/orderInTransaction';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
3
|
type IPlaceOrderTransaction = Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf' | 'result' | 'object' | 'seller'>;
|
|
4
|
-
type IOrderAcceptedOffer = factory.order.IAcceptedOffer
|
|
4
|
+
type IOrderAcceptedOffer = Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'serialNumber'>;
|
|
5
5
|
declare function createPaymentMethods(params: {
|
|
6
6
|
authorizePaymentActions: Pick<factory.action.authorize.paymentMethod.any.IAction, 'result'>[];
|
|
7
7
|
}): {
|
|
@@ -9,7 +9,7 @@ import type { SettingRepo } from '../../repo/setting';
|
|
|
9
9
|
import type { TaskRepo } from '../../repo/task';
|
|
10
10
|
import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
11
11
|
import { factory } from '../../factory';
|
|
12
|
-
import { Settings } from '../../
|
|
12
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
13
13
|
interface IPlaceOrderRepos {
|
|
14
14
|
acceptedOffer: AcceptedOfferRepo;
|
|
15
15
|
accountingReport: AccountingReportRepo;
|
|
@@ -8,7 +8,6 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
8
8
|
// import { createMaskedCustomer } from '../../factory/order';
|
|
9
9
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
10
10
|
const factory_1 = require("../../factory");
|
|
11
|
-
// import { Settings } from '../../settings';
|
|
12
11
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
13
12
|
function createReturnPolicy(params) {
|
|
14
13
|
const { identifier, returnFees, restockingFee, typeOf } = params.returnOrderTransaction.object.returnPolicy;
|
|
@@ -10,7 +10,6 @@ const factory_1 = require("../delivery/factory");
|
|
|
10
10
|
// import { findPlaceOrderTransaction } from './findPlaceOrderTransaction';
|
|
11
11
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
12
12
|
const factory_2 = require("../../factory");
|
|
13
|
-
// import { Settings } from '../../settings';
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
/**
|
|
16
15
|
* 注文を配送する
|
|
@@ -94,10 +93,7 @@ function sendOrder(params) {
|
|
|
94
93
|
case factory_2.factory.personType.Person:
|
|
95
94
|
createOwnerships = true; // Personのみに限定(2026-03-15~)
|
|
96
95
|
break;
|
|
97
|
-
// case factory.creativeWorkType.WebApplication:
|
|
98
|
-
// break;
|
|
99
96
|
default:
|
|
100
|
-
// createOwnerships = true;
|
|
101
97
|
}
|
|
102
98
|
try {
|
|
103
99
|
const offerIndexBase = (limit * (page - 1));
|
|
@@ -105,7 +101,10 @@ function sendOrder(params) {
|
|
|
105
101
|
$slice: [offerIndexBase, limit],
|
|
106
102
|
orderNumber: { $eq: order.orderNumber },
|
|
107
103
|
project: { id: { $eq: order.project.id } }
|
|
108
|
-
}
|
|
104
|
+
}, {
|
|
105
|
+
useItemOfferedByReserve: true // 2026-05-25~
|
|
106
|
+
} // 予約取引参照(2026-05-18~)
|
|
107
|
+
);
|
|
109
108
|
acceptedOffers = searchSlicedAcceptedOffersResult.acceptedOffers;
|
|
110
109
|
debug('delivering...', order.orderNumber, acceptedOffers.map((offer) => `${offer.itemOffered.id}`), // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
111
110
|
params.object.acceptedOffers, 'offerIndexBase:', offerIndexBase);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../repo/action/refund';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.person2username = person2username;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const person_1 = require("../../../repo/person");
|
|
7
6
|
const SSKTS_PROVIDER_NAME = 'SSKTS';
|
|
8
7
|
async function person2username(person, cognitoIdentityServiceProvider, setting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
4
4
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
5
5
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
4
4
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -47,10 +47,11 @@ payTransaction, paymentServiceId, options) {
|
|
|
47
47
|
try {
|
|
48
48
|
// タスクによって実行されているかどうか
|
|
49
49
|
const executedByTask = typeof options.executor?.id === 'string' && options.executor.id !== '';
|
|
50
|
+
const gmoIntegrationSettings = await settings.getByKey('gmo');
|
|
50
51
|
// 非同期承認時に長時間対応(2024-05-18~)
|
|
51
|
-
const timeout = (executedByTask && typeof
|
|
52
|
-
?
|
|
53
|
-
:
|
|
52
|
+
const timeout = (executedByTask && typeof gmoIntegrationSettings.timeoutBackground === 'number')
|
|
53
|
+
? gmoIntegrationSettings.timeoutBackground
|
|
54
|
+
: gmoIntegrationSettings.timeout;
|
|
54
55
|
debug('processAuthorizeCreditCard processing... executor:', options.executor?.id, 'timeout:', timeout);
|
|
55
56
|
const creditCardService = new gmo_service_1.GMO.service.Credit({
|
|
56
57
|
endpoint: String(availableChannel.serviceUrl)
|