@chevre/domain 21.8.0-alpha.46 → 21.8.0-alpha.48

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.
@@ -8,19 +8,28 @@ async function main() {
8
8
 
9
9
  const aggregateOfferRepo = new chevre.repository.AggregateOffer(mongoose.connection);
10
10
 
11
- const offers = await aggregateOfferRepo.search({
12
- limit: 10,
13
- // page: 1,
14
- project: { id: { $eq: String(process.env.PROJECT_ID) } },
15
- availability: { $eq: chevre.factory.itemAvailability.InStock },
16
- itemOffered: { typeOf: { $eq: chevre.factory.product.ProductType.EventService } },
17
- // identifier: { $eq: '901' },
18
- sort: {
19
- 'priceSpecification.price': 1,
20
- identifier: 1
11
+ const offers = await aggregateOfferRepo.search(
12
+ {
13
+ limit: 10,
14
+ // page: 1,
15
+ project: { id: { $eq: String(process.env.PROJECT_ID) } },
16
+ availability: { $eq: chevre.factory.itemAvailability.InStock },
17
+ itemOffered: { typeOf: { $eq: chevre.factory.product.ProductType.EventService } },
18
+ // identifier: { $eq: '901' },
19
+ sort: {
20
+ 'priceSpecification.price': 1,
21
+ identifier: 1
22
+ }
23
+ },
24
+ {
25
+ id: 1,
26
+ identifier: 1,
27
+ name: 1,
28
+ priceSpecification: 1
21
29
  }
22
- });
30
+ );
23
31
  console.log(offers);
32
+ console.log(offers[0]?.offers);
24
33
  console.log(offers.map((offer) => {
25
34
  return `${offer.project.id} ${(<any>offer).offerCount} ${offer.offers[0].identifier} ${offer.offers[0].name.ja} ${offer.offers[0].priceSpecification.price}`;
26
35
  }));
@@ -5,7 +5,7 @@ import { chevre } from '../../../lib/index';
5
5
 
6
6
  // tslint:disable-next-line:max-func-body-length
7
7
  async function main() {
8
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: true });
8
+ await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
9
9
 
10
10
  const offerRepo = new chevre.repository.Offer(mongoose.connection);
11
11
 
@@ -69,8 +69,9 @@ async function main() {
69
69
  // $eq: ''
70
70
  }
71
71
  },
72
+ // parentOffer: { id: { $in: ['901'] } },
72
73
  id: {
73
- // $eq: '1001'
74
+ // $eq: '901'
74
75
  // $in: string[];
75
76
  },
