@chevre/domain 22.8.0-alpha.26 → 22.8.0-alpha.28

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.
@@ -336,16 +336,104 @@ export declare class ActionRepo {
336
336
  startFrom: Date;
337
337
  startThrough: Date;
338
338
  }): Promise<IAggregateAction>;
339
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
339
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
340
+ object: any;
341
+ error?: any;
342
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
343
+ typeOf: factory.actionType;
344
+ result?: any;
345
+ recipient?: import("@chevre/factory/lib/action").IParticipant | undefined;
346
+ agent: import("@chevre/factory/lib/action").IParticipant;
347
+ purpose?: import("@chevre/factory/lib/action").IPurpose | undefined;
348
+ targetCollection?: any;
349
+ potentialActions?: any;
340
350
  about?: any;
341
- }> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
351
+ instrument?: any;
352
+ location?: any;
353
+ endDate?: Date | undefined;
354
+ sameAs?: import("@chevre/factory/lib/action").ISameAs | undefined;
355
+ startDate: Date;
356
+ description?: string | undefined;
357
+ amount?: any;
358
+ fromLocation?: any;
359
+ toLocation?: any;
360
+ replacer?: any;
361
+ cancelAction?: any;
362
+ actionStatus: factory.actionStatusType;
363
+ }> & {
364
+ object: any;
365
+ error?: any;
366
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
367
+ typeOf: factory.actionType;
368
+ result?: any;
369
+ recipient?: import("@chevre/factory/lib/action").IParticipant | undefined;
370
+ agent: import("@chevre/factory/lib/action").IParticipant;
371
+ purpose?: import("@chevre/factory/lib/action").IPurpose | undefined;
372
+ targetCollection?: any;
373
+ potentialActions?: any;
342
374
  about?: any;
375
+ instrument?: any;
376
+ location?: any;
377
+ endDate?: Date | undefined;
378
+ sameAs?: import("@chevre/factory/lib/action").ISameAs | undefined;
379
+ startDate: Date;
380
+ description?: string | undefined;
381
+ amount?: any;
382
+ fromLocation?: any;
383
+ toLocation?: any;
384
+ replacer?: any;
385
+ cancelAction?: any;
386
+ actionStatus: factory.actionStatusType;
343
387
  } & {
344
388
  _id: import("mongoose").Types.ObjectId;
345
- }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
389
+ }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, {
390
+ object: any;
391
+ error?: any;
392
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
393
+ typeOf: factory.actionType;
394
+ result?: any;
395
+ recipient?: import("@chevre/factory/lib/action").IParticipant | undefined;
396
+ agent: import("@chevre/factory/lib/action").IParticipant;
397
+ purpose?: import("@chevre/factory/lib/action").IPurpose | undefined;
398
+ targetCollection?: any;
399
+ potentialActions?: any;
346
400
  about?: any;
347
- }> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
401
+ instrument?: any;
402
+ location?: any;
403
+ endDate?: Date | undefined;
404
+ sameAs?: import("@chevre/factory/lib/action").ISameAs | undefined;
405
+ startDate: Date;
406
+ description?: string | undefined;
407
+ amount?: any;
408
+ fromLocation?: any;
409
+ toLocation?: any;
410
+ replacer?: any;
411
+ cancelAction?: any;
412
+ actionStatus: factory.actionStatusType;
413
+ }> & {
414
+ object: any;
415
+ error?: any;
416
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
417
+ typeOf: factory.actionType;
418
+ result?: any;
419
+ recipient?: import("@chevre/factory/lib/action").IParticipant | undefined;
420
+ agent: import("@chevre/factory/lib/action").IParticipant;
421
+ purpose?: import("@chevre/factory/lib/action").IPurpose | undefined;
422
+ targetCollection?: any;
423
+ potentialActions?: any;
348
424
  about?: any;
425
+ instrument?: any;
426
+ location?: any;
427
+ endDate?: Date | undefined;
428
+ sameAs?: import("@chevre/factory/lib/action").ISameAs | undefined;
429
+ startDate: Date;
430
+ description?: string | undefined;
431
+ amount?: any;
432
+ fromLocation?: any;
433
+ toLocation?: any;
434
+ replacer?: any;
435
+ cancelAction?: any;
436
+ actionStatus: factory.actionStatusType;
349
437
  } & {
350
438
  _id: import("mongoose").Types.ObjectId;
351
439
  }>>;
