@chevre/domain 23.2.0-alpha.62 → 23.2.0-alpha.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/errorHandler.js +0 -5
- package/lib/chevre/eventEmitter/assetTransaction.js +0 -1
- package/lib/chevre/eventEmitter/task.js +0 -1
- package/lib/chevre/eventEmitter/transaction.js +0 -1
- package/lib/chevre/factory/transactionNumber.js +0 -2
- package/lib/chevre/repo/acceptedOffer.js +0 -1
- package/lib/chevre/repo/acceptedPaymentMethod.js +0 -1
- package/lib/chevre/repo/account.js +0 -17
- package/lib/chevre/repo/accountTransaction.js +0 -7
- package/lib/chevre/repo/action.js +0 -7
- package/lib/chevre/repo/additionalProperty.js +0 -2
- package/lib/chevre/repo/advanceBookingRequirement.js +0 -1
- package/lib/chevre/repo/aggregateOffer.js +0 -5
- package/lib/chevre/repo/assetTransaction.js +0 -17
- package/lib/chevre/repo/authorization.js +0 -7
- package/lib/chevre/repo/categoryCode.js +0 -5
- package/lib/chevre/repo/comment.js +0 -1
- package/lib/chevre/repo/confirmationNumber.js +0 -4
- package/lib/chevre/repo/creativeWork.js +0 -6
- package/lib/chevre/repo/credentials.js +0 -1
- package/lib/chevre/repo/customer.js +0 -1
- package/lib/chevre/repo/customerType.js +0 -1
- package/lib/chevre/repo/emailMessage.js +0 -1
- package/lib/chevre/repo/event.js +0 -21
- package/lib/chevre/repo/eventSeries.js +0 -14
- package/lib/chevre/repo/identity.js +0 -1
- package/lib/chevre/repo/identityProvider.js +0 -1
- package/lib/chevre/repo/member.js +0 -1
- package/lib/chevre/repo/merchantReturnPolicy.js +0 -2
- package/lib/chevre/repo/mongoose/onIndexCreated.js +0 -1
- package/lib/chevre/repo/mongoose/schemas/task.js +0 -1
- package/lib/chevre/repo/movieTicketType.js +0 -6
- package/lib/chevre/repo/note.js +0 -1
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +0 -2
- package/lib/chevre/repo/offerCatalog.js +0 -1
- package/lib/chevre/repo/offerCatalogItem.js +0 -1
- package/lib/chevre/repo/order.js +0 -39
- package/lib/chevre/repo/orderNumber.js +0 -4
- package/lib/chevre/repo/ownershipInfo.js +0 -8
- package/lib/chevre/repo/passport.js +0 -1
- package/lib/chevre/repo/paymentMethod/creditCard.js +0 -2
- package/lib/chevre/repo/paymentService.js +0 -2
- package/lib/chevre/repo/paymentServiceChannel.js +0 -1
- package/lib/chevre/repo/pendingReservation.js +0 -3
- package/lib/chevre/repo/person.js +0 -19
- package/lib/chevre/repo/place/busStop.js +0 -4
- package/lib/chevre/repo/place/movieTheater.js +0 -3
- package/lib/chevre/repo/place/screeningRoom.js +0 -2
- package/lib/chevre/repo/place/seat.js +0 -7
- package/lib/chevre/repo/place/section.js +0 -5
- package/lib/chevre/repo/potentialAction.js +0 -1
- package/lib/chevre/repo/priceSpecification.js +0 -6
- package/lib/chevre/repo/product.js +0 -2
- package/lib/chevre/repo/productModel.js +0 -1
- package/lib/chevre/repo/rateLimit/offer.js +0 -1
- package/lib/chevre/repo/reservation.js +0 -54
- package/lib/chevre/repo/role.js +0 -1
- package/lib/chevre/repo/seller.js +0 -3
- package/lib/chevre/repo/sellerReturnPolicy.js +0 -1
- package/lib/chevre/repo/serviceOutput.js +0 -2
- package/lib/chevre/repo/serviceOutputIdentifier.js +0 -1
- package/lib/chevre/repo/stockHolder.js +0 -2
- package/lib/chevre/repo/task.js +0 -7
- package/lib/chevre/repo/transaction.js +0 -24
- package/lib/chevre/repo/transactionNumberCounter.js +0 -1
- package/lib/chevre/repo/trip.js +0 -2
- package/lib/chevre/repo/webSite.js +0 -1
- package/lib/chevre/repository.js +0 -1
- package/lib/chevre/service/account.js +0 -3
- package/lib/chevre/service/accountTransaction/transfer.js +0 -3
- package/lib/chevre/service/accountTransaction.js +0 -3
- package/lib/chevre/service/aggregation/event/importFromCOA.js +0 -1
- package/lib/chevre/service/assetTransaction/cancelReservation/start.js +0 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.js +0 -2
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -2
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +0 -2
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +0 -2
- package/lib/chevre/service/assetTransaction/refund.js +0 -2
- package/lib/chevre/service/assetTransaction/registerService/potentialActions.js +0 -2
- package/lib/chevre/service/assetTransaction/registerService.js +0 -4
- package/lib/chevre/service/assetTransaction/reserve/confirm/factory.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +0 -4
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -2
- package/lib/chevre/service/assetTransaction/reserve/start.js +0 -2
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +0 -2
- package/lib/chevre/service/delivery.js +1 -3
- package/lib/chevre/service/event/processUpdateMovieTheater.js +0 -3
- package/lib/chevre/service/event/saveScreeningEventSeries.js +0 -4
- package/lib/chevre/service/event/saveScreeningEvents.js +0 -6
- package/lib/chevre/service/event.js +0 -3
- package/lib/chevre/service/notification/factory.js +0 -2
- package/lib/chevre/service/notification/notifyByEmail.js +0 -2
- package/lib/chevre/service/notification/triggerWebhook.js +0 -2
- package/lib/chevre/service/offer/event/authorize/factory.js +0 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +0 -1
- package/lib/chevre/service/offer/event/authorize.js +0 -3
- package/lib/chevre/service/offer/event/importFromCOA/factory.js +0 -1
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +0 -3
- package/lib/chevre/service/offer/event/searchOfferCatalogItemAvailability.js +0 -2
- package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +0 -1
- package/lib/chevre/service/offer/event/searchOffersByIds.js +0 -3
- package/lib/chevre/service/offer/event/voidTransaction.js +0 -2
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +0 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -4
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +0 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +0 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +0 -2
- package/lib/chevre/service/offer/factory.js +0 -1
- package/lib/chevre/service/offer/onEventChanged.js +0 -1
- package/lib/chevre/service/offer/product/factory.js +0 -3
- package/lib/chevre/service/offer/product/searchProductOffers.js +0 -1
- package/lib/chevre/service/offer/product.js +0 -2
- package/lib/chevre/service/offer.js +0 -1
- package/lib/chevre/service/order/deleteOrder.js +0 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +0 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +0 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +0 -1
- package/lib/chevre/service/order/placeOrder.js +0 -1
- package/lib/chevre/service/order/returnOrder.js +0 -1
- package/lib/chevre/service/order/sendOrder.js +0 -1
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +0 -2
- package/lib/chevre/service/payment/any/factory.js +0 -1
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +0 -1
- package/lib/chevre/service/payment/any/person2username.js +0 -1
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +0 -2
- package/lib/chevre/service/payment/any.js +0 -5
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +0 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +0 -2
- package/lib/chevre/service/payment/creditCard/voidTransaction.js +0 -1
- package/lib/chevre/service/payment/factory.js +0 -1
- package/lib/chevre/service/payment/movieTicket/authorize.js +0 -2
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +0 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +0 -1
- package/lib/chevre/service/payment/paymentCard.js +0 -1
- package/lib/chevre/service/product.js +0 -1
- package/lib/chevre/service/report/telemetry.js +0 -15
- package/lib/chevre/service/reserve/cancelReservation.js +0 -3
- package/lib/chevre/service/reserve/confirmReservation.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +0 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
- package/lib/chevre/service/reserve/searchByOrder.js +0 -1
- package/lib/chevre/service/reserve/useReservation.js +0 -2
- package/lib/chevre/service/reserveCOA/cancelReservation.js +0 -1
- package/lib/chevre/service/task/acceptCOAOffer.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +0 -3
- package/lib/chevre/service/task/deletePerson.js +0 -2
- package/lib/chevre/service/task/onAuthorizationCreated.js +0 -1
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +0 -1
- package/lib/chevre/service/task/onResourceDeleted.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated.js +0 -5
- package/lib/chevre/service/task/returnPayTransaction.js +0 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +0 -5
- package/lib/chevre/service/task.js +0 -4
- package/lib/chevre/service/taskHandler.js +0 -1
- package/lib/chevre/service/transaction/deleteTransaction.js +0 -4
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +0 -3
- package/lib/chevre/service/transaction/moneyTransfer.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -4
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +0 -2
- package/lib/chevre/service/transaction/returnOrder/preStart/findApplicableReturnPolicy.js +0 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +0 -1
- package/lib/chevre/service/transaction/returnOrder.js +0 -1
- package/lib/chevre/service/validation/validateOrder.js +0 -2
- package/lib/chevre/service.js +0 -3
- package/lib/chevre/settings.js +0 -1
- package/lib/index.js +0 -1
- package/package.json +2 -6
|
@@ -11,9 +11,7 @@ const factory = require("../../factory");
|
|
|
11
11
|
// lineNotify: LINENotifyCredentials;
|
|
12
12
|
// }
|
|
13
13
|
// ) => Promise<T>;
|
|
14
|
-
// tslint:disable-next-line:max-func-body-length
|
|
15
14
|
function notifyByEmail(params) {
|
|
16
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
17
15
|
return async (__, credentials) => {
|
|
18
16
|
const { logLevel } = params;
|
|
19
17
|
const shortSubject = params.subject;
|
|
@@ -119,9 +119,7 @@ function signRequest(params) {
|
|
|
119
119
|
.update(payload)
|
|
120
120
|
.digest('hex');
|
|
121
121
|
}
|
|
122
|
-
// tslint:disable-next-line:max-func-body-length
|
|
123
122
|
function processInformAction(params, options) {
|
|
124
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
125
123
|
return async (repos) => {
|
|
126
124
|
const timeout = options?.triggerWebhook?.timeout;
|
|
127
125
|
const useFetchAPI = options?.triggerWebhook?.useFetchAPI === true;
|
|
@@ -278,7 +278,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
278
278
|
return c;
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
|
-
// tslint:disable-next-line:no-unnecessary-local-variable
|
|
282
281
|
const resultAcceptedOffer = {
|
|
283
282
|
typeOf: factory.offerType.Offer,
|
|
284
283
|
id: itemOffered.reservedTicket.ticketType.id,
|
|
@@ -301,7 +300,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
301
300
|
/**
|
|
302
301
|
* 注文データの予約を生成する
|
|
303
302
|
*/
|
|
304
|
-
// tslint:disable-next-line:max-func-body-length
|
|
305
303
|
function createReservation(params) {
|
|
306
304
|
// const { itemOffered, event, reservationFor } = params;
|
|
307
305
|
const { itemOffered } = params;
|
|
@@ -6,7 +6,6 @@ const factory = require("../../../../../factory");
|
|
|
6
6
|
* チケット化された適用メンバーシップをPermitに変換する
|
|
7
7
|
*/
|
|
8
8
|
function requestedProgramMembershipUsed2permit(params) {
|
|
9
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
10
9
|
return async (repos) => {
|
|
11
10
|
let programMembershipUsedAsPermit;
|
|
12
11
|
const { programMembershipUsed, placeOrder } = params;
|
|
@@ -112,9 +112,7 @@ function validateCreateRequest(params) {
|
|
|
112
112
|
/**
|
|
113
113
|
* 受け入れらたオファーの内容を検証
|
|
114
114
|
*/
|
|
115
|
-
// tslint:disable-next-line:max-func-body-length
|
|
116
115
|
function validateAcceptedOffers(params) {
|
|
117
|
-
// tslint:disable-next-line:max-func-body-length
|
|
118
116
|
return async (repos) => {
|
|
119
117
|
let ticketOffers;
|
|
120
118
|
let unitPriceOffers;
|
|
@@ -241,7 +239,6 @@ function validateAcceptedOffers(params) {
|
|
|
241
239
|
};
|
|
242
240
|
}
|
|
243
241
|
function acceptedOfferWithoutDetail2acceptedOffer(params) {
|
|
244
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
245
242
|
return async () => {
|
|
246
243
|
const availableTicketOffers = params.availableTicketOffers;
|
|
247
244
|
const offerWithoutDetail = params.offerWithoutDetail;
|
|
@@ -4,7 +4,6 @@ exports.coaTicket2offer = coaTicket2offer;
|
|
|
4
4
|
const COA = require("@motionpicture/coa-service");
|
|
5
5
|
const util_1 = require("util");
|
|
6
6
|
const factory = require("../../../../factory");
|
|
7
|
-
// tslint:disable-next-line:max-func-body-length
|
|
8
7
|
function coaTicket2offer(params) {
|
|
9
8
|
// discontinue eligibleMonetaryAmount(2025-01-03~)
|
|
10
9
|
// 適用通貨区分
|
|
@@ -5,9 +5,7 @@ const factory = require("../../../factory");
|
|
|
5
5
|
const factory_1 = require("../factory");
|
|
6
6
|
const checkAvailability_1 = require("./checkAvailability");
|
|
7
7
|
const searchPriceSpecs4event_1 = require("./searchPriceSpecs4event");
|
|
8
|
-
// tslint:disable-next-line:max-func-body-length
|
|
9
8
|
function searchTicketOffersByItemOffered(params) {
|
|
10
|
-
// tslint:disable-next-line:max-func-body-length
|
|
11
9
|
return async (repos) => {
|
|
12
10
|
const eventService = (await repos.product.projectFields({
|
|
13
11
|
limit: 1,
|
|
@@ -115,7 +113,6 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
115
113
|
* イベントから興行(旅客)オファーを検索する
|
|
116
114
|
*/
|
|
117
115
|
function searchEventTicketOffersByEvent(params) {
|
|
118
|
-
// tslint:disable-next-line:max-func-body-length
|
|
119
116
|
return async (repos) => {
|
|
120
117
|
const event = params.event;
|
|
121
118
|
let soundFormatTypes = [];
|
|
@@ -15,9 +15,7 @@ const MAX_LIMIT_SEARCH_OFFER_CATALOG_ITEMS = 10;
|
|
|
15
15
|
/**
|
|
16
16
|
* サブカタログ利用可能性検索
|
|
17
17
|
*/
|
|
18
|
-
// tslint:disable-next-line:max-func-body-length
|
|
19
18
|
function searchOfferCatalogItemAvailability(params) {
|
|
20
|
-
// tslint:disable-next-line:max-func-body-length
|
|
21
19
|
return async (repos) => {
|
|
22
20
|
const { considerUnacceptedPaymentMethod, useIncludeInDataCatalog } = params.options;
|
|
23
21
|
if (typeof params.limit !== 'number') {
|
|
@@ -6,7 +6,6 @@ const factory = require("../../../factory");
|
|
|
6
6
|
* サブカタログ検索
|
|
7
7
|
*/
|
|
8
8
|
function searchOfferCatalogItems(params) {
|
|
9
|
-
// tslint:disable-next-line:max-func-body-length
|
|
10
9
|
return async (repos) => {
|
|
11
10
|
if (typeof params.limit !== 'number') {
|
|
12
11
|
throw new factory.errors.Argument('limit', 'must be number');
|
|
@@ -7,9 +7,7 @@ const factory_1 = require("../factory");
|
|
|
7
7
|
const checkAvailability_1 = require("./checkAvailability");
|
|
8
8
|
const searchPriceSpecs4event_1 = require("./searchPriceSpecs4event");
|
|
9
9
|
const debug = createDebug('chevre-domain:service:offer');
|
|
10
|
-
// tslint:disable-next-line:max-func-body-length
|
|
11
10
|
function searchTicketOffersByItemOffered(params) {
|
|
12
|
-
// tslint:disable-next-line:max-func-body-length
|
|
13
11
|
return async (repos) => {
|
|
14
12
|
const eventService = (await repos.product.projectFields({
|
|
15
13
|
limit: 1,
|
|
@@ -98,7 +96,6 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
98
96
|
* イベントから興行(旅客)オファーを検索する
|
|
99
97
|
*/
|
|
100
98
|
function searchEventTicketOffersByEvent(params) {
|
|
101
|
-
// tslint:disable-next-line:max-func-body-length
|
|
102
99
|
return async (repos) => {
|
|
103
100
|
const event = params.event;
|
|
104
101
|
let soundFormatTypes = [];
|
|
@@ -10,9 +10,7 @@ const voidTransactionByActionId_1 = require("./voidTransactionByActionId");
|
|
|
10
10
|
* 興行オファー承認取消(タスクから実行 or apiから実行))
|
|
11
11
|
* 取引中の承認アクション全てについて処理する or 特定の承認アクションについて処理する
|
|
12
12
|
*/
|
|
13
|
-
// tslint:disable-next-line:max-func-body-length
|
|
14
13
|
function voidTransaction(params) {
|
|
15
|
-
// tslint:disable-next-line:max-func-body-length
|
|
16
14
|
return async (repos, settings) => {
|
|
17
15
|
// support void by action ID(2024-05-26~)
|
|
18
16
|
if (typeof params.id === 'string') {
|
|
@@ -35,7 +35,6 @@ function createAcceptedOffersWithoutDetails(params) {
|
|
|
35
35
|
* 受入オファーをCOA販売チケットへ変換する
|
|
36
36
|
*/
|
|
37
37
|
function offer2availableSalesTicket(params) {
|
|
38
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
39
38
|
return async (repos) => {
|
|
40
39
|
let availableSalesTicket;
|
|
41
40
|
const offers = params.offers;
|
|
@@ -168,7 +167,6 @@ function offer2availableSalesTicket(params) {
|
|
|
168
167
|
};
|
|
169
168
|
};
|
|
170
169
|
}
|
|
171
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
172
170
|
function availableSalesTicket2offerWithDetails(params) {
|
|
173
171
|
let offerWithDetails;
|
|
174
172
|
const availableSalesTicket = params.availableSalesTicket;
|
|
@@ -79,7 +79,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
79
79
|
const event = params.event;
|
|
80
80
|
const reservationNumber = String(params.responseBody.tmpReserveNum);
|
|
81
81
|
// 座席仮予約からオファー情報を生成する
|
|
82
|
-
// tslint:disable-next-line:max-func-body-length
|
|
83
82
|
acceptedOffers4result.push(...params.responseBody.listTmpReserve.map((tmpReserve, index) => {
|
|
84
83
|
const requestedOffer = params.acceptedOffer.find((o) => {
|
|
85
84
|
return o.itemOffered?.serviceOutput?.reservedTicket?.ticketedSeat?.seatNumber === tmpReserve.seatNum
|
|
@@ -96,9 +95,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
96
95
|
const ticketToken = [
|
|
97
96
|
coaInfo.theaterCode,
|
|
98
97
|
coaInfo.dateJouei,
|
|
99
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
100
98
|
(`00000000${reservationNumber}`).slice(-8),
|
|
101
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
102
99
|
(`000${index + 1}`).slice(-3)
|
|
103
100
|
].join('');
|
|
104
101
|
// reimplement id(2024-12-31~)
|
|
@@ -220,7 +217,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
220
217
|
valueAddedTaxIncluded: requestedOffer.priceSpecification.valueAddedTaxIncluded,
|
|
221
218
|
priceComponent: requestedOffer.priceSpecification.priceComponent
|
|
222
219
|
};
|
|
223
|
-
// tslint:disable-next-line:no-unnecessary-local-variable
|
|
224
220
|
const resultAcceptedOffer = {
|
|
225
221
|
typeOf: factory.offerType.Offer,
|
|
226
222
|
id: requestedOffer.id,
|
|
@@ -39,7 +39,6 @@ function createAppliesToMovieTicket(params) {
|
|
|
39
39
|
}
|
|
40
40
|
return { movieTicketTypeChargePriceSpec, appliesToMovieTicket };
|
|
41
41
|
}
|
|
42
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
43
42
|
function createPriceComponent(params) {
|
|
44
43
|
const acceptedOffer = params.acceptedOffer;
|
|
45
44
|
const availableUnitPriceOffer = params.availableUnitPriceOffer;
|
|
@@ -305,9 +304,7 @@ function createPriceComponent(params) {
|
|
|
305
304
|
/**
|
|
306
305
|
* 受け入れらたオファーの内容を検証
|
|
307
306
|
*/
|
|
308
|
-
// tslint:disable-next-line:max-func-body-length
|
|
309
307
|
function validateAcceptedOffers(params) {
|
|
310
|
-
// tslint:disable-next-line:max-func-body-length
|
|
311
308
|
return async (repos) => {
|
|
312
309
|
const theaterCode = String(params.screeningEvent.coaInfo?.theaterCode);
|
|
313
310
|
const offerIdentifiers = (Array.isArray(params.object.acceptedOffer))
|
|
@@ -11,7 +11,6 @@ const factory = require("../../../factory");
|
|
|
11
11
|
* COA興行オファー承認
|
|
12
12
|
*/
|
|
13
13
|
function authorize(params) {
|
|
14
|
-
// tslint:disable-next-line:max-func-body-length
|
|
15
14
|
return async (repos) => {
|
|
16
15
|
const transaction = await repos.transaction.projectFieldsInProgressById({
|
|
17
16
|
typeOf: factory.transactionType.PlaceOrder,
|
|
@@ -10,7 +10,6 @@ const factory = require("../../../factory");
|
|
|
10
10
|
* COA興行オファー承認のオファーを変更
|
|
11
11
|
*/
|
|
12
12
|
function changeOffers(params) {
|
|
13
|
-
// tslint:disable-next-line:max-func-body-length
|
|
14
13
|
return async (repos) => {
|
|
15
14
|
const transaction = await repos.transaction.projectFieldsInProgressById({
|
|
16
15
|
typeOf: factory.transactionType.PlaceOrder,
|
|
@@ -179,7 +178,6 @@ function validate4changeOffer(params) {
|
|
|
179
178
|
if (authorizeAction.actionStatus !== factory.actionStatusType.CompletedActionStatus) {
|
|
180
179
|
throw new factory.errors.NotFound('authorizeAction');
|
|
181
180
|
}
|
|
182
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
183
181
|
/* istanbul ignore if */
|
|
184
182
|
// if (authorizeAction.object.event === undefined) {
|
|
185
183
|
// throw new factory.errors.NotFound('authorizeAction.object.event');
|
|
@@ -40,7 +40,6 @@ function mvtkChargePriceSpec2component(params) {
|
|
|
40
40
|
// ...(typeof params.accounting?.typeOf === 'string') ? { accounting: params.accounting } : undefined // 不要(2024-12-15~)
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
// tslint:disable-next-line:max-func-body-length
|
|
44
43
|
function createCompoundPriceSpec4event(params) {
|
|
45
44
|
// priceSpecificationはマスタ管理の仕様上必ず存在するはず
|
|
46
45
|
if (params.offer.priceSpecification === undefined) {
|
|
@@ -89,7 +89,6 @@ function acceptedOffers2amount(params) {
|
|
|
89
89
|
return a + priceSpecification.priceComponent.reduce((a2, b2) => a2 + Number(b2.price), 0);
|
|
90
90
|
}, 0);
|
|
91
91
|
}
|
|
92
|
-
// tslint:disable-next-line:max-func-body-length
|
|
93
92
|
function responseBody2resultAcceptedOffer(params) {
|
|
94
93
|
let acceptedOffers = [];
|
|
95
94
|
if (Array.isArray(params.responseBody.object)) {
|
|
@@ -124,7 +123,6 @@ function responseBody2resultAcceptedOffer(params) {
|
|
|
124
123
|
offer.priceSpecification.priceComponent.forEach((component) => {
|
|
125
124
|
if (typeof component.price === 'number') {
|
|
126
125
|
if (component.typeOf === factory.priceSpecificationType.UnitPriceSpecification) {
|
|
127
|
-
// tslint:disable-next-line:no-unnecessary-local-variable
|
|
128
126
|
const unitPriceComponent = {
|
|
129
127
|
accounting: component.accounting,
|
|
130
128
|
name: component.name,
|
|
@@ -172,7 +170,6 @@ function responseBody2resultAcceptedOffer(params) {
|
|
|
172
170
|
priceCurrency: offer.priceSpecification.priceCurrency,
|
|
173
171
|
priceComponent
|
|
174
172
|
};
|
|
175
|
-
// tslint:disable-next-line:no-unnecessary-local-variable
|
|
176
173
|
const permitAcceptedOffer = {
|
|
177
174
|
typeOf: responseBodyObject.typeOf,
|
|
178
175
|
id: offer.id,
|
|
@@ -6,7 +6,6 @@ const factory = require("../../../factory");
|
|
|
6
6
|
* プロダクトオファーを検索する
|
|
7
7
|
*/
|
|
8
8
|
function searchProductOffers(params) {
|
|
9
|
-
// tslint:disable-next-line:max-func-body-length
|
|
10
9
|
return async (repos) => {
|
|
11
10
|
// プロダクト検索
|
|
12
11
|
const productWithOffers = (await repos.product.projectFields({
|
|
@@ -73,9 +73,7 @@ function search(params) {
|
|
|
73
73
|
/**
|
|
74
74
|
* サービス(Chevreプロダクト)オファー承認
|
|
75
75
|
*/
|
|
76
|
-
// tslint:disable-next-line:max-func-body-length
|
|
77
76
|
function authorize(params) {
|
|
78
|
-
// tslint:disable-next-line:max-func-body-length
|
|
79
77
|
return async (repos) => {
|
|
80
78
|
const now = new Date();
|
|
81
79
|
const transaction = await repos.transaction.projectFieldsInProgressById({
|
|
@@ -54,7 +54,6 @@ function addOffers2Seat(params) {
|
|
|
54
54
|
* イベントに対する座席オファーを検索する
|
|
55
55
|
*/
|
|
56
56
|
function searchEventSeatOffersWithPaging(params) {
|
|
57
|
-
// tslint:disable-next-line:max-func-body-length
|
|
58
57
|
return async (repos) => {
|
|
59
58
|
const { includeSectionCodeOnlyFirstElement, useDefaultSection } = params.options;
|
|
60
59
|
let offers = [];
|
|
@@ -9,7 +9,6 @@ const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
|
9
9
|
const factory = require("../../factory");
|
|
10
10
|
const debug = createDebug('chevre-domain:service:order');
|
|
11
11
|
function onAssetTransactionStatusChanged(params) {
|
|
12
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
13
12
|
return async (repos, settings) => {
|
|
14
13
|
if (typeof params.useOnOrderStatusChanged !== 'boolean') {
|
|
15
14
|
throw new factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
|
|
@@ -186,7 +185,6 @@ function isProcessable(params) {
|
|
|
186
185
|
return allPayTransactionConfirmed;
|
|
187
186
|
};
|
|
188
187
|
}
|
|
189
|
-
// tslint:disable-next-line:max-func-body-length
|
|
190
188
|
function paymentDue2Processing(params) {
|
|
191
189
|
return async (repos, settings) => {
|
|
192
190
|
const placeOrderTransaction = await (0, findPlaceOrderTransaction_1.findPlaceOrderTransaction)({
|
|
@@ -73,7 +73,6 @@ function creteProcessingOrderAsNotification(order) {
|
|
|
73
73
|
const { id, project, typeOf, seller, price, priceCurrency, confirmationNumber, orderNumber, numAcceptedOffers, orderDate, orderStatus } = order;
|
|
74
74
|
// in case of [id not found](2025-02-23~)
|
|
75
75
|
if (typeof id !== 'string' || id === '') {
|
|
76
|
-
// tslint:disable-next-line:no-console
|
|
77
76
|
console.error('creteProcessingOrderAsNotification: unexpected order found.', JSON.stringify(order));
|
|
78
77
|
throw new factory.errors.Internal('order.id must be string');
|
|
79
78
|
}
|
|
@@ -4,7 +4,6 @@ exports.createPlacingOrderFromExistingTransaction = createPlacingOrderFromExisti
|
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
5
|
const factory_1 = require("./factory");
|
|
6
6
|
function createPlacingOrderFromExistingTransaction(params) {
|
|
7
|
-
// tslint:disable-next-line:max-func-body-length
|
|
8
7
|
return async (repos) => {
|
|
9
8
|
const confirmationNumber = String(params.confirmationNumber);
|
|
10
9
|
const orderNumber = params.orderNumber;
|
|
@@ -10,7 +10,6 @@ const voidAcceptedOfferIfNecessary_1 = require("./placeOrder/voidAcceptedOfferIf
|
|
|
10
10
|
* 注文を作成する
|
|
11
11
|
*/
|
|
12
12
|
function placeOrder(params) {
|
|
13
|
-
// tslint:disable-next-line:max-func-body-length
|
|
14
13
|
return async (repos, settings) => {
|
|
15
14
|
if (typeof params.useOnOrderStatusChanged !== 'boolean') {
|
|
16
15
|
throw new factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
|
package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js
CHANGED
|
@@ -40,7 +40,6 @@ function recipe2paymentAgencyTransaction(actionRecipe) {
|
|
|
40
40
|
* 決済採用アクションから決済方法チケットを参照する
|
|
41
41
|
*/
|
|
42
42
|
function acceptAction2ticket(params) {
|
|
43
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
44
43
|
return async (repos) => {
|
|
45
44
|
const { acceptPayAction, project } = params;
|
|
46
45
|
const ticketToken = acceptPayAction.instrument?.find((ticketAsInstrument) => ticketAsInstrument.typeOf === 'Ticket')?.ticketToken;
|
|
@@ -89,7 +88,6 @@ function acceptAction2ticket(params) {
|
|
|
89
88
|
/**
|
|
90
89
|
* 決済承認前の決済採用アクションを参照する
|
|
91
90
|
*/
|
|
92
|
-
// tslint:disable-next-line:max-func-body-length
|
|
93
91
|
function handlePrePublishedPaymentMethodIdOnAuthorizing(params) {
|
|
94
92
|
return async (repos) => {
|
|
95
93
|
let creditCard;
|
|
@@ -250,7 +250,6 @@ function createAuthorizeResult(params) {
|
|
|
250
250
|
typeOf: factory.action.authorize.paymentMethod.any.ResultType.Payment,
|
|
251
251
|
referencesOrder // add(2025-11-23~)
|
|
252
252
|
};
|
|
253
|
-
// tslint:disable-next-line:no-suspicious-comment
|
|
254
253
|
// TODO 保留 resultにメンバーシップを追加(2024-08-13~)
|
|
255
254
|
// let resultAsPermit: factory.action.authorize.paymentMethod.any.IResultAsPermit | undefined;
|
|
256
255
|
// if (typeof params.permit?.identifier === 'string') {
|
|
@@ -11,7 +11,6 @@ const onPaymentStatusChanged_1 = require("./onPaymentStatusChanged");
|
|
|
11
11
|
* 返金後のアクション
|
|
12
12
|
*/
|
|
13
13
|
function onRefundActionCompletedOrFailed(refundAction) {
|
|
14
|
-
// tslint:disable-next-line:max-func-body-length
|
|
15
14
|
return async (repos) => {
|
|
16
15
|
const aciton4inform = (0, factory_1.optimizeAction4inform)(refundAction);
|
|
17
16
|
const potentialActions = refundAction.potentialActions;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.verifyTicketTokenAsNeeded = verifyTicketTokenAsNeeded;
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
|
-
// tslint:disable-next-line:max-func-body-length
|
|
6
5
|
function verifyTicketTokenAsNeeded(params) {
|
|
7
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
8
6
|
return async (repos) => {
|
|
9
7
|
const { paymentServiceType, object, project } = params;
|
|
10
8
|
const { issuedThrough, ticketToken } = object;
|
|
@@ -56,7 +56,6 @@ function voidPayTransaction(params) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
function invalidatePaymentUrl(params) {
|
|
59
|
-
// tslint:disable-next-line:max-func-body-length
|
|
60
59
|
return async (repos
|
|
61
60
|
// settings: Settings
|
|
62
61
|
) => {
|
|
@@ -216,7 +215,6 @@ function invalidatePaymentUrl(params) {
|
|
|
216
215
|
* apiもしくはタスクから決済承認を取り消す
|
|
217
216
|
*/
|
|
218
217
|
function processVoidPayTransaction(params) {
|
|
219
|
-
// tslint:disable-next-line:max-func-body-length
|
|
220
218
|
return async (repos) => {
|
|
221
219
|
const cancelAction = {
|
|
222
220
|
startTime: new Date(),
|
|
@@ -312,9 +310,7 @@ function processVoidPayTransaction(params) {
|
|
|
312
310
|
/**
|
|
313
311
|
* 外部決済ロケーションを発行する
|
|
314
312
|
*/
|
|
315
|
-
// tslint:disable-next-line:max-func-body-length
|
|
316
313
|
function publishPaymentUrl(params) {
|
|
317
|
-
// tslint:disable-next-line:max-func-body-length
|
|
318
314
|
return async (repos, settings) => {
|
|
319
315
|
const { paymentServiceType, purpose, project } = params;
|
|
320
316
|
if (purpose.typeOf !== factory.transactionType.PlaceOrder) {
|
|
@@ -424,7 +420,6 @@ function minimizeObjectIncludingPaymentMethodDetails(authorizeObjectIncludingPay
|
|
|
424
420
|
* 決済承認
|
|
425
421
|
*/
|
|
426
422
|
function authorize(params) {
|
|
427
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
428
423
|
return async (repos, settings) => {
|
|
429
424
|
const { paymentServiceType, purpose, project } = params;
|
|
430
425
|
if (purpose.typeOf !== factory.transactionType.PlaceOrder) {
|
|
@@ -5,7 +5,6 @@ const GMO = require("@motionpicture/gmo-service");
|
|
|
5
5
|
const factory = require("../../../../factory");
|
|
6
6
|
const processAuthorizeCreditCardResult2recipe_1 = require("./processAuthorizeCreditCardResult2recipe");
|
|
7
7
|
function processAuthorizeCreditCard(params) {
|
|
8
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
9
8
|
return async (repos) => {
|
|
10
9
|
let entryTranArgs;
|
|
11
10
|
let entryTranResult;
|
|
@@ -10,7 +10,6 @@ const gmoError_1 = require("./gmoError");
|
|
|
10
10
|
/**
|
|
11
11
|
* refund CreditCard IF payment
|
|
12
12
|
*/
|
|
13
|
-
// tslint:disable-next-line:max-func-body-length
|
|
14
13
|
function refundCreditCard(params
|
|
15
14
|
// options: { // discontinue(2025-02-20~)
|
|
16
15
|
// requirePayAction: boolean;
|
|
@@ -109,7 +108,6 @@ function refundCreditCard(params
|
|
|
109
108
|
};
|
|
110
109
|
}
|
|
111
110
|
function processAlterTran(params) {
|
|
112
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
113
111
|
return async (repos) => {
|
|
114
112
|
let searchTradeArgs;
|
|
115
113
|
let searchTradeResult;
|
|
@@ -45,7 +45,6 @@ function createPayOrderAction(params) {
|
|
|
45
45
|
: undefined
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
49
48
|
function createPayObject(params) {
|
|
50
49
|
const transaction = params.transaction;
|
|
51
50
|
const paymentMethod = transaction.object.paymentMethod;
|
|
@@ -9,9 +9,7 @@ const validation_1 = require("./validation");
|
|
|
9
9
|
* 決済カード承認
|
|
10
10
|
* オーソリサービスが存在するわけではないので、実質着券する
|
|
11
11
|
*/
|
|
12
|
-
// tslint:disable-next-line:max-func-body-length
|
|
13
12
|
function authorize(params, transaction, paymentServiceId, options) {
|
|
14
|
-
// tslint:disable-next-line:max-func-body-length
|
|
15
13
|
return async (repos, settings) => {
|
|
16
14
|
let accountId;
|
|
17
15
|
let accountsReceivablesByServiceType = [];
|
|
@@ -34,7 +34,6 @@ function wait4payActionDelayIfNeeded(params) {
|
|
|
34
34
|
* 決済カード返金
|
|
35
35
|
*/
|
|
36
36
|
function refundMovieTicket(params, options) {
|
|
37
|
-
// tslint:disable-next-line:max-func-body-length
|
|
38
37
|
return async (repos, settings) => {
|
|
39
38
|
const { callOnPayActionCompleted } = options;
|
|
40
39
|
const paymentMethodId = params.object[0]?.paymentMethod.paymentMethodId;
|
|
@@ -8,7 +8,6 @@ const debug = createDebug('chevre-domain:service:payment');
|
|
|
8
8
|
function validateMovieTicket(params, paymentServiceId,
|
|
9
9
|
// useCheckByIdentifierIfNotYet: boolean,
|
|
10
10
|
checkedAction, purpose) {
|
|
11
|
-
// tslint:disable-next-line:max-func-body-length
|
|
12
11
|
return async (repos, settings) => {
|
|
13
12
|
const movieTickets = params.object.paymentMethod?.movieTickets;
|
|
14
13
|
if (!Array.isArray(movieTickets)) {
|
|
@@ -269,7 +269,6 @@ function payPaymentCard(params) {
|
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
271
|
function refundPaymentCard(params) {
|
|
272
|
-
// tslint:disable-next-line:max-func-body-length
|
|
273
272
|
return async (repos) => {
|
|
274
273
|
const paymentMethodId = params.object[0]?.paymentMethod.paymentMethodId;
|
|
275
274
|
const paymentServiceId = params.object[0]?.id;
|
|
@@ -51,7 +51,6 @@ function onRegistered(actionAttributes, __) {
|
|
|
51
51
|
const potentialActions = actionAttributes.potentialActions;
|
|
52
52
|
const now = new Date();
|
|
53
53
|
const taskAttributes = [];
|
|
54
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
55
54
|
/* istanbul ignore else */
|
|
56
55
|
if (potentialActions !== undefined) {
|
|
57
56
|
if (Array.isArray(potentialActions.moneyTransfer)) {
|