76
77
  identifier: {
@@ -391,7 +391,7 @@ class MongoRepository {
391
391
  return matchStages;
392
392
  }
393
393
  static CREATE_AGGREGATE_OFFERS_PROJECTION(params) {
394
- const projectStage = {
394
+ let projectStage = {
395
395
  _id: 0,
396
396
  id: '$_id',
397
397
  typeOf: '$typeOf',
@@ -406,16 +406,21 @@ class MongoRepository {
406
406
  const negativeProjectionFields = Object.keys(params)
407
407
  .filter((key) => params[key] === 0);
408
408
  if (positiveProjectionFields.length > 0) {
409
- // projectStage = {
410
- // _id: 0,
411
- // offerIndex: `$${OFFERS_ARRAY_INDEX_NAME}`,
412
- // parentOffer: {
413
- // id: '$_id'
414
- // }
415
- // };
416
- // positiveProjectionFields.forEach((field) => {
417
- // projectStage[field] = `$offers.${field}`;
418
- // });
409
+ projectStage = {
410
+ _id: 0,
411
+ id: '$_id',
412
+ typeOf: '$typeOf',
413
+ project: '$project',
414
+ // offers: [{ $first: '$offers' }],
415
+ highPrice: { $max: '$offers.priceSpecification.price' },
416
+ lowPrice: { $min: '$offers.priceSpecification.price' },
417
+ offerCount: { $size: '$offers' }
418
+ };
419
+ const offersProjection = {};
420
+ positiveProjectionFields.forEach((field) => {
421
+ offersProjection[field] = { $first: `$offers.${field}` };
422
+ });
423
+ projectStage.offers = [offersProjection];
419
424
  }
420
425
  else if (negativeProjectionFields.length > 0) {
421
426
  negativeProjectionFields.forEach((field) => {
@@ -48,7 +48,7 @@ class MongoRepository {
48
48
  }
49
49
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
50
50
  static CREATE_OFFER_MONGO_CONDITIONS(params) {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38;
52
52
  // MongoDB検索条件
53
53
  const andConditions = [];
54
54
  const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
@@ -59,7 +59,11 @@ class MongoRepository {
59
59
  }
60
60
  });
61
61
  }
62
- const idEq = (_c = params.id) === null || _c === void 0 ? void 0 : _c.$eq;
62
+ const parentOfferIdIn = (_d = (_c = params.parentOffer) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$in;
63
+ if (Array.isArray(parentOfferIdIn)) {
64
+ andConditions.push({ _id: { $in: parentOfferIdIn } });
65
+ }
66
+ const idEq = (_e = params.id) === null || _e === void 0 ? void 0 : _e.$eq;
63
67
  if (typeof idEq === 'string') {
64
68
  andConditions.push({
65
69
  _id: {
@@ -67,7 +71,7 @@ class MongoRepository {
67
71
  }
68
72
  });
69
73
  }
70
- const idIn = (_d = params.id) === null || _d === void 0 ? void 0 : _d.$in;
74
+ const idIn = (_f = params.id) === null || _f === void 0 ? void 0 : _f.$in;
71
75
  if (Array.isArray(idIn)) {
72
76
  andConditions.push({
73
77
  _id: {
@@ -75,7 +79,7 @@ class MongoRepository {
75
79
  }
76
80
  });
77
81
  }
78
- const identifierEq = (_e = params.identifier) === null || _e === void 0 ? void 0 : _e.$eq;
82
+ const identifierEq = (_g = params.identifier) === null || _g === void 0 ? void 0 : _g.$eq;
79
83
  if (typeof identifierEq === 'string') {
80
84
  andConditions.push({
81
85
  identifier: {
@@ -84,7 +88,7 @@ class MongoRepository {
84
88
  }
85
89
  });
86
90
  }
87
- const identifierIn = (_f = params.identifier) === null || _f === void 0 ? void 0 : _f.$in;
91
+ const identifierIn = (_h = params.identifier) === null || _h === void 0 ? void 0 : _h.$in;
88
92
  if (Array.isArray(identifierIn)) {
89
93
  andConditions.push({
90
94
  identifier: {
@@ -93,7 +97,7 @@ class MongoRepository {
93
97
  }
94
98
  });
95
99
  }
96
- const identifierRegex = (_g = params.identifier) === null || _g === void 0 ? void 0 : _g.$regex;
100
+ const identifierRegex = (_j = params.identifier) === null || _j === void 0 ? void 0 : _j.$regex;
97
101
  if (typeof identifierRegex === 'string' && identifierRegex.length > 0) {
98
102
  andConditions.push({
99
103
  identifier: {
@@ -102,7 +106,7 @@ class MongoRepository {
102
106
  }
103
107
  });
104
108
  }
105
- const nameRegex = (_h = params.name) === null || _h === void 0 ? void 0 : _h.$regex;
109
+ const nameRegex = (_k = params.name) === null || _k === void 0 ? void 0 : _k.$regex;
106
110
  if (typeof nameRegex === 'string' && nameRegex.length > 0) {
107
111
  const nameRegexExp = new RegExp(nameRegex);
108
112
  andConditions.push({
@@ -134,7 +138,7 @@ class MongoRepository {
134
138
  ]
135
139
  });
136
140
  }
137
- const itemOfferedTypeOfEq = (_k = (_j = params.itemOffered) === null || _j === void 0 ? void 0 : _j.typeOf) === null || _k === void 0 ? void 0 : _k.$eq;
141
+ const itemOfferedTypeOfEq = (_m = (_l = params.itemOffered) === null || _l === void 0 ? void 0 : _l.typeOf) === null || _m === void 0 ? void 0 : _m.$eq;
138
142
  if (typeof itemOfferedTypeOfEq === 'string') {
139
143
  andConditions.push({
140
144
  'itemOffered.typeOf': {
@@ -143,7 +147,7 @@ class MongoRepository {
143
147
  }
144
148
  });
145
149
  }
146
- const categoryCodeValueIn = (_m = (_l = params.category) === null || _l === void 0 ? void 0 : _l.codeValue) === null || _m === void 0 ? void 0 : _m.$in;
150
+ const categoryCodeValueIn = (_p = (_o = params.category) === null || _o === void 0 ? void 0 : _o.codeValue) === null || _p === void 0 ? void 0 : _p.$in;
147
151
  if (Array.isArray(categoryCodeValueIn)) {
148
152
  andConditions.push({
149
153
  'category.codeValue': {
@@ -152,7 +156,7 @@ class MongoRepository {
152
156
  }
153
157
  });
154
158
  }
155
- const eligibleMembershipTypeCodeValueEq = (_p = (_o = params.eligibleMembershipType) === null || _o === void 0 ? void 0 : _o.codeValue) === null || _p === void 0 ? void 0 : _p.$eq;
159
+ const eligibleMembershipTypeCodeValueEq = (_r = (_q = params.eligibleMembershipType) === null || _q === void 0 ? void 0 : _q.codeValue) === null || _r === void 0 ? void 0 : _r.$eq;
156
160
  if (typeof eligibleMembershipTypeCodeValueEq === 'string') {
157
161
  andConditions.push({
158
162
  'eligibleMembershipType.codeValue': {
@@ -161,7 +165,7 @@ class MongoRepository {
161
165
  }
162
166
  });
163
167
  }
164
- const eligibleMonetaryAmountCurrencyEq = (_r = (_q = params.eligibleMonetaryAmount) === null || _q === void 0 ? void 0 : _q.currency) === null || _r === void 0 ? void 0 : _r.$eq;
168
+ const eligibleMonetaryAmountCurrencyEq = (_t = (_s = params.eligibleMonetaryAmount) === null || _s === void 0 ? void 0 : _s.currency) === null || _t === void 0 ? void 0 : _t.$eq;
165
169
  if (typeof eligibleMonetaryAmountCurrencyEq === 'string') {
166
170
  andConditions.push({
167
171
  'eligibleMonetaryAmount.currency': {
@@ -170,7 +174,7 @@ class MongoRepository {
170
174
  }
171
175
  });
172
176
  }
173
- const eligibleSeatingTypeCodeValueEq = (_t = (_s = params.eligibleSeatingType) === null || _s === void 0 ? void 0 : _s.codeValue) === null || _t === void 0 ? void 0 : _t.$eq;
177
+ const eligibleSeatingTypeCodeValueEq = (_v = (_u = params.eligibleSeatingType) === null || _u === void 0 ? void 0 : _u.codeValue) === null || _v === void 0 ? void 0 : _v.$eq;
174
178
  if (typeof eligibleSeatingTypeCodeValueEq === 'string') {
175
179
  andConditions.push({
176
180
  'eligibleSeatingType.codeValue': {
@@ -179,7 +183,7 @@ class MongoRepository {
179
183
  }
180
184
  });
181
185
  }
182
- const appliesToMovieTicketServiceTypeExist = (_w = (_v = (_u = params.priceSpecification) === null || _u === void 0 ? void 0 : _u.appliesToMovieTicket) === null || _v === void 0 ? void 0 : _v.serviceType) === null || _w === void 0 ? void 0 : _w.$exists;
186
+ const appliesToMovieTicketServiceTypeExist = (_y = (_x = (_w = params.priceSpecification) === null || _w === void 0 ? void 0 : _w.appliesToMovieTicket) === null || _x === void 0 ? void 0 : _x.serviceType) === null || _y === void 0 ? void 0 : _y.$exists;
183
187
  if (typeof appliesToMovieTicketServiceTypeExist === 'boolean') {
184
188
  andConditions.push({
185
189
  'priceSpecification.appliesToMovieTicket.serviceType': {
@@ -187,7 +191,7 @@ class MongoRepository {
187
191
  }
188
192
  });
189
193
  }
190
- const appliesToMovieTicketServiceTypeEq = (_z = (_y = (_x = params.priceSpecification) === null || _x === void 0 ? void 0 : _x.appliesToMovieTicket) === null || _y === void 0 ? void 0 : _y.serviceType) === null || _z === void 0 ? void 0 : _z.$eq;
194
+ const appliesToMovieTicketServiceTypeEq = (_1 = (_0 = (_z = params.priceSpecification) === null || _z === void 0 ? void 0 : _z.appliesToMovieTicket) === null || _0 === void 0 ? void 0 : _0.serviceType) === null || _1 === void 0 ? void 0 : _1.$eq;
191
195
  if (typeof appliesToMovieTicketServiceTypeEq === 'string') {
192
196
  andConditions.push({
193
197
  'priceSpecification.appliesToMovieTicket.serviceType': {
@@ -196,7 +200,7 @@ class MongoRepository {
196
200
  }
197
201
  });
198
202
  }
199
- const appliesToMovieTicketServiceOutputTypeOfEq = (_3 = (_2 = (_1 = (_0 = params.priceSpecification) === null || _0 === void 0 ? void 0 : _0.appliesToMovieTicket) === null || _1 === void 0 ? void 0 : _1.serviceOutput) === null || _2 === void 0 ? void 0 : _2.typeOf) === null || _3 === void 0 ? void 0 : _3.$eq;
203
+ const appliesToMovieTicketServiceOutputTypeOfEq = (_5 = (_4 = (_3 = (_2 = params.priceSpecification) === null || _2 === void 0 ? void 0 : _2.appliesToMovieTicket) === null || _3 === void 0 ? void 0 : _3.serviceOutput) === null || _4 === void 0 ? void 0 : _4.typeOf) === null || _5 === void 0 ? void 0 : _5.$eq;
200
204
  if (typeof appliesToMovieTicketServiceOutputTypeOfEq === 'string') {
201
205
  andConditions.push({
202
206
  'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': {
@@ -205,7 +209,7 @@ class MongoRepository {
205
209
  }
206
210
  });
207
211
  }
208
- const appliesToMovieTicketServiceOutputTypeOfNin = (_7 = (_6 = (_5 = (_4 = params.priceSpecification) === null || _4 === void 0 ? void 0 : _4.appliesToMovieTicket) === null || _5 === void 0 ? void 0 : _5.serviceOutput) === null || _6 === void 0 ? void 0 : _6.typeOf) === null || _7 === void 0 ? void 0 : _7.$nin;
212
+ const appliesToMovieTicketServiceOutputTypeOfNin = (_9 = (_8 = (_7 = (_6 = params.priceSpecification) === null || _6 === void 0 ? void 0 : _6.appliesToMovieTicket) === null || _7 === void 0 ? void 0 : _7.serviceOutput) === null || _8 === void 0 ? void 0 : _8.typeOf) === null || _9 === void 0 ? void 0 : _9.$nin;
209
213
  if (Array.isArray(appliesToMovieTicketServiceOutputTypeOfNin)) {
210
214
  andConditions.push({
211
215
  'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': {
@@ -214,7 +218,7 @@ class MongoRepository {
214
218
  });
215
219
  }
216
220
  if (params.priceSpecification !== undefined && params.priceSpecification !== null) {
217
- const priceSpecificationPriceGte = (_8 = params.priceSpecification.price) === null || _8 === void 0 ? void 0 : _8.$gte;
221
+ const priceSpecificationPriceGte = (_10 = params.priceSpecification.price) === null || _10 === void 0 ? void 0 : _10.$gte;
218
222
  if (typeof priceSpecificationPriceGte === 'number') {
219
223
  andConditions.push({
220
224
  'priceSpecification.price': {
@@ -223,7 +227,7 @@ class MongoRepository {
223
227
  }
224
228
  });
225
229
  }
226
- const priceSpecificationPriceLte = (_9 = params.priceSpecification.price) === null || _9 === void 0 ? void 0 : _9.$lte;
230
+ const priceSpecificationPriceLte = (_11 = params.priceSpecification.price) === null || _11 === void 0 ? void 0 : _11.$lte;
227
231
  if (typeof priceSpecificationPriceLte === 'number') {
228
232
  andConditions.push({
229
233
  'priceSpecification.price': {
@@ -232,7 +236,7 @@ class MongoRepository {
232
236
  }
233
237
  });
234
238
  }
235
- const accountsReceivableGte = (_11 = (_10 = params.priceSpecification.accounting) === null || _10 === void 0 ? void 0 : _10.accountsReceivable) === null || _11 === void 0 ? void 0 : _11.$gte;
239
+ const accountsReceivableGte = (_13 = (_12 = params.priceSpecification.accounting) === null || _12 === void 0 ? void 0 : _12.accountsReceivable) === null || _13 === void 0 ? void 0 : _13.$gte;
236
240
  if (typeof accountsReceivableGte === 'number') {
237
241
  andConditions.push({
238
242
  'priceSpecification.accounting.accountsReceivable': {
@@ -241,7 +245,7 @@ class MongoRepository {
241
245
  }
242
246
  });
243
247
  }
244
- const accountsReceivableLte = (_13 = (_12 = params.priceSpecification.accounting) === null || _12 === void 0 ? void 0 : _12.accountsReceivable) === null || _13 === void 0 ? void 0 : _13.$lte;
248
+ const accountsReceivableLte = (_15 = (_14 = params.priceSpecification.accounting) === null || _14 === void 0 ? void 0 : _14.accountsReceivable) === null || _15 === void 0 ? void 0 : _15.$lte;
245
249
  if (typeof accountsReceivableLte === 'number') {
246
250
  andConditions.push({
247
251
  'priceSpecification.accounting.accountsReceivable': {
@@ -250,7 +254,7 @@ class MongoRepository {
250
254
  }
251
255
  });
252
256
  }
253
- const accountingCodeValueEq = (_16 = (_15 = (_14 = params.priceSpecification.accounting) === null || _14 === void 0 ? void 0 : _14.operatingRevenue) === null || _15 === void 0 ? void 0 : _15.codeValue) === null || _16 === void 0 ? void 0 : _16.$eq;
257
+ const accountingCodeValueEq = (_18 = (_17 = (_16 = params.priceSpecification.accounting) === null || _16 === void 0 ? void 0 : _16.operatingRevenue) === null || _17 === void 0 ? void 0 : _17.codeValue) === null || _18 === void 0 ? void 0 : _18.$eq;
254
258
  if (typeof accountingCodeValueEq === 'string') {
255
259
  andConditions.push({
256
260
  'priceSpecification.accounting.operatingRevenue.codeValue': {
@@ -259,7 +263,7 @@ class MongoRepository {
259
263
  }
260
264
  });
261
265
  }
262
- const accountingCodeValueIn = (_19 = (_18 = (_17 = params.priceSpecification.accounting) === null || _17 === void 0 ? void 0 : _17.operatingRevenue) === null || _18 === void 0 ? void 0 : _18.codeValue) === null || _19 === void 0 ? void 0 : _19.$in;
266
+ const accountingCodeValueIn = (_21 = (_20 = (_19 = params.priceSpecification.accounting) === null || _19 === void 0 ? void 0 : _19.operatingRevenue) === null || _20 === void 0 ? void 0 : _20.codeValue) === null || _21 === void 0 ? void 0 : _21.$in;
263
267
  if (Array.isArray(accountingCodeValueIn)) {
264
268
  andConditions.push({
265
269
  'priceSpecification.accounting.operatingRevenue.codeValue': {
@@ -268,7 +272,7 @@ class MongoRepository {
268
272
  }
269
273
  });
270
274
  }
271
- const referenceQuantityValueEq = (_21 = (_20 = params.priceSpecification.referenceQuantity) === null || _20 === void 0 ? void 0 : _20.value) === null || _21 === void 0 ? void 0 : _21.$eq;
275
+ const referenceQuantityValueEq = (_23 = (_22 = params.priceSpecification.referenceQuantity) === null || _22 === void 0 ? void 0 : _22.value) === null || _23 === void 0 ? void 0 : _23.$eq;
272
276
  if (typeof referenceQuantityValueEq === 'number') {
273
277
  andConditions.push({
274
278
  'priceSpecification.referenceQuantity.value': {
@@ -278,11 +282,11 @@ class MongoRepository {
278
282
  });
279
283
  }
280
284
  }
281
- const availabilityEq = (_22 = params.availability) === null || _22 === void 0 ? void 0 : _22.$eq;
285
+ const availabilityEq = (_24 = params.availability) === null || _24 === void 0 ? void 0 : _24.$eq;
282
286
  if (typeof availabilityEq === 'string') {
283
287
  andConditions.push({ availability: { $eq: availabilityEq } });
284
288
  }
285
- const availableAtOrFromIdEq = (_24 = (_23 = params.availableAtOrFrom) === null || _23 === void 0 ? void 0 : _23.id) === null || _24 === void 0 ? void 0 : _24.$eq;
289
+ const availableAtOrFromIdEq = (_26 = (_25 = params.availableAtOrFrom) === null || _25 === void 0 ? void 0 : _25.id) === null || _26 === void 0 ? void 0 : _26.$eq;
286
290
  if (typeof availableAtOrFromIdEq === 'string') {
287
291
  andConditions.push({
288
292
  'availableAtOrFrom.id': {
@@ -291,7 +295,7 @@ class MongoRepository {
291
295
  }
292
296
  });
293
297
  }
294
- const availableAtOrFromIdIn = (_26 = (_25 = params.availableAtOrFrom) === null || _25 === void 0 ? void 0 : _25.id) === null || _26 === void 0 ? void 0 : _26.$in;
298
+ const availableAtOrFromIdIn = (_28 = (_27 = params.availableAtOrFrom) === null || _27 === void 0 ? void 0 : _27.id) === null || _28 === void 0 ? void 0 : _28.$in;
295
299
  if (Array.isArray(availableAtOrFromIdIn)) {
296
300
  andConditions.push({
297
301
  'availableAtOrFrom.id': {
@@ -300,19 +304,19 @@ class MongoRepository {
300
304
  }
301
305
  });
302
306
  }
303
- const addOnItemOfferedIdEq = (_29 = (_28 = (_27 = params.addOn) === null || _27 === void 0 ? void 0 : _27.itemOffered) === null || _28 === void 0 ? void 0 : _28.id) === null || _29 === void 0 ? void 0 : _29.$eq;
307
+ const addOnItemOfferedIdEq = (_31 = (_30 = (_29 = params.addOn) === null || _29 === void 0 ? void 0 : _29.itemOffered) === null || _30 === void 0 ? void 0 : _30.id) === null || _31 === void 0 ? void 0 : _31.$eq;
304
308
  if (typeof addOnItemOfferedIdEq === 'string') {
305
309
  andConditions.push({
306
310
  'addOn.itemOffered.id': { $exists: true, $eq: addOnItemOfferedIdEq }
307
311
  });
308
312
  }
309
- const addOnItemOfferedIdIn = (_32 = (_31 = (_30 = params.addOn) === null || _30 === void 0 ? void 0 : _30.itemOffered) === null || _31 === void 0 ? void 0 : _31.id) === null || _32 === void 0 ? void 0 : _32.$in;
313
+ const addOnItemOfferedIdIn = (_34 = (_33 = (_32 = params.addOn) === null || _32 === void 0 ? void 0 : _32.itemOffered) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$in;
310
314
  if (Array.isArray(addOnItemOfferedIdIn)) {
311
315
  andConditions.push({
312
316
  'addOn.itemOffered.id': { $exists: true, $in: addOnItemOfferedIdIn }
313
317
  });
314
318
  }
315
- const hasMerchantReturnPolicyIdEq = (_34 = (_33 = params.hasMerchantReturnPolicy) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$eq;
319
+ const hasMerchantReturnPolicyIdEq = (_36 = (_35 = params.hasMerchantReturnPolicy) === null || _35 === void 0 ? void 0 : _35.id) === null || _36 === void 0 ? void 0 : _36.$eq;
316
320
  if (typeof hasMerchantReturnPolicyIdEq === 'string') {
317
321
  andConditions.push({
318
322
  'hasMerchantReturnPolicy.id': {
@@ -321,7 +325,7 @@ class MongoRepository {
321
325
  }
322
326
  });
323
327
  }
324
- const additionalPropertyAll = (_35 = params.additionalProperty) === null || _35 === void 0 ? void 0 : _35.$all;
328
+ const additionalPropertyAll = (_37 = params.additionalProperty) === null || _37 === void 0 ? void 0 : _37.$all;
325
329
  if (Array.isArray(additionalPropertyAll)) {
326
330
  andConditions.push({
327
331
  additionalProperty: {
@@ -330,7 +334,7 @@ class MongoRepository {
330
334
  }
331
335
  });
332
336
  }
333
- const additionalPropertyElemMatch = (_36 = params.additionalProperty) === null || _36 === void 0 ? void 0 : _36.$elemMatch;
337
+ const additionalPropertyElemMatch = (_38 = params.additionalProperty) === null || _38 === void 0 ? void 0 : _38.$elemMatch;
334
338
  if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
335
339
  andConditions.push({
336
340
  additionalProperty: {
@@ -357,124 +361,85 @@ class MongoRepository {
357
361
  }
358
362
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
359
363
  static CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params) {
360
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
364
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38;
361
365
  const matchStages = [];
362
366
  const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
363
367
  if (typeof projectIdEq === 'string') {
364
368
  matchStages.push({
365
- $match: {
366
- 'project.id': { $eq: projectIdEq }
367
- }
369
+ $match: { 'project.id': { $eq: projectIdEq } }
368
370
  });
369
371
  }
370
- const idEq = (_c = params.id) === null || _c === void 0 ? void 0 : _c.$eq;
372
+ const parentOfferIdIn = (_d = (_c = params.parentOffer) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$in;
373
+ if (Array.isArray(parentOfferIdIn)) {
374
+ matchStages.push({ $match: { _id: { $in: parentOfferIdIn } } });
375
+ }
376
+ const idEq = (_e = params.id) === null || _e === void 0 ? void 0 : _e.$eq;
371
377
  if (typeof idEq === 'string') {
372
378
  matchStages.push({
373
- $match: {
374
- 'offers.id': { $eq: idEq }
375
- }
379
+ $match: { 'offers.id': { $eq: idEq } }
376
380
  });
377
381
  }
378
- const idIn = (_d = params.id) === null || _d === void 0 ? void 0 : _d.$in;
382
+ const idIn = (_f = params.id) === null || _f === void 0 ? void 0 : _f.$in;
379
383
  if (Array.isArray(idIn)) {
380
384
  matchStages.push({
381
- $match: {
382
- 'offers.id': {
383
- $in: idIn
384
- }
385
- }
385
+ $match: { 'offers.id': { $in: idIn } }
386
386
  });
387
387
  }
388
- const identifierEq = (_e = params.identifier) === null || _e === void 0 ? void 0 : _e.$eq;
388
+ const identifierEq = (_g = params.identifier) === null || _g === void 0 ? void 0 : _g.$eq;
389
389
  if (typeof identifierEq === 'string') {
390
390
  matchStages.push({
391
391
  $match: {
392
- 'offers.identifier': {
393
- $exists: true,
394
- $eq: identifierEq
395
- }
392
+ 'offers.identifier': { $exists: true, $eq: identifierEq }
396
393
  }
397
394
  });
398
395
  }
399
- const identifierIn = (_f = params.identifier) === null || _f === void 0 ? void 0 : _f.$in;
396
+ const identifierIn = (_h = params.identifier) === null || _h === void 0 ? void 0 : _h.$in;
400
397
  if (Array.isArray(identifierIn)) {
401
398
  matchStages.push({
402
399
  $match: {
403
- 'offers.identifier': {
404
- $exists: true,
405
- $in: identifierIn
406
- }
400
+ 'offers.identifier': { $exists: true, $in: identifierIn }
407
401
  }
408
402
  });
409
403
  }
410
- const identifierRegex = (_g = params.identifier) === null || _g === void 0 ? void 0 : _g.$regex;
404
+ const identifierRegex = (_j = params.identifier) === null || _j === void 0 ? void 0 : _j.$regex;
411
405
  if (typeof identifierRegex === 'string' && identifierRegex.length > 0) {
412
406
  matchStages.push({
413
407
  $match: {
414
- 'offers.identifier': {
415
- $exists: true,
416
- $regex: new RegExp(identifierRegex)
417
- }
408
+ 'offers.identifier': { $exists: true, $regex: new RegExp(identifierRegex) }
418
409
  }
419
410
  });
420
411
  }
421
- const nameRegex = (_h = params.name) === null || _h === void 0 ? void 0 : _h.$regex;
412
+ const nameRegex = (_k = params.name) === null || _k === void 0 ? void 0 : _k.$regex;
422
413
  if (typeof nameRegex === 'string' && nameRegex.length > 0) {
423
414
  const nameRegexExp = new RegExp(nameRegex);
424
415
  matchStages.push({
425
416
  $match: {
426
417
  $or: [
427
- {
428
- 'offers.name.ja': {
429
- $exists: true,
430
- $regex: nameRegexExp
431
- }
432
- },
433
- {
434
- 'offers.name.en': {
435
- $exists: true,
436
- $regex: nameRegexExp
437
- }
438
- },
439
- {
440
- 'offers.alternateName.ja': {
441
- $exists: true,
442
- $regex: nameRegexExp
443
- }
444
- },
445
- {
446
- 'offers.alternateName.en': {
447
- $exists: true,
448
- $regex: nameRegexExp
449
- }
450
- }
418
+ { 'offers.name.ja': { $exists: true, $regex: nameRegexExp } },
419
+ { 'offers.name.en': { $exists: true, $regex: nameRegexExp } },
420
+ { 'offers.alternateName.ja': { $exists: true, $regex: nameRegexExp } },
421
+ { 'offers.alternateName.en': { $exists: true, $regex: nameRegexExp } }
451
422
  ]
452
423
  }
453
424
  });
454
425
  }
455
- const itemOfferedTypeOfEq = (_k = (_j = params.itemOffered) === null || _j === void 0 ? void 0 : _j.typeOf) === null || _k === void 0 ? void 0 : _k.$eq;
426
+ const itemOfferedTypeOfEq = (_m = (_l = params.itemOffered) === null || _l === void 0 ? void 0 : _l.typeOf) === null || _m === void 0 ? void 0 : _m.$eq;
456
427
  if (typeof itemOfferedTypeOfEq === 'string') {
457
428
  matchStages.push({
458
429
  $match: {
459
- 'offers.itemOffered.typeOf': {
460
- $exists: true,
461
- $eq: itemOfferedTypeOfEq
462
- }
430
+ 'offers.itemOffered.typeOf': { $exists: true, $eq: itemOfferedTypeOfEq }
463
431
  }
464
432
  });
465
433
  }
466
- const categoryCodeValueIn = (_m = (_l = params.category) === null || _l === void 0 ? void 0 : _l.codeValue) === null || _m === void 0 ? void 0 : _m.$in;
434
+ const categoryCodeValueIn = (_p = (_o = params.category) === null || _o === void 0 ? void 0 : _o.codeValue) === null || _p === void 0 ? void 0 : _p.$in;
467
435
  if (Array.isArray(categoryCodeValueIn)) {
468
436
  matchStages.push({
469
437
  $match: {
470
- 'offers.category.codeValue': {
471
- $exists: true,
472
- $in: categoryCodeValueIn
473
- }
438
+ 'offers.category.codeValue': { $exists: true, $in: categoryCodeValueIn }
474
439
  }
475
440
  });
476
441
  }
477
- const eligibleMembershipTypeCodeValueEq = (_p = (_o = params.eligibleMembershipType) === null || _o === void 0 ? void 0 : _o.codeValue) === null || _p === void 0 ? void 0 : _p.$eq;
442
+ const eligibleMembershipTypeCodeValueEq = (_r = (_q = params.eligibleMembershipType) === null || _q === void 0 ? void 0 : _q.codeValue) === null || _r === void 0 ? void 0 : _r.$eq;
478
443
  if (typeof eligibleMembershipTypeCodeValueEq === 'string') {
479
444
  matchStages.push({
480
445
  $match: {
@@ -485,7 +450,7 @@ class MongoRepository {
485
450
  }
486
451
  });
487
452
  }
488
- const eligibleMonetaryAmountCurrencyEq = (_r = (_q = params.eligibleMonetaryAmount) === null || _q === void 0 ? void 0 : _q.currency) === null || _r === void 0 ? void 0 : _r.$eq;
453
+ const eligibleMonetaryAmountCurrencyEq = (_t = (_s = params.eligibleMonetaryAmount) === null || _s === void 0 ? void 0 : _s.currency) === null || _t === void 0 ? void 0 : _t.$eq;
489
454
  if (typeof eligibleMonetaryAmountCurrencyEq === 'string') {
490
455
  matchStages.push({
491
456
  $match: {
@@ -496,7 +461,7 @@ class MongoRepository {
496
461
  }
497
462
  });
498
463
  }
499
- const eligibleSeatingTypeCodeValueEq = (_t = (_s = params.eligibleSeatingType) === null || _s === void 0 ? void 0 : _s.codeValue) === null || _t === void 0 ? void 0 : _t.$eq;
464
+ const eligibleSeatingTypeCodeValueEq = (_v = (_u = params.eligibleSeatingType) === null || _u === void 0 ? void 0 : _u.codeValue) === null || _v === void 0 ? void 0 : _v.$eq;
500
465
  if (typeof eligibleSeatingTypeCodeValueEq === 'string') {
501
466
  matchStages.push({
502
467
  $match: {
@@ -507,7 +472,7 @@ class MongoRepository {
507
472
  }
508
473
  });
509
474
  }
510
- const appliesToMovieTicketServiceTypeExist = (_w = (_v = (_u = params.priceSpecification) === null || _u === void 0 ? void 0 : _u.appliesToMovieTicket) === null || _v === void 0 ? void 0 : _v.serviceType) === null || _w === void 0 ? void 0 : _w.$exists;
475
+ const appliesToMovieTicketServiceTypeExist = (_y = (_x = (_w = params.priceSpecification) === null || _w === void 0 ? void 0 : _w.appliesToMovieTicket) === null || _x === void 0 ? void 0 : _x.serviceType) === null || _y === void 0 ? void 0 : _y.$exists;
511
476
  if (typeof appliesToMovieTicketServiceTypeExist === 'boolean') {
512
477
  matchStages.push({
513
478
  $match: {
@@ -517,7 +482,7 @@ class MongoRepository {
517
482
  }
518
483
  });
519
484
  }
520
- const appliesToMovieTicketServiceTypeEq = (_z = (_y = (_x = params.priceSpecification) === null || _x === void 0 ? void 0 : _x.appliesToMovieTicket) === null || _y === void 0 ? void 0 : _y.serviceType) === null || _z === void 0 ? void 0 : _z.$eq;
485
+ const appliesToMovieTicketServiceTypeEq = (_1 = (_0 = (_z = params.priceSpecification) === null || _z === void 0 ? void 0 : _z.appliesToMovieTicket) === null || _0 === void 0 ? void 0 : _0.serviceType) === null || _1 === void 0 ? void 0 : _1.$eq;
521
486
  if (typeof appliesToMovieTicketServiceTypeEq === 'string') {
522
487
  matchStages.push({
523
488
  $match: {
@@ -528,7 +493,7 @@ class MongoRepository {
528
493
  }
529
494
  });
530
495
  }
531
- const appliesToMovieTicketServiceOutputTypeOfEq = (_3 = (_2 = (_1 = (_0 = params.priceSpecification) === null || _0 === void 0 ? void 0 : _0.appliesToMovieTicket) === null || _1 === void 0 ? void 0 : _1.serviceOutput) === null || _2 === void 0 ? void 0 : _2.typeOf) === null || _3 === void 0 ? void 0 : _3.$eq;
496
+ const appliesToMovieTicketServiceOutputTypeOfEq = (_5 = (_4 = (_3 = (_2 = params.priceSpecification) === null || _2 === void 0 ? void 0 : _2.appliesToMovieTicket) === null || _3 === void 0 ? void 0 : _3.serviceOutput) === null || _4 === void 0 ? void 0 : _4.typeOf) === null || _5 === void 0 ? void 0 : _5.$eq;
532
497
  if (typeof appliesToMovieTicketServiceOutputTypeOfEq === 'string') {
533
498
  matchStages.push({
534
499
  $match: {
@@ -539,7 +504,7 @@ class MongoRepository {
539
504
  }
540
505
  });
541
506
  }
542
- const appliesToMovieTicketServiceOutputTypeOfNin = (_7 = (_6 = (_5 = (_4 = params.priceSpecification) === null || _4 === void 0 ? void 0 : _4.appliesToMovieTicket) === null || _5 === void 0 ? void 0 : _5.serviceOutput) === null || _6 === void 0 ? void 0 : _6.typeOf) === null || _7 === void 0 ? void 0 : _7.$nin;
507
+ const appliesToMovieTicketServiceOutputTypeOfNin = (_9 = (_8 = (_7 = (_6 = params.priceSpecification) === null || _6 === void 0 ? void 0 : _6.appliesToMovieTicket) === null || _7 === void 0 ? void 0 : _7.serviceOutput) === null || _8 === void 0 ? void 0 : _8.typeOf) === null || _9 === void 0 ? void 0 : _9.$nin;
543
508
  if (Array.isArray(appliesToMovieTicketServiceOutputTypeOfNin)) {
544
509
  matchStages.push({
545
510
  $match: {
@@ -550,7 +515,7 @@ class MongoRepository {
550
515
  });
551
516
  }
552
517
  if (params.priceSpecification !== undefined && params.priceSpecification !== null) {
553
- const priceSpecificationPriceGte = (_8 = params.priceSpecification.price) === null || _8 === void 0 ? void 0 : _8.$gte;
518
+ const priceSpecificationPriceGte = (_10 = params.priceSpecification.price) === null || _10 === void 0 ? void 0 : _10.$gte;
554
519
  if (typeof priceSpecificationPriceGte === 'number') {
555
520
  matchStages.push({
556
521
  $match: {
@@ -561,7 +526,7 @@ class MongoRepository {
561
526
  }
562
527
  });
563
528
  }
564
- const priceSpecificationPriceLte = (_9 = params.priceSpecification.price) === null || _9 === void 0 ? void 0 : _9.$lte;
529
+ const priceSpecificationPriceLte = (_11 = params.priceSpecification.price) === null || _11 === void 0 ? void 0 : _11.$lte;
565
530
  if (typeof priceSpecificationPriceLte === 'number') {
566
531
  matchStages.push({
567
532
  $match: {
@@ -572,7 +537,7 @@ class MongoRepository {
572
537
  }
573
538
  });
574
539
  }
575
- const accountsReceivableGte = (_11 = (_10 = params.priceSpecification.accounting) === null || _10 === void 0 ? void 0 : _10.accountsReceivable) === null || _11 === void 0 ? void 0 : _11.$gte;
540
+ const accountsReceivableGte = (_13 = (_12 = params.priceSpecification.accounting) === null || _12 === void 0 ? void 0 : _12.accountsReceivable) === null || _13 === void 0 ? void 0 : _13.$gte;
576
541
  if (typeof accountsReceivableGte === 'number') {
577
542
  matchStages.push({
578
543
  $match: {
@@ -583,7 +548,7 @@ class MongoRepository {
583
548
  }
584
549
  });
585
550
  }
586
- const accountsReceivableLte = (_13 = (_12 = params.priceSpecification.accounting) === null || _12 === void 0 ? void 0 : _12.accountsReceivable) === null || _13 === void 0 ? void 0 : _13.$lte;
551
+ const accountsReceivableLte = (_15 = (_14 = params.priceSpecification.accounting) === null || _14 === void 0 ? void 0 : _14.accountsReceivable) === null || _15 === void 0 ? void 0 : _15.$lte;
587
552
  if (typeof accountsReceivableLte === 'number') {
588
553
  matchStages.push({
589
554
  $match: {
@@ -594,7 +559,7 @@ class MongoRepository {
594
559
  }
595
560
  });
596
561
  }
597
- const accountingCodeValueEq = (_16 = (_15 = (_14 = params.priceSpecification.accounting) === null || _14 === void 0 ? void 0 : _14.operatingRevenue) === null || _15 === void 0 ? void 0 : _15.codeValue) === null || _16 === void 0 ? void 0 : _16.$eq;
562
+ const accountingCodeValueEq = (_18 = (_17 = (_16 = params.priceSpecification.accounting) === null || _16 === void 0 ? void 0 : _16.operatingRevenue) === null || _17 === void 0 ? void 0 : _17.codeValue) === null || _18 === void 0 ? void 0 : _18.$eq;
598
563
  if (typeof accountingCodeValueEq === 'string') {
599
564
  matchStages.push({
600
565
  $match: {
@@ -605,7 +570,7 @@ class MongoRepository {
605
570
  }
606
571
  });
607
572
  }
608
- const accountingCodeValueIn = (_19 = (_18 = (_17 = params.priceSpecification.accounting) === null || _17 === void 0 ? void 0 : _17.operatingRevenue) === null || _18 === void 0 ? void 0 : _18.codeValue) === null || _19 === void 0 ? void 0 : _19.$in;
573
+ const accountingCodeValueIn = (_21 = (_20 = (_19 = params.priceSpecification.accounting) === null || _19 === void 0 ? void 0 : _19.operatingRevenue) === null || _20 === void 0 ? void 0 : _20.codeValue) === null || _21 === void 0 ? void 0 : _21.$in;
609
574
  if (Array.isArray(accountingCodeValueIn)) {
610
575
  matchStages.push({
611
576
  $match: {
@@ -616,7 +581,7 @@ class MongoRepository {
616
581
  }
617
582
  });
618
583
  }
619
- const referenceQuantityValueEq = (_21 = (_20 = params.priceSpecification.referenceQuantity) === null || _20 === void 0 ? void 0 : _20.value) === null || _21 === void 0 ? void 0 : _21.$eq;
584
+ const referenceQuantityValueEq = (_23 = (_22 = params.priceSpecification.referenceQuantity) === null || _22 === void 0 ? void 0 : _22.value) === null || _23 === void 0 ? void 0 : _23.$eq;
620
585
  if (typeof referenceQuantityValueEq === 'number') {
621
586
  matchStages.push({
622
587
  $match: {
@@ -628,7 +593,7 @@ class MongoRepository {
628
593
  });
629
594
  }
630
595
  }
631
- const availabilityEq = (_22 = params.availability) === null || _22 === void 0 ? void 0 : _22.$eq;
596
+ const availabilityEq = (_24 = params.availability) === null || _24 === void 0 ? void 0 : _24.$eq;
632
597
  if (typeof availabilityEq === 'string') {
633
598
  matchStages.push({
634
599
  $match: {
@@ -636,7 +601,7 @@ class MongoRepository {
636
601
  }
637
602
  });
638
603
  }
639
- const availableAtOrFromIdEq = (_24 = (_23 = params.availableAtOrFrom) === null || _23 === void 0 ? void 0 : _23.id) === null || _24 === void 0 ? void 0 : _24.$eq;
604
+ const availableAtOrFromIdEq = (_26 = (_25 = params.availableAtOrFrom) === null || _25 === void 0 ? void 0 : _25.id) === null || _26 === void 0 ? void 0 : _26.$eq;
640
605
  if (typeof availableAtOrFromIdEq === 'string') {
641
606
  matchStages.push({
642
607
  $match: {
@@ -647,7 +612,7 @@ class MongoRepository {
647
612
  }
648
613
  });
649
614
  }
650
- const availableAtOrFromIdIn = (_26 = (_25 = params.availableAtOrFrom) === null || _25 === void 0 ? void 0 : _25.id) === null || _26 === void 0 ? void 0 : _26.$in;
615
+ const availableAtOrFromIdIn = (_28 = (_27 = params.availableAtOrFrom) === null || _27 === void 0 ? void 0 : _27.id) === null || _28 === void 0 ? void 0 : _28.$in;
651
616
  if (Array.isArray(availableAtOrFromIdIn)) {
652
617
  matchStages.push({
653
618
  $match: {
@@ -658,7 +623,7 @@ class MongoRepository {
658
623
  }
659
624
  });
660
625
  }
661
- const addOnItemOfferedIdEq = (_29 = (_28 = (_27 = params.addOn) === null || _27 === void 0 ? void 0 : _27.itemOffered) === null || _28 === void 0 ? void 0 : _28.id) === null || _29 === void 0 ? void 0 : _29.$eq;
626
+ const addOnItemOfferedIdEq = (_31 = (_30 = (_29 = params.addOn) === null || _29 === void 0 ? void 0 : _29.itemOffered) === null || _30 === void 0 ? void 0 : _30.id) === null || _31 === void 0 ? void 0 : _31.$eq;
662
627
  if (typeof addOnItemOfferedIdEq === 'string') {
663
628
  matchStages.push({
664
629
  $match: {
@@ -666,7 +631,7 @@ class MongoRepository {
666
631
  }
667
632
  });
668
633
  }
669
- const addOnItemOfferedIdIn = (_32 = (_31 = (_30 = params.addOn) === null || _30 === void 0 ? void 0 : _30.itemOffered) === null || _31 === void 0 ? void 0 : _31.id) === null || _32 === void 0 ? void 0 : _32.$in;
634
+ const addOnItemOfferedIdIn = (_34 = (_33 = (_32 = params.addOn) === null || _32 === void 0 ? void 0 : _32.itemOffered) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$in;
670
635
  if (Array.isArray(addOnItemOfferedIdIn)) {
671
636
  matchStages.push({
672
637
  $match: {
@@ -674,7 +639,7 @@ class MongoRepository {
674
639
  }
675
640
  });
676
641
  }
677
- const hasMerchantReturnPolicyIdEq = (_34 = (_33 = params.hasMerchantReturnPolicy) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$eq;
642
+ const hasMerchantReturnPolicyIdEq = (_36 = (_35 = params.hasMerchantReturnPolicy) === null || _35 === void 0 ? void 0 : _35.id) === null || _36 === void 0 ? void 0 : _36.$eq;
678
643
  if (typeof hasMerchantReturnPolicyIdEq === 'string') {
679
644
  matchStages.push({
680
645
  $match: {
@@ -685,7 +650,7 @@ class MongoRepository {
685
650
  }
686
651
  });
687
652
  }
688
- const additionalPropertyAll = (_35 = params.additionalProperty) === null || _35 === void 0 ? void 0 : _35.$all;
653
+ const additionalPropertyAll = (_37 = params.additionalProperty) === null || _37 === void 0 ? void 0 : _37.$all;
689
654
  if (Array.isArray(additionalPropertyAll)) {
690
655
  matchStages.push({
691
656
  $match: {
@@ -696,7 +661,7 @@ class MongoRepository {
696
661
  }
697
662
  });
698
663
  }
699
- const additionalPropertyElemMatch = (_36 = params.additionalProperty) === null || _36 === void 0 ? void 0 : _36.$elemMatch;
664
+ const additionalPropertyElemMatch = (_38 = params.additionalProperty) === null || _38 === void 0 ? void 0 : _38.$elemMatch;
700
665
  if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
701
666
  matchStages.push({
702
667
  $match: {
@@ -2,7 +2,6 @@ import * as factory from '../../factory';
2
2
  type IMovieTicketTypeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.MovieTicketTypeChargeSpecification>;
3
3
  type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
4
4
  type ITicketOffer = factory.product.ITicketOffer & {
5
- offerIndex?: number;
6
5
  parentOffer?: {
7
6
  id: string;
8
7
  };
@@ -2,7 +2,6 @@ import * as factory from '../../../factory';
2
2
  import { MongoRepository as OfferRepo } from '../../../repo/offer';
3
3
  import { MongoRepository as ProductRepo } from '../../../repo/product';
4
4
  type ITicketOffer = factory.product.ITicketOffer & {
5
- offerIndex?: number;
6
5
  parentOffer?: {
7
6
  id: string;
8
7
  };
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.329.0-alpha.8",
13
- "@cinerino/sdk": "3.166.0",
12
+ "@chevre/factory": "4.329.0-alpha.10",
13
+ "@cinerino/sdk": "3.167.0-alpha.3",
14
14
  "@motionpicture/coa-service": "9.2.0",
15
15
  "@motionpicture/gmo-service": "5.2.0",
16
16
  "@sendgrid/mail": "6.4.0",
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.8.0-alpha.46"
120
+ "version": "21.8.0-alpha.48"
121
121
  }