@chevre/domain 24.1.0-alpha.30 → 24.1.0-alpha.32

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.
Files changed (80) hide show
  1. package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +1 -1
  2. package/lib/chevre/repo/factory/reservation/createMongoConditions.js +171 -363
  3. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +43 -0
  4. package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
  5. package/lib/chevre/repo/place/hasPOS.js +2 -1
  6. package/lib/chevre/repo/reservation.js +2 -2
  7. package/lib/chevre/repo/setting/integration.d.ts +19 -0
  8. package/lib/chevre/repo/setting/integration.js +72 -0
  9. package/lib/chevre/repository.d.ts +5 -0
  10. package/lib/chevre/repository.js +11 -0
  11. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
  12. package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
  13. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
  14. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
  15. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
  16. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
  17. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
  18. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  19. package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
  20. package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
  21. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
  22. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +1 -1
  23. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  24. package/lib/chevre/service/offer/event/authorize.d.ts +1 -1
  25. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
  26. package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
  27. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
  28. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
  29. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
  30. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
  31. package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
  32. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
  33. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
  34. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
  35. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
  36. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  37. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
  38. package/lib/chevre/service/order/onOrderUpdated.js +0 -1
  39. package/lib/chevre/service/order/payOrder.d.ts +1 -1
  40. package/lib/chevre/service/order/placeOrder.d.ts +1 -1
  41. package/lib/chevre/service/order/returnOrder.js +0 -1
  42. package/lib/chevre/service/order/sendOrder.js +0 -1
  43. package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
  44. package/lib/chevre/service/payment/any/person2username.js +0 -1
  45. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
  46. package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
  47. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
  48. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
  49. package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
  50. package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
  51. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
  52. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
  53. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
  54. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
  55. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
  56. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
  57. package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
  58. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
  59. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +0 -1
  60. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
  61. package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
  62. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
  63. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
  64. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
  65. package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
  66. package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
  67. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
  68. package/lib/chevre/service/task.d.ts +1 -1
  69. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
  70. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
  71. package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -1
  72. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
  73. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
  74. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
  75. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
  76. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
  77. package/lib/chevre/settings.d.ts +0 -54
  78. package/lib/chevre/settings.js +1 -63
  79. package/lib/chevre/taskSettings.d.ts +1 -1
  80. package/package.json +2 -2
@@ -1,3 +1,3 @@
1
1
  import type { FilterQuery } from 'mongoose';
2
2
  import { factory } from '../../../factory';
