@chevre/domain 21.2.0-alpha.16 → 21.2.0-alpha.160
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/example/src/chevre/aggregateEventReservation.ts +1 -1
- package/example/src/chevre/aggregateSellerPaymentAccepted.ts +27 -0
- package/example/src/chevre/aggregation/aggregateSystem.ts +85 -27
- package/example/src/chevre/countDelayedTasks.ts +7 -2
- package/example/src/chevre/createManyEventsIfNotExist.ts +199 -46
- package/example/src/chevre/deleteTasksByName.ts +10 -2
- package/example/src/chevre/findScreeningRoomsByBranchCode.ts +4 -3
- package/example/src/chevre/giveUpStartDatePassedCertainPeriod.ts +56 -0
- package/example/src/chevre/importEventsFromCOA.ts +3 -4
- package/example/src/chevre/lockStockHolder.ts +5 -2
- package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +79 -0
- package/example/src/chevre/processPay.ts +5 -1
- package/example/src/chevre/processRegisterMembership.ts +8 -4
- package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
- package/example/src/chevre/processReserve.ts +5 -2
- package/example/src/chevre/saveTasks.ts +13 -10
- package/example/src/chevre/searchAbortedTasks.ts +34 -0
- package/example/src/chevre/searchActions.ts +33 -0
- package/example/src/chevre/searchEventSeats.ts +5 -2
- package/example/src/chevre/searchHoldReservations.ts +38 -0
- package/example/src/chevre/searchPermissions.ts +54 -0
- package/example/src/chevre/searchReservationNumbersByOrderNumbers.ts +37 -1
- package/example/src/chevre/searchScreeningRooms.ts +35 -0
- package/example/src/chevre/searchSendEmailActions.ts +44 -0
- package/example/src/chevre/sendEmailMessage.ts +1 -2
- package/example/src/chevre/syncScreeningRooms.ts +22 -0
- package/example/src/chevre/syncScreeningRoomsAll.ts +44 -0
- package/example/src/chevre/task/executeTasks.ts +26 -0
- package/example/src/chevre/transaction/processReturnOrder.ts +40 -0
- package/example/src/chevre/transaction/startExportTasks.ts +2 -1
- package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +41 -0
- package/example/src/chevre/updateTransaction.ts +1 -1
- package/example/src/playOnMoment.ts +24 -0
- package/lib/chevre/credentials.d.ts +1 -0
- package/lib/chevre/credentials.js +2 -1
- package/lib/chevre/eventEmitter/assetTransaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/assetTransaction.js +25 -0
- package/lib/chevre/eventEmitter/task.d.ts +2 -1
- package/lib/chevre/eventEmitter/task.js +1 -4
- package/lib/chevre/eventEmitter/transaction.d.ts +1 -1
- package/lib/chevre/eventEmitter/transaction.js +1 -4
- package/lib/chevre/eventEmitter.d.ts +2 -1
- package/lib/chevre/eventEmitter.js +3 -1
- package/lib/chevre/factory/order.d.ts +4 -1
- package/lib/chevre/factory/order.js +19 -6
- package/lib/chevre/repo/account.js +3 -2
- package/lib/chevre/repo/accountTransaction.d.ts +3 -1
- package/lib/chevre/repo/accountTransaction.js +3 -2
- package/lib/chevre/repo/accountingReport.d.ts +1 -3
- package/lib/chevre/repo/action.d.ts +79 -2
- package/lib/chevre/repo/action.js +151 -57
- package/lib/chevre/repo/additionalProperty.js +2 -1
- package/lib/chevre/repo/aggregation.d.ts +3 -0
- package/lib/chevre/repo/aggregation.js +3 -0
- package/lib/chevre/repo/assetTransaction.d.ts +23 -8
- package/lib/chevre/repo/assetTransaction.js +253 -80
- package/lib/chevre/repo/categoryCode.d.ts +1 -1
- package/lib/chevre/repo/categoryCode.js +37 -25
- package/lib/chevre/repo/code.js +3 -2
- package/lib/chevre/repo/comment.d.ts +4 -1
- package/lib/chevre/repo/comment.js +22 -6
- package/lib/chevre/repo/confirmationNumber.d.ts +0 -1
- package/lib/chevre/repo/confirmationNumber.js +3 -15
- package/lib/chevre/repo/creativeWork.d.ts +1 -1
- package/lib/chevre/repo/creativeWork.js +35 -12
- package/lib/chevre/repo/customer.js +2 -1
- package/lib/chevre/repo/emailMessage.js +2 -1
- package/lib/chevre/repo/event.d.ts +30 -2
- package/lib/chevre/repo/event.js +87 -36
- package/lib/chevre/repo/member.d.ts +14 -0
- package/lib/chevre/repo/member.js +31 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +19 -1
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +9 -6
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +32 -19
- package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
- package/lib/chevre/repo/mongoose/schemas/holdReservation.js +93 -0
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +9 -9
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +74 -0
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +45 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +21 -21
- package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -0
- package/lib/chevre/repo/mongoose/schemas/place.js +16 -1
- package/lib/chevre/repo/mongoose/schemas/product.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +15 -15
- package/lib/chevre/repo/mongoose/schemas/reservation.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +3 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +9 -6
- package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -1
- package/lib/chevre/repo/offer.js +3 -2
- package/lib/chevre/repo/offerCatalog.js +0 -27
- package/lib/chevre/repo/offerItemCondition.d.ts +22 -0
- package/lib/chevre/repo/offerItemCondition.js +121 -0
- package/lib/chevre/repo/order.d.ts +30 -3
- package/lib/chevre/repo/order.js +57 -10
- package/lib/chevre/repo/ownershipInfo.js +2 -7
- package/lib/chevre/repo/paymentServiceProvider.d.ts +65 -0
- package/lib/chevre/repo/paymentServiceProvider.js +156 -0
- package/lib/chevre/repo/place.d.ts +203 -27
- package/lib/chevre/repo/place.js +1722 -694
- package/lib/chevre/repo/priceSpecification.js +3 -2
- package/lib/chevre/repo/product.d.ts +5 -3
- package/lib/chevre/repo/product.js +92 -5
- package/lib/chevre/repo/project.js +2 -1
- package/lib/chevre/repo/reservation.d.ts +20 -4
- package/lib/chevre/repo/reservation.js +40 -59
- package/lib/chevre/repo/role.d.ts +7 -0
- package/lib/chevre/repo/role.js +39 -2
- package/lib/chevre/repo/seller.d.ts +21 -1
- package/lib/chevre/repo/seller.js +78 -23
- package/lib/chevre/repo/serviceOutput.js +2 -1
- package/lib/chevre/repo/stockHolder.d.ts +143 -7
- package/lib/chevre/repo/stockHolder.js +622 -104
- package/lib/chevre/repo/task.d.ts +42 -2
- package/lib/chevre/repo/task.js +68 -20
- package/lib/chevre/repo/transaction.d.ts +21 -2
- package/lib/chevre/repo/transaction.js +160 -48
- package/lib/chevre/repo/trip.js +2 -1
- package/lib/chevre/repository.d.ts +11 -2
- package/lib/chevre/repository.js +15 -4
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +18 -8
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -8
- package/lib/chevre/service/aggregation/system.d.ts +110 -23
- package/lib/chevre/service/aggregation/system.js +213 -91
- package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -28
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +2 -24
- package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +17 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +5 -1
- package/lib/chevre/service/assetTransaction/pay.js +20 -34
- package/lib/chevre/service/assetTransaction/refund.js +2 -24
- package/lib/chevre/service/assetTransaction/registerService.js +1 -25
- package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +15 -5
- package/lib/chevre/service/assetTransaction/reserve/factory.js +122 -58
- package/lib/chevre/service/assetTransaction/reserve.d.ts +10 -1
- package/lib/chevre/service/assetTransaction/reserve.js +93 -70
- package/lib/chevre/service/assetTransaction.d.ts +6 -0
- package/lib/chevre/service/assetTransaction.js +9 -4
- package/lib/chevre/service/event.d.ts +3 -0
- package/lib/chevre/service/event.js +55 -22
- package/lib/chevre/service/iam.d.ts +6 -2
- package/lib/chevre/service/iam.js +23 -9
- package/lib/chevre/service/notification/factory.js +2 -2
- package/lib/chevre/service/notification.d.ts +3 -1
- package/lib/chevre/service/notification.js +41 -7
- package/lib/chevre/service/offer/event/authorize.d.ts +3 -0
- package/lib/chevre/service/offer/event/authorize.js +8 -2
- package/lib/chevre/service/offer/event/factory.d.ts +3 -0
- package/lib/chevre/service/offer/event/factory.js +36 -16
- package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +17 -1
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +15 -8
- package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
- package/lib/chevre/service/offer/product/factory.js +13 -6
- package/lib/chevre/service/offer/product.js +2 -2
- package/lib/chevre/service/offer.d.ts +16 -8
- package/lib/chevre/service/offer.js +72 -9
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +31 -17
- package/lib/chevre/service/order/deleteOrder.d.ts +3 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -8
- package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +5 -2
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +41 -81
- package/lib/chevre/service/order/onOrderStatusChanged.js +3 -5
- package/lib/chevre/service/order/onOrderUpdated.d.ts +16 -0
- package/lib/chevre/service/order/onOrderUpdated.js +22 -0
- package/lib/chevre/service/order/placeOrder.d.ts +1 -0
- package/lib/chevre/service/order/placeOrder.js +45 -28
- package/lib/chevre/service/order/returnOrder.d.ts +1 -0
- package/lib/chevre/service/order/returnOrder.js +8 -13
- package/lib/chevre/service/order/sendOrder.d.ts +1 -0
- package/lib/chevre/service/order/sendOrder.js +10 -13
- package/lib/chevre/service/order.d.ts +2 -1
- package/lib/chevre/service/order.js +3 -1
- package/lib/chevre/service/payment/any/onPaid.js +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +4 -6
- package/lib/chevre/service/payment/any/onRefund.js +47 -43
- package/lib/chevre/service/payment/any.d.ts +9 -5
- package/lib/chevre/service/payment/any.js +80 -18
- package/lib/chevre/service/payment/creditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard.js +23 -17
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +8 -7
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +6 -6
- package/lib/chevre/service/payment/movieTicket/validation.js +65 -37
- package/lib/chevre/service/payment/movieTicket.d.ts +2 -2
- package/lib/chevre/service/payment/movieTicket.js +7 -6
- package/lib/chevre/service/product.js +1 -5
- package/lib/chevre/service/report/telemetry.d.ts +0 -11
- package/lib/chevre/service/report/telemetry.js +21 -24
- package/lib/chevre/service/reserve/cancelReservation.d.ts +5 -3
- package/lib/chevre/service/reserve/cancelReservation.js +162 -142
- package/lib/chevre/service/reserve/checkInReservation.d.ts +9 -4
- package/lib/chevre/service/reserve/checkInReservation.js +77 -3
- package/lib/chevre/service/reserve/confirmReservation.d.ts +7 -4
- package/lib/chevre/service/reserve/confirmReservation.js +133 -58
- package/lib/chevre/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +17 -5
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +26 -24
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -31
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -3
- package/lib/chevre/service/reserve/useReservation.d.ts +7 -3
- package/lib/chevre/service/reserve/useReservation.js +61 -71
- package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +15 -0
- package/lib/chevre/service/reserve/verifyToken4reservation.js +56 -0
- package/lib/chevre/service/reserve.d.ts +3 -2
- package/lib/chevre/service/reserve.js +4 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
- package/lib/chevre/service/task/cancelPendingReservation.js +6 -2
- package/lib/chevre/service/task/cancelReservation.js +1 -1
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
- package/lib/chevre/service/task/deleteTransaction.js +12 -8
- package/lib/chevre/service/task/importOffersFromCOA.js +4 -0
- package/lib/chevre/service/task/onAuthorizationCreated.d.ts +7 -0
- package/lib/chevre/service/task/onAuthorizationCreated.js +108 -0
- package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
- package/lib/chevre/service/task/{deleteOrder.js → onEventChanged.js} +8 -14
- package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
- package/lib/chevre/service/task/onResourceUpdated.js +396 -0
- package/lib/chevre/service/task/placeOrder.js +1 -1
- package/lib/chevre/service/task/reserve.js +10 -7
- package/lib/chevre/service/task/returnOrder.js +1 -1
- package/lib/chevre/service/task/returnPayTransaction.js +2 -12
- package/lib/chevre/service/task/sendOrder.js +1 -1
- package/lib/chevre/service/task/syncScreeningRooms.d.ts +7 -0
- package/lib/chevre/service/task/syncScreeningRooms.js +24 -0
- package/lib/chevre/service/task/useReservation.d.ts +7 -0
- package/lib/chevre/service/task/useReservation.js +36 -0
- package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
- package/lib/chevre/service/task.d.ts +6 -0
- package/lib/chevre/service/task.js +22 -4
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +360 -0
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +12 -1
- package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/moneyTransfer/factory.js +3 -1
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +10 -13
- package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership.js +7 -3
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +43 -30
- package/lib/chevre/service/transaction/placeOrder.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +15 -15
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +23 -17
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +0 -3
- package/lib/chevre/service/transaction/placeOrderInProgress.js +28 -15
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +11 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +30 -22
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +4 -0
- package/lib/chevre/service/transaction/returnOrder.js +228 -36
- package/lib/chevre/service/transaction.d.ts +7 -13
- package/lib/chevre/service/transaction.js +12 -139
- package/lib/chevre/settings.d.ts +15 -2
- package/lib/chevre/settings.js +58 -7
- package/package.json +3 -3
- package/example/src/chevre/eventCatalog2eventService.ts +0 -123
- package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
- package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
- package/lib/chevre/service/task/deleteAssetTransaction.d.ts +0 -12
- package/lib/chevre/service/task/deleteAssetTransaction.js +0 -65
- package/lib/chevre/service/task/deleteOrder.d.ts +0 -6
|
@@ -73,6 +73,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
73
73
|
smokingAllowed?: boolean | undefined;
|
|
74
74
|
sameAs?: string | undefined;
|
|
75
75
|
parentOrganization?: any;
|
|
76
|
+
openSeatingAllowed?: any;
|
|
77
|
+
amenityFeature?: any;
|
|
76
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
77
79
|
typeOf: string;
|
|
78
80
|
additionalProperty: any[];
|
|
@@ -95,6 +97,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
95
97
|
smokingAllowed?: boolean | undefined;
|
|
96
98
|
sameAs?: string | undefined;
|
|
97
99
|
parentOrganization?: any;
|
|
100
|
+
openSeatingAllowed?: any;
|
|
101
|
+
amenityFeature?: any;
|
|
98
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
99
103
|
typeOf: string;
|
|
100
104
|
additionalProperty: any[];
|
|
@@ -117,6 +121,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
117
121
|
smokingAllowed?: boolean | undefined;
|
|
118
122
|
sameAs?: string | undefined;
|
|
119
123
|
parentOrganization?: any;
|
|
124
|
+
openSeatingAllowed?: any;
|
|
125
|
+
amenityFeature?: any;
|
|
120
126
|
}> & {
|
|
121
127
|
_id: import("mongoose").Types.ObjectId;
|
|
122
128
|
}, never>>;
|
|
@@ -32,7 +32,10 @@ const schema = new mongoose_1.Schema({
|
|
|
32
32
|
kanaName: String,
|
|
33
33
|
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
34
|
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
parentOrganization: mongoose_1.SchemaTypes.Mixed
|
|
35
|
+
parentOrganization: mongoose_1.SchemaTypes.Mixed,
|
|
36
|
+
// ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
|
|
37
|
+
openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
|
|
38
|
+
amenityFeature: mongoose_1.SchemaTypes.Mixed
|
|
36
39
|
}, {
|
|
37
40
|
collection: 'places',
|
|
38
41
|
id: true,
|
|
@@ -132,3 +135,15 @@ schema.index({ 'containsPlace.containsPlace.containsPlace.additionalProperty': 1
|
|
|
132
135
|
'containsPlace.containsPlace.containsPlace.additionalProperty': { $exists: true }
|
|
133
136
|
}
|
|
134
137
|
});
|
|
138
|
+
schema.index({ 'containedInPlace.id': 1, branchCode: 1 }, {
|
|
139
|
+
name: 'searchByContainedInPlaceId',
|
|
140
|
+
partialFilterExpression: {
|
|
141
|
+
'containedInPlace.id': { $exists: true }
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
schema.index({ 'containedInPlace.branchCode': 1, branchCode: 1 }, {
|
|
145
|
+
name: 'searchByContainedInPlaceBranchCode',
|
|
146
|
+
partialFilterExpression: {
|
|
147
|
+
'containedInPlace.branchCode': { $exists: true }
|
|
148
|
+
}
|
|
149
|
+
});
|
|
@@ -100,3 +100,9 @@ schema.index({ 'name.en': 1, productID: 1 }, {
|
|
|
100
100
|
'name.en': { $exists: true }
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
+
schema.index({ 'provider.id': 1, productID: 1 }, {
|
|
104
|
+
name: 'searchByProviderId',
|
|
105
|
+
partialFilterExpression: {
|
|
106
|
+
'provider.id': { $exists: true }
|
|
107
|
+
}
|
|
108
|
+
});
|
|
@@ -53,8 +53,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
-
name?: string | undefined;
|
|
57
56
|
_id?: string | undefined;
|
|
57
|
+
name?: string | undefined;
|
|
58
58
|
alternateName?: string | undefined;
|
|
59
59
|
logo?: string | undefined;
|
|
60
60
|
aggregateReservation?: any;
|
|
@@ -62,8 +62,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
62
62
|
subscription?: any;
|
|
63
63
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
64
64
|
typeOf: string;
|
|
65
|
-
name?: string | undefined;
|
|
66
65
|
_id?: string | undefined;
|
|
66
|
+
name?: string | undefined;
|
|
67
67
|
alternateName?: string | undefined;
|
|
68
68
|
logo?: string | undefined;
|
|
69
69
|
aggregateReservation?: any;
|
|
@@ -71,8 +71,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
71
71
|
subscription?: any;
|
|
72
72
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
73
73
|
typeOf: string;
|
|
74
|
-
name?: string | undefined;
|
|
75
74
|
_id?: string | undefined;
|
|
75
|
+
name?: string | undefined;
|
|
76
76
|
alternateName?: string | undefined;
|
|
77
77
|
logo?: string | undefined;
|
|
78
78
|
aggregateReservation?: any;
|
|
@@ -59,20 +59,20 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
59
59
|
attended: boolean;
|
|
60
60
|
_id?: string | undefined;
|
|
61
61
|
project?: any;
|
|
62
|
-
|
|
63
|
-
reservationFor?: any;
|
|
62
|
+
broker?: any;
|
|
64
63
|
price?: any;
|
|
65
64
|
priceCurrency?: string | undefined;
|
|
65
|
+
additionalProperty?: any;
|
|
66
|
+
reservationFor?: any;
|
|
67
|
+
underName?: any;
|
|
66
68
|
issuedThrough?: any;
|
|
67
|
-
reservedTicket?: any;
|
|
68
69
|
subReservation?: any;
|
|
70
|
+
reservedTicket?: any;
|
|
69
71
|
additionalTicketText?: string | undefined;
|
|
70
72
|
bookingTime?: Date | undefined;
|
|
71
|
-
broker?: any;
|
|
72
73
|
modifiedTime?: Date | undefined;
|
|
73
74
|
numSeats?: number | undefined;
|
|
74
75
|
programMembershipUsed?: any;
|
|
75
|
-
underName?: any;
|
|
76
76
|
bookingAgent?: any;
|
|
77
77
|
cancelReservationUrl?: string | undefined;
|
|
78
78
|
checkinUrl?: string | undefined;
|
|
@@ -87,20 +87,20 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
87
87
|
attended: boolean;
|
|
88
88
|
_id?: string | undefined;
|
|
89
89
|
project?: any;
|
|
90
|
-
|
|
91
|
-
reservationFor?: any;
|
|
90
|
+
broker?: any;
|
|
92
91
|
price?: any;
|
|
93
92
|
priceCurrency?: string | undefined;
|
|
93
|
+
additionalProperty?: any;
|
|
94
|
+
reservationFor?: any;
|
|
95
|
+
underName?: any;
|
|
94
96
|
issuedThrough?: any;
|
|
95
|
-
reservedTicket?: any;
|
|
96
97
|
subReservation?: any;
|
|
98
|
+
reservedTicket?: any;
|
|
97
99
|
additionalTicketText?: string | undefined;
|
|
98
100
|
bookingTime?: Date | undefined;
|
|
99
|
-
broker?: any;
|
|
100
101
|
modifiedTime?: Date | undefined;
|
|
101
102
|
numSeats?: number | undefined;
|
|
102
103
|
programMembershipUsed?: any;
|
|
103
|
-
underName?: any;
|
|
104
104
|
bookingAgent?: any;
|
|
105
105
|
cancelReservationUrl?: string | undefined;
|
|
106
106
|
checkinUrl?: string | undefined;
|
|
@@ -115,20 +115,20 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
115
115
|
attended: boolean;
|
|
116
116
|
_id?: string | undefined;
|
|
117
117
|
project?: any;
|
|
118
|
-
|
|
119
|
-
reservationFor?: any;
|
|
118
|
+
broker?: any;
|
|
120
119
|
price?: any;
|
|
121
120
|
priceCurrency?: string | undefined;
|
|
121
|
+
additionalProperty?: any;
|
|
122
|
+
reservationFor?: any;
|
|
123
|
+
underName?: any;
|
|
122
124
|
issuedThrough?: any;
|
|
123
|
-
reservedTicket?: any;
|
|
124
125
|
subReservation?: any;
|
|
126
|
+
reservedTicket?: any;
|
|
125
127
|
additionalTicketText?: string | undefined;
|
|
126
128
|
bookingTime?: Date | undefined;
|
|
127
|
-
broker?: any;
|
|
128
129
|
modifiedTime?: Date | undefined;
|
|
129
130
|
numSeats?: number | undefined;
|
|
130
131
|
programMembershipUsed?: any;
|
|
131
|
-
underName?: any;
|
|
132
132
|
bookingAgent?: any;
|
|
133
133
|
cancelReservationUrl?: string | undefined;
|
|
134
134
|
checkinUrl?: string | undefined;
|
|
@@ -75,3 +75,9 @@ schema.index({ additionalProperty: 1, branchCode: 1 }, {
|
|
|
75
75
|
additionalProperty: { $exists: true }
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
schema.index({ 'hasMerchantReturnPolicy.itemCondition.id': 1, branchCode: 1 }, {
|
|
79
|
+
name: 'searchByHasMerchantReturnPolicyItemConditionId',
|
|
80
|
+
partialFilterExpression: {
|
|
81
|
+
'hasMerchantReturnPolicy.itemCondition.id': { $exists: true }
|
|
82
|
+
}
|
|
83
|
+
});
|
|
@@ -61,6 +61,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
61
61
|
remainingNumberOfTries?: number | undefined;
|
|
62
62
|
lastTriedAt?: Date | undefined;
|
|
63
63
|
numberOfTried?: number | undefined;
|
|
64
|
+
executor?: any;
|
|
64
65
|
dateAborted?: Date | undefined;
|
|
65
66
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
66
67
|
executionResults: any[];
|
|
@@ -72,6 +73,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
72
73
|
remainingNumberOfTries?: number | undefined;
|
|
73
74
|
lastTriedAt?: Date | undefined;
|
|
74
75
|
numberOfTried?: number | undefined;
|
|
76
|
+
executor?: any;
|
|
75
77
|
dateAborted?: Date | undefined;
|
|
76
78
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
77
79
|
executionResults: any[];
|
|
@@ -83,6 +85,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
83
85
|
remainingNumberOfTries?: number | undefined;
|
|
84
86
|
lastTriedAt?: Date | undefined;
|
|
85
87
|
numberOfTried?: number | undefined;
|
|
88
|
+
executor?: any;
|
|
86
89
|
dateAborted?: Date | undefined;
|
|
87
90
|
}> & {
|
|
88
91
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -17,12 +17,13 @@ const schema = new mongoose_1.Schema({
|
|
|
17
17
|
lastTriedAt: Date,
|
|
18
18
|
numberOfTried: Number,
|
|
19
19
|
executionResults: [mongoose_1.SchemaTypes.Mixed],
|
|
20
|
+
executor: mongoose_1.SchemaTypes.Mixed,
|
|
20
21
|
data: mongoose_1.SchemaTypes.Mixed,
|
|
21
22
|
dateAborted: Date
|
|
22
23
|
}, {
|
|
23
24
|
collection: 'tasks',
|
|
24
25
|
id: true,
|
|
25
|
-
read: '
|
|
26
|
+
read: 'primary',
|
|
26
27
|
writeConcern: writeConcern_1.writeConcern,
|
|
27
28
|
strict: true,
|
|
28
29
|
strictQuery: false,
|
|
@@ -53,12 +53,13 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
object?: any;
|
|
56
|
-
typeOf?: string | undefined;
|
|
57
56
|
error?: any;
|
|
57
|
+
typeOf?: string | undefined;
|
|
58
58
|
status?: string | undefined;
|
|
59
59
|
result?: any;
|
|
60
60
|
expires?: Date | undefined;
|
|
61
61
|
project?: any;
|
|
62
|
+
seller?: any;
|
|
62
63
|
agent?: any;
|
|
63
64
|
recipient?: any;
|
|
64
65
|
startDate?: Date | undefined;
|
|
@@ -66,15 +67,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
66
67
|
potentialActions?: any;
|
|
67
68
|
tasksExportationStatus?: string | undefined;
|
|
68
69
|
tasksExportedAt?: Date | undefined;
|
|
69
|
-
|
|
70
|
+
tasksExportAction?: any;
|
|
70
71
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
71
72
|
object?: any;
|
|
72
|
-
typeOf?: string | undefined;
|
|
73
73
|
error?: any;
|
|
74
|
+
typeOf?: string | undefined;
|
|
74
75
|
status?: string | undefined;
|
|
75
76
|
result?: any;
|
|
76
77
|
expires?: Date | undefined;
|
|
77
78
|
project?: any;
|
|
79
|
+
seller?: any;
|
|
78
80
|
agent?: any;
|
|
79
81
|
recipient?: any;
|
|
80
82
|
startDate?: Date | undefined;
|
|
@@ -82,15 +84,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
82
84
|
potentialActions?: any;
|
|
83
85
|
tasksExportationStatus?: string | undefined;
|
|
84
86
|
tasksExportedAt?: Date | undefined;
|
|
85
|
-
|
|
87
|
+
tasksExportAction?: any;
|
|
86
88
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
87
89
|
object?: any;
|
|
88
|
-
typeOf?: string | undefined;
|
|
89
90
|
error?: any;
|
|
91
|
+
typeOf?: string | undefined;
|
|
90
92
|
status?: string | undefined;
|
|
91
93
|
result?: any;
|
|
92
94
|
expires?: Date | undefined;
|
|
93
95
|
project?: any;
|
|
96
|
+
seller?: any;
|
|
94
97
|
agent?: any;
|
|
95
98
|
recipient?: any;
|
|
96
99
|
startDate?: Date | undefined;
|
|
@@ -98,7 +101,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
98
101
|
potentialActions?: any;
|
|
99
102
|
tasksExportationStatus?: string | undefined;
|
|
100
103
|
tasksExportedAt?: Date | undefined;
|
|
101
|
-
|
|
104
|
+
tasksExportAction?: any;
|
|
102
105
|
}> & {
|
|
103
106
|
_id: import("mongoose").Types.ObjectId;
|
|
104
107
|
}, never>>;
|
|
@@ -22,13 +22,14 @@ const schema = new mongoose_1.Schema({
|
|
|
22
22
|
expires: Date,
|
|
23
23
|
startDate: Date,
|
|
24
24
|
endDate: Date,
|
|
25
|
+
tasksExportAction: mongoose_1.SchemaTypes.Mixed,
|
|
25
26
|
tasksExportedAt: Date,
|
|
26
27
|
tasksExportationStatus: String,
|
|
27
28
|
potentialActions: mongoose_1.SchemaTypes.Mixed
|
|
28
29
|
}, {
|
|
29
30
|
collection: 'transactions',
|
|
30
31
|
id: true,
|
|
31
|
-
read: '
|
|
32
|
+
read: 'primary',
|
|
32
33
|
writeConcern: writeConcern_1.writeConcern,
|
|
33
34
|
strict: true,
|
|
34
35
|
strictQuery: false,
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -25,6 +25,7 @@ const uniqid = require("uniqid");
|
|
|
25
25
|
const factory = require("../factory");
|
|
26
26
|
const offer_1 = require("./mongoose/schemas/offer");
|
|
27
27
|
const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
28
|
+
const settings_1 = require("../settings");
|
|
28
29
|
/**
|
|
29
30
|
* オファーリポジトリ
|
|
30
31
|
*/
|
|
@@ -409,7 +410,7 @@ class MongoRepository {
|
|
|
409
410
|
return __awaiter(this, void 0, void 0, function* () {
|
|
410
411
|
const conditions = MongoRepository.CREATE_OFFER_MONGO_CONDITIONS(params);
|
|
411
412
|
return this.offerModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
412
|
-
.setOptions({ maxTimeMS:
|
|
413
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
413
414
|
.exec();
|
|
414
415
|
});
|
|
415
416
|
}
|
|
@@ -434,7 +435,7 @@ class MongoRepository {
|
|
|
434
435
|
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price']) !== undefined) {
|
|
435
436
|
query.sort({ 'priceSpecification.price': params.sort['priceSpecification.price'] });
|
|
436
437
|
}
|
|
437
|
-
return query.setOptions({ maxTimeMS:
|
|
438
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
438
439
|
.exec()
|
|
439
440
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
440
441
|
});
|
|
@@ -178,33 +178,6 @@ class MongoRepository {
|
|
|
178
178
|
.exec();
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
// public async findById(params: {
|
|
182
|
-
// id: string;
|
|
183
|
-
// }): Promise<factory.offerCatalog.IOfferCatalog> {
|
|
184
|
-
// const doc = await this.offerCatalogModel.findOne(
|
|
185
|
-
// {
|
|
186
|
-
// _id: params.id
|
|
187
|
-
// },
|
|
188
|
-
// {
|
|
189
|
-
// __v: 0,
|
|
190
|
-
// createdAt: 0,
|
|
191
|
-
// updatedAt: 0
|
|
192
|
-
// }
|
|
193
|
-
// )
|
|
194
|
-
// .exec();
|
|
195
|
-
// if (doc === null) {
|
|
196
|
-
// throw new factory.errors.NotFound(this.offerCatalogModel.modelName);
|
|
197
|
-
// }
|
|
198
|
-
// return doc.toObject();
|
|
199
|
-
// }
|
|
200
|
-
// public async count(
|
|
201
|
-
// params: factory.offerCatalog.ISearchConditions
|
|
202
|
-
// ): Promise<number> {
|
|
203
|
-
// const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
204
|
-
// return this.offerCatalogModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
205
|
-
// .setOptions({ maxTimeMS: 10000 })
|
|
206
|
-
// .exec();
|
|
207
|
-
// }
|
|
208
181
|
search(params) {
|
|
209
182
|
var _a;
|
|
210
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import * as factory from '../factory';
|
|
3
|
+
interface IProjection {
|
|
4
|
+
[key: string]: 0 | 1;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* アイテムコンディションリポジトリ
|
|
8
|
+
*/
|
|
9
|
+
export declare class MongoRepository {
|
|
10
|
+
private readonly offerItemConditionModel;
|
|
11
|
+
constructor(connection: Connection);
|
|
12
|
+
static CREATE_MONGO_CONDITIONS(params: factory.offerItemCondition.ISearchConditions): any[];
|
|
13
|
+
findById(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}): Promise<factory.offerItemCondition.IOfferItemCondition>;
|
|
16
|
+
search(params: factory.offerItemCondition.ISearchConditions, projection?: IProjection): Promise<factory.offerItemCondition.IOfferItemCondition[]>;
|
|
17
|
+
save(params: factory.offerItemCondition.IOfferItemCondition): Promise<factory.offerItemCondition.IOfferItemCondition>;
|
|
18
|
+
deleteById(params: {
|
|
19
|
+
id: string;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.MongoRepository = void 0;
|
|
24
|
+
const factory = require("../factory");
|
|
25
|
+
const offerItemCondition_1 = require("./mongoose/schemas/offerItemCondition");
|
|
26
|
+
const settings_1 = require("../settings");
|
|
27
|
+
/**
|
|
28
|
+
* アイテムコンディションリポジトリ
|
|
29
|
+
*/
|
|
30
|
+
class MongoRepository {
|
|
31
|
+
constructor(connection) {
|
|
32
|
+
this.offerItemConditionModel = connection.model(offerItemCondition_1.modelName, offerItemCondition_1.schema);
|
|
33
|
+
}
|
|
34
|
+
static CREATE_MONGO_CONDITIONS(params) {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f;
|
|
36
|
+
const andConditions = [];
|
|
37
|
+
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
38
|
+
if (typeof projectIdEq === 'string') {
|
|
39
|
+
andConditions.push({ 'project.id': { $eq: projectIdEq } });
|
|
40
|
+
}
|
|
41
|
+
const idEq = (_c = params.id) === null || _c === void 0 ? void 0 : _c.$eq;
|
|
42
|
+
if (typeof idEq === 'string') {
|
|
43
|
+
andConditions.push({ _id: { $eq: idEq } });
|
|
44
|
+
}
|
|
45
|
+
const idIn = (_d = params.id) === null || _d === void 0 ? void 0 : _d.$in;
|
|
46
|
+
if (Array.isArray(idIn)) {
|
|
47
|
+
andConditions.push({ _id: { $in: idIn } });
|
|
48
|
+
}
|
|
49
|
+
const identifierEq = (_e = params.identifier) === null || _e === void 0 ? void 0 : _e.$eq;
|
|
50
|
+
if (typeof identifierEq === 'string') {
|
|
51
|
+
andConditions.push({ identifier: { $eq: identifierEq } });
|
|
52
|
+
}
|
|
53
|
+
const identifierIn = (_f = params.identifier) === null || _f === void 0 ? void 0 : _f.$in;
|
|
54
|
+
if (Array.isArray(identifierIn)) {
|
|
55
|
+
andConditions.push({ identifier: { $in: identifierIn } });
|
|
56
|
+
}
|
|
57
|
+
return andConditions;
|
|
58
|
+
}
|
|
59
|
+
findById(params) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const doc = yield this.offerItemConditionModel.findOne({ _id: params.id }, {
|
|
62
|
+
__v: 0,
|
|
63
|
+
createdAt: 0,
|
|
64
|
+
updatedAt: 0
|
|
65
|
+
})
|
|
66
|
+
.exec();
|
|
67
|
+
if (doc === null) {
|
|
68
|
+
throw new factory.errors.NotFound(this.offerItemConditionModel.modelName);
|
|
69
|
+
}
|
|
70
|
+
return doc.toObject();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
search(params, projection) {
|
|
74
|
+
var _a;
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
77
|
+
const positiveProjectionExists = (projection !== undefined && projection !== null)
|
|
78
|
+
? Object.values(projection)
|
|
79
|
+
.some((value) => value !== 0)
|
|
80
|
+
: false;
|
|
81
|
+
const query = this.offerItemConditionModel.find((conditions.length > 0) ? { $and: conditions } : {}, (positiveProjectionExists)
|
|
82
|
+
? projection
|
|
83
|
+
: Object.assign(Object.assign({}, projection), { __v: 0, createdAt: 0, updatedAt: 0 }));
|
|
84
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
85
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
86
|
+
query.limit(params.limit)
|
|
87
|
+
.skip(params.limit * (page - 1));
|
|
88
|
+
}
|
|
89
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.identifier) !== undefined) {
|
|
90
|
+
query.sort({ identifier: params.sort.identifier });
|
|
91
|
+
}
|
|
92
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
93
|
+
.exec()
|
|
94
|
+
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
save(params) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
let doc;
|
|
100
|
+
if (params.id === '') {
|
|
101
|
+
doc = yield this.offerItemConditionModel.create(params);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
const { id, identifier, project, typeOf } = params, updateFields = __rest(params, ["id", "identifier", "project", "typeOf"]);
|
|
105
|
+
doc = yield this.offerItemConditionModel.findOneAndUpdate({ _id: params.id }, updateFields, { upsert: false, new: true })
|
|
106
|
+
.exec();
|
|
107
|
+
}
|
|
108
|
+
if (doc === null) {
|
|
109
|
+
throw new factory.errors.NotFound(this.offerItemConditionModel.modelName);
|
|
110
|
+
}
|
|
111
|
+
return doc.toObject();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
deleteById(params) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
yield this.offerItemConditionModel.findOneAndRemove({ _id: params.id })
|
|
117
|
+
.exec();
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.MongoRepository = MongoRepository;
|
|
@@ -58,7 +58,9 @@ export declare class MongoRepository {
|
|
|
58
58
|
additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
59
59
|
name?: string;
|
|
60
60
|
orderNumber: string;
|
|
61
|
-
}): Promise<
|
|
61
|
+
}): Promise<{
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
}>;
|
|
62
64
|
findById(params: {
|
|
63
65
|
id: string;
|
|
64
66
|
inclusion: string[];
|
|
@@ -86,7 +88,9 @@ export declare class MongoRepository {
|
|
|
86
88
|
/**
|
|
87
89
|
* 注文を検索する
|
|
88
90
|
*/
|
|
89
|
-
search(params: factory.order.ISearchConditions, projection?:
|
|
91
|
+
search(params: factory.order.ISearchConditions, projection?: {
|
|
92
|
+
[key: string]: 0 | 1;
|
|
93
|
+
}): Promise<factory.order.IOrder[]>;
|
|
90
94
|
/**
|
|
91
95
|
* 注文の受入オファーIDリストを検索する
|
|
92
96
|
*/
|
|
@@ -94,7 +98,11 @@ export declare class MongoRepository {
|
|
|
94
98
|
/**
|
|
95
99
|
* オファー展開の注文検索
|
|
96
100
|
*/
|
|
97
|
-
searchWithUnwoundAcceptedOffer(params: factory.order.ISearchConditions, projection?:
|
|
101
|
+
searchWithUnwoundAcceptedOffer(params: factory.order.ISearchConditions, projection?: {
|
|
102
|
+
[key: string]: any;
|
|
103
|
+
}): Promise<Omit<factory.order.IOrder[], 'acceptedOffers'> & {
|
|
104
|
+
acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered> | factory.order.IAcceptedOffer<factory.order.IItemOffered>[];
|
|
105
|
+
}>;
|
|
98
106
|
/**
|
|
99
107
|
* 特典口座情報が未保管であれば保管する
|
|
100
108
|
*/
|
|
@@ -110,5 +118,24 @@ export declare class MongoRepository {
|
|
|
110
118
|
$in: string[];
|
|
111
119
|
};
|
|
112
120
|
}): Promise<(string)[]>;
|
|
121
|
+
/**
|
|
122
|
+
* 注文に含まれるイベントIDを検索する
|
|
123
|
+
*/
|
|
124
|
+
searchReservationForIdsByOrderNumbers(params: {
|
|
125
|
+
orderNumber: {
|
|
126
|
+
$in: string[];
|
|
127
|
+
};
|
|
128
|
+
}): Promise<string[]>;
|
|
129
|
+
/**
|
|
130
|
+
* 注文に含まれるacceptedOffersを検索する
|
|
131
|
+
*/
|
|
132
|
+
searchAcceptedOffersByOrderNumbers(params: {
|
|
133
|
+
orderNumber: {
|
|
134
|
+
$in: string[];
|
|
135
|
+
};
|
|
136
|
+
}): Promise<{
|
|
137
|
+
id: string;
|
|
138
|
+
priceSpecification: factory.order.ITicketPriceSpecification;
|
|
139
|
+
}[]>;
|
|
113
140
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
114
141
|
}
|