@@ -61,7 +61,7 @@ class ActionRepo {
61
61
  }
62
62
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
63
63
  static CREATE_MONGO_CONDITIONS(params) {
64
- 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, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68;
64
+ 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, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72;
65
65
  const andConditions = [];
66
66
  const idIn = (_a = params.id) === null || _a === void 0 ? void 0 : _a.$in;
67
67
  if (Array.isArray(idIn)) {
@@ -105,7 +105,11 @@ class ActionRepo {
105
105
  if (typeof instrumentTypeOfEq === 'string') {
106
106
  andConditions.push({ 'instrument.typeOf': { $exists: true, $eq: instrumentTypeOfEq } });
107
107
  }
108
- const locationIdEq = (_p = (_o = params.location) === null || _o === void 0 ? void 0 : _o.id) === null || _p === void 0 ? void 0 : _p.$eq;
108
+ const instrumentIdentifierEq = (_p = (_o = params.instrument) === null || _o === void 0 ? void 0 : _o.identifier) === null || _p === void 0 ? void 0 : _p.$eq;
109
+ if (typeof instrumentIdentifierEq === 'string') {
110
+ andConditions.push({ 'instrument.identifier': { $exists: true, $eq: instrumentIdentifierEq } });
111
+ }
112
+ const locationIdEq = (_r = (_q = params.location) === null || _q === void 0 ? void 0 : _q.id) === null || _r === void 0 ? void 0 : _r.$eq;
109
113
  if (typeof locationIdEq === 'string') {
110
114
  andConditions.push({
111
115
  'location.id': {
@@ -114,7 +118,7 @@ class ActionRepo {
114
118
  }
115
119
  });
116
120
  }
117
- const locationIdentifierEq = (_r = (_q = params.location) === null || _q === void 0 ? void 0 : _q.identifier) === null || _r === void 0 ? void 0 : _r.$eq;
121
+ const locationIdentifierEq = (_t = (_s = params.location) === null || _s === void 0 ? void 0 : _s.identifier) === null || _t === void 0 ? void 0 : _t.$eq;
118
122
  if (typeof locationIdentifierEq === 'string') {
119
123
  andConditions.push({
120
124
  'location.identifier': {
@@ -123,7 +127,7 @@ class ActionRepo {
123
127
  }
124
128
  });
125
129
  }
126
- const objectMovieTicketsIdentifierEq = (_u = (_t = (_s = params.object) === null || _s === void 0 ? void 0 : _s.movieTickets) === null || _t === void 0 ? void 0 : _t.identifier) === null || _u === void 0 ? void 0 : _u.$eq;
130
+ const objectMovieTicketsIdentifierEq = (_w = (_v = (_u = params.object) === null || _u === void 0 ? void 0 : _u.movieTickets) === null || _v === void 0 ? void 0 : _v.identifier) === null || _w === void 0 ? void 0 : _w.$eq;
127
131
  if (typeof objectMovieTicketsIdentifierEq === 'string') {
128
132
  andConditions.push({
129
133
  'object.movieTickets.identifier': {
@@ -132,7 +136,7 @@ class ActionRepo {
132
136
  }
133
137
  });
134
138
  }
135
- const objectMovieTicketsServiceOutputReservationForIdEq = (_z = (_y = (_x = (_w = (_v = params.object) === null || _v === void 0 ? void 0 : _v.movieTickets) === null || _w === void 0 ? void 0 : _w.serviceOutput) === null || _x === void 0 ? void 0 : _x.reservationFor) === null || _y === void 0 ? void 0 : _y.id) === null || _z === void 0 ? void 0 : _z.$eq;
139
+ const objectMovieTicketsServiceOutputReservationForIdEq = (_1 = (_0 = (_z = (_y = (_x = params.object) === null || _x === void 0 ? void 0 : _x.movieTickets) === null || _y === void 0 ? void 0 : _y.serviceOutput) === null || _z === void 0 ? void 0 : _z.reservationFor) === null || _0 === void 0 ? void 0 : _0.id) === null || _1 === void 0 ? void 0 : _1.$eq;
136
140
  if (typeof objectMovieTicketsServiceOutputReservationForIdEq === 'string') {
137
141
  andConditions.push({
138
142
  'object.movieTickets.serviceOutput.reservationFor.id': {
@@ -141,7 +145,7 @@ class ActionRepo {
141
145
  }
142
146
  });
143
147
  }
144
- const objectPaymentMethodIdEq = (_1 = (_0 = params.object) === null || _0 === void 0 ? void 0 : _0.paymentMethodId) === null || _1 === void 0 ? void 0 : _1.$eq;
148
+ const objectPaymentMethodIdEq = (_3 = (_2 = params.object) === null || _2 === void 0 ? void 0 : _2.paymentMethodId) === null || _3 === void 0 ? void 0 : _3.$eq;
145
149
  if (typeof objectPaymentMethodIdEq === 'string') {
146
150
  andConditions.push({
147
151
  'object.paymentMethodId': {
@@ -150,7 +154,7 @@ class ActionRepo {
150
154
  }
151
155
  });
152
156
  }
153
- const objectObjectPaymentMethodIdEq = (_4 = (_3 = (_2 = params.object) === null || _2 === void 0 ? void 0 : _2.object) === null || _3 === void 0 ? void 0 : _3.paymentMethodId) === null || _4 === void 0 ? void 0 : _4.$eq;
157
+ const objectObjectPaymentMethodIdEq = (_6 = (_5 = (_4 = params.object) === null || _4 === void 0 ? void 0 : _4.object) === null || _5 === void 0 ? void 0 : _5.paymentMethodId) === null || _6 === void 0 ? void 0 : _6.$eq;
154
158
  if (typeof objectObjectPaymentMethodIdEq === 'string') {
155
159
  andConditions.push({
156
160
  'object.object.paymentMethodId': {
@@ -159,7 +163,7 @@ class ActionRepo {
159
163
  }
160
164
  });
161
165
  }
162
- const objectReservationForIdEq = (_7 = (_6 = (_5 = params.object) === null || _5 === void 0 ? void 0 : _5.reservationFor) === null || _6 === void 0 ? void 0 : _6.id) === null || _7 === void 0 ? void 0 : _7.$eq;
166
+ const objectReservationForIdEq = (_9 = (_8 = (_7 = params.object) === null || _7 === void 0 ? void 0 : _7.reservationFor) === null || _8 === void 0 ? void 0 : _8.id) === null || _9 === void 0 ? void 0 : _9.$eq;
163
167
  if (typeof objectReservationForIdEq === 'string') {
164
168
  andConditions.push({
165
169
  'object.reservationFor.id': {
@@ -168,7 +172,7 @@ class ActionRepo {
168
172
  }
169
173
  });
170
174
  }
171
- const objectReservationNumberEq = (_9 = (_8 = params.object) === null || _8 === void 0 ? void 0 : _8.reservationNumber) === null || _9 === void 0 ? void 0 : _9.$eq;
175
+ const objectReservationNumberEq = (_11 = (_10 = params.object) === null || _10 === void 0 ? void 0 : _10.reservationNumber) === null || _11 === void 0 ? void 0 : _11.$eq;
172
176
  if (typeof objectReservationNumberEq === 'string') {
173
177
  andConditions.push({
174
178
  'object.reservationNumber': {
@@ -177,7 +181,7 @@ class ActionRepo {
177
181
  }
178
182
  });
179
183
  }
180
- const objectReservationNumberIn = (_11 = (_10 = params.object) === null || _10 === void 0 ? void 0 : _10.reservationNumber) === null || _11 === void 0 ? void 0 : _11.$in;
184
+ const objectReservationNumberIn = (_13 = (_12 = params.object) === null || _12 === void 0 ? void 0 : _12.reservationNumber) === null || _13 === void 0 ? void 0 : _13.$in;
181
185
  if (Array.isArray(objectReservationNumberIn)) {
182
186
  andConditions.push({
183
187
  'object.reservationNumber': {
@@ -186,7 +190,7 @@ class ActionRepo {
186
190
  }
187
191
  });
188
192
  }
189
- const objectPaymentMethodAccountIdEq = (_14 = (_13 = (_12 = params.object) === null || _12 === void 0 ? void 0 : _12.paymentMethod) === null || _13 === void 0 ? void 0 : _13.accountId) === null || _14 === void 0 ? void 0 : _14.$eq;
193
+ const objectPaymentMethodAccountIdEq = (_16 = (_15 = (_14 = params.object) === null || _14 === void 0 ? void 0 : _14.paymentMethod) === null || _15 === void 0 ? void 0 : _15.accountId) === null || _16 === void 0 ? void 0 : _16.$eq;
190
194
  if (typeof objectPaymentMethodAccountIdEq === 'string') {
191
195
  andConditions.push({
192
196
  'object.paymentMethod.accountId': {
@@ -195,7 +199,7 @@ class ActionRepo {
195
199
  }
196
200
  });
197
201
  }
198
- const objectPaymentMethodPaymentMethodIdEq = (_17 = (_16 = (_15 = params.object) === null || _15 === void 0 ? void 0 : _15.paymentMethod) === null || _16 === void 0 ? void 0 : _16.paymentMethodId) === null || _17 === void 0 ? void 0 : _17.$eq;
202
+ const objectPaymentMethodPaymentMethodIdEq = (_19 = (_18 = (_17 = params.object) === null || _17 === void 0 ? void 0 : _17.paymentMethod) === null || _18 === void 0 ? void 0 : _18.paymentMethodId) === null || _19 === void 0 ? void 0 : _19.$eq;
199
203
  if (typeof objectPaymentMethodPaymentMethodIdEq === 'string') {
200
204
  andConditions.push({
201
205
  'object.paymentMethod.paymentMethodId': {
@@ -204,7 +208,7 @@ class ActionRepo {
204
208
  }
205
209
  });
206
210
  }
207
- const objectPaymentMethodPaymentMethodIdIn = (_20 = (_19 = (_18 = params.object) === null || _18 === void 0 ? void 0 : _18.paymentMethod) === null || _19 === void 0 ? void 0 : _19.paymentMethodId) === null || _20 === void 0 ? void 0 : _20.$in;
211
+ const objectPaymentMethodPaymentMethodIdIn = (_22 = (_21 = (_20 = params.object) === null || _20 === void 0 ? void 0 : _20.paymentMethod) === null || _21 === void 0 ? void 0 : _21.paymentMethodId) === null || _22 === void 0 ? void 0 : _22.$in;
208
212
  if (Array.isArray(objectPaymentMethodPaymentMethodIdIn)) {
209
213
  andConditions.push({
210
214
  'object.paymentMethod.paymentMethodId': {
@@ -213,7 +217,7 @@ class ActionRepo {
213
217
  }
214
218
  });
215
219
  }
216
- const objectPaymentMethodTypeOfEq = (_23 = (_22 = (_21 = params.object) === null || _21 === void 0 ? void 0 : _21.paymentMethod) === null || _22 === void 0 ? void 0 : _22.typeOf) === null || _23 === void 0 ? void 0 : _23.$eq;
220
+ const objectPaymentMethodTypeOfEq = (_25 = (_24 = (_23 = params.object) === null || _23 === void 0 ? void 0 : _23.paymentMethod) === null || _24 === void 0 ? void 0 : _24.typeOf) === null || _25 === void 0 ? void 0 : _25.$eq;
217
221
  if (typeof objectPaymentMethodTypeOfEq === 'string') {
218
222
  andConditions.push({
219
223
  'object.paymentMethod.typeOf': {
@@ -222,7 +226,7 @@ class ActionRepo {
222
226
  }
223
227
  });
224
228
  }
225
- const objectTypeOfEq = (_25 = (_24 = params.object) === null || _24 === void 0 ? void 0 : _24.typeOf) === null || _25 === void 0 ? void 0 : _25.$eq;
229
+ const objectTypeOfEq = (_27 = (_26 = params.object) === null || _26 === void 0 ? void 0 : _26.typeOf) === null || _27 === void 0 ? void 0 : _27.$eq;
226
230
  if (typeof objectTypeOfEq === 'string') {
227
231
  andConditions.push({
228
232
  'object.typeOf': {
@@ -231,7 +235,7 @@ class ActionRepo {
231
235
  }
232
236
  });
233
237
  }
234
- const objectTypeOfIn = (_27 = (_26 = params.object) === null || _26 === void 0 ? void 0 : _26.typeOf) === null || _27 === void 0 ? void 0 : _27.$in;
238
+ const objectTypeOfIn = (_29 = (_28 = params.object) === null || _28 === void 0 ? void 0 : _28.typeOf) === null || _29 === void 0 ? void 0 : _29.$in;
235
239
  if (Array.isArray(objectTypeOfIn)) {
236
240
  andConditions.push({
237
241
  'object.typeOf': {
@@ -240,7 +244,7 @@ class ActionRepo {
240
244
  }
241
245
  });
242
246
  }
243
- const objectIdEq = (_29 = (_28 = params.object) === null || _28 === void 0 ? void 0 : _28.id) === null || _29 === void 0 ? void 0 : _29.$eq;
247
+ const objectIdEq = (_31 = (_30 = params.object) === null || _30 === void 0 ? void 0 : _30.id) === null || _31 === void 0 ? void 0 : _31.$eq;
244
248
  if (typeof objectIdEq === 'string') {
245
249
  andConditions.push({
246
250
  'object.id': {
@@ -249,7 +253,7 @@ class ActionRepo {
249
253
  }
250
254
  });
251
255
  }
252
- const objectIdIn = (_31 = (_30 = params.object) === null || _30 === void 0 ? void 0 : _30.id) === null || _31 === void 0 ? void 0 : _31.$in;
256
+ const objectIdIn = (_33 = (_32 = params.object) === null || _32 === void 0 ? void 0 : _32.id) === null || _33 === void 0 ? void 0 : _33.$in;
253
257
  if (Array.isArray(objectIdIn)) {
254
258
  andConditions.push({
255
259
  'object.id': {
@@ -258,7 +262,7 @@ class ActionRepo {
258
262
  }
259
263
  });
260
264
  }
261
- const objectOrderNumberIn = (_33 = (_32 = params.object) === null || _32 === void 0 ? void 0 : _32.orderNumber) === null || _33 === void 0 ? void 0 : _33.$in;
265
+ const objectOrderNumberIn = (_35 = (_34 = params.object) === null || _34 === void 0 ? void 0 : _34.orderNumber) === null || _35 === void 0 ? void 0 : _35.$in;
262
266
  if (Array.isArray(objectOrderNumberIn)) {
263
267
  andConditions.push({
264
268
  'object.orderNumber': {
@@ -267,7 +271,7 @@ class ActionRepo {
267
271
  }
268
272
  });
269
273
  }
270
- const objectEventIdIn = (_36 = (_35 = (_34 = params.object) === null || _34 === void 0 ? void 0 : _34.event) === null || _35 === void 0 ? void 0 : _35.id) === null || _36 === void 0 ? void 0 : _36.$in;
274
+ const objectEventIdIn = (_38 = (_37 = (_36 = params.object) === null || _36 === void 0 ? void 0 : _36.event) === null || _37 === void 0 ? void 0 : _37.id) === null || _38 === void 0 ? void 0 : _38.$in;
271
275
  if (Array.isArray(objectEventIdIn)) {
272
276
  andConditions.push({
273
277
  'object.event.id': {
@@ -287,7 +291,7 @@ class ActionRepo {
287
291
  // }
288
292
  // });
289
293
  // }
290
- const objectTransactionNumberEq = (_38 = (_37 = params.object) === null || _37 === void 0 ? void 0 : _37.transactionNumber) === null || _38 === void 0 ? void 0 : _38.$eq;
294
+ const objectTransactionNumberEq = (_40 = (_39 = params.object) === null || _39 === void 0 ? void 0 : _39.transactionNumber) === null || _40 === void 0 ? void 0 : _40.$eq;
291
295
  if (typeof objectTransactionNumberEq === 'string') {
292
296
  andConditions.push({ 'object.transactionNumber': { $exists: true, $eq: objectTransactionNumberEq } });
293
297
  }
@@ -297,14 +301,14 @@ class ActionRepo {
297
301
  });
298
302
  }
299
303
  else {
300
- const typeOfEq = (_39 = params.typeOf) === null || _39 === void 0 ? void 0 : _39.$eq;
304
+ const typeOfEq = (_41 = params.typeOf) === null || _41 === void 0 ? void 0 : _41.$eq;
301
305
  if (typeof typeOfEq === 'string') {
302
306
  andConditions.push({
303
307
  typeOf: { $eq: typeOfEq }
304
308
  });
305
309
  }
306
310
  }
307
- const actionStatusIn = (_40 = params.actionStatus) === null || _40 === void 0 ? void 0 : _40.$in;
311
+ const actionStatusIn = (_42 = params.actionStatus) === null || _42 === void 0 ? void 0 : _42.$in;
308
312
  if (Array.isArray(actionStatusIn)) {
309
313
  andConditions.push({
310
314
  actionStatus: { $in: actionStatusIn }
@@ -327,7 +331,7 @@ class ActionRepo {
327
331
  startDate: { $lte: startDateLte }
328
332
  });
329
333
  }
330
- const fromLocationTypeOfIn = (_42 = (_41 = params.fromLocation) === null || _41 === void 0 ? void 0 : _41.typeOf) === null || _42 === void 0 ? void 0 : _42.$in;
334
+ const fromLocationTypeOfIn = (_44 = (_43 = params.fromLocation) === null || _43 === void 0 ? void 0 : _43.typeOf) === null || _44 === void 0 ? void 0 : _44.$in;
331
335
  if (Array.isArray(fromLocationTypeOfIn)) {
332
336
  andConditions.push({
333
337
  'fromLocation.typeOf': {
@@ -336,7 +340,7 @@ class ActionRepo {
336
340
  }
337
341
  });
338
342
  }
339
- const fromLocationAccountNumberIn = (_44 = (_43 = params.fromLocation) === null || _43 === void 0 ? void 0 : _43.accountNumber) === null || _44 === void 0 ? void 0 : _44.$in;
343
+ const fromLocationAccountNumberIn = (_46 = (_45 = params.fromLocation) === null || _45 === void 0 ? void 0 : _45.accountNumber) === null || _46 === void 0 ? void 0 : _46.$in;
340
344
  if (Array.isArray(fromLocationAccountNumberIn)) {
341
345
  andConditions.push({
342
346
  'fromLocation.accountNumber': {
@@ -345,7 +349,7 @@ class ActionRepo {
345
349
  }
346
350
  });
347
351
  }
348
- const fromLocationAccountTypeIn = (_46 = (_45 = params.fromLocation) === null || _45 === void 0 ? void 0 : _45.accountType) === null || _46 === void 0 ? void 0 : _46.$in;
352
+ const fromLocationAccountTypeIn = (_48 = (_47 = params.fromLocation) === null || _47 === void 0 ? void 0 : _47.accountType) === null || _48 === void 0 ? void 0 : _48.$in;
349
353
  if (Array.isArray(fromLocationAccountTypeIn)) {
350
354
  andConditions.push({
351
355
  'fromLocation.accountType': {
@@ -354,7 +358,7 @@ class ActionRepo {
354
358
  }
355
359
  });
356
360
  }
357
- const toLocationTypeOfIn = (_48 = (_47 = params.toLocation) === null || _47 === void 0 ? void 0 : _47.typeOf) === null || _48 === void 0 ? void 0 : _48.$in;
361
+ const toLocationTypeOfIn = (_50 = (_49 = params.toLocation) === null || _49 === void 0 ? void 0 : _49.typeOf) === null || _50 === void 0 ? void 0 : _50.$in;
358
362
  if (Array.isArray(toLocationTypeOfIn)) {
359
363
  andConditions.push({
360
364
  'toLocation.typeOf': {
@@ -363,7 +367,7 @@ class ActionRepo {
363
367
  }
364
368
  });
365
369
  }
366
- const toLocationAccountNumberIn = (_50 = (_49 = params.toLocation) === null || _49 === void 0 ? void 0 : _49.accountNumber) === null || _50 === void 0 ? void 0 : _50.$in;
370
+ const toLocationAccountNumberIn = (_52 = (_51 = params.toLocation) === null || _51 === void 0 ? void 0 : _51.accountNumber) === null || _52 === void 0 ? void 0 : _52.$in;
367
371
  if (Array.isArray(toLocationAccountNumberIn)) {
368
372
  andConditions.push({
369
373
  'toLocation.accountNumber': {
@@ -372,7 +376,7 @@ class ActionRepo {
372
376
  }
373
377
  });
374
378
  }
375
- const toLocationAccountTypeIn = (_52 = (_51 = params.toLocation) === null || _51 === void 0 ? void 0 : _51.accountType) === null || _52 === void 0 ? void 0 : _52.$in;
379
+ const toLocationAccountTypeIn = (_54 = (_53 = params.toLocation) === null || _53 === void 0 ? void 0 : _53.accountType) === null || _54 === void 0 ? void 0 : _54.$in;
376
380
  if (Array.isArray(toLocationAccountTypeIn)) {
377
381
  andConditions.push({
378
382
  'toLocation.accountType': {
@@ -381,7 +385,7 @@ class ActionRepo {
381
385
  }
382
386
  });
383
387
  }
384
- const purposeTypeOfIn = (_54 = (_53 = params.purpose) === null || _53 === void 0 ? void 0 : _53.typeOf) === null || _54 === void 0 ? void 0 : _54.$in;
388
+ const purposeTypeOfIn = (_56 = (_55 = params.purpose) === null || _55 === void 0 ? void 0 : _55.typeOf) === null || _56 === void 0 ? void 0 : _56.$in;
385
389
  if (Array.isArray(purposeTypeOfIn)) {
386
390
  andConditions.push({
387
391
  'purpose.typeOf': {
@@ -390,7 +394,7 @@ class ActionRepo {
390
394
  }
391
395
  });
392
396
  }
393
- const purposeIdIn = (_56 = (_55 = params.purpose) === null || _55 === void 0 ? void 0 : _55.id) === null || _56 === void 0 ? void 0 : _56.$in;
397
+ const purposeIdIn = (_58 = (_57 = params.purpose) === null || _57 === void 0 ? void 0 : _57.id) === null || _58 === void 0 ? void 0 : _58.$in;
394
398
  if (Array.isArray(purposeIdIn)) {
395
399
  andConditions.push({
396
400
  'purpose.id': {
@@ -399,7 +403,7 @@ class ActionRepo {
399
403
  }
400
404
  });
401
405
  }
402
- const purposeOrderNumberIn = (_58 = (_57 = params.purpose) === null || _57 === void 0 ? void 0 : _57.orderNumber) === null || _58 === void 0 ? void 0 : _58.$in;
406
+ const purposeOrderNumberIn = (_60 = (_59 = params.purpose) === null || _59 === void 0 ? void 0 : _59.orderNumber) === null || _60 === void 0 ? void 0 : _60.$in;
403
407
  if (Array.isArray(purposeOrderNumberIn)) {
404
408
  andConditions.push({
405
409
  'purpose.orderNumber': {
@@ -408,7 +412,7 @@ class ActionRepo {
408
412
  }
409
413
  });
410
414
  }
411
- const resultTypeOfIn = (_60 = (_59 = params.result) === null || _59 === void 0 ? void 0 : _59.typeOf) === null || _60 === void 0 ? void 0 : _60.$in;
415
+ const resultTypeOfIn = (_62 = (_61 = params.result) === null || _61 === void 0 ? void 0 : _61.typeOf) === null || _62 === void 0 ? void 0 : _62.$in;
412
416
  if (Array.isArray(resultTypeOfIn)) {
413
417
  andConditions.push({
414
418
  'result.typeOf': {
@@ -417,7 +421,7 @@ class ActionRepo {
417
421
  }
418
422
  });
419
423
  }
420
- const resultIdIn = (_62 = (_61 = params.result) === null || _61 === void 0 ? void 0 : _61.id) === null || _62 === void 0 ? void 0 : _62.$in;
424
+ const resultIdIn = (_64 = (_63 = params.result) === null || _63 === void 0 ? void 0 : _63.id) === null || _64 === void 0 ? void 0 : _64.$in;
421
425
  if (Array.isArray(resultIdIn)) {
422
426
  andConditions.push({
423
427
  'result.id': {
@@ -426,7 +430,7 @@ class ActionRepo {
426
430
  }
427
431
  });
428
432
  }
429
- const resultOrderNumberIn = (_64 = (_63 = params.result) === null || _63 === void 0 ? void 0 : _63.orderNumber) === null || _64 === void 0 ? void 0 : _64.$in;
433
+ const resultOrderNumberIn = (_66 = (_65 = params.result) === null || _65 === void 0 ? void 0 : _65.orderNumber) === null || _66 === void 0 ? void 0 : _66.$in;
430
434
  if (Array.isArray(resultOrderNumberIn)) {
431
435
  andConditions.push({
432
436
  'result.orderNumber': {
@@ -435,7 +439,7 @@ class ActionRepo {
435
439
  }
436
440
  });
437
441
  }
438
- const resultCodeIn = (_66 = (_65 = params.result) === null || _65 === void 0 ? void 0 : _65.code) === null || _66 === void 0 ? void 0 : _66.$in;
442
+ const resultCodeIn = (_68 = (_67 = params.result) === null || _67 === void 0 ? void 0 : _67.code) === null || _68 === void 0 ? void 0 : _68.$in;
439
443
  if (Array.isArray(resultCodeIn)) {
440
444
  andConditions.push({
441
445
  'result.code': {
@@ -445,10 +449,14 @@ class ActionRepo {
445
449
  });
446
450
  }
447
451
  // sameAs(2024-04-23~)
448
- const sameAsIdEq = (_68 = (_67 = params.sameAs) === null || _67 === void 0 ? void 0 : _67.id) === null || _68 === void 0 ? void 0 : _68.$eq;
452
+ const sameAsIdEq = (_70 = (_69 = params.sameAs) === null || _69 === void 0 ? void 0 : _69.id) === null || _70 === void 0 ? void 0 : _70.$eq;
449
453
  if (typeof sameAsIdEq === 'string') {
450
454
  andConditions.push({ 'sameAs.id': { $exists: true, $eq: sameAsIdEq } });
451
455
  }
456
+ const aboutOrderNumberEq = (_72 = (_71 = params.about) === null || _71 === void 0 ? void 0 : _71.orderNumber) === null || _72 === void 0 ? void 0 : _72.$eq;
457
+ if (typeof aboutOrderNumberEq === 'string') {
458
+ andConditions.push({ 'about.orderNumber': { $exists: true, $eq: aboutOrderNumberEq } });
459
+ }
452
460
  return andConditions;
453
461
  }
454
462
  /**
@@ -1,8 +1,6 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import * as factory from '../../../factory';
3
- type IDocType = Omit<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>, 'id'> & {
4
- about?: any;
5
- };
3
+ type IDocType = Omit<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>, 'id'>;
6
4
  type IModel = Model<IDocType>;
7
5
  type ISchemaDefinition = SchemaDefinition<IDocType>;
8
6
  type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
@@ -390,6 +390,15 @@ const indexes = [
390
390
  }
391
391
  }
392
392
  ],
393
+ [
394
+ { 'instrument.identifier': 1, startDate: -1 },
395
+ {
396
+ name: 'instrumentIdentifier',
397
+ partialFilterExpression: {
398
+ 'instrument.identifier': { $exists: true }
399
+ }
400
+ }
401
+ ],
393
402
  [
394
403
  { 'object.transactionNumber': 1, startDate: -1 },
395
404
  {
@@ -242,8 +242,9 @@ function sleep(waitTime) {
242
242
  });
243
243
  }
244
244
  function createInformActionAttributes(params) {
245
- const { object, purpose, recipient, project } = params;
246
- return Object.assign({ agent: { id: project.id, typeOf: factory.organizationType.Project }, object, project: { id: project.id, typeOf: factory.organizationType.Project }, recipient, typeOf: factory.actionType.InformAction }, (typeof (purpose === null || purpose === void 0 ? void 0 : purpose.typeOf) === 'string') ? { purpose } : undefined);
245
+ const { about, object, purpose, recipient, project } = params;
246
+ return Object.assign(Object.assign({ agent: { id: project.id, typeOf: factory.organizationType.Project }, object, project: { id: project.id, typeOf: factory.organizationType.Project }, recipient, typeOf: factory.actionType.InformAction }, (typeof (purpose === null || purpose === void 0 ? void 0 : purpose.typeOf) === 'string') ? { purpose } : undefined), (typeof (about === null || about === void 0 ? void 0 : about.typeOf) === 'string') ? { about } : undefined // add(2025-01-23~)
247
+ );
247
248
  }
248
249
  function signRequest(params) {
249
250
  const { requestBody, timestamp, secretKey } = params;
package/package.json CHANGED
@@ -11,8 +11,8 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "4.392.0-alpha.18",
15
- "@cinerino/sdk": "10.20.0-alpha.10",
14
+ "@chevre/factory": "4.392.0",
15
+ "@cinerino/sdk": "10.20.0",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.3.0",
18
18
  "@sendgrid/mail": "6.4.0",
@@ -112,5 +112,5 @@
112
112
  "postversion": "git push origin --tags",
113
113
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
114
114
  },
115
- "version": "22.8.0-alpha.26"
115
+ "version": "22.8.0-alpha.28"
116
116
  }