@chevre/domain 24.1.0-alpha.3 → 24.1.0-alpha.31
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/repo/acceptedOffer.d.ts +14 -13
- package/lib/chevre/repo/acceptedOffer.js +135 -51
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +30 -0
- package/lib/chevre/repo/acceptedOfferInReserve.js +78 -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.js +155 -180
- 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 +43 -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 +39 -3
- package/lib/chevre/repo/orderInTransaction.js +43 -1
- package/lib/chevre/repo/reservation.d.ts +20 -7
- package/lib/chevre/repo/reservation.js +14 -10
- 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 +19 -0
- package/lib/chevre/repo/setting/integration.js +72 -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 +22 -26
- 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/offer/any.d.ts +6 -1
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +4 -7
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +7 -1
- package/lib/chevre/service/offer/event/authorize.js +11 -3
- 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 +21 -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/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 +2 -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 +3 -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 +2 -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 +8 -3
- package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
- package/lib/chevre/service/reserve/useReservation.js +20 -24
- package/lib/chevre/service/task/acceptCOAOffer.js +2 -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 +3 -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 +3 -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 +6 -18
- 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 +1 -1
- 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 +2 -4
- package/lib/chevre/service/validation/validateOrder.js +5 -79
- package/lib/chevre/settings.d.ts +0 -55
- package/lib/chevre/settings.js +1 -29
- package/lib/chevre/taskSettings.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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
|
*/
|
|
@@ -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,8 @@ function sendOrder(params) {
|
|
|
105
101
|
$slice: [offerIndexBase, limit],
|
|
106
102
|
orderNumber: { $eq: order.orderNumber },
|
|
107
103
|
project: { id: { $eq: order.project.id } }
|
|
108
|
-
})
|
|
104
|
+
}, { useReserveTransaction: true } // 予約取引参照(2026-05-18~)
|
|
105
|
+
);
|
|
109
106
|
acceptedOffers = searchSlicedAcceptedOffersResult.acceptedOffers;
|
|
110
107
|
debug('delivering...', order.orderNumber, acceptedOffers.map((offer) => `${offer.itemOffered.id}`), // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
111
108
|
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';
|
|
@@ -48,9 +48,9 @@ payTransaction, paymentServiceId, options) {
|
|
|
48
48
|
// タスクによって実行されているかどうか
|
|
49
49
|
const executedByTask = typeof options.executor?.id === 'string' && options.executor.id !== '';
|
|
50
50
|
// 非同期承認時に長時間対応(2024-05-18~)
|
|
51
|
-
const timeout = (executedByTask && typeof settings.gmo.timeoutBackground === 'number')
|
|
52
|
-
? settings.gmo.timeoutBackground
|
|
53
|
-
: settings.gmo.timeout;
|
|
51
|
+
const timeout = (executedByTask && typeof (await settings.getByKey('gmo')).timeoutBackground === 'number')
|
|
52
|
+
? (await settings.getByKey('gmo')).timeoutBackground
|
|
53
|
+
: (await settings.getByKey('gmo')).timeout;
|
|
54
54
|
debug('processAuthorizeCreditCard processing... executor:', options.executor?.id, 'timeout:', timeout);
|
|
55
55
|
const creditCardService = new gmo_service_1.GMO.service.Credit({
|
|
56
56
|
endpoint: String(availableChannel.serviceUrl)
|
|
@@ -6,7 +6,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
8
|
import { factory } from '../../../factory';
|
|
9
|
-
import { Settings } from '../../../
|
|
9
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
10
10
|
/**
|
|
11
11
|
* クレジットカード決済
|
|
12
12
|
*/
|
|
@@ -39,7 +39,7 @@ function payCreditCard(params) {
|
|
|
39
39
|
try {
|
|
40
40
|
const creditService = new gmo_service_1.GMO.service.Credit({
|
|
41
41
|
endpoint: String(availableChannel.serviceUrl)
|
|
42
|
-
}, { timeout: settings.gmo.timeout });
|
|
42
|
+
}, { timeout: (await settings.getByKey('gmo')).timeout });
|
|
43
43
|
await Promise.all(payObject.map(async (paymentMethod) => {
|
|
44
44
|
const processAlterTranResult = await processAlterTran({
|
|
45
45
|
shopId, shopPass, availableChannel, paymentMethod
|
|
@@ -6,7 +6,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
8
|
import { factory } from '../../../factory';
|
|
9
|
-
import { Settings } from '../../../
|
|
9
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
10
10
|
/**
|
|
11
11
|
* refund CreditCard IF payment
|
|
12
12
|
*/
|
|
@@ -59,7 +59,7 @@ function refundCreditCard(params
|
|
|
59
59
|
try {
|
|
60
60
|
const creditService = new gmo_service_1.GMO.service.Credit({
|
|
61
61
|
endpoint: String(availableChannel.serviceUrl)
|
|
62
|
-
}, { timeout: settings.gmo.timeout });
|
|
62
|
+
}, { timeout: (await settings.getByKey('gmo')).timeout });
|
|
63
63
|
processAlterTranResult = await processAlterTran({
|
|
64
64
|
availableChannel,
|
|
65
65
|
alterTranResultByPayAction,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GMO } from '@motionpicture/gmo-service';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
|
-
import { Settings } from '../../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
4
4
|
/**
|
|
5
5
|
* 決済代行側の取引状態参照
|
|
6
6
|
* 存在しない場合NotFoundエラー
|
|
@@ -11,7 +11,7 @@ const gmoError_1 = require("./gmoError");
|
|
|
11
11
|
async function searchGMOTrade(params, settings) {
|
|
12
12
|
const creditCardService = new gmo_service_1.GMO.service.Credit({
|
|
13
13
|
endpoint: String(params.availableChannel.serviceUrl)
|
|
14
|
-
}, { timeout: settings.gmo.timeout });
|
|
14
|
+
}, { timeout: (await settings.getByKey('gmo')).timeout });
|
|
15
15
|
// 取引状態参照
|
|
16
16
|
let searchTradeResult;
|
|
17
17
|
try {
|
|
@@ -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';
|
|
@@ -59,7 +59,7 @@ function voidTransaction(params) {
|
|
|
59
59
|
}
|
|
60
60
|
const creditCardService = new gmo_service_1.GMO.service.Credit({
|
|
61
61
|
endpoint: String(availableChannel.serviceUrl)
|
|
62
|
-
}, { timeout: settings.gmo.timeout });
|
|
62
|
+
}, { timeout: (await settings.getByKey('gmo')).timeout });
|
|
63
63
|
let searchTradeResult;
|
|
64
64
|
try {
|
|
65
65
|
searchTradeResult = await creditCardService.searchTrade({
|
|
@@ -12,5 +12,12 @@ declare function createPayObjectServiceOutput(params: {
|
|
|
12
12
|
purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
13
13
|
};
|
|
14
14
|
}): factory.invoice.IPaymentServiceOutput | undefined;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* 決済カードの適用された注文オファー
|
|
17
|
+
*/
|
|
18
|
+
type IAcceptedOfferMovieTicketUsed = Pick<factory.order.IAcceptedOffer, 'priceSpecification'> & {
|
|
19
|
+
itemOffered: Pick<factory.order.IReservation, 'reservationFor' | 'reservationNumber'> & {
|
|
20
|
+
reservedTicket: Pick<factory.order.IReservedTicket, 'identifier' | 'ticketedSeat' | 'ticketToken'> | Pick<factory.order.ICOAReservedTicket, 'identifier' | 'ticketedSeat' | 'ticketToken'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
16
23
|
export { createPayObjectServiceOutput, IAcceptedOfferMovieTicketUsed };
|
|
@@ -131,7 +131,7 @@ function reservationPriceComponent2invoicePriceComponent(component) {
|
|
|
131
131
|
* 決済カードの対象予約情報を作成する
|
|
132
132
|
*/
|
|
133
133
|
function movieTicket2reservation4invoice(movieTicket, order, paymentMethodType, payTransactionNumber) {
|
|
134
|
-
// Order
|
|
134
|
+
// Orderから決済カードの対象予約を取得
|
|
135
135
|
const reservationOffer = order.acceptedOffersMovieTicketUsed.find(({ itemOffered, priceSpecification }) => {
|
|
136
136
|
let mvtkUnitPriceSpec;
|
|
137
137
|
// MovieTicket適用単価オファーからidentifierを取り出す
|
|
@@ -9,7 +9,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
9
9
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
10
10
|
import type { TaskRepo } from '../../../repo/task';
|
|
11
11
|
import { factory } from '../../../factory';
|
|
12
|
-
import { Settings } from '../../../
|
|
12
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
13
13
|
interface IAuthorizeResult {
|
|
14
14
|
accountId: string;
|
|
15
15
|
accountsReceivablesByServiceType: factory.assetTransaction.pay.IAccountsReceivableByServiceType[];
|
|
@@ -5,7 +5,7 @@ import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
import { ICheckResult } from './processPurchaseNumberAuth';
|
|
10
10
|
interface ICheckOperationRepos {
|
|
11
11
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
@@ -8,7 +8,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
8
8
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
9
9
|
import type { TaskRepo } from '../../../repo/task';
|
|
10
10
|
import { factory } from '../../../factory';
|
|
11
|
-
import { Settings } from '../../../
|
|
11
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
12
12
|
interface IPayOperationRepos {
|
|
13
13
|
action?: never;
|
|
14
14
|
actions: {
|
|
@@ -53,7 +53,7 @@ function payMovieTicket(params, options) {
|
|
|
53
53
|
state: '',
|
|
54
54
|
credentialsRepo: repos.credentials // set credentialsRepo(2024-11-20~)
|
|
55
55
|
});
|
|
56
|
-
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: settings.movieticketReserve.
|
|
56
|
+
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).timeoutPay });
|
|
57
57
|
processSeatInfoSyncResult = await (0, processSeatInfoSync_1.processSeatInfoSync)({ seatInfoSyncIn })({ seatService });
|
|
58
58
|
}
|
|
59
59
|
// add recipe(2024-06-03~)
|
|
@@ -3,7 +3,7 @@ import type { IMinimizedIndividualEvent } from '../../../repo/event';
|
|
|
3
3
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
4
4
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
5
5
|
import { factory } from '../../../factory';
|
|
6
|
-
import { Settings } from '../../../
|
|
6
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
7
7
|
interface ICheckResult {
|
|
8
8
|
purchaseNumberAuthIn: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthIn;
|
|
9
9
|
purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
@@ -73,7 +73,7 @@ function processPurchaseNumberAuth(params) {
|
|
|
73
73
|
const authService = new sdk_1.Surfrock.service.auth.AuthService({
|
|
74
74
|
endpoint: String(availableChannel.serviceUrl),
|
|
75
75
|
auth: mvtkReserveAuthClient
|
|
76
|
-
}, { timeout: settings.movieticketReserve.timeoutCheck });
|
|
76
|
+
}, { timeout: (await settings.getByKey('movieticketReserve')).timeoutCheck });
|
|
77
77
|
const purchaseNumberAuthResult = await authService.purchaseNumberAuth(purchaseNumberAuthIn);
|
|
78
78
|
return { purchaseNumberAuthIn, purchaseNumberAuthResult };
|
|
79
79
|
};
|
|
@@ -5,7 +5,7 @@ import type { CredentialsRepo } from '../../../repo/credentials';
|
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
6
6
|
import type { TaskRepo } from '../../../repo/task';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IRefundOperationRepos {
|
|
10
10
|
action?: never;
|
|
11
11
|
actions: {
|
|
@@ -17,7 +17,7 @@ const processSeatInfoSyncCancel_1 = require("./refundMovieTicket/processSeatInfo
|
|
|
17
17
|
function wait4payActionDelayIfNeeded(params) {
|
|
18
18
|
return async (settings) => {
|
|
19
19
|
const { payAction } = params;
|
|
20
|
-
const minIntervalBetweenPayAndRefund = settings.movieticketReserve.minIntervalBetweenPayAndRefund;
|
|
20
|
+
const minIntervalBetweenPayAndRefund = (await settings.getByKey('movieticketReserve')).minIntervalBetweenPayAndRefund;
|
|
21
21
|
let waitingNecessary = false;
|
|
22
22
|
if (typeof minIntervalBetweenPayAndRefund === 'number' && minIntervalBetweenPayAndRefund > 0) {
|
|
23
23
|
if (payAction.actionStatus !== factory_1.factory.actionStatusType.CompletedActionStatus) {
|
|
@@ -74,7 +74,7 @@ function refundMovieTicket(params, options) {
|
|
|
74
74
|
state: '',
|
|
75
75
|
credentialsRepo: repos.credentials // set credentialsRepo(2024-11-20~)
|
|
76
76
|
});
|
|
77
|
-
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: settings.movieticketReserve.
|
|
77
|
+
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).timeoutRefund });
|
|
78
78
|
let seatInfoSyncCancelIn;
|
|
79
79
|
let seatInfoSyncIn;
|
|
80
80
|
const useSeatInfoSyncCancel = availableChannel.credentials?.useSeatInfoSyncCancel === true;
|
|
@@ -5,7 +5,7 @@ import type { CredentialsRepo } from '../../../repo/credentials';
|
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
6
6
|
import type { TaskRepo } from '../../../repo/task';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
10
10
|
actions: {
|
|
11
11
|
pay: PayActionRepo;
|
|
@@ -61,7 +61,8 @@ function confirmReservation(params) {
|
|
|
61
61
|
...rawReservation.reservedTicket,
|
|
62
62
|
ticketType: ticketTypeByTransaction
|
|
63
63
|
},
|
|
64
|
-
reservationFor: reserveTransaction.object.reservationFor // reservationForは予約取引から参照する(2026-04-05~)
|
|
64
|
+
reservationFor: reserveTransaction.object.reservationFor, // reservationForは予約取引から参照する(2026-04-05~)
|
|
65
|
+
issuedThrough: reserveTransaction.object.issuedThrough // issuedThroughは予約取引から補完する(2026-05-08~)
|
|
65
66
|
};
|
|
66
67
|
});
|
|
67
68
|
confirmedReservations = confirmedReservations.map((r) => {
|
|
@@ -189,25 +190,24 @@ params, options) {
|
|
|
189
190
|
if (reserveTransaction.object.disablePendingReservations === true) {
|
|
190
191
|
const reservationFor = reserveTransaction.object.reservationFor;
|
|
191
192
|
const subReservations = reserveTransaction.object.subReservation;
|
|
192
|
-
const issuedThrough = reserveTransaction.object.issuedThrough;
|
|
193
|
+
// const issuedThrough = reserveTransaction.object.issuedThrough;
|
|
193
194
|
if (Array.isArray(subReservations)
|
|
194
195
|
&& typeof reservationFor?.typeOf === 'string'
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
// && typeof issuedThrough?.typeOf === 'string'
|
|
197
|
+
) {
|
|
198
|
+
await repos.reservation.confirmManyIfNotExist({
|
|
198
199
|
bookingTime: reserveTransaction.startDate, // startDateに設定(2024-04-08~)
|
|
199
200
|
project: { id: reserveTransaction.project.id },
|
|
200
201
|
provider: (typeof reserveTransaction.object.provider?.id === 'string')
|
|
201
202
|
? reserveTransaction.object.provider
|
|
202
203
|
: { id: reserveTransaction.agent.id, typeOf: factory_1.factory.organizationType.Corporation },
|
|
203
204
|
subReservation: subReservations,
|
|
204
|
-
issuedThrough,
|
|
205
|
+
// issuedThrough,
|
|
205
206
|
reservationFor,
|
|
206
207
|
reservationNumber: reserveTransaction.object.reservationNumber,
|
|
207
208
|
underName,
|
|
208
209
|
broker: reserveTransaction.object.broker
|
|
209
210
|
});
|
|
210
|
-
debug('confirmManyIfNotExistResult:', confirmManyIfNotExistResult, 'reservationNumber:', reservationPackage.reservationNumber);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
@@ -21,7 +21,8 @@ function createCancelPendingReservationAction(params) {
|
|
|
21
21
|
const reservationPackage = {
|
|
22
22
|
typeOf: factory_1.factory.reservationType.ReservationPackage,
|
|
23
23
|
reservationNumber: transaction.transactionNumber,
|
|
24
|
-
|
|
24
|
+
// discontinue reservationFor(2026-05-09~)
|
|
25
|
+
// reservationFor: { typeOf: reservationFor.typeOf, id: String(reservationFor.id) },
|
|
25
26
|
reservationStatus: (typeof params.transaction.object.reservationStatus === 'string')
|
|
26
27
|
? params.transaction.object.reservationStatus
|
|
27
28
|
: factory_1.factory.reservationStatusType.ReservationPending
|
|
@@ -5,7 +5,7 @@ import type { OrderRepo } from '../../repo/order';
|
|
|
5
5
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
6
6
|
type IReservationResult = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'additionalTicketText' | 'checkedIn' | 'reservationStatus'> & {
|
|
7
7
|
reservedTicket: {
|
|
8
|
-
ticketType: Pick<factory.
|
|
8
|
+
ticketType: Pick<factory.assetTransaction.reserve.ITicketType, 'identifier'> & {
|
|
9
9
|
name: {
|
|
10
10
|
ja?: string;
|
|
11
11
|
};
|
|
@@ -39,7 +39,8 @@ function findByCode(params) {
|
|
|
39
39
|
// typeOf?: { $in?: factory.order.IItemOffered['typeOf'][] };
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, { useReserveTransaction: true } // 予約取引参照(2026-05-18~)
|
|
43
|
+
)).shift();
|
|
43
44
|
if (acceptedOffer === undefined) {
|
|
44
45
|
throw new factory_1.factory.errors.NotFound('acceptedOffer');
|
|
45
46
|
}
|