@chevre/domain 25.2.0-alpha.4 → 25.2.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/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
- package/lib/chevre/factory/customerTelephone2COATelNum.js +22 -0
- package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
- package/lib/chevre/repo/action/acceptPay.js +47 -19
- package/lib/chevre/repo/action/actionProcess.js +57 -57
- package/lib/chevre/repo/action.d.ts +16 -9
- package/lib/chevre/repo/action.js +99 -180
- package/lib/chevre/repo/aggregateOffer.d.ts +2 -3
- package/lib/chevre/repo/creativeWork.d.ts +2 -3
- package/lib/chevre/repo/customerType.d.ts +2 -3
- package/lib/chevre/repo/event.d.ts +10 -11
- package/lib/chevre/repo/eventOffer.d.ts +4 -5
- package/lib/chevre/repo/eventSellerMakesOffer.d.ts +2 -3
- package/lib/chevre/repo/eventSeries.d.ts +4 -5
- package/lib/chevre/repo/message.d.ts +1 -1
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.js +67 -66
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
- package/lib/chevre/repo/note.d.ts +3 -4
- package/lib/chevre/repo/noteAboutOrder.d.ts +2 -3
- package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +4 -0
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +40 -0
- package/lib/chevre/repo/offerCatalog.d.ts +2 -3
- package/lib/chevre/repo/offerCatalogItem.d.ts +2 -3
- package/lib/chevre/repo/order.d.ts +2 -0
- package/lib/chevre/repo/order.js +14 -14
- package/lib/chevre/repo/orderInTransaction.d.ts +68 -1
- package/lib/chevre/repo/orderInTransaction.js +181 -3
- package/lib/chevre/repo/person.d.ts +0 -15
- package/lib/chevre/repo/person.js +122 -108
- package/lib/chevre/repo/place/entranceGate.d.ts +4 -5
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +4 -5
- package/lib/chevre/repo/place/seat.d.ts +4 -5
- package/lib/chevre/repo/place/section.d.ts +3 -4
- package/lib/chevre/repo/product.d.ts +3 -4
- package/lib/chevre/repo/rateLimit/offer.js +0 -12
- package/lib/chevre/repo/reservation.d.ts +2 -3
- package/lib/chevre/repo/sellerMakesOffer.d.ts +3 -4
- package/lib/chevre/repo/stockHolder.d.ts +1 -1
- package/lib/chevre/repo/stockHolder.js +0 -146
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
- package/lib/chevre/repo/transaction/placeOrder.js +43 -83
- package/lib/chevre/repo/transaction.d.ts +2 -2
- package/lib/chevre/repo/transactionNumberCounter.js +0 -34
- package/lib/chevre/repo/transactionProcess.js +0 -13
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
- package/lib/chevre/service/notification/factory.d.ts +2 -4
- package/lib/chevre/service/notification/factory.js +26 -24
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +11 -5
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +11 -3
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -5
- package/lib/chevre/service/offer/event/authorize/factory.js +93 -75
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
- package/lib/chevre/service/offer/event/authorize.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +17 -14
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
- package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionCanceled.js +19 -11
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -2
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +1 -7
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +95 -33
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +2 -6
- package/lib/chevre/service/order/payOrder.d.ts +2 -0
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +13 -58
- package/lib/chevre/service/order/placeOrder/factory.js +3 -21
- package/lib/chevre/service/order/placeOrder.d.ts +4 -5
- package/lib/chevre/service/order/placeOrder.js +20 -31
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
- package/lib/chevre/service/payment/any/authorize.js +13 -37
- package/lib/chevre/service/payment/any/factory.d.ts +7 -7
- package/lib/chevre/service/payment/any/factory.js +19 -22
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +3 -1
- package/lib/chevre/service/payment/any/findAcceptAction.js +14 -6
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +4 -66
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
- package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
- package/lib/chevre/service/reserve/adminFindReservations.d.ts +15 -0
- package/lib/chevre/service/reserve/adminFindReservations.js +35 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +17 -8
- package/lib/chevre/service/reserve/searchByOrder.js +2 -6
- package/lib/chevre/service/reserve.d.ts +2 -2
- package/lib/chevre/service/reserve.js +3 -3
- package/lib/chevre/service/task/aggregateOffers.d.ts +2 -2
- package/lib/chevre/service/task/aggregateOffers.js +2 -1
- package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +2 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -1
- package/lib/chevre/service/task/authorizePayment.js +3 -1
- package/lib/chevre/service/task/cancelReservation.d.ts +2 -2
- package/lib/chevre/service/task/cancelReservation.js +2 -1
- package/lib/chevre/service/task/confirmPayTransaction.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +2 -7
- package/lib/chevre/service/task/deleteTransaction.d.ts +2 -2
- package/lib/chevre/service/task/deleteTransaction.js +2 -1
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +2 -2
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -3
- package/lib/chevre/service/task/onEventChanged.d.ts +2 -2
- package/lib/chevre/service/task/onEventChanged.js +2 -1
- package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +2 -2
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -1
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated.js +2 -1
- package/lib/chevre/service/task/placeOrder.d.ts +2 -2
- package/lib/chevre/service/task/placeOrder.js +6 -3
- package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
- package/lib/chevre/service/task/refund.d.ts +2 -2
- package/lib/chevre/service/task/refund.js +4 -10
- package/lib/chevre/service/task/reserve.d.ts +2 -2
- package/lib/chevre/service/task/reserve.js +2 -1
- package/lib/chevre/service/task/returnOrder.d.ts +2 -2
- package/lib/chevre/service/task/returnOrder.js +2 -1
- package/lib/chevre/service/task/sendOrder.d.ts +2 -2
- package/lib/chevre/service/task/sendOrder.js +2 -1
- package/lib/chevre/service/task/voidPayTransaction.js +3 -7
- package/lib/chevre/service/task/voidPayment.d.ts +2 -2
- package/lib/chevre/service/task/voidPayment.js +2 -1
- package/lib/chevre/service/taskHandler.d.ts +2 -2
- package/lib/chevre/service/taskHandler.js +36 -37
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +28 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +11 -12
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +4 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +6 -7
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +35 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +17 -13
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +11 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +112 -91
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +6 -5
- package/lib/chevre/service/transaction/placeOrder/confirm.js +33 -78
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
- package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.d.ts +20 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.js +63 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +17 -86
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/lib/chevre/taskSettings.d.ts +1 -3
- package/package.json +8 -11
- package/lib/chevre/service/order/findConfirmedPlaceOrder.d.ts +0 -13
- package/lib/chevre/service/order/findConfirmedPlaceOrder.js +0 -32
- package/lib/chevre/service/reserve/findReservations.d.ts +0 -33
- package/lib/chevre/service/reserve/findReservations.js +0 -61
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findConfirmedPlaceOrder = findConfirmedPlaceOrder;
|
|
4
|
-
const factory_1 = require("../../factory");
|
|
5
|
-
function findConfirmedPlaceOrder(params) {
|
|
6
|
-
return async (repos) => {
|
|
7
|
-
const placeOrderTransactions = await repos.placeOrder.findPlaceOrderTransactions({
|
|
8
|
-
limit: 1,
|
|
9
|
-
page: 1,
|
|
10
|
-
project: { id: { $eq: params.project.id } },
|
|
11
|
-
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
12
|
-
statuses: [factory_1.factory.transactionStatusType.Confirmed],
|
|
13
|
-
// resultではなくobjectで参照するように変更(2026-06-16~)
|
|
14
|
-
object: {
|
|
15
|
-
confirmationNumber: { $eq: params.confirmationNumber },
|
|
16
|
-
orderNumber: { $eq: params.orderNumber },
|
|
17
|
-
},
|
|
18
|
-
// result: {
|
|
19
|
-
// order: {
|
|
20
|
-
// confirmationNumber: { $eq: params.confirmationNumber },
|
|
21
|
-
// orderNumbers: [params.orderNumber]
|
|
22
|
-
// }
|
|
23
|
-
// },
|
|
24
|
-
inclusion: ['potentialActions', 'project', 'typeOf']
|
|
25
|
-
});
|
|
26
|
-
const placeOrderTransaction = placeOrderTransactions.shift();
|
|
27
|
-
if (placeOrderTransaction === undefined) {
|
|
28
|
-
throw new factory_1.factory.errors.NotFound(factory_1.factory.transactionType.PlaceOrder);
|
|
29
|
-
}
|
|
30
|
-
return placeOrderTransaction;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { factory } from '../../factory';
|
|
2
|
-
import type { ReserveTransactionRepo } from '../../repo/assetTransaction/reserve';
|
|
3
|
-
import type { IKeyOfProjection, ReservationRepo } from '../../repo/reservation';
|
|
4
|
-
/**
|
|
5
|
-
* 予約検索レスポンスとしての予約
|
|
6
|
-
* 予約ドキュメントに予約取引の情報を補完する
|
|
7
|
-
*/
|
|
8
|
-
type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, 'underName' | 'reservedTicket' | 'reservationFor'> & {
|
|
9
|
-
underName?: factory.assetTransaction.reserve.IUnderName;
|
|
10
|
-
reservedTicket?: factory.reservation.eventReservation.IReservedTicket | factory.assetTransaction.reserve.IObjectSubReservation['reservedTicket'];
|
|
11
|
-
reservationFor?: factory.reservation.eventReservation.IReservationForMinimized | factory.assetTransaction.reserve.IReservationFor;
|
|
12
|
-
price?: never;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* 予約を検索する
|
|
16
|
-
*/
|
|
17
|
-
export declare function findReservations(params: factory.reservation.eventReservation.ISearchConditions, options: {
|
|
18
|
-
inclusion: Partial<Record<IKeyOfProjection | 'underName', 1>>;
|
|
19
|
-
/**
|
|
20
|
-
* reservationForを予約ドキュメントそのままで返すかどうか
|
|
21
|
-
*/
|
|
22
|
-
minimizeReservationFor: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* reservedTicketからticketTypeを除外するかどうか
|
|
25
|
-
*/
|
|
26
|
-
minimizeReservedTicket: boolean;
|
|
27
|
-
}): (repos: {
|
|
28
|
-
assetTransaction: {
|
|
29
|
-
reserve: ReserveTransactionRepo;
|
|
30
|
-
};
|
|
31
|
-
reservation: ReservationRepo;
|
|
32
|
-
}) => Promise<IReservationAsFindResult[]>;
|
|
33
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findReservations = findReservations;
|
|
4
|
-
/**
|
|
5
|
-
* 予約を検索する
|
|
6
|
-
*/
|
|
7
|
-
function findReservations(params, options) {
|
|
8
|
-
return async (repos) => {
|
|
9
|
-
const { inclusion, minimizeReservationFor, minimizeReservedTicket } = options;
|
|
10
|
-
const rawReservations = await repos.reservation.findReservations(params, inclusion);
|
|
11
|
-
if (rawReservations.length === 0) {
|
|
12
|
-
return [];
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
const requireUnderName = Object.keys(inclusion).includes('underName');
|
|
16
|
-
const requireReservedTicket = Object.keys(inclusion).includes('reservedTicket');
|
|
17
|
-
const requireReservationFor = Object.keys(inclusion).includes('reservationFor');
|
|
18
|
-
const reservationIds = rawReservations.map(({ id }) => id);
|
|
19
|
-
const subReservations = await repos.assetTransaction.reserve.findSubReservationsById({
|
|
20
|
-
ids: reservationIds
|
|
21
|
-
});
|
|
22
|
-
return rawReservations.map((reservation) => {
|
|
23
|
-
const subReservationByTransaction = subReservations.find((s) => s.id === reservation.id);
|
|
24
|
-
const underNameByTransaction = subReservationByTransaction?.underName;
|
|
25
|
-
const ticketTypeByTransaction = subReservationByTransaction?.reservedTicket?.ticketType;
|
|
26
|
-
const reservationForByTransaction = subReservationByTransaction?.reservationFor;
|
|
27
|
-
const { reservationFor, issuedThrough: _issuedThrough, priceCurrency: _priceCurrency, numSeats: _numSeats, reservedTicket, ...rawReservation4result } = reservation;
|
|
28
|
-
return {
|
|
29
|
-
...rawReservation4result, // 予約ドキュメントはそのまま返す
|
|
30
|
-
...(requireUnderName && underNameByTransaction !== undefined) ? { underName: underNameByTransaction } : undefined, // underNameがあれば上書き
|
|
31
|
-
...(requireReservedTicket)
|
|
32
|
-
? (!minimizeReservedTicket && ticketTypeByTransaction !== undefined)
|
|
33
|
-
? {
|
|
34
|
-
reservedTicket: {
|
|
35
|
-
...reservedTicket, // 予約ドキュメントのreservedTicketはそのまま返す
|
|
36
|
-
ticketType: ticketTypeByTransaction
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
: { reservedTicket } // 予約検索レスポンスからticketTypeは廃止(2026-06-01~)
|
|
40
|
-
: undefined,
|
|
41
|
-
...(requireReservationFor)
|
|
42
|
-
? (!minimizeReservationFor && reservationForByTransaction !== undefined)
|
|
43
|
-
? { reservationFor: reservationForByTransaction }
|
|
44
|
-
: { reservationFor } // 予約検索レスポンスのreservationForはそのまま返す(2026-06-01~)
|
|
45
|
-
: undefined,
|
|
46
|
-
// ...(requireReservedTicket && ticketTypeByTransaction !== undefined) // ticketTypeがあれば上書き
|
|
47
|
-
// ? {
|
|
48
|
-
// reservedTicket: {
|
|
49
|
-
// ...reservedTicket, // 予約ドキュメントのreservedTicketはそのまま返す
|
|
50
|
-
// ticketType: ticketTypeByTransaction
|
|
51
|
-
// }
|
|
52
|
-
// }
|
|
53
|
-
// : undefined,
|
|
54
|
-
// ...(requireReservationFor && reservationForByTransaction !== undefined)
|
|
55
|
-
// ? { reservationFor: reservationForByTransaction }
|
|
56
|
-
// : undefined, // reservationForがあれば上書き(2026-04-06~)
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|