@chevre/domain 24.1.0-alpha.4 → 24.1.0-alpha.41
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/emailMessageBuilder.js +4 -12
- package/lib/chevre/index.d.ts +1 -2
- package/lib/chevre/index.js +1 -3
- 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 +65 -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 +26 -0
- package/lib/chevre/repo/setting/integration.js +94 -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 -4
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +3 -3
- package/lib/chevre/service/notification/notifyByEmail.d.ts +3 -3
- package/lib/chevre/service/notification/notifyByEmail.js +7 -12
- package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -3
- package/lib/chevre/service/notification/sendEmailMessage.js +5 -4
- 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/sendEmailMessage.js +5 -3
- 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 -7
- 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 -7
- 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
- package/lib/chevre/credentials/sendGrid.d.ts +0 -24
- package/lib/chevre/credentials/sendGrid.js +0 -18
- package/lib/chevre/credentials.d.ts +0 -20
- package/lib/chevre/credentials.js +0 -42
|
@@ -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,10 @@ function findByCode(params) {
|
|
|
39
39
|
// typeOf?: { $in?: factory.order.IItemOffered['typeOf'][] };
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, {
|
|
43
|
+
useItemOfferedByReserve: true // 2026-05-25~
|
|
44
|
+
} // 予約取引参照(2026-05-18~)
|
|
45
|
+
)).shift();
|
|
43
46
|
if (acceptedOffer === undefined) {
|
|
44
47
|
throw new factory_1.factory.errors.NotFound('acceptedOffer');
|
|
45
48
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import type { ReserveTransactionRepo } from '../../repo/assetTransaction/reserve';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IKeyOfProjection, ReservationRepo } from '../../repo/reservation';
|
|
4
4
|
/**
|
|
5
5
|
* 予約検索レスポンスとしての予約
|
|
6
6
|
* 予約ドキュメントに予約取引の情報を補完する
|
|
7
7
|
*/
|
|
8
|
-
type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, '
|
|
9
|
-
price?: factory.reservation.eventReservation.IPrice;
|
|
8
|
+
type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, 'underName' | 'reservedTicket' | 'reservationFor'> & {
|
|
10
9
|
underName?: factory.assetTransaction.reserve.IUnderName;
|
|
11
10
|
reservedTicket?: factory.assetTransaction.reserve.IObjectSubReservation['reservedTicket'];
|
|
12
11
|
reservationFor?: factory.assetTransaction.reserve.IReservationFor;
|
|
12
|
+
price?: never;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* 予約を検索する
|
|
16
16
|
*/
|
|
17
17
|
export declare function findReservations(params: factory.reservation.eventReservation.ISearchConditions, options: {
|
|
18
|
-
inclusion: Partial<Record<IKeyOfProjection |
|
|
18
|
+
inclusion: Partial<Record<IKeyOfProjection | 'underName', 1>>;
|
|
19
19
|
}): (repos: {
|
|
20
20
|
assetTransaction: {
|
|
21
21
|
reserve: ReserveTransactionRepo;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.findReservations = findReservations;
|
|
7
|
-
const debug_1 = __importDefault(require("debug"));
|
|
8
|
-
const debug = (0, debug_1.default)('chevre-domain:service:reserve:findReservations');
|
|
9
4
|
/**
|
|
10
5
|
* 予約を検索する
|
|
11
6
|
*/
|
|
@@ -17,41 +12,28 @@ function findReservations(params, options) {
|
|
|
17
12
|
return [];
|
|
18
13
|
}
|
|
19
14
|
else {
|
|
20
|
-
const requirePrice = Object.keys(inclusion).includes('price');
|
|
21
15
|
const requireUnderName = Object.keys(inclusion).includes('underName');
|
|
22
16
|
const requireReservedTicket = Object.keys(inclusion).includes('reservedTicket');
|
|
23
17
|
const requireReservationFor = Object.keys(inclusion).includes('reservationFor');
|
|
18
|
+
// const requirePrice = Object.keys(inclusion).includes('price');
|
|
19
|
+
// const requirePriceCurrency = Object.keys(inclusion).includes('priceCurrency');
|
|
20
|
+
// const requireIssuedThrough = Object.keys(inclusion).includes('issuedThrough');
|
|
21
|
+
// const requireNumSeats = Object.keys(inclusion).includes('numSeats');
|
|
24
22
|
const reservationIds = rawReservations.map(({ id }) => id);
|
|
25
23
|
const subReservations = await repos.assetTransaction.reserve.findSubReservationsById({
|
|
26
24
|
ids: reservationIds
|
|
27
25
|
});
|
|
28
|
-
// 予約取引から参照した予約数と同じはず
|
|
29
|
-
debug('useReserveTransaction: true. reservations.length === subReservations.length?', rawReservations.length === subReservations.length);
|
|
30
26
|
return rawReservations.map((reservation) => {
|
|
31
27
|
const subReservationByTransaction = subReservations.find((s) => s.id === reservation.id);
|
|
32
|
-
const priceByTransaction = subReservationByTransaction?.price;
|
|
33
28
|
const underNameByTransaction = subReservationByTransaction?.underName;
|
|
34
29
|
const ticketTypeByTransaction = subReservationByTransaction?.reservedTicket?.ticketType;
|
|
35
30
|
const reservationForByTransaction = subReservationByTransaction?.reservationFor;
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
// if (requireUnderName) {
|
|
41
|
-
// }
|
|
42
|
-
// if (requireReservedTicket) {
|
|
43
|
-
// }
|
|
44
|
-
// if (requireReservationFor) {
|
|
45
|
-
// const reservationForMatched = isDeepStrictEqual(reservation.reservationFor, reservationForByTransaction);
|
|
46
|
-
// debug('requireReservationFor. reservationForMatched?', reservationForMatched);
|
|
47
|
-
// if (!reservationForMatched) {
|
|
48
|
-
// console.error('reservationForMatched: false!!!', reservation.id);
|
|
49
|
-
// }
|
|
50
|
-
// }
|
|
51
|
-
const { reservationFor, reservedTicket, ...rawReservation4result } = reservation; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
31
|
+
// const priceByTransaction = subReservationByTransaction?.price;
|
|
32
|
+
// const issuedThroughByTransaction = subReservationByTransaction?.issuedThrough;
|
|
33
|
+
// const numSeatsByTransaction = subReservationByTransaction?.numSeats;
|
|
34
|
+
const { reservationFor: _reservationFor, issuedThrough: _issuedThrough, priceCurrency: _priceCurrency, numSeats: _numSeats, reservedTicket, ...rawReservation4result } = reservation;
|
|
52
35
|
return {
|
|
53
36
|
...rawReservation4result, // 予約ドキュメントはそのまま返す
|
|
54
|
-
...(requirePrice && priceByTransaction !== undefined) ? { price: priceByTransaction } : undefined, // priceがあれば上書き
|
|
55
37
|
...(requireUnderName && underNameByTransaction !== undefined) ? { underName: underNameByTransaction } : undefined, // underNameがあれば上書き
|
|
56
38
|
...(requireReservedTicket && ticketTypeByTransaction !== undefined) // ticketTypeがあれば上書き
|
|
57
39
|
? {
|
|
@@ -64,6 +46,14 @@ function findReservations(params, options) {
|
|
|
64
46
|
...(requireReservationFor && reservationForByTransaction !== undefined)
|
|
65
47
|
? { reservationFor: reservationForByTransaction }
|
|
66
48
|
: undefined, // reservationForがあれば上書き(2026-04-06~)
|
|
49
|
+
// ...(requirePrice && priceByTransaction !== undefined) ? { price: priceByTransaction } : undefined, // priceがあれば上書き
|
|
50
|
+
// ...(requirePriceCurrency) ? { priceCurrency: factory.priceCurrency.JPY } : undefined, // 必要あらば固定値を補完(2026-05-08~)
|
|
51
|
+
// ...(requireIssuedThrough && issuedThroughByTransaction !== undefined)
|
|
52
|
+
// ? { issuedThrough: issuedThroughByTransaction }
|
|
53
|
+
// : undefined, // issuedThroughがあれば上書き(2026-05-09~)
|
|
54
|
+
// ...(requireNumSeats && numSeatsByTransaction !== undefined)
|
|
55
|
+
// ? { numSeats: numSeatsByTransaction }
|
|
56
|
+
// : undefined, // issuedThroughがあれば上書き(2026-05-09~)
|
|
67
57
|
};
|
|
68
58
|
});
|
|
69
59
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onPendingReservationCanceled = onPendingReservationCanceled;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const factory_2 = require("../factory");
|
|
7
6
|
function onPendingReservationCanceled(params) {
|
|
8
7
|
return async (repos
|
|
@@ -5,13 +5,14 @@ import { factory } from '../../../factory';
|
|
|
5
5
|
import { AuthorizationRepo } from '../../../repo/authorization';
|
|
6
6
|
import type { SettingRepo } from '../../../repo/setting';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
|
-
export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket' | 'reservationFor'> & {
|
|
9
|
-
price?: factory.
|
|
8
|
+
export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket' | 'reservationFor' | 'issuedThrough'> & {
|
|
9
|
+
price?: factory.assetTransaction.reserve.IPrice;
|
|
10
10
|
underName?: Pick<factory.reservation.IUnderName, 'id' | 'typeOf'>;
|
|
11
11
|
reservedTicket: Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
|
|
12
|
-
ticketType: factory.
|
|
12
|
+
ticketType: factory.assetTransaction.reserve.ITicketType;
|
|
13
13
|
};
|
|
14
14
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
15
|
+
issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* 予約確定後のアクション
|
|
@@ -6,7 +6,6 @@ exports.onReservationConfirmed = onReservationConfirmed;
|
|
|
6
6
|
* 予約確定時アクション
|
|
7
7
|
*/
|
|
8
8
|
const factory_1 = require("../../../factory");
|
|
9
|
-
// import { Settings } from '../../../settings';
|
|
10
9
|
const factory_2 = require("../factory");
|
|
11
10
|
/**
|
|
12
11
|
* 予約確定後のアクション
|
|
@@ -98,22 +97,14 @@ function onReservationConfirmed(confirmedReservations, reserveAction) {
|
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
const subReservations4inform = confirmedReservations.map((r) => {
|
|
101
|
-
const { additionalProperty, additionalTicketText,
|
|
102
|
-
// attended, checkedIn,
|
|
103
|
-
id, modifiedTime,
|
|
104
|
-
// numSeats,
|
|
105
|
-
price, programMembershipUsed, reservedTicket, subReservation, typeOf } = r;
|
|
100
|
+
const { additionalProperty, additionalTicketText, id, modifiedTime, price, programMembershipUsed, reservedTicket, subReservation, typeOf } = r;
|
|
106
101
|
return {
|
|
107
|
-
// bookingTime, // discontinue(2024-10-27~)
|
|
108
102
|
id,
|
|
109
103
|
typeOf,
|
|
110
104
|
reservedTicket,
|
|
111
105
|
...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined,
|
|
112
106
|
...(typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined,
|
|
113
|
-
// ...(typeof attended === 'boolean') ? { attended } : undefined, // discontinue(2024-10-27~)
|
|
114
|
-
// ...(typeof checkedIn === 'boolean') ? { checkedIn } : undefined, // discontinue(2024-10-27~)
|
|
115
107
|
...(modifiedTime instanceof Date) ? { modifiedTime } : undefined,
|
|
116
|
-
// ...(typeof numSeats === 'number') ? { numSeats } : undefined, // discontinue(2024-10-27~)
|
|
117
108
|
...(price !== undefined) ? { price } : undefined,
|
|
118
109
|
...(programMembershipUsed !== undefined) ? { programMembershipUsed } : undefined,
|
|
119
110
|
...(Array.isArray(subReservation)) ? { subReservation } : undefined
|
|
@@ -9,7 +9,6 @@ exports.onReservationUsed = onReservationUsed;
|
|
|
9
9
|
*/
|
|
10
10
|
const moment_1 = __importDefault(require("moment"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("../factory");
|
|
14
13
|
/**
|
|
15
14
|
* 予約使用
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onReservationsCreated = onReservationsCreated;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const factory_2 = require("../factory");
|
|
7
6
|
/**
|
|
8
7
|
* 予約作成時イベント
|
|
@@ -11,14 +11,21 @@ function searchByOrder(params) {
|
|
|
11
11
|
page: params.page,
|
|
12
12
|
project: { id: { $eq: params.project.id } },
|
|
13
13
|
orderNumber: { $eq: params.orderNumber },
|
|
14
|
-
acceptedOffers: {
|
|
15
|
-
|
|
14
|
+
acceptedOffers: {
|
|
15
|
+
itemOffered: {
|
|
16
|
+
// typeOf: { $in: [reservationType] }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
useItemOfferedByReserve: true // 2026-05-25~
|
|
21
|
+
} // 予約取引参照(2026-05-18~)
|
|
22
|
+
);
|
|
16
23
|
const reservationIds = acceptedOffers.map((offer) => {
|
|
17
24
|
if (offer.itemOffered.typeOf === reservationType) {
|
|
18
25
|
return offer.itemOffered.id;
|
|
19
26
|
}
|
|
20
27
|
else {
|
|
21
|
-
//
|
|
28
|
+
// EventReservationしか存在しないので、ありえないケース
|
|
22
29
|
throw new factory_1.factory.errors.Internal(`unexpected itemOffered.typeOf ${offer.itemOffered.typeOf}`);
|
|
23
30
|
}
|
|
24
31
|
});
|
|
@@ -20,7 +20,7 @@ export declare function useReservation(params: {
|
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
23
|
-
instrument
|
|
23
|
+
instrument: factory.action.consume.use.reservation.IInstrument[];
|
|
24
24
|
location?: {
|
|
25
25
|
identifier?: string;
|
|
26
26
|
};
|
|
@@ -58,14 +58,15 @@ function call(params) {
|
|
|
58
58
|
const actionRepo = new acceptCOAOffer_1.AcceptCOAOfferActionRepo(connection);
|
|
59
59
|
// const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
60
60
|
try {
|
|
61
|
+
const coaIntegrationSettings = await settings.getByKey('coa');
|
|
61
62
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
62
63
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
63
64
|
auth: coaAuthClient
|
|
64
|
-
}, { timeout:
|
|
65
|
+
}, { timeout: coaIntegrationSettings.timeoutReserve });
|
|
65
66
|
const masterService = new coa_service_1.COA.service.Master({
|
|
66
67
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
67
68
|
auth: coaAuthClient
|
|
68
|
-
}, { timeout:
|
|
69
|
+
}, { timeout: coaIntegrationSettings.timeoutMaster });
|
|
69
70
|
const { agent, object, potentialActions, purpose } = params.data;
|
|
70
71
|
// agent.idからflgMemberを自動セット(2024-12-16~)
|
|
71
72
|
const isMember = memberClients.includes(agent.id);
|
|
@@ -48,7 +48,7 @@ function call(params) {
|
|
|
48
48
|
const authorizePaymentMethodActionRepo = new authorizePaymentMethod_1.AuthorizePaymentMethodActionRepo(connection);
|
|
49
49
|
// const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
50
50
|
const paymentServiceId = params.data.object.issuedThrough.id;
|
|
51
|
-
const credentialsExpireInSeconds = settings.movieticketReserve.credentialsExpireInSeconds;
|
|
51
|
+
const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
|
|
52
52
|
const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
|
|
53
53
|
&& typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
|
|
54
54
|
try {
|
|
@@ -54,7 +54,7 @@ function call(params) {
|
|
|
54
54
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
55
55
|
endpoint: coaAuthClient.options.endpoint,
|
|
56
56
|
auth: coaAuthClient
|
|
57
|
-
}, { timeout: settings.coa.
|
|
57
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
58
58
|
const { object, instrument } = data;
|
|
59
59
|
await (0, cancelReservation_2.cancelPendingReservation)({
|
|
60
60
|
object,
|
|
@@ -25,7 +25,7 @@ function call(params) {
|
|
|
25
25
|
const actionRepo = new checkMovieTicket_1.CheckMovieTicketActionRepo(connection);
|
|
26
26
|
// const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
27
27
|
const paymentServiceId = params.data.object[0]?.id;
|
|
28
|
-
const credentialsExpireInSeconds = settings.movieticketReserve.credentialsExpireInSeconds;
|
|
28
|
+
const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
|
|
29
29
|
const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
|
|
30
30
|
&& typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
|
|
31
31
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COA } from '@motionpicture/coa-service';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
|
-
import { Settings } from '../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
4
4
|
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
5
5
|
import { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
6
6
|
import { ActionRepo } from '../../repo/action';
|
|
@@ -41,7 +41,7 @@ function call(params) {
|
|
|
41
41
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
42
42
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
43
43
|
auth: coaAuthClient
|
|
44
|
-
}, { timeout: settings.coa.
|
|
44
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
45
45
|
await confirmReserveTransaction({
|
|
46
46
|
...params.data,
|
|
47
47
|
project: params.project,
|
|
@@ -137,7 +137,10 @@ function fixOrderAsPurpose(params) {
|
|
|
137
137
|
const acceptedOffers = await repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
|
|
138
138
|
orderNumber: { $eq: order.orderNumber },
|
|
139
139
|
project: { id: { $eq: params.project.id } }
|
|
140
|
-
},
|
|
140
|
+
}, {
|
|
141
|
+
useItemOfferedByReserve: true // 2026-05-25~
|
|
142
|
+
} // 予約取引参照(2026-05-18~)
|
|
143
|
+
);
|
|
141
144
|
return {
|
|
142
145
|
...order,
|
|
143
146
|
acceptedOffers
|