3
- export declare function CREATE_MONGO_CONDITIONS(params: factory.reservation.eventReservation.ISearchConditions): FilterQuery<import("@chevre/factory/lib/chevre/reservation/event").IReservation>[];
3
+ export declare function createMongoConditions(params: factory.reservation.eventReservation.ISearchConditions): FilterQuery<import("@chevre/factory/lib/chevre/reservation/event").IReservation>[];
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_MONGO_CONDITIONS = CREATE_MONGO_CONDITIONS;
4
- const factory_1 = require("../../../factory");
5
- function CREATE_MONGO_CONDITIONS(params) {
3
+ exports.createMongoConditions = createMongoConditions;
4
+ function createMongoConditions(params) {
6
5
  // MongoDB検索条件
7
6
  const andConditions = [
8
- { typeOf: { $eq: params.typeOf } }
7
+ // { typeOf: { $eq: params.typeOf } } // EventReservationしかコレクションに存在しない前提のため、不要(2026-05-24~)
9
8
  ];
10
9
  const projectIdEq = params.project?.id?.$eq;
11
10
  if (typeof projectIdEq === 'string') {
@@ -24,15 +23,15 @@ function CREATE_MONGO_CONDITIONS(params) {
24
23
  if (typeof params.id.$eq === 'string') {
25
24
  andConditions.push({ _id: { $eq: params.id.$eq } });
26
25
  }
27
- if (typeof params.id.$ne === 'string') {
28
- andConditions.push({ _id: { $ne: params.id.$ne } });
29
- }
26
+ // if (typeof params.id.$ne === 'string') {
27
+ // andConditions.push({ _id: { $ne: params.id.$ne } });
28
+ // }
30
29
  if (Array.isArray(params.id.$in)) {
31
30
  andConditions.push({ _id: { $in: params.id.$in } });
32
31
  }
33
- if (Array.isArray(params.id.$nin)) {
34
- andConditions.push({ _id: { $nin: params.id.$nin } });
35
- }
32
+ // if (Array.isArray(params.id.$nin)) {
33
+ // andConditions.push({ _id: { $nin: params.id.$nin } });
34
+ // }
36
35
  }
37
36
  /* istanbul ignore else */
38
37
  if (Array.isArray(params.reservationNumbers)) {
@@ -61,13 +60,13 @@ function CREATE_MONGO_CONDITIONS(params) {
61
60
  }
62
61
  });
63
62
  }
64
- if (typeof params.reservationNumber.$ne === 'string') {
65
- andConditions.push({
66
- reservationNumber: {
67
- $ne: params.reservationNumber.$ne
68
- }
69
- });
70
- }
63
+ // if (typeof params.reservationNumber.$ne === 'string') {
64
+ // andConditions.push({
65
+ // reservationNumber: {
66
+ // $ne: params.reservationNumber.$ne
67
+ // }
68
+ // });
69
+ // }
71
70
  if (Array.isArray(params.reservationNumber.$in)) {
72
71
  andConditions.push({
73
72
  reservationNumber: {
@@ -75,13 +74,13 @@ function CREATE_MONGO_CONDITIONS(params) {
75
74
  }
76
75
  });
77
76
  }
78
- if (Array.isArray(params.reservationNumber.$nin)) {
79
- andConditions.push({
80
- reservationNumber: {
81
- $nin: params.reservationNumber.$nin
82
- }
83
- });
84
- }
77
+ // if (Array.isArray(params.reservationNumber.$nin)) {
78
+ // andConditions.push({
79
+ // reservationNumber: {
80
+ // $nin: params.reservationNumber.$nin
81
+ // }
82
+ // });
83
+ // }
85
84
  }
86
85
  }
87
86
  /* istanbul ignore else */
@@ -105,13 +104,13 @@ function CREATE_MONGO_CONDITIONS(params) {
105
104
  }
106
105
  });
107
106
  }
108
- if (typeof params.additionalTicketText.$ne === 'string') {
109
- andConditions.push({
110
- additionalTicketText: {
111
- $ne: params.additionalTicketText.$ne
112
- }
113
- });
114
- }
107
+ // if (typeof params.additionalTicketText.$ne === 'string') {
108
+ // andConditions.push({
109
+ // additionalTicketText: {
110
+ // $ne: params.additionalTicketText.$ne
111
+ // }
112
+ // });
113
+ // }
115
114
  if (Array.isArray(params.additionalTicketText.$in)) {
116
115
  andConditions.push({
117
116
  additionalTicketText: {
@@ -120,21 +119,21 @@ function CREATE_MONGO_CONDITIONS(params) {
120
119
  }
121
120
  });
122
121
  }
123
- if (Array.isArray(params.additionalTicketText.$nin)) {
124
- andConditions.push({
125
- additionalTicketText: {
126
- $nin: params.additionalTicketText.$nin
127
- }
128
- });
129
- }
122
+ // if (Array.isArray(params.additionalTicketText.$nin)) {
123
+ // andConditions.push({
124
+ // additionalTicketText: {
125
+ // $nin: params.additionalTicketText.$nin
126
+ // }
127
+ // });
128
+ // }
130
129
  const additionalTicketTextRegex = params.additionalTicketText?.$regex;
131
130
  if (typeof additionalTicketTextRegex === 'string' && additionalTicketTextRegex.length > 0) {
132
- const additionalTicketTextOptions = params.additionalTicketText?.$options;
131
+ // const additionalTicketTextOptions = params.additionalTicketText?.$options;
133
132
  andConditions.push({
134
133
  additionalTicketText: {
135
134
  $exists: true,
136
135
  $regex: new RegExp(additionalTicketTextRegex),
137
- ...(typeof additionalTicketTextOptions === 'string') ? { $options: additionalTicketTextOptions } : undefined
136
+ // ...(typeof additionalTicketTextOptions === 'string') ? { $options: additionalTicketTextOptions } : undefined
138
137
  }
139
138
  });
140
139
  }
@@ -156,237 +155,186 @@ function CREATE_MONGO_CONDITIONS(params) {
156
155
  if (Array.isArray(params.reservationStatuses)) {
157
156
  andConditions.push({ reservationStatus: { $in: params.reservationStatuses } });
158
157
  }
159
- /* istanbul ignore else */
160
- if (params.modifiedFrom instanceof Date) {
158
+ // if (params.modifiedFrom instanceof Date) {
159
+ // andConditions.push({
160
+ // modifiedTime: { $gte: params.modifiedFrom }
161
+ // });
162
+ // }
163
+ // if (params.modifiedThrough instanceof Date) {
164
+ // andConditions.push({
165
+ // modifiedTime: { $lte: params.modifiedThrough }
166
+ // });
167
+ // }
168
+ if (params.bookingFrom instanceof Date) {
161
169
  andConditions.push({
162
- modifiedTime: { $gte: params.modifiedFrom }
170
+ bookingTime: { $gte: params.bookingFrom }
163
171
  });
164
172
  }
165
- /* istanbul ignore else */
166
- if (params.modifiedThrough instanceof Date) {
173
+ if (params.bookingThrough instanceof Date) {
167
174
  andConditions.push({
168
- modifiedTime: { $lte: params.modifiedThrough }
175
+ bookingTime: { $lte: params.bookingThrough }
169
176
  });
170
177
  }
171
- /* istanbul ignore else */
172
- if (params.bookingFrom instanceof Date) {
178
+ if (typeof params.reservationFor?.id === 'string') {
173
179
  andConditions.push({
174
- bookingTime: {
180
+ 'reservationFor.id': {
175
181
  $exists: true,
176
- $gte: params.bookingFrom
182
+ $eq: params.reservationFor.id
177
183
  }
178
184
  });
179
185
  }
180
- /* istanbul ignore else */
181
- if (params.bookingThrough instanceof Date) {
182
- andConditions.push({
183
- bookingTime: {
184
- $exists: true,
185
- $lte: params.bookingThrough
186
- }
187
- });
186
+ else {
187
+ const reservationForIdEq4eventReservation = params.reservationFor?.id?.$eq;
188
+ if (typeof reservationForIdEq4eventReservation === 'string') {
189
+ andConditions.push({
190
+ 'reservationFor.id': {
191
+ $exists: true,
192
+ $eq: reservationForIdEq4eventReservation
193
+ }
194
+ });
195
+ }
188
196
  }
189
- switch (params.typeOf) {
190
- // case factory.reservationType.BusReservation:
191
- // const reservationForTypeOfEq = params.reservationFor?.typeOf;
192
- // if (typeof reservationForTypeOfEq === 'string') {
193
- // andConditions.push(
194
- // {
195
- // 'reservationFor.typeOf': {
196
- // $exists: true,
197
- // $eq: reservationForTypeOfEq
198
- // }
199
- // }
200
- // );
201
- // }
202
- // const reservationForIdEq = params.reservationFor?.id?.$eq;
203
- // if (typeof reservationForIdEq === 'string') {
204
- // andConditions.push(
205
- // {
206
- // 'reservationFor.id': {
207
- // $exists: true,
208
- // $eq: reservationForIdEq
209
- // }
210
- // }
211
- // );
212
- // }
213
- // const reservationForIdIn = params.reservationFor?.id?.$in;
214
- // if (Array.isArray(reservationForIdIn)) {
215
- // andConditions.push(
216
- // {
217
- // 'reservationFor.id': {
218
- // $exists: true,
219
- // $in: reservationForIdIn
220
- // }
197
+ /* istanbul ignore else */
198
+ if (params.reservationFor !== undefined) {
199
+ // if (params.reservationFor.typeOf !== undefined) {
200
+ // andConditions.push(
201
+ // {
202
+ // 'reservationFor.typeOf': {
203
+ // $exists: true,
204
+ // $eq: params.reservationFor.typeOf
221
205
  // }
222
- // );
223
- // }
224
- // break;
225
- case factory_1.factory.reservationType.EventReservation:
226
- if (typeof params.reservationFor?.id === 'string') {
206
+ // }
207
+ // );
208
+ // }
209
+ /* istanbul ignore else */
210
+ if (Array.isArray(params.reservationFor.ids)) {
211
+ andConditions.push({
212
+ 'reservationFor.id': {
213
+ $exists: true,
214
+ $in: params.reservationFor.ids
215
+ }
216
+ });
217
+ }
218
+ /* istanbul ignore else */
219
+ if (params.reservationFor.location !== undefined) {
220
+ /* istanbul ignore else */
221
+ if (Array.isArray(params.reservationFor.location.ids)) {
227
222
  andConditions.push({
228
- 'reservationFor.id': {
223
+ 'reservationFor.location.id': {
229
224
  $exists: true,
230
- $eq: params.reservationFor.id
225
+ $in: params.reservationFor.location.ids
231
226
  }
232
227
  });
233
228
  }
234
- else {
235
- const reservationForIdEq4eventReservation = params.reservationFor?.id?.$eq;
236
- if (typeof reservationForIdEq4eventReservation === 'string') {
237
- andConditions.push({
238
- 'reservationFor.id': {
239
- $exists: true,
240
- $eq: reservationForIdEq4eventReservation
241
- }
242
- });
243
- }
244
- }
245
229
  /* istanbul ignore else */
246
- if (params.reservationFor !== undefined) {
247
- /* istanbul ignore else */
248
- if (params.reservationFor.typeOf !== undefined) {
249
- andConditions.push({
250
- 'reservationFor.typeOf': {
251
- $exists: true,
252
- $eq: params.reservationFor.typeOf
253
- }
254
- });
230
+ if (Array.isArray(params.reservationFor.location.branchCodes)) {
231
+ andConditions.push({
232
+ 'reservationFor.location.branchCode': {
233
+ $exists: true,
234
+ $in: params.reservationFor.location.branchCodes
235
+ }
236
+ });
237
+ }
238
+ }
239
+ /* istanbul ignore else */
240
+ if (params.reservationFor.startFrom instanceof Date) {
241
+ andConditions.push({
242
+ 'reservationFor.startDate': {
243
+ $exists: true,
244
+ $gte: params.reservationFor.startFrom
255
245
  }
256
- /* istanbul ignore else */
257
- if (Array.isArray(params.reservationFor.ids)) {
258
- andConditions.push({
259
- 'reservationFor.id': {
260
- $exists: true,
261
- $in: params.reservationFor.ids
262
- }
263
- });
246
+ });
247
+ }
248
+ /* istanbul ignore else */
249
+ if (params.reservationFor.startThrough instanceof Date) {
250
+ andConditions.push({
251
+ 'reservationFor.startDate': {
252
+ $exists: true,
253
+ $lte: params.reservationFor.startThrough
264
254
  }
265
- /* istanbul ignore else */
266
- if (params.reservationFor.location !== undefined) {
267
- /* istanbul ignore else */
268
- if (Array.isArray(params.reservationFor.location.ids)) {
269
- andConditions.push({
270
- 'reservationFor.location.id': {
271
- $exists: true,
272
- $in: params.reservationFor.location.ids
273
- }
274
- });
255
+ });
256
+ }
257
+ /* istanbul ignore else */
258
+ if (params.reservationFor.endFrom instanceof Date) {
259
+ andConditions.push({
260
+ 'reservationFor.endDate': {
261
+ $exists: true,
262
+ $gte: params.reservationFor.endFrom
263
+ }
264
+ });
265
+ }
266
+ /* istanbul ignore else */
267
+ if (params.reservationFor.endThrough instanceof Date) {
268
+ andConditions.push({
269
+ 'reservationFor.endDate': {
270
+ $exists: true,
271
+ $lte: params.reservationFor.endThrough
272
+ }
273
+ });
274
+ }
275
+ /* istanbul ignore else */
276
+ if (params.reservationFor.superEvent !== undefined) {
277
+ /* istanbul ignore else */
278
+ if (params.reservationFor.superEvent.id !== undefined) {
279
+ andConditions.push({
280
+ 'reservationFor.superEvent.id': {
281
+ $exists: true,
282
+ $eq: params.reservationFor.superEvent.id
275
283
  }
276
- /* istanbul ignore else */
277
- if (Array.isArray(params.reservationFor.location.branchCodes)) {
278
- andConditions.push({
279
- 'reservationFor.location.branchCode': {
280
- $exists: true,
281
- $in: params.reservationFor.location.branchCodes
282
- }
283
- });
284
+ });
285
+ }
286
+ /* istanbul ignore else */
287
+ if (Array.isArray(params.reservationFor.superEvent.ids)) {
288
+ andConditions.push({
289
+ 'reservationFor.superEvent.id': {
290
+ $exists: true,
291
+ $in: params.reservationFor.superEvent.ids
284
292
  }
285
- }
293
+ });
294
+ }
295
+ /* istanbul ignore else */
296
+ if (params.reservationFor.superEvent.location !== undefined) {
286
297
  /* istanbul ignore else */
287
- if (params.reservationFor.startFrom instanceof Date) {
298
+ if (Array.isArray(params.reservationFor.superEvent.location.ids)) {
288
299
  andConditions.push({
289
- 'reservationFor.startDate': {
300
+ 'reservationFor.superEvent.location.id': {
290
301
  $exists: true,
291
- $gte: params.reservationFor.startFrom
302
+ $in: params.reservationFor.superEvent.location.ids
292
303
  }
293
304
  });
294
305
  }
295
306
  /* istanbul ignore else */
296
- if (params.reservationFor.startThrough instanceof Date) {
307
+ if (Array.isArray(params.reservationFor.superEvent.location.branchCodes)) {
297
308
  andConditions.push({
298
- 'reservationFor.startDate': {
309
+ 'reservationFor.superEvent.location.branchCode': {
299
310
  $exists: true,
300
- $lte: params.reservationFor.startThrough
311
+ $in: params.reservationFor.superEvent.location.branchCodes
301
312
  }
302
313
  });
303
314
  }
315
+ }
316
+ /* istanbul ignore else */
317
+ if (params.reservationFor.superEvent.workPerformed !== undefined) {
304
318
  /* istanbul ignore else */
305
- if (params.reservationFor.endFrom instanceof Date) {
319
+ if (Array.isArray(params.reservationFor.superEvent.workPerformed.ids)) {
306
320
  andConditions.push({
307
- 'reservationFor.endDate': {
321
+ 'reservationFor.superEvent.workPerformed.id': {
308
322
  $exists: true,
309
- $gte: params.reservationFor.endFrom
323
+ $in: params.reservationFor.superEvent.workPerformed.ids
310
324
  }
311
325
  });
312
326
  }
313
327
  /* istanbul ignore else */
314
- if (params.reservationFor.endThrough instanceof Date) {
328
+ if (Array.isArray(params.reservationFor.superEvent.workPerformed.identifiers)) {
315
329
  andConditions.push({
316
- 'reservationFor.endDate': {
330
+ 'reservationFor.superEvent.workPerformed.identifier': {
317
331
  $exists: true,
318
- $lte: params.reservationFor.endThrough
332
+ $in: params.reservationFor.superEvent.workPerformed.identifiers
319
333
  }
320
334
  });
321
335
  }
322
- /* istanbul ignore else */
323
- if (params.reservationFor.superEvent !== undefined) {
324
- /* istanbul ignore else */
325
- if (params.reservationFor.superEvent.id !== undefined) {
326
- andConditions.push({
327
- 'reservationFor.superEvent.id': {
328
- $exists: true,
329
- $eq: params.reservationFor.superEvent.id
330
- }
331
- });
332
- }
333
- /* istanbul ignore else */
334
- if (Array.isArray(params.reservationFor.superEvent.ids)) {
335
- andConditions.push({
336
- 'reservationFor.superEvent.id': {
337
- $exists: true,
338
- $in: params.reservationFor.superEvent.ids
339
- }
340
- });
341
- }
342
- /* istanbul ignore else */
343
- if (params.reservationFor.superEvent.location !== undefined) {
344
- /* istanbul ignore else */
345
- if (Array.isArray(params.reservationFor.superEvent.location.ids)) {
346
- andConditions.push({
347
- 'reservationFor.superEvent.location.id': {
348
- $exists: true,
349
- $in: params.reservationFor.superEvent.location.ids
350
- }
351
- });
352
- }
353
- /* istanbul ignore else */
354
- if (Array.isArray(params.reservationFor.superEvent.location.branchCodes)) {
355
- andConditions.push({
356
- 'reservationFor.superEvent.location.branchCode': {
357
- $exists: true,
358
- $in: params.reservationFor.superEvent.location.branchCodes
359
- }
360
- });
361
- }
362
- }
363
- /* istanbul ignore else */
364
- if (params.reservationFor.superEvent.workPerformed !== undefined) {
365
- /* istanbul ignore else */
366
- if (Array.isArray(params.reservationFor.superEvent.workPerformed.ids)) {
367
- andConditions.push({
368
- 'reservationFor.superEvent.workPerformed.id': {
369
- $exists: true,
370
- $in: params.reservationFor.superEvent.workPerformed.ids
371
- }
372
- });
373
- }
374
- /* istanbul ignore else */
375
- if (Array.isArray(params.reservationFor.superEvent.workPerformed.identifiers)) {
376
- andConditions.push({
377
- 'reservationFor.superEvent.workPerformed.identifier': {
378
- $exists: true,
379
- $in: params.reservationFor.superEvent.workPerformed.identifiers
380
- }
381
- });
382
- }
383
- }
384
- }
385
336
  }
386
- break;
387
- // case factory.reservationType.ReservationPackage:
388
- // break;
389
- default:
337
+ }
390
338
  }
391
339
  /* istanbul ignore else */
392
340
  if (params.reservedTicket !== undefined) {
@@ -455,41 +403,6 @@ function CREATE_MONGO_CONDITIONS(params) {
455
403
  }
456
404
  });
457
405
  }
458
- // const brokerIdentifierAll = params.broker?.identifier?.$all;
459
- // if (Array.isArray(brokerIdentifierAll)) {
460
- // andConditions.push({
461
- // 'broker.identifier': {
462
- // $exists: true,
463
- // $all: brokerIdentifierAll
464
- // }
465
- // });
466
- // }
467
- // const brokerIdentifierIn = params.broker?.identifier?.$in;
468
- // if (Array.isArray(brokerIdentifierIn)) {
469
- // andConditions.push({
470
- // 'broker.identifier': {
471
- // $exists: true,
472
- // $in: brokerIdentifierIn
473
- // }
474
- // });
475
- // }
476
- // const brokerIdentifierNin = params.broker?.identifier?.$nin;
477
- // if (Array.isArray(brokerIdentifierNin)) {
478
- // andConditions.push({
479
- // 'broker.identifier': {
480
- // $nin: brokerIdentifierNin
481
- // }
482
- // });
483
- // }
484
- // const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
485
- // if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
486
- // andConditions.push({
487
- // 'broker.identifier': {
488
- // $exists: true,
489
- // $elemMatch: brokerIdentifierElemMatch
490
- // }
491
- // });
492
- // }
493
406
  /* istanbul ignore else */
494
407
  if (params.underName !== undefined) {
495
408
  /* istanbul ignore else */
@@ -606,49 +519,6 @@ function CREATE_MONGO_CONDITIONS(params) {
606
519
  });
607
520
  }
608
521
  }
609
- // /* istanbul ignore else */
610
- // if (params.underName.identifier !== undefined) {
611
- // if (Array.isArray(params.underName.identifier.$all)) {
612
- // andConditions.push({
613
- // 'underName.identifier': {
614
- // $exists: true,
615
- // $all: params.underName.identifier.$all
616
- // }
617
- // });
618
- // }
619
- // if (Array.isArray(params.underName.identifier.$in)) {
620
- // andConditions.push({
621
- // 'underName.identifier': {
622
- // $exists: true,
623
- // $in: params.underName.identifier.$in
624
- // }
625
- // });
626
- // }
627
- // if (Array.isArray(params.underName.identifier.$nin)) {
628
- // andConditions.push({
629
- // 'underName.identifier': {
630
- // $nin: params.underName.identifier.$nin
631
- // }
632
- // });
633
- // }
634
- // if (params.underName.identifier.$elemMatch !== undefined) {
635
- // andConditions.push({
636
- // 'underName.identifier': {
637
- // $exists: true,
638
- // $elemMatch: params.underName.identifier.$elemMatch
639
- // }
640
- // });
641
- // }
642
- // }
643
- // /* istanbul ignore else */
644
- // if (Array.isArray(params.underName.identifiers)) {
645
- // andConditions.push({
646
- // 'underName.identifier': {
647
- // $exists: true,
648
- // $in: params.underName.identifiers
649
- // }
650
- // });
651
- // }
652
522
  }
653
523
  /* istanbul ignore else */
654
524
  if (typeof params.attended === 'boolean') {
@@ -662,67 +532,5 @@ function CREATE_MONGO_CONDITIONS(params) {
662
532
  checkedIn: params.checkedIn
663
533
  });
664
534
  }
665
- // /* istanbul ignore else */
666
- // if (params.additionalProperty !== undefined) {
667
- // if (Array.isArray(params.additionalProperty.$all)) {
668
- // andConditions.push({
669
- // additionalProperty: {
670
- // $exists: true,
671
- // $all: params.additionalProperty.$all
672
- // }
673
- // });
674
- // }
675
- // if (Array.isArray(params.additionalProperty.$in)) {
676
- // andConditions.push({
677
- // additionalProperty: {
678
- // $exists: true,
679
- // $in: params.additionalProperty.$in
680
- // }
681
- // });
682
- // }
683
- // if (Array.isArray(params.additionalProperty.$nin)) {
684
- // andConditions.push({
685
- // additionalProperty: {
686
- // $nin: params.additionalProperty.$nin
687
- // }
688
- // });
689
- // }
690
- // if (params.additionalProperty.$elemMatch !== undefined) {
691
- // andConditions.push({
692
- // additionalProperty: {
693
- // $exists: true,
694
- // $elemMatch: params.additionalProperty.$elemMatch
695
- // }
696
- // });
697
- // }
698
- // }
699
- // const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
700
- // if (typeof programMembershipUsedIdentifierEq === 'string') {
701
- // andConditions.push({
702
- // 'programMembershipUsed.identifier': {
703
- // $exists: true,
704
- // $eq: programMembershipUsedIdentifierEq
705
- // }
706
- // });
707
- // }
708
- // const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
709
- // params.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
710
- // if (typeof programMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
711
- // andConditions.push({
712
- // 'programMembershipUsed.issuedThrough.serviceType.codeValue': {
713
- // $exists: true,
714
- // $eq: programMembershipUsedIssuedThroughServiceTypeCodeValueEq
715
- // }
716
- // });
717
- // }
718
- // const appliesToMovieTicketIdentifierEq = params.price?.priceComponent?.appliesToMovieTicket?.identifier?.$eq;
719
- // if (typeof appliesToMovieTicketIdentifierEq === 'string') {
720
- // andConditions.push({
721
- // 'price.priceComponent.appliesToMovieTicket.identifier': {
722
- // $exists: true,
723
- // $eq: appliesToMovieTicketIdentifierEq
724
- // }
725
- // });
726
- // }
727
535
  return andConditions;
728
536
  }