@chevre/domain 24.1.0-alpha.5 → 24.1.0-alpha.51
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/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 +20 -26
- package/lib/chevre/repo/acceptedOffer.js +113 -67
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +30 -0
- package/lib/chevre/repo/acceptedOfferInReserve.js +86 -0
- package/lib/chevre/repo/accountingReport.js +2 -30
- package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
- package/lib/chevre/repo/assetTransaction/reserve.d.ts +1 -2
- 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 +84 -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 +10 -373
- package/lib/chevre/repo/orderInTransaction.d.ts +52 -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 +27 -0
- package/lib/chevre/repo/setting/integration.js +102 -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 -2
- package/lib/chevre/service/offer/event/authorize.js +58 -11
- 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 -1
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +15 -15
- package/lib/chevre/service/order/deleteOrder.js +19 -43
- 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 +0 -4
- 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 +1 -1
- package/lib/chevre/service/reserve/findReservations.d.ts +14 -6
- package/lib/chevre/service/reserve/findReservations.js +26 -36
- 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 +7 -3
- package/lib/chevre/service/task/acceptCOAOffer.js +6 -3
- package/lib/chevre/service/task/authorizePayment.js +4 -2
- package/lib/chevre/service/task/cancelPendingReservation.js +4 -2
- package/lib/chevre/service/task/checkMovieTicket.js +4 -2
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +5 -3
- package/lib/chevre/service/task/createAccountingReport.js +4 -8
- package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +4 -2
- package/lib/chevre/service/task/importEventsFromCOA.js +4 -2
- package/lib/chevre/service/task/importOffersFromCOA.js +4 -2
- package/lib/chevre/service/task/invalidatePaymentUrl.js +3 -1
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +3 -1
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +3 -1
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
- package/lib/chevre/service/task/pay.js +4 -2
- 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 +6 -7
- 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/placeOrder.js +3 -1
- package/lib/chevre/service/task/publishPaymentUrl.js +3 -1
- package/lib/chevre/service/task/refund.js +4 -2
- package/lib/chevre/service/task/returnReserveTransaction.js +4 -2
- package/lib/chevre/service/task/sendEmailMessage.js +5 -3
- package/lib/chevre/service/task/syncResourcesFromCOA.js +4 -2
- package/lib/chevre/service/task/voidPayment.js +4 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
- package/lib/chevre/service/task.d.ts +0 -7
- 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 +0 -3
- package/lib/chevre/service/validation/validateOrder.js +3 -78
- package/lib/chevre/settings.d.ts +0 -55
- package/lib/chevre/settings.js +1 -29
- package/lib/chevre/taskSettings.d.ts +0 -22
- package/lib/chevre/taskSettings.js +1 -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
|
@@ -8,9 +8,7 @@ export interface IUpdatePartiallyParams {
|
|
|
8
8
|
export type ICancelResult = UpdateWriteOpResult;
|
|
9
9
|
export type ICheckedInResult = UpdateWriteOpResult;
|
|
10
10
|
type ISavingReservedTicket = Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
|
|
11
|
-
ticketType
|
|
12
|
-
id?: string;
|
|
13
|
-
};
|
|
11
|
+
ticketType?: never;
|
|
14
12
|
};
|
|
15
13
|
/**
|
|
16
14
|
* ドキュメントとして保管する予約
|
|
@@ -22,7 +20,7 @@ export type ICreatingReservation = Omit<factory.reservation.eventReservation.IRe
|
|
|
22
20
|
/**
|
|
23
21
|
* 廃止予定の予約属性
|
|
24
22
|
*/
|
|
25
|
-
export type IDeprecatedField = 'price' | 'underName';
|
|
23
|
+
export type IDeprecatedField = 'price' | 'underName' | 'priceCurrency' | 'issuedThrough' | 'numSeats';
|
|
26
24
|
export type IKeyOfProjection = Exclude<keyof factory.reservation.eventReservation.IReservation, IDeprecatedField> | 'reservedTicket.dateUsed' | 'reservationFor.id' | 'reservationFor.typeOf';
|
|
27
25
|
export type IAttendedReservation = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'typeOf' | 'project' | 'modifiedTime'> & {
|
|
28
26
|
reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, 'id' | 'typeOf'>;
|
|
@@ -37,6 +35,18 @@ export type IReservationAsFindResult = Omit<factory.reservation.eventReservation
|
|
|
37
35
|
* 実データとしてはまだ存在しているが型から廃止(2026-03-26~)
|
|
38
36
|
*/
|
|
39
37
|
underName?: never;
|
|
38
|
+
/**
|
|
39
|
+
* discontinue(2026-05-10~)
|
|
40
|
+
*/
|
|
41
|
+
priceCurrency?: never;
|
|
42
|
+
/**
|
|
43
|
+
* discontinue(2026-05-10~)
|
|
44
|
+
*/
|
|
45
|
+
issuedThrough?: never;
|
|
46
|
+
/**
|
|
47
|
+
* discontinue(2026-05-11~)
|
|
48
|
+
*/
|
|
49
|
+
numSeats?: never;
|
|
40
50
|
};
|
|
41
51
|
/**
|
|
42
52
|
* 予約リポジトリ
|
|
@@ -63,7 +73,6 @@ export declare class ReservationRepo {
|
|
|
63
73
|
};
|
|
64
74
|
provider: factory.reservation.IProvider;
|
|
65
75
|
subReservation: factory.assetTransaction.reserve.IObjectSubReservation[];
|
|
66
|
-
issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
|
|
67
76
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
68
77
|
reservationNumber: string;
|
|
69
78
|
underName?: factory.reservation.IUnderName;
|
|
@@ -145,16 +154,20 @@ export declare class ReservationRepo {
|
|
|
145
154
|
}): Promise<string[]>;
|
|
146
155
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
|
|
147
156
|
_id: string;
|
|
148
|
-
bookingAgent?: any;
|
|
149
157
|
previousReservationStatus?: factory.reservationStatusType;
|
|
158
|
+
price?: never;
|
|
159
|
+
priceCurrency?: never;
|
|
160
|
+
issuedThrough?: never;
|
|
150
161
|
} & Required<{
|
|
151
162
|
_id: string;
|
|
152
163
|
}> & {
|
|
153
164
|
__v: number;
|
|
154
165
|
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
|
|
155
166
|
_id: string;
|
|
156
|
-
bookingAgent?: any;
|
|
157
167
|
previousReservationStatus?: factory.reservationStatusType;
|
|
168
|
+
price?: never;
|
|
169
|
+
priceCurrency?: never;
|
|
170
|
+
issuedThrough?: never;
|
|
158
171
|
} & Required<{
|
|
159
172
|
_id: string;
|
|
160
173
|
}> & {
|
|
@@ -19,7 +19,7 @@ class ReservationRepo {
|
|
|
19
19
|
* 汎用予約カウント
|
|
20
20
|
*/
|
|
21
21
|
async count(params) {
|
|
22
|
-
const conditions = (0, createMongoConditions_1.
|
|
22
|
+
const conditions = (0, createMongoConditions_1.createMongoConditions)(params);
|
|
23
23
|
return this.reservationModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
24
24
|
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
25
25
|
.exec();
|
|
@@ -28,7 +28,7 @@ class ReservationRepo {
|
|
|
28
28
|
* 予約検索
|
|
29
29
|
*/
|
|
30
30
|
async findReservations(params, inclusion) {
|
|
31
|
-
const conditions = (0, createMongoConditions_1.
|
|
31
|
+
const conditions = (0, createMongoConditions_1.createMongoConditions)(params);
|
|
32
32
|
let projection;
|
|
33
33
|
if (inclusion !== undefined && inclusion !== null) {
|
|
34
34
|
projection = {
|
|
@@ -114,15 +114,19 @@ class ReservationRepo {
|
|
|
114
114
|
const bulkWriteOps = [];
|
|
115
115
|
if (Array.isArray(params.subReservation)) {
|
|
116
116
|
params.subReservation.forEach((subReservation) => {
|
|
117
|
-
const { price: _discontinuePrice, reservedTicket,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
const { price: _discontinuePrice, reservedTicket, priceCurrency: _discontinuePriceCurrency, // discontinue priceCurrency
|
|
118
|
+
numSeats: _numSeats, // discontinue(2026-05-11~)
|
|
119
|
+
...subReservationWithoutPrice } = subReservation;
|
|
120
|
+
const { ticketType: _ticketType, ...reservedTicketWithoutTicketType } = reservedTicket;
|
|
121
|
+
// discontinue ticketType(2026-05-09~)
|
|
122
|
+
const savingReservedTicket = reservedTicketWithoutTicketType;
|
|
123
|
+
// // 予約ドキュメントのticketTypeを最小化(2026-04-03~)
|
|
124
|
+
// const savingReservedTicket: ISavingReservedTicket = {
|
|
125
|
+
// ...reservedTicketWithoutTicketType,
|
|
126
|
+
// ticketType: {
|
|
127
|
+
// ...((typeof ticketType.id === 'string') && { id: ticketType.id })
|
|
128
|
+
// }
|
|
129
|
+
// };
|
|
126
130
|
// reservationFor最小化(2026-04-06~)
|
|
127
131
|
const { minimizedReservationFor } = (0, minimizeReservationFor_1.minimizeReservationFor)(params.reservationFor);
|
|
128
132
|
const setOnInsert = {
|
|
@@ -132,7 +136,7 @@ class ReservationRepo {
|
|
|
132
136
|
bookingTime: params.bookingTime,
|
|
133
137
|
checkedIn: false,
|
|
134
138
|
attended: false,
|
|
135
|
-
issuedThrough: params.issuedThrough,
|
|
139
|
+
// issuedThrough: params.issuedThrough, // discontinue issuedThrough
|
|
136
140
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
137
141
|
reservationFor: minimizedReservationFor,
|
|
138
142
|
reservationNumber: params.reservationNumber,
|
|
@@ -59,23 +59,9 @@ export declare class RoleRepo {
|
|
|
59
59
|
} & {
|
|
60
60
|
__v: number;
|
|
61
61
|
}) | null>;
|
|
62
|
-
addMember(params: Pick<IRole, 'member' | 'memberOf' | 'roleName'>): Promise<(import("mongoose").FlattenMaps<{
|
|
63
|
-
typeOf: import("@chevre/factory/lib/chevre/role").RoleType;
|
|
64
|
-
memberOf: {
|
|
65
|
-
typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
66
|
-
};
|
|
67
|
-
member: {
|
|
68
|
-
typeOf: import("@chevre/factory/lib/chevre/role/organizationRole").IMemberType;
|
|
69
|
-
};
|
|
70
|
-
roleName: import("@chevre/factory/lib/chevre/role/organizationRole").RoleName;
|
|
71
|
-
permissions: string[];
|
|
72
|
-
}> & {
|
|
73
|
-
_id: import("mongoose").Types.ObjectId;
|
|
74
|
-
} & {
|
|
75
|
-
__v: number;
|
|
76
|
-
}) | null>;
|
|
77
62
|
create(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
|
|
78
63
|
id: string;
|
|
79
64
|
}>;
|
|
65
|
+
deleteByRoleName(params: Pick<IRole, 'roleName'>): Promise<import("mongodb").DeleteResult>;
|
|
80
66
|
}
|
|
81
67
|
export {};
|
package/lib/chevre/repo/role.js
CHANGED
|
@@ -139,20 +139,6 @@ class RoleRepo {
|
|
|
139
139
|
.lean()
|
|
140
140
|
.exec();
|
|
141
141
|
}
|
|
142
|
-
async addMember(params) {
|
|
143
|
-
const { roleName, member, memberOf } = params;
|
|
144
|
-
return this.roleModel.findOneAndUpdate({
|
|
145
|
-
roleName: { $eq: roleName },
|
|
146
|
-
'member.typeOf': { $ne: member.typeOf }
|
|
147
|
-
}, {
|
|
148
|
-
$set: { member, memberOf }
|
|
149
|
-
}, {
|
|
150
|
-
new: true,
|
|
151
|
-
projection: { _id: 1 }
|
|
152
|
-
})
|
|
153
|
-
.lean()
|
|
154
|
-
.exec();
|
|
155
|
-
}
|
|
156
142
|
async create(params) {
|
|
157
143
|
const { member, memberOf, permissions, roleName } = params;
|
|
158
144
|
const creatingRole = {
|
|
@@ -167,5 +153,12 @@ class RoleRepo {
|
|
|
167
153
|
const savedId = insertedId;
|
|
168
154
|
return { id: savedId };
|
|
169
155
|
}
|
|
156
|
+
async deleteByRoleName(params) {
|
|
157
|
+
const { roleName } = params;
|
|
158
|
+
return this.roleModel.deleteOne({
|
|
159
|
+
roleName: { $eq: roleName }
|
|
160
|
+
})
|
|
161
|
+
.exec();
|
|
162
|
+
}
|
|
170
163
|
}
|
|
171
164
|
exports.RoleRepo = RoleRepo;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import { IIntegrationSettings, ISendGridSettings, IHubSettings } from '../mongoose/schemas/setting';
|
|
3
|
+
interface IDBOptions {
|
|
4
|
+
connection: Connection;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 外部連携設定リポジトリ
|
|
8
|
+
*/
|
|
9
|
+
export declare class IntegrationSettingRepo {
|
|
10
|
+
private readonly settingModel;
|
|
11
|
+
private readonly defaultOptions;
|
|
12
|
+
private static cachedSettings;
|
|
13
|
+
private static cacheExpiry;
|
|
14
|
+
private static readonly CACHE_TTL_MS;
|
|
15
|
+
constructor(options: IDBOptions);
|
|
16
|
+
/**
|
|
17
|
+
* 設定全体をDBまたはキャッシュから取得する
|
|
18
|
+
*/
|
|
19
|
+
private getAllSettings;
|
|
20
|
+
/**
|
|
21
|
+
* 設定名称から設定を参照する
|
|
22
|
+
*/
|
|
23
|
+
getByKey<T extends keyof IIntegrationSettings>(key: T): Promise<IIntegrationSettings[T]>;
|
|
24
|
+
addSendGridSettings(params: ISendGridSettings): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
25
|
+
addHubSettings(params: IHubSettings): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IntegrationSettingRepo = void 0;
|
|
7
|
+
const debug_1 = __importDefault(require("debug"));
|
|
8
|
+
const factory_1 = require("../../factory");
|
|
9
|
+
const setting_1 = require("../mongoose/schemas/setting");
|
|
10
|
+
const debug = (0, debug_1.default)('chevre-domain:repo:integrationSetting');
|
|
11
|
+
const defaultOptions = {
|
|
12
|
+
abortedTasksWithoutReport: [
|
|
13
|
+
factory_1.factory.taskName.ImportEventCapacitiesFromCOA,
|
|
14
|
+
factory_1.factory.taskName.ImportEventsFromCOA,
|
|
15
|
+
factory_1.factory.taskName.ImportOffersFromCOA,
|
|
16
|
+
],
|
|
17
|
+
numTryConfirmReserveTransaction: 10,
|
|
18
|
+
deliverOrderLimit: 10,
|
|
19
|
+
coa: {
|
|
20
|
+
timeoutReserve: 20000,
|
|
21
|
+
timeoutMaster: 30000
|
|
22
|
+
},
|
|
23
|
+
gmo: {
|
|
24
|
+
timeout: 4000,
|
|
25
|
+
timeoutBackground: 6000
|
|
26
|
+
},
|
|
27
|
+
movieticketReserve: {
|
|
28
|
+
timeoutPay: 5000,
|
|
29
|
+
timeoutRefund: 5000,
|
|
30
|
+
timeoutCheck: 4000,
|
|
31
|
+
minIntervalBetweenPayAndRefund: 10000,
|
|
32
|
+
credentialsExpireInSeconds: 600
|
|
33
|
+
},
|
|
34
|
+
useExperimentalFeature: false
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 外部連携設定リポジトリ
|
|
38
|
+
*/
|
|
39
|
+
class IntegrationSettingRepo {
|
|
40
|
+
settingModel;
|
|
41
|
+
defaultOptions;
|
|
42
|
+
// static にすることで、クラスが何回 new されてもメモリ上で1つだけ保持される
|
|
43
|
+
static cachedSettings;
|
|
44
|
+
static cacheExpiry = 0;
|
|
45
|
+
static CACHE_TTL_MS = 10 * 60 * 1000; // 10分
|
|
46
|
+
constructor(options) {
|
|
47
|
+
const { connection } = options;
|
|
48
|
+
this.settingModel = connection.model(setting_1.modelName, (0, setting_1.createSchema)());
|
|
49
|
+
this.defaultOptions = defaultOptions;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 設定全体をDBまたはキャッシュから取得する
|
|
53
|
+
*/
|
|
54
|
+
async getAllSettings() {
|
|
55
|
+
const now = Date.now();
|
|
56
|
+
// static プロパティにアクセスするため、クラス名(IntegrationSettingRepo)経由で参照
|
|
57
|
+
if (IntegrationSettingRepo.cachedSettings !== undefined && now < IntegrationSettingRepo.cacheExpiry) {
|
|
58
|
+
debug('cache exist!', JSON.stringify(IntegrationSettingRepo.cachedSettings));
|
|
59
|
+
return IntegrationSettingRepo.cachedSettings;
|
|
60
|
+
}
|
|
61
|
+
const settingDoc = await this.settingModel.findOne({ 'project.id': { $eq: '*' } }, {
|
|
62
|
+
_id: 0,
|
|
63
|
+
integration: 1
|
|
64
|
+
})
|
|
65
|
+
.lean()
|
|
66
|
+
.exec();
|
|
67
|
+
// キャッシュを更新
|
|
68
|
+
if (settingDoc?.integration !== undefined) {
|
|
69
|
+
// console.log('docuemnt exist!');
|
|
70
|
+
IntegrationSettingRepo.cachedSettings = settingDoc.integration;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
IntegrationSettingRepo.cachedSettings = this.defaultOptions;
|
|
74
|
+
}
|
|
75
|
+
IntegrationSettingRepo.cacheExpiry = now + IntegrationSettingRepo.CACHE_TTL_MS;
|
|
76
|
+
return IntegrationSettingRepo.cachedSettings;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 設定名称から設定を参照する
|
|
80
|
+
*/
|
|
81
|
+
async getByKey(key) {
|
|
82
|
+
const settings = await this.getAllSettings();
|
|
83
|
+
return settings[key];
|
|
84
|
+
}
|
|
85
|
+
async addSendGridSettings(params) {
|
|
86
|
+
return this.settingModel.updateOne({ 'project.id': { $eq: '*' } }, {
|
|
87
|
+
$set: {
|
|
88
|
+
'integration.sendGrid': params
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
.exec();
|
|
92
|
+
}
|
|
93
|
+
async addHubSettings(params) {
|
|
94
|
+
return this.settingModel.updateOne({ 'project.id': { $eq: '*' } }, {
|
|
95
|
+
$set: {
|
|
96
|
+
'integration.hub': params
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
.exec();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.IntegrationSettingRepo = IntegrationSettingRepo;
|
|
@@ -136,11 +136,11 @@ export declare class TransactionRepo {
|
|
|
136
136
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
137
137
|
startDate: Date;
|
|
138
138
|
endDate?: Date | undefined;
|
|
139
|
-
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
140
139
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
141
|
-
|
|
140
|
+
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
142
141
|
status: factory.transactionStatusType;
|
|
143
142
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
143
|
+
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
144
144
|
} & {
|
|
145
145
|
_id: import("mongoose").Types.ObjectId;
|
|
146
146
|
} & {
|
|
@@ -156,10 +156,10 @@ export declare class TransactionRepo {
|
|
|
156
156
|
startDate: Date;
|
|
157
157
|
endDate?: Date | undefined;
|
|
158
158
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
159
|
-
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
160
159
|
recipient?: undefined;
|
|
161
160
|
status: factory.transactionStatusType;
|
|
162
161
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
162
|
+
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
163
163
|
} & {
|
|
164
164
|
_id: import("mongoose").Types.ObjectId;
|
|
165
165
|
} & {
|
|
@@ -174,11 +174,11 @@ export declare class TransactionRepo {
|
|
|
174
174
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
175
175
|
startDate: Date;
|
|
176
176
|
endDate?: Date | undefined;
|
|
177
|
-
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
178
177
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
179
|
-
|
|
178
|
+
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
180
179
|
status: factory.transactionStatusType;
|
|
181
180
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
181
|
+
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
182
182
|
} & {
|
|
183
183
|
_id: import("mongoose").Types.ObjectId;
|
|
184
184
|
} & {
|
|
@@ -194,10 +194,10 @@ export declare class TransactionRepo {
|
|
|
194
194
|
startDate: Date;
|
|
195
195
|
endDate?: Date | undefined;
|
|
196
196
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
197
|
-
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
198
197
|
recipient?: undefined;
|
|
199
198
|
status: factory.transactionStatusType;
|
|
200
199
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
200
|
+
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
201
201
|
} & {
|
|
202
202
|
_id: import("mongoose").Types.ObjectId;
|
|
203
203
|
} & {
|
|
@@ -79,6 +79,7 @@ import type { SellerPaymentAcceptedRepo } from './repo/sellerPaymentAccepted';
|
|
|
79
79
|
import type { SellerReturnPolicyRepo } from './repo/sellerReturnPolicy';
|
|
80
80
|
import type { ServiceAvailableHourRepo } from './repo/service/availableHour';
|
|
81
81
|
import type { SettingRepo } from './repo/setting';
|
|
82
|
+
import type { IntegrationSettingRepo } from './repo/setting/integration';
|
|
82
83
|
import type { JWTSettingRepo } from './repo/setting/jwt';
|
|
83
84
|
import type { StockHolderRepo } from './repo/stockHolder';
|
|
84
85
|
import type { TaskRepo } from './repo/task';
|
|
@@ -437,6 +438,10 @@ export declare namespace Setting {
|
|
|
437
438
|
function createInstance(...params: ConstructorParameters<typeof SettingRepo>): Promise<SettingRepo>;
|
|
438
439
|
}
|
|
439
440
|
export declare namespace setting {
|
|
441
|
+
type Integration = IntegrationSettingRepo;
|
|
442
|
+
namespace Integration {
|
|
443
|
+
function createInstance(...params: ConstructorParameters<typeof IntegrationSettingRepo>): Promise<IntegrationSettingRepo>;
|
|
444
|
+
}
|
|
440
445
|
type JWT = JWTSettingRepo;
|
|
441
446
|
namespace JWT {
|
|
442
447
|
function createInstance(...params: ConstructorParameters<typeof JWTSettingRepo>): Promise<JWTSettingRepo>;
|
package/lib/chevre/repository.js
CHANGED
|
@@ -911,6 +911,17 @@ var Setting;
|
|
|
911
911
|
})(Setting || (exports.Setting = Setting = {}));
|
|
912
912
|
var setting;
|
|
913
913
|
(function (setting) {
|
|
914
|
+
let Integration;
|
|
915
|
+
(function (Integration) {
|
|
916
|
+
let repo;
|
|
917
|
+
async function createInstance(...params) {
|
|
918
|
+
if (repo === undefined) {
|
|
919
|
+
repo = (await import('./repo/setting/integration.js')).IntegrationSettingRepo;
|
|
920
|
+
}
|
|
921
|
+
return new repo(...params);
|
|
922
|
+
}
|
|
923
|
+
Integration.createInstance = createInstance;
|
|
924
|
+
})(Integration = setting.Integration || (setting.Integration = {}));
|
|
914
925
|
let JWT;
|
|
915
926
|
(function (JWT) {
|
|
916
927
|
let repo;
|
|
@@ -150,7 +150,12 @@ function aggregateReservationByOffer(params) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
console.log(
|
|
153
|
+
// console.log(
|
|
154
|
+
// 'aggregateReservationByOffer: reservationCount4offer:', reservationCount4offer,
|
|
155
|
+
// 'aggregateSeatingType:', aggregateSeatingType,
|
|
156
|
+
// 'offer.id:', params.offer.id,
|
|
157
|
+
// 'offer.category:', params.offer.category?.codeValue
|
|
158
|
+
// );
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
161
|
const { maximumAttendeeCapacity, remainingAttendeeCapacity } = await calculateCapacityByOffer(params)(repos);
|
|
@@ -10,7 +10,6 @@ exports.aggregateScreeningEvent = aggregateScreeningEvent;
|
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
12
12
|
const factory_1 = require("../../../factory");
|
|
13
|
-
// import { Settings } from '../../../settings';
|
|
14
13
|
const findEventOffers_1 = require("./findEventOffers");
|
|
15
14
|
const debug = (0, debug_1.default)('chevre-domain:service:aggregation');
|
|
16
15
|
/**
|
|
@@ -69,10 +69,11 @@ function createPotentialActions(params) {
|
|
|
69
69
|
const reservationForByReserveTransaction = transaction.object.transaction?.object.reservationFor;
|
|
70
70
|
if (reservationForByReserveTransaction !== undefined && typeof reservationNumber === 'string') {
|
|
71
71
|
const cancelObject = {
|
|
72
|
-
reservationFor
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
// discontinue reservationFor(2026-05-09~)
|
|
73
|
+
// reservationFor: {
|
|
74
|
+
// typeOf: reservationForByReserveTransaction.typeOf,
|
|
75
|
+
// id: String(reservationForByReserveTransaction.id)
|
|
76
|
+
// },
|
|
76
77
|
reservationNumber,
|
|
77
78
|
// ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
|
|
78
79
|
reservationStatus: factory_1.factory.reservationStatusType.ReservationConfirmed,
|
|
@@ -100,13 +101,15 @@ function createPotentialActions(params) {
|
|
|
100
101
|
cancelObject = {
|
|
101
102
|
typeOf: reservation.typeOf,
|
|
102
103
|
id: reservation.id,
|
|
103
|
-
issuedThrough
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
// discontinue issuedThrough(2026-05-08~)
|
|
105
|
+
// issuedThrough: {
|
|
106
|
+
// typeOf: reservation.issuedThrough?.typeOf
|
|
107
|
+
// },
|
|
108
|
+
// discontinue reservationFor(2026-05-09~)
|
|
109
|
+
// reservationFor: {
|
|
110
|
+
// typeOf: reservation.reservationFor.typeOf,
|
|
111
|
+
// id: String(reservation.reservationFor.id)
|
|
112
|
+
// },
|
|
110
113
|
reservationNumber: reservation.reservationNumber,
|
|
111
114
|
// ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
|
|
112
115
|
reservationStatus: factory_1.factory.reservationStatusType.ReservationConfirmed
|
|
@@ -18,7 +18,7 @@ export declare function validateStartParams(params: IStartParams): (repos: {
|
|
|
18
18
|
assetTransaction: AssetTransactionRepo;
|
|
19
19
|
}) => Promise<{
|
|
20
20
|
reserveTransaction: import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction | undefined;
|
|
21
|
-
reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "
|
|
21
|
+
reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber"> & {
|
|
22
22
|
reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, "id" | "typeOf">;
|
|
23
23
|
})[] | undefined;
|
|
24
24
|
}>;
|
|
@@ -43,7 +43,7 @@ function validateStartParams(params) {
|
|
|
43
43
|
const reservation = await repos.reservation.findReservationById({
|
|
44
44
|
id: params.object.reservation.id,
|
|
45
45
|
inclusion: [
|
|
46
|
-
'
|
|
46
|
+
'typeOf', 'reservationNumber', 'reservationFor.id', 'reservationFor.typeOf', 'provider', 'reservationStatus'
|
|
47
47
|
]
|
|
48
48
|
});
|
|
49
49
|
// 販売者検証(2023-08-01~)
|
|
@@ -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 { CheckMovieTicketActionRepo } from '../../../repo/action/checkMovieTicket';
|
|
4
4
|
import type { CredentialsRepo } from '../../../repo/credentials';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
4
4
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 決済取引サービス
|
|
3
3
|
*/
|
|
4
4
|
import type { GMO } from '@motionpicture/gmo-service';
|
|
5
|
-
import { Settings } from '../../../
|
|
5
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
6
6
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
7
7
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
8
8
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
@@ -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 { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../../repo/paymentService';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../repo/action/refund';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Settings } from '../../../
|
|
1
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
2
2
|
import type { ActionRepo } from '../../../repo/action';
|
|
3
3
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
4
|
import type { OfferRateLimitRepo } from '../../../repo/rateLimit/offer';
|
|
@@ -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 { ActionRepo } from '../../../repo/action';
|
|
4
4
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
5
5
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
@@ -328,27 +328,17 @@ function createReservation(params) {
|
|
|
328
328
|
const price4reservation = (0, price_1.createPrice)(params);
|
|
329
329
|
if (params.reservationFor.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
330
330
|
return {
|
|
331
|
-
// project: params.project, // 廃止(2024-04-08~)
|
|
332
331
|
typeOf: factory_1.factory.reservationType.EventReservation,
|
|
333
332
|
id: params.id,
|
|
334
333
|
// reservationPackage保管に移行(2023-06-06~)
|
|
335
334
|
// issuedThrough,
|
|
336
335
|
additionalProperty: params.additionalProperty,
|
|
337
|
-
// bookingTime: params.reserveDate, // 廃止(2024-04-08~)
|
|
338
|
-
// modifiedTime: params.reserveDate, // 廃止(2024-04-08~)
|
|
339
336
|
numSeats: 1,
|
|
340
337
|
price: price4reservation,
|
|
341
338
|
priceCurrency: factory_1.factory.priceCurrency.JPY,
|
|
342
|
-
// reservationNumber: params.reservationNumber, // 廃止(2024-04-08~)
|
|
343
339
|
// statusは不要なので削除(2023-07-19~)
|
|
344
340
|
// reservationStatus: factory.reservationStatusType.ReservationPending,
|
|
345
341
|
reservedTicket: params.reservedTicket,
|
|
346
|
-
// underName: { // 廃止(2024-04-08~)
|
|
347
|
-
// typeOf: params.agent.typeOf,
|
|
348
|
-
// name: params.agent.name
|
|
349
|
-
// },
|
|
350
|
-
// checkedIn: false, // 廃止(2024-04-08~)
|
|
351
|
-
// attended: false, // 廃止(2024-04-08~)
|
|
352
342
|
...(typeof params.additionalTicketText === 'string') ? { additionalTicketText: params.additionalTicketText } : undefined,
|
|
353
343
|
...(Array.isArray(params.subReservation))
|
|
354
344
|
? {
|
|
@@ -362,8 +352,6 @@ function createReservation(params) {
|
|
|
362
352
|
})
|
|
363
353
|
}
|
|
364
354
|
: undefined,
|
|
365
|
-
// reservationPackage保管に移行(2023-06-06~)
|
|
366
|
-
// ...(typeof params.broker?.typeOf === 'string') ? { broker: params.broker } : undefined,
|
|
367
355
|
...(typeof params.programMembershipUsed?.identifier === 'string')
|
|
368
356
|
? { programMembershipUsed: params.programMembershipUsed }
|
|
369
357
|
: undefined
|
|
@@ -14,4 +14,4 @@ export declare function createPrice(params: {
|
|
|
14
14
|
seatPriceComponent: factory.place.seat.IPriceComponent[];
|
|
15
15
|
acceptedAddOns: IAcceptedAddOn[];
|
|
16
16
|
appliesToMovieTicket?: factory.assetTransaction.reserve.IAcceptedAppliesToMovieTicket;
|
|
17
|
-
}): factory.
|
|
17
|
+
}): factory.assetTransaction.reserve.IPrice;
|
|
@@ -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 { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
4
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -5,7 +5,12 @@ export type IOwnershipInfo = factory.ownershipInfo.IOwnershipInfo<factory.owners
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function createOwnershipInfosFromOrder(params: {
|
|
7
7
|
order: Pick<factory.order.IOrder, 'orderDate' | 'project' | 'customer' | 'orderNumber' | 'seller'> & {
|
|
8
|
-
acceptedOffers: factory.order.IAcceptedOffer
|
|
8
|
+
acceptedOffers: (Omit<factory.order.IAcceptedOffer, 'priceSpecification'> & {
|
|
9
|
+
/**
|
|
10
|
+
* COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
|
|
11
|
+
*/
|
|
12
|
+
priceSpecification?: factory.order.ITicketPriceSpecification;
|
|
13
|
+
})[];
|
|
9
14
|
};
|
|
10
15
|
offerIndexBase: number;
|
|
11
16
|
}): IOwnershipInfo[];
|