@chevre/domain 23.2.0-alpha.62 → 23.2.0-alpha.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/errorHandler.js +0 -5
- package/lib/chevre/eventEmitter/assetTransaction.js +0 -1
- package/lib/chevre/eventEmitter/task.js +0 -1
- package/lib/chevre/eventEmitter/transaction.js +0 -1
- package/lib/chevre/factory/transactionNumber.js +0 -2
- package/lib/chevre/repo/acceptedOffer.js +0 -1
- package/lib/chevre/repo/acceptedPaymentMethod.js +0 -1
- package/lib/chevre/repo/account.js +0 -17
- package/lib/chevre/repo/accountTransaction.js +0 -7
- package/lib/chevre/repo/action.js +0 -7
- package/lib/chevre/repo/additionalProperty.js +0 -2
- package/lib/chevre/repo/advanceBookingRequirement.js +0 -1
- package/lib/chevre/repo/aggregateOffer.js +0 -5
- package/lib/chevre/repo/assetTransaction.js +0 -17
- package/lib/chevre/repo/authorization.js +0 -7
- package/lib/chevre/repo/categoryCode.js +0 -5
- package/lib/chevre/repo/comment.js +0 -1
- package/lib/chevre/repo/confirmationNumber.js +0 -4
- package/lib/chevre/repo/creativeWork.js +0 -6
- package/lib/chevre/repo/credentials.js +0 -1
- package/lib/chevre/repo/customer.js +0 -1
- package/lib/chevre/repo/customerType.js +0 -1
- package/lib/chevre/repo/emailMessage.js +0 -1
- package/lib/chevre/repo/event.js +0 -21
- package/lib/chevre/repo/eventSeries.js +0 -14
- package/lib/chevre/repo/identity.js +0 -1
- package/lib/chevre/repo/identityProvider.js +0 -1
- package/lib/chevre/repo/member.js +0 -1
- package/lib/chevre/repo/merchantReturnPolicy.js +0 -2
- package/lib/chevre/repo/mongoose/onIndexCreated.js +0 -1
- package/lib/chevre/repo/mongoose/schemas/task.js +0 -1
- package/lib/chevre/repo/movieTicketType.js +0 -6
- package/lib/chevre/repo/note.js +0 -1
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +0 -2
- package/lib/chevre/repo/offerCatalog.js +0 -1
- package/lib/chevre/repo/offerCatalogItem.js +0 -1
- package/lib/chevre/repo/order.js +0 -39
- package/lib/chevre/repo/orderNumber.js +0 -4
- package/lib/chevre/repo/ownershipInfo.js +0 -8
- package/lib/chevre/repo/passport.js +0 -1
- package/lib/chevre/repo/paymentMethod/creditCard.js +0 -2
- package/lib/chevre/repo/paymentService.js +0 -2
- package/lib/chevre/repo/paymentServiceChannel.js +0 -1
- package/lib/chevre/repo/pendingReservation.js +0 -3
- package/lib/chevre/repo/person.js +0 -19
- package/lib/chevre/repo/place/busStop.js +0 -4
- package/lib/chevre/repo/place/movieTheater.js +0 -3
- package/lib/chevre/repo/place/screeningRoom.js +0 -2
- package/lib/chevre/repo/place/seat.js +0 -7
- package/lib/chevre/repo/place/section.js +0 -5
- package/lib/chevre/repo/potentialAction.js +0 -1
- package/lib/chevre/repo/priceSpecification.js +0 -6
- package/lib/chevre/repo/product.js +0 -2
- package/lib/chevre/repo/productModel.js +0 -1
- package/lib/chevre/repo/rateLimit/offer.js +0 -1
- package/lib/chevre/repo/reservation.js +0 -54
- package/lib/chevre/repo/role.js +0 -1
- package/lib/chevre/repo/seller.js +0 -3
- package/lib/chevre/repo/sellerReturnPolicy.js +0 -1
- package/lib/chevre/repo/serviceOutput.js +0 -2
- package/lib/chevre/repo/serviceOutputIdentifier.js +0 -1
- package/lib/chevre/repo/stockHolder.js +0 -2
- package/lib/chevre/repo/task.js +0 -7
- package/lib/chevre/repo/transaction.js +0 -24
- package/lib/chevre/repo/transactionNumberCounter.js +0 -1
- package/lib/chevre/repo/trip.js +0 -2
- package/lib/chevre/repo/webSite.js +0 -1
- package/lib/chevre/repository.js +0 -1
- package/lib/chevre/service/account.js +0 -3
- package/lib/chevre/service/accountTransaction/transfer.js +0 -3
- package/lib/chevre/service/accountTransaction.js +0 -3
- package/lib/chevre/service/aggregation/event/importFromCOA.js +0 -1
- package/lib/chevre/service/assetTransaction/cancelReservation/start.js +0 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.js +0 -2
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -2
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +0 -2
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +0 -2
- package/lib/chevre/service/assetTransaction/refund.js +0 -2
- package/lib/chevre/service/assetTransaction/registerService/potentialActions.js +0 -2
- package/lib/chevre/service/assetTransaction/registerService.js +0 -4
- package/lib/chevre/service/assetTransaction/reserve/confirm/factory.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +0 -4
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -2
- package/lib/chevre/service/assetTransaction/reserve/start.js +0 -2
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +0 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +0 -2
- package/lib/chevre/service/delivery.js +1 -3
- package/lib/chevre/service/event/processUpdateMovieTheater.js +0 -3
- package/lib/chevre/service/event/saveScreeningEventSeries.js +0 -4
- package/lib/chevre/service/event/saveScreeningEvents.js +0 -6
- package/lib/chevre/service/event.js +0 -3
- package/lib/chevre/service/notification/factory.js +0 -2
- package/lib/chevre/service/notification/notifyByEmail.js +0 -2
- package/lib/chevre/service/notification/triggerWebhook.js +0 -2
- package/lib/chevre/service/offer/event/authorize/factory.js +0 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +0 -1
- package/lib/chevre/service/offer/event/authorize.js +0 -3
- package/lib/chevre/service/offer/event/importFromCOA/factory.js +0 -1
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +0 -3
- package/lib/chevre/service/offer/event/searchOfferCatalogItemAvailability.js +0 -2
- package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +0 -1
- package/lib/chevre/service/offer/event/searchOffersByIds.js +0 -3
- package/lib/chevre/service/offer/event/voidTransaction.js +0 -2
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +0 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -4
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +0 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +0 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +0 -2
- package/lib/chevre/service/offer/factory.js +0 -1
- package/lib/chevre/service/offer/onEventChanged.js +0 -1
- package/lib/chevre/service/offer/product/factory.js +0 -3
- package/lib/chevre/service/offer/product/searchProductOffers.js +0 -1
- package/lib/chevre/service/offer/product.js +0 -2
- package/lib/chevre/service/offer.js +0 -1
- package/lib/chevre/service/order/deleteOrder.js +0 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +0 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +0 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +0 -1
- package/lib/chevre/service/order/placeOrder.js +0 -1
- package/lib/chevre/service/order/returnOrder.js +0 -1
- package/lib/chevre/service/order/sendOrder.js +0 -1
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +0 -2
- package/lib/chevre/service/payment/any/factory.js +0 -1
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +0 -1
- package/lib/chevre/service/payment/any/person2username.js +0 -1
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +0 -2
- package/lib/chevre/service/payment/any.js +0 -5
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +0 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +0 -2
- package/lib/chevre/service/payment/creditCard/voidTransaction.js +0 -1
- package/lib/chevre/service/payment/factory.js +0 -1
- package/lib/chevre/service/payment/movieTicket/authorize.js +0 -2
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +0 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +0 -1
- package/lib/chevre/service/payment/paymentCard.js +0 -1
- package/lib/chevre/service/product.js +0 -1
- package/lib/chevre/service/report/telemetry.js +0 -15
- package/lib/chevre/service/reserve/cancelReservation.js +0 -3
- package/lib/chevre/service/reserve/confirmReservation.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +0 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
- package/lib/chevre/service/reserve/searchByOrder.js +0 -1
- package/lib/chevre/service/reserve/useReservation.js +0 -2
- package/lib/chevre/service/reserveCOA/cancelReservation.js +0 -1
- package/lib/chevre/service/task/acceptCOAOffer.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +0 -3
- package/lib/chevre/service/task/deletePerson.js +0 -2
- package/lib/chevre/service/task/onAuthorizationCreated.js +0 -1
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +0 -1
- package/lib/chevre/service/task/onResourceDeleted.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated.js +0 -5
- package/lib/chevre/service/task/returnPayTransaction.js +0 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +0 -5
- package/lib/chevre/service/task.js +0 -4
- package/lib/chevre/service/taskHandler.js +0 -1
- package/lib/chevre/service/transaction/deleteTransaction.js +0 -4
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +0 -3
- package/lib/chevre/service/transaction/moneyTransfer.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -4
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +0 -2
- package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +0 -2
- package/lib/chevre/service/transaction/returnOrder/preStart/findApplicableReturnPolicy.js +0 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +0 -1
- package/lib/chevre/service/transaction/returnOrder.js +0 -1
- package/lib/chevre/service/validation/validateOrder.js +0 -2
- package/lib/chevre/service.js +0 -3
- package/lib/chevre/settings.js +0 -1
- package/lib/index.js +0 -1
- package/package.json +2 -6
|
@@ -29,7 +29,6 @@ class CreativeWorkRepo {
|
|
|
29
29
|
constructor(connection) {
|
|
30
30
|
this.creativeWorkModel = connection.model(creativeWork_1.modelName, (0, creativeWork_1.createSchema)());
|
|
31
31
|
}
|
|
32
|
-
// tslint:disable-next-line:max-func-body-length
|
|
33
32
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
34
33
|
const andConditions = [
|
|
35
34
|
{ typeOf: { $eq: factory.creativeWorkType.Movie } }
|
|
@@ -85,12 +84,10 @@ class CreativeWorkRepo {
|
|
|
85
84
|
]
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
89
87
|
/* istanbul ignore else */
|
|
90
88
|
if (params.datePublishedFrom !== undefined) {
|
|
91
89
|
andConditions.push({ datePublished: { $exists: true, $gte: params.datePublishedFrom } });
|
|
92
90
|
}
|
|
93
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
94
91
|
/* istanbul ignore else */
|
|
95
92
|
if (params.datePublishedThrough !== undefined) {
|
|
96
93
|
andConditions.push({ datePublished: { $exists: true, $lte: params.datePublishedThrough } });
|
|
@@ -143,7 +140,6 @@ class CreativeWorkRepo {
|
|
|
143
140
|
/**
|
|
144
141
|
* コードをキーにして冪等作成
|
|
145
142
|
*/
|
|
146
|
-
// tslint:disable-next-line:max-func-body-length
|
|
147
143
|
async upsertMoviesByIdentifier(params
|
|
148
144
|
// options?: {
|
|
149
145
|
// replace?: boolean;
|
|
@@ -151,7 +147,6 @@ class CreativeWorkRepo {
|
|
|
151
147
|
) {
|
|
152
148
|
const bulkWriteOps = [];
|
|
153
149
|
if (Array.isArray(params)) {
|
|
154
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
155
150
|
params.forEach(({ $set, $unset }) => {
|
|
156
151
|
// リソースのユニークネスを保証するfilter
|
|
157
152
|
const filter = {
|
|
@@ -253,7 +248,6 @@ class CreativeWorkRepo {
|
|
|
253
248
|
query.limit(params.limit)
|
|
254
249
|
.skip(params.limit * (page - 1));
|
|
255
250
|
}
|
|
256
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
257
251
|
/* istanbul ignore else */
|
|
258
252
|
if (params.sort?.identifier !== undefined) {
|
|
259
253
|
query.sort({ identifier: params.sort.identifier });
|
|
@@ -108,7 +108,6 @@ class CustomerRepo {
|
|
|
108
108
|
query.limit(conditions.limit)
|
|
109
109
|
.skip(conditions.limit * (page - 1));
|
|
110
110
|
}
|
|
111
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
112
111
|
/* istanbul ignore else */
|
|
113
112
|
if (conditions.sort?.branchCode !== undefined) {
|
|
114
113
|
query.sort({ branchCode: conditions.sort.branchCode });
|
|
@@ -16,7 +16,6 @@ class CustomerTypeRepo {
|
|
|
16
16
|
constructor(connection) {
|
|
17
17
|
this.customerTypeModel = connection.model(customerType_1.modelName, (0, customerType_1.createSchema)());
|
|
18
18
|
}
|
|
19
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
20
19
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
21
20
|
const andConditions = [];
|
|
22
21
|
const codeValueEq = params.codeValue?.$eq;
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -31,7 +31,6 @@ class EventRepo {
|
|
|
31
31
|
// return (USE_OBJECT_ID_AS_EVENT_ID) ? new Types.ObjectId().toHexString() : uniqid();
|
|
32
32
|
return new mongoose_1.Types.ObjectId().toHexString(); // 設定を廃止(2025-11-20~)
|
|
33
33
|
}
|
|
34
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
35
34
|
static CREATE_MONGO_CONDITIONS(conditions) {
|
|
36
35
|
const andConditions = [];
|
|
37
36
|
const typeOfEq = conditions.typeOf;
|
|
@@ -66,49 +65,42 @@ class EventRepo {
|
|
|
66
65
|
if (Array.isArray(identifierIn)) {
|
|
67
66
|
andConditions.push({ identifier: { $exists: true, $in: identifierIn } });
|
|
68
67
|
}
|
|
69
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
70
68
|
/* istanbul ignore else */
|
|
71
69
|
if (Array.isArray(conditions.eventStatuses)) {
|
|
72
70
|
andConditions.push({
|
|
73
71
|
eventStatus: { $in: conditions.eventStatuses }
|
|
74
72
|
});
|
|
75
73
|
}
|
|
76
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
77
74
|
/* istanbul ignore else */
|
|
78
75
|
if (conditions.inSessionFrom !== undefined) {
|
|
79
76
|
andConditions.push({
|
|
80
77
|
endDate: { $gte: conditions.inSessionFrom }
|
|
81
78
|
});
|
|
82
79
|
}
|
|
83
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
84
80
|
/* istanbul ignore else */
|
|
85
81
|
if (conditions.inSessionThrough !== undefined) {
|
|
86
82
|
andConditions.push({
|
|
87
83
|
startDate: { $lte: conditions.inSessionThrough }
|
|
88
84
|
});
|
|
89
85
|
}
|
|
90
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
91
86
|
/* istanbul ignore else */
|
|
92
87
|
if (conditions.startFrom !== undefined) {
|
|
93
88
|
andConditions.push({
|
|
94
89
|
startDate: { $gte: conditions.startFrom }
|
|
95
90
|
});
|
|
96
91
|
}
|
|
97
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
98
92
|
/* istanbul ignore else */
|
|
99
93
|
if (conditions.startThrough !== undefined) {
|
|
100
94
|
andConditions.push({
|
|
101
95
|
startDate: { $lte: conditions.startThrough }
|
|
102
96
|
});
|
|
103
97
|
}
|
|
104
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
105
98
|
/* istanbul ignore else */
|
|
106
99
|
if (conditions.endFrom !== undefined) {
|
|
107
100
|
andConditions.push({
|
|
108
101
|
endDate: { $gte: conditions.endFrom }
|
|
109
102
|
});
|
|
110
103
|
}
|
|
111
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
112
104
|
/* istanbul ignore else */
|
|
113
105
|
if (conditions.endThrough !== undefined) {
|
|
114
106
|
andConditions.push({
|
|
@@ -136,7 +128,6 @@ class EventRepo {
|
|
|
136
128
|
switch (conditions.typeOf) {
|
|
137
129
|
case factory.eventType.ScreeningEvent:
|
|
138
130
|
params = conditions;
|
|
139
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
140
131
|
/* istanbul ignore else */
|
|
141
132
|
if (typeof params.name === 'string' && params.name.length > 0) {
|
|
142
133
|
andConditions.push({
|
|
@@ -156,7 +147,6 @@ class EventRepo {
|
|
|
156
147
|
]
|
|
157
148
|
});
|
|
158
149
|
}
|
|
159
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
160
150
|
/* istanbul ignore else */
|
|
161
151
|
const superEventLocationIdEq = params.superEvent?.location?.id?.$eq;
|
|
162
152
|
if (typeof superEventLocationIdEq === 'string') {
|
|
@@ -167,10 +157,8 @@ class EventRepo {
|
|
|
167
157
|
}
|
|
168
158
|
});
|
|
169
159
|
}
|
|
170
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
171
160
|
/* istanbul ignore else */
|
|
172
161
|
if (params.superEvent !== undefined) {
|
|
173
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
174
162
|
/* istanbul ignore else */
|
|
175
163
|
if (Array.isArray(params.superEvent.ids)) {
|
|
176
164
|
andConditions.push({
|
|
@@ -180,7 +168,6 @@ class EventRepo {
|
|
|
180
168
|
}
|
|
181
169
|
});
|
|
182
170
|
}
|
|
183
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
184
171
|
/* istanbul ignore else */
|
|
185
172
|
if (Array.isArray(params.superEvent.locationBranchCodes)) {
|
|
186
173
|
andConditions.push({
|
|
@@ -190,7 +177,6 @@ class EventRepo {
|
|
|
190
177
|
}
|
|
191
178
|
});
|
|
192
179
|
}
|
|
193
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
194
180
|
/* istanbul ignore else */
|
|
195
181
|
if (Array.isArray(params.superEvent.workPerformedIdentifiers)) {
|
|
196
182
|
andConditions.push({
|
|
@@ -541,7 +527,6 @@ class EventRepo {
|
|
|
541
527
|
query.limit(params.limit)
|
|
542
528
|
.skip(params.limit * (page - 1));
|
|
543
529
|
}
|
|
544
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
545
530
|
/* istanbul ignore else */
|
|
546
531
|
if (params.sort?.startDate !== undefined) {
|
|
547
532
|
query.sort({ startDate: params.sort.startDate });
|
|
@@ -633,7 +618,6 @@ class EventRepo {
|
|
|
633
618
|
aggregate.limit(params.limit * page)
|
|
634
619
|
.skip(params.limit * (page - 1));
|
|
635
620
|
}
|
|
636
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
637
621
|
/* istanbul ignore else */
|
|
638
622
|
if (params.sort?.startDate !== undefined) {
|
|
639
623
|
aggregate.sort({ startDate: params.sort.startDate });
|
|
@@ -855,7 +839,6 @@ class EventRepo {
|
|
|
855
839
|
}));
|
|
856
840
|
return { statuses };
|
|
857
841
|
}
|
|
858
|
-
// tslint:disable-next-line:max-func-body-length
|
|
859
842
|
async agggregateByStatus(params) {
|
|
860
843
|
const matchConditions = params.matchConditions;
|
|
861
844
|
const eventStatus = params.status;
|
|
@@ -879,7 +862,6 @@ class EventRepo {
|
|
|
879
862
|
then: {
|
|
880
863
|
$multiply: [
|
|
881
864
|
{ $divide: ['$remainingAttendeeCapacity', '$maximumAttendeeCapacity'] },
|
|
882
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
883
865
|
100
|
|
884
866
|
]
|
|
885
867
|
},
|
|
@@ -951,7 +933,6 @@ class EventRepo {
|
|
|
951
933
|
}
|
|
952
934
|
])
|
|
953
935
|
.exec();
|
|
954
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
955
936
|
const percents = [50, 95, 99];
|
|
956
937
|
if (aggregations.length === 0) {
|
|
957
938
|
return {
|
|
@@ -977,7 +958,6 @@ class EventRepo {
|
|
|
977
958
|
const ranks4percentile = percents.map((percentile) => {
|
|
978
959
|
return {
|
|
979
960
|
percentile,
|
|
980
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
981
961
|
rank: Math.floor(aggregations[0].eventCount * percentile / 100)
|
|
982
962
|
};
|
|
983
963
|
});
|
|
@@ -1001,7 +981,6 @@ class EventRepo {
|
|
|
1001
981
|
then: {
|
|
1002
982
|
$multiply: [
|
|
1003
983
|
{ $divide: ['$remainingAttendeeCapacity', '$maximumAttendeeCapacity'] },
|
|
1004
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
1005
984
|
100
|
|
1006
985
|
]
|
|
1007
986
|
},
|
|
@@ -13,7 +13,6 @@ class EventSeriesRepo {
|
|
|
13
13
|
constructor(connection) {
|
|
14
14
|
this.eventSeriesModel = connection.model(eventSeries_1.modelName, (0, eventSeries_1.createSchema)());
|
|
15
15
|
}
|
|
16
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
17
16
|
static CREATE_MONGO_CONDITIONS(conditions) {
|
|
18
17
|
const andConditions = [
|
|
19
18
|
// typeOfは必ずScreeningEventSeriesなので不要(2026-02-14~)
|
|
@@ -35,49 +34,42 @@ class EventSeriesRepo {
|
|
|
35
34
|
if (Array.isArray(idIn)) {
|
|
36
35
|
andConditions.push({ _id: { $in: idIn } });
|
|
37
36
|
}
|
|
38
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
39
37
|
/* istanbul ignore else */
|
|
40
38
|
if (Array.isArray(conditions.eventStatuses)) {
|
|
41
39
|
andConditions.push({
|
|
42
40
|
eventStatus: { $in: conditions.eventStatuses }
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
46
43
|
/* istanbul ignore else */
|
|
47
44
|
if (conditions.inSessionFrom !== undefined) {
|
|
48
45
|
andConditions.push({
|
|
49
46
|
endDate: { $gte: conditions.inSessionFrom }
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
53
49
|
/* istanbul ignore else */
|
|
54
50
|
if (conditions.inSessionThrough !== undefined) {
|
|
55
51
|
andConditions.push({
|
|
56
52
|
startDate: { $lte: conditions.inSessionThrough }
|
|
57
53
|
});
|
|
58
54
|
}
|
|
59
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
60
55
|
/* istanbul ignore else */
|
|
61
56
|
if (conditions.startFrom !== undefined) {
|
|
62
57
|
andConditions.push({
|
|
63
58
|
startDate: { $gte: conditions.startFrom }
|
|
64
59
|
});
|
|
65
60
|
}
|
|
66
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
67
61
|
/* istanbul ignore else */
|
|
68
62
|
if (conditions.startThrough !== undefined) {
|
|
69
63
|
andConditions.push({
|
|
70
64
|
startDate: { $lte: conditions.startThrough }
|
|
71
65
|
});
|
|
72
66
|
}
|
|
73
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
74
67
|
/* istanbul ignore else */
|
|
75
68
|
if (conditions.endFrom !== undefined) {
|
|
76
69
|
andConditions.push({
|
|
77
70
|
endDate: { $gte: conditions.endFrom }
|
|
78
71
|
});
|
|
79
72
|
}
|
|
80
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
81
73
|
/* istanbul ignore else */
|
|
82
74
|
if (conditions.endThrough !== undefined) {
|
|
83
75
|
andConditions.push({
|
|
@@ -101,7 +93,6 @@ class EventSeriesRepo {
|
|
|
101
93
|
}
|
|
102
94
|
});
|
|
103
95
|
}
|
|
104
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
105
96
|
/* istanbul ignore else */
|
|
106
97
|
if (typeof conditions.name === 'string' && conditions.name.length > 0) {
|
|
107
98
|
andConditions.push({
|
|
@@ -128,17 +119,14 @@ class EventSeriesRepo {
|
|
|
128
119
|
});
|
|
129
120
|
}
|
|
130
121
|
const locationIdEq = conditions.location?.id?.$eq;
|
|
131
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
132
122
|
/* istanbul ignore else */
|
|
133
123
|
if (typeof locationIdEq === 'string') {
|
|
134
124
|
andConditions.push({
|
|
135
125
|
'location.id': { $exists: true, $eq: locationIdEq }
|
|
136
126
|
});
|
|
137
127
|
}
|
|
138
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
139
128
|
/* istanbul ignore else */
|
|
140
129
|
if (conditions.location !== undefined) {
|
|
141
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
142
130
|
/* istanbul ignore else */
|
|
143
131
|
if (Array.isArray(conditions.location.branchCodes)) {
|
|
144
132
|
andConditions.push({
|
|
@@ -150,7 +138,6 @@ class EventSeriesRepo {
|
|
|
150
138
|
}
|
|
151
139
|
}
|
|
152
140
|
const workPerformedIdentifierIn = conditions.workPerformed?.identifiers;
|
|
153
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
154
141
|
/* istanbul ignore else */
|
|
155
142
|
if (Array.isArray(workPerformedIdentifierIn)) {
|
|
156
143
|
andConditions.push({
|
|
@@ -492,7 +479,6 @@ class EventSeriesRepo {
|
|
|
492
479
|
query.limit(params.limit)
|
|
493
480
|
.skip(params.limit * (page - 1));
|
|
494
481
|
}
|
|
495
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
496
482
|
/* istanbul ignore else */
|
|
497
483
|
if (params.sort?.startDate !== undefined) {
|
|
498
484
|
query.sort({ startDate: params.sort.startDate });
|
|
@@ -12,7 +12,6 @@ class IdentityRepo {
|
|
|
12
12
|
constructor(connection) {
|
|
13
13
|
this.identityModel = connection.model(identity_1.modelName, (0, identity_1.createSchema)());
|
|
14
14
|
}
|
|
15
|
-
// tslint:disable-next-line:max-func-body-length
|
|
16
15
|
static CREATE_FILTER_QUERY(params) {
|
|
17
16
|
const andConditions = [];
|
|
18
17
|
const projectIdEq = params.project?.id?.$eq;
|
|
@@ -12,7 +12,6 @@ class IdentityProviderRepo {
|
|
|
12
12
|
constructor(connection) {
|
|
13
13
|
this.identityProviderModel = connection.model(identityProvider_1.modelName, (0, identityProvider_1.createSchema)());
|
|
14
14
|
}
|
|
15
|
-
// tslint:disable-next-line:max-func-body-length
|
|
16
15
|
static CREATE_FILTER_QUERY(params) {
|
|
17
16
|
const andConditions = [];
|
|
18
17
|
const projectIdEq = params.project?.id?.$eq;
|
|
@@ -21,7 +21,6 @@ class MemberRepo {
|
|
|
21
21
|
this.globalMemberModel = connection.model(global_1.modelName, (0, global_1.createSchema)());
|
|
22
22
|
this.memberModel = connection.model(member_1.modelName, (0, member_1.createSchema)());
|
|
23
23
|
}
|
|
24
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
25
24
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
26
25
|
const andConditions = [];
|
|
27
26
|
const idEq = params.id?.$eq;
|
|
@@ -12,7 +12,6 @@ class MerchantReturnPolicyRepo {
|
|
|
12
12
|
constructor(connection) {
|
|
13
13
|
this.merchantReturnPolicyModel = connection.model(merchantReturnPolicy_1.modelName, (0, merchantReturnPolicy_1.createSchema)());
|
|
14
14
|
}
|
|
15
|
-
// tslint:disable-next-line:max-func-body-length
|
|
16
15
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
17
16
|
// MongoDB検索条件
|
|
18
17
|
const andConditions = [];
|
|
@@ -114,7 +113,6 @@ class MerchantReturnPolicyRepo {
|
|
|
114
113
|
query.limit(params.limit)
|
|
115
114
|
.skip(params.limit * (page - 1));
|
|
116
115
|
}
|
|
117
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
118
116
|
/* istanbul ignore else */
|
|
119
117
|
if (params.sort?.identifier !== undefined) {
|
|
120
118
|
query.sort({ identifier: params.sort.identifier });
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MovieTicketTypeRepo = void 0;
|
|
4
|
-
// tslint:disable-next-line:no-implicit-dependencies
|
|
5
4
|
const mongoose_1 = require("mongoose");
|
|
6
5
|
// import { createSchema, modelName } from './mongoose/schemas/categoryCode';
|
|
7
6
|
const movieTicketTypes_1 = require("./mongoose/schemas/movieTicketTypes");
|
|
@@ -18,7 +17,6 @@ class MovieTicketTypeRepo {
|
|
|
18
17
|
constructor(connection) {
|
|
19
18
|
this.categoryCodeModel = connection.model(movieTicketTypes_1.modelName, (0, movieTicketTypes_1.createSchema)());
|
|
20
19
|
}
|
|
21
|
-
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
22
20
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
23
21
|
const andConditions = [
|
|
24
22
|
{
|
|
@@ -27,7 +25,6 @@ class MovieTicketTypeRepo {
|
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
];
|
|
30
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
31
28
|
/* istanbul ignore else */
|
|
32
29
|
if (params.project !== undefined && params.project !== null) {
|
|
33
30
|
if (params.project.id !== undefined && params.project.id !== null) {
|
|
@@ -50,7 +47,6 @@ class MovieTicketTypeRepo {
|
|
|
50
47
|
// andConditions.push({ _id: { $in: idIn } });
|
|
51
48
|
andConditions.push({ _id: { $in: idIn.map((id) => new mongoose_1.Types.ObjectId(id)) } });
|
|
52
49
|
}
|
|
53
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
54
50
|
/* istanbul ignore else */
|
|
55
51
|
if (params.name !== undefined && params.name !== null) {
|
|
56
52
|
if (typeof params.name.$regex === 'string' && params.name.$regex.length > 0) {
|
|
@@ -80,7 +76,6 @@ class MovieTicketTypeRepo {
|
|
|
80
76
|
if (Array.isArray(codeValueIn)) {
|
|
81
77
|
andConditions.push({ codeValue: { $in: codeValueIn } });
|
|
82
78
|
}
|
|
83
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
84
79
|
/* istanbul ignore else */
|
|
85
80
|
if (params.inCodeSet !== undefined && params.inCodeSet !== null) {
|
|
86
81
|
if (params.inCodeSet.identifier !== undefined && params.inCodeSet.identifier !== null) {
|
|
@@ -173,7 +168,6 @@ class MovieTicketTypeRepo {
|
|
|
173
168
|
query.limit(params.limit)
|
|
174
169
|
.skip(params.limit * (page - 1));
|
|
175
170
|
}
|
|
176
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
177
171
|
/* istanbul ignore else */
|
|
178
172
|
if (params.sort !== undefined) {
|
|
179
173
|
query.sort(params.sort);
|
package/lib/chevre/repo/note.js
CHANGED
|
@@ -90,7 +90,6 @@ class OfferRepo {
|
|
|
90
90
|
// idは除外しない(2023-12-14~)
|
|
91
91
|
if (field !== 'id') {
|
|
92
92
|
if (typeof projectStage[field] === 'string') {
|
|
93
|
-
// tslint:disable-next-line:no-dynamic-delete
|
|
94
93
|
delete projectStage[field];
|
|
95
94
|
}
|
|
96
95
|
}
|
|
@@ -416,7 +415,6 @@ class OfferRepo {
|
|
|
416
415
|
: [],
|
|
417
416
|
{ $project: projectStage }
|
|
418
417
|
]);
|
|
419
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
420
418
|
/* istanbul ignore else */
|
|
421
419
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
422
420
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
@@ -24,7 +24,6 @@ class OfferCatalogRepo {
|
|
|
24
24
|
constructor(connection) {
|
|
25
25
|
this.offerCatalogModel = connection.model(offerCatalog_1.modelName, (0, offerCatalog_1.createSchema)());
|
|
26
26
|
}
|
|
27
|
-
// tslint:disable-next-line:max-func-body-length
|
|
28
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
29
28
|
// MongoDB検索条件
|
|
30
29
|
const andConditions = [];
|
|
@@ -26,7 +26,6 @@ class OfferCatalogItemRepo {
|
|
|
26
26
|
constructor(connection) {
|
|
27
27
|
this.offerCatalogItemModel = connection.model(offerCatalogItem_1.modelName, (0, offerCatalogItem_1.createSchema)());
|
|
28
28
|
}
|
|
29
|
-
// tslint:disable-next-line:max-func-body-length
|
|
30
29
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
31
30
|
// MongoDB検索条件
|
|
32
31
|
const andConditions = [];
|