@chevre/domain 20.2.0-alpha.8 → 20.2.0

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 (140) hide show
  1. package/example/src/chevre/aggregateEventReservation.ts +37 -0
  2. package/example/src/chevre/aggregation/aggregateSystem.ts +116 -0
  3. package/example/src/chevre/attendIfNotAttended.ts +22 -0
  4. package/example/src/chevre/createManyEventsIfNotExist.ts +209 -0
  5. package/example/src/chevre/findByOrderNumberAndReservationId.ts +20 -0
  6. package/example/src/chevre/findScreeningRoomsByBranchCode.ts +27 -0
  7. package/example/src/chevre/importEventsFromCOA.ts +8 -1
  8. package/example/src/chevre/migrateEventOffersItemOfferedAvailableChannel.ts +2 -1
  9. package/example/src/chevre/migrateOwnershipInfos2newUserPool.ts +1 -1
  10. package/example/src/chevre/migrateProjectSubscription.ts +51 -0
  11. package/example/src/chevre/ownershipInfosCsv2peopleJson.ts +2 -2
  12. package/example/src/chevre/processReserve.ts +2 -0
  13. package/example/src/chevre/searchEventIds.ts +24 -0
  14. package/example/src/chevre/searchEventTicketOffers.ts +5 -4
  15. package/example/src/chevre/searchEvents.ts +20 -41
  16. package/example/src/chevre/searchOffersByCatalog.ts +27 -0
  17. package/example/src/chevre/updateTransaction.ts +38 -0
  18. package/lib/chevre/factory/event.d.ts +2 -0
  19. package/lib/chevre/factory/event.js +2 -0
  20. package/lib/chevre/repo/action.d.ts +77 -1
  21. package/lib/chevre/repo/action.js +249 -6
  22. package/lib/chevre/repo/aggregation.d.ts +38 -0
  23. package/lib/chevre/repo/aggregation.js +68 -0
  24. package/lib/chevre/repo/assetTransaction.d.ts +32 -0
  25. package/lib/chevre/repo/assetTransaction.js +148 -0
  26. package/lib/chevre/repo/code.d.ts +13 -16
  27. package/lib/chevre/repo/code.js +33 -19
  28. package/lib/chevre/repo/creativeWork.js +13 -12
  29. package/lib/chevre/repo/event.d.ts +64 -17
  30. package/lib/chevre/repo/event.js +456 -156
  31. package/lib/chevre/repo/mongoose/model/aggregation.d.ts +7 -0
  32. package/lib/chevre/repo/mongoose/model/aggregation.js +47 -0
  33. package/lib/chevre/repo/mongoose/model/event.js +4 -3
  34. package/lib/chevre/repo/mongoose/model/offer.js +2 -1
  35. package/lib/chevre/repo/mongoose/model/project.js +7 -1
  36. package/lib/chevre/repo/mongoose/model/telemetry.js +4 -28
  37. package/lib/chevre/repo/offer.d.ts +10 -0
  38. package/lib/chevre/repo/offer.js +47 -16
  39. package/lib/chevre/repo/order.d.ts +6 -0
  40. package/lib/chevre/repo/order.js +53 -7
  41. package/lib/chevre/repo/place.d.ts +26 -1
  42. package/lib/chevre/repo/place.js +216 -12
  43. package/lib/chevre/repo/product.d.ts +1 -0
  44. package/lib/chevre/repo/product.js +5 -0
  45. package/lib/chevre/repo/project.d.ts +7 -1
  46. package/lib/chevre/repo/project.js +15 -6
  47. package/lib/chevre/repo/reservation.d.ts +7 -8
  48. package/lib/chevre/repo/reservation.js +181 -76
  49. package/lib/chevre/repo/task.d.ts +31 -4
  50. package/lib/chevre/repo/task.js +146 -33
  51. package/lib/chevre/repo/transaction.d.ts +57 -5
  52. package/lib/chevre/repo/transaction.js +228 -34
  53. package/lib/chevre/repo/trip.js +33 -27
  54. package/lib/chevre/repository.d.ts +3 -0
  55. package/lib/chevre/repository.js +5 -1
  56. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +86 -68
  57. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +5 -8
  58. package/lib/chevre/service/aggregation/system.d.ts +100 -0
  59. package/lib/chevre/service/aggregation/system.js +409 -0
  60. package/lib/chevre/service/aggregation.d.ts +2 -0
  61. package/lib/chevre/service/aggregation.js +3 -1
  62. package/lib/chevre/service/assetTransaction/pay/movieTicket/validation.js +5 -1
  63. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +2 -4
  64. package/lib/chevre/service/assetTransaction/pay.d.ts +19 -4
  65. package/lib/chevre/service/assetTransaction/pay.js +65 -32
  66. package/lib/chevre/service/assetTransaction/registerService.js +4 -1
  67. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +3 -0
  68. package/lib/chevre/service/assetTransaction/reserve/factory.js +33 -2
  69. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.d.ts +16 -0
  70. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.js +84 -0
  71. package/lib/chevre/service/assetTransaction/reserve.d.ts +38 -6
  72. package/lib/chevre/service/assetTransaction/reserve.js +120 -94
  73. package/lib/chevre/service/assetTransaction.d.ts +1 -1
  74. package/lib/chevre/service/code.d.ts +2 -3
  75. package/lib/chevre/service/delivery/factory.d.ts +1 -1
  76. package/lib/chevre/service/delivery/product/factory.js +9 -3
  77. package/lib/chevre/service/event.d.ts +2 -4
  78. package/lib/chevre/service/event.js +35 -14
  79. package/lib/chevre/service/offer/event/authorize.d.ts +4 -7
  80. package/lib/chevre/service/offer/event/authorize.js +33 -87
  81. package/lib/chevre/service/offer/event/cancel.js +0 -1
  82. package/lib/chevre/service/offer/event/factory.d.ts +3 -2
  83. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +14 -7
  84. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +95 -53
  85. package/lib/chevre/service/offer/event/voidTransaction.js +0 -2
  86. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -1
  87. package/lib/chevre/service/offer/eventServiceByCOA.js +10 -2
  88. package/lib/chevre/service/offer/factory.js +10 -3
  89. package/lib/chevre/service/offer/product/searchProductOffers.d.ts +1 -0
  90. package/lib/chevre/service/offer/product/searchProductOffers.js +1 -1
  91. package/lib/chevre/service/offer/product.d.ts +1 -0
  92. package/lib/chevre/service/offer/product.js +7 -2
  93. package/lib/chevre/service/offer.d.ts +13 -2
  94. package/lib/chevre/service/offer.js +68 -46
  95. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +25 -27
  96. package/lib/chevre/service/order/onOrderStatusChanged.js +2 -1
  97. package/lib/chevre/service/order/placeOrder.js +16 -0
  98. package/lib/chevre/service/order/returnOrder.js +6 -4
  99. package/lib/chevre/service/order/sendOrder.js +4 -2
  100. package/lib/chevre/service/payment/any.d.ts +9 -0
  101. package/lib/chevre/service/payment/any.js +16 -1
  102. package/lib/chevre/service/payment/movieTicket.d.ts +2 -2
  103. package/lib/chevre/service/payment/movieTicket.js +8 -2
  104. package/lib/chevre/service/product.js +5 -3
  105. package/lib/chevre/service/report/telemetry.js +1 -1
  106. package/lib/chevre/service/reserve/checkInReservation.js +2 -2
  107. package/lib/chevre/service/reserve/confirmReservation.js +7 -10
  108. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +2 -1
  109. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -1
  110. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -1
  111. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +32 -35
  112. package/lib/chevre/service/reserve/useReservation.d.ts +0 -3
  113. package/lib/chevre/service/reserve/useReservation.js +58 -32
  114. package/lib/chevre/service/task/confirmPayTransaction.js +20 -1
  115. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +4 -0
  116. package/lib/chevre/service/task/confirmReserveTransaction.js +5 -5
  117. package/lib/chevre/service/task/importEventsFromCOA.js +3 -1
  118. package/lib/chevre/service/task/returnPayTransaction.js +10 -4
  119. package/lib/chevre/service/task.js +6 -9
  120. package/lib/chevre/service/transaction/moneyTransfer.js +9 -1
  121. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.d.ts +1 -1
  122. package/lib/chevre/service/transaction/orderProgramMembership.js +6 -6
  123. package/lib/chevre/service/transaction/placeOrder.js +5 -3
  124. package/lib/chevre/service/transaction/placeOrderInProgress/factory.d.ts +1 -1
  125. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +0 -2
  126. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +2 -11
  127. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.d.ts +1 -1
  128. package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +3 -8
  129. package/lib/chevre/service/transaction/placeOrderInProgress.js +92 -107
  130. package/lib/chevre/service/transaction/returnOrder.js +8 -6
  131. package/lib/chevre/settings.d.ts +2 -0
  132. package/lib/chevre/settings.js +20 -12
  133. package/package.json +3 -3
  134. package/CHANGELOG.md +0 -2030
  135. package/example/.gitignore +0 -1
  136. package/example/src/chevre/.gitignore +0 -1
  137. package/example/src/chevre/aggregateReservationOnProject.ts +0 -32
  138. package/example/src/chevre/migratePlaceAdditionalProperties.ts +0 -162
  139. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmPay.d.ts +0 -6
  140. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmPay.js +0 -65
@@ -29,29 +29,24 @@ class MongoRepository {
29
29
  }
30
30
  // tslint:disable-next-line:max-func-body-length
31
31
  static CREATE_MONGO_CONDITIONS(params) {
32
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
33
- const andConditions = [{
34
- name: { $exists: true }
35
- }];
36
- // tslint:disable-next-line:no-single-line-block-comment
37
- /* istanbul ignore else */
38
- if (params.project !== undefined) {
39
- if (params.project.id !== undefined && params.project.id !== null) {
40
- if (typeof params.project.id.$eq === 'string') {
41
- andConditions.push({
42
- 'project.id': {
43
- $eq: params.project.id.$eq
44
- }
45
- });
46
- }
47
- }
32
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
33
+ const andConditions = [];
34
+ const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
35
+ if (typeof projectIdEq === 'string') {
36
+ andConditions.push({ 'project.id': { $eq: projectIdEq } });
48
37
  }
49
- // tslint:disable-next-line:no-single-line-block-comment
50
- /* istanbul ignore else */
51
- if (params.name !== undefined) {
52
- andConditions.push({
53
- name: params.name
54
- });
38
+ if (typeof params.name === 'string') {
39
+ andConditions.push({ name: { $eq: params.name } });
40
+ }
41
+ else {
42
+ const nameIn = (_c = params.name) === null || _c === void 0 ? void 0 : _c.$in;
43
+ if (Array.isArray(nameIn)) {
44
+ andConditions.push({ name: { $in: nameIn } });
45
+ }
46
+ const nameNin = (_d = params.name) === null || _d === void 0 ? void 0 : _d.$nin;
47
+ if (Array.isArray(nameNin)) {
48
+ andConditions.push({ name: { $nin: nameNin } });
49
+ }
55
50
  }
56
51
  // tslint:disable-next-line:no-single-line-block-comment
57
52
  /* istanbul ignore else */
@@ -94,7 +89,7 @@ class MongoRepository {
94
89
  }
95
90
  });
96
91
  }
97
- const dateAbortedGte = (_a = params.dateAborted) === null || _a === void 0 ? void 0 : _a.$gte;
92
+ const dateAbortedGte = (_e = params.dateAborted) === null || _e === void 0 ? void 0 : _e.$gte;
98
93
  if (dateAbortedGte instanceof Date) {
99
94
  andConditions.push({
100
95
  dateAborted: {
@@ -103,7 +98,7 @@ class MongoRepository {
103
98
  }
104
99
  });
105
100
  }
106
- const dateAbortedLte = (_b = params.dateAborted) === null || _b === void 0 ? void 0 : _b.$lte;
101
+ const dateAbortedLte = (_f = params.dateAborted) === null || _f === void 0 ? void 0 : _f.$lte;
107
102
  if (dateAbortedLte instanceof Date) {
108
103
  andConditions.push({
109
104
  dateAborted: {
@@ -112,7 +107,7 @@ class MongoRepository {
112
107
  }
113
108
  });
114
109
  }
115
- const objectTransactionNumberEq = (_e = (_d = (_c = params.data) === null || _c === void 0 ? void 0 : _c.object) === null || _d === void 0 ? void 0 : _d.transactionNumber) === null || _e === void 0 ? void 0 : _e.$eq;
110
+ const objectTransactionNumberEq = (_j = (_h = (_g = params.data) === null || _g === void 0 ? void 0 : _g.object) === null || _h === void 0 ? void 0 : _h.transactionNumber) === null || _j === void 0 ? void 0 : _j.$eq;
116
111
  if (typeof objectTransactionNumberEq === 'string') {
117
112
  andConditions.push({
118
113
  'data.object.transactionNumber': {
@@ -121,7 +116,7 @@ class MongoRepository {
121
116
  }
122
117
  });
123
118
  }
124
- const objectPurposeIdEq = (_h = (_g = (_f = params.data) === null || _f === void 0 ? void 0 : _f.purpose) === null || _g === void 0 ? void 0 : _g.id) === null || _h === void 0 ? void 0 : _h.$eq;
119
+ const objectPurposeIdEq = (_m = (_l = (_k = params.data) === null || _k === void 0 ? void 0 : _k.purpose) === null || _l === void 0 ? void 0 : _l.id) === null || _m === void 0 ? void 0 : _m.$eq;
125
120
  if (typeof objectPurposeIdEq === 'string') {
126
121
  andConditions.push({
127
122
  'data.purpose.id': {
@@ -130,7 +125,7 @@ class MongoRepository {
130
125
  }
131
126
  });
132
127
  }
133
- const objectPurposeOrderNumberEq = (_l = (_k = (_j = params.data) === null || _j === void 0 ? void 0 : _j.purpose) === null || _k === void 0 ? void 0 : _k.orderNumber) === null || _l === void 0 ? void 0 : _l.$eq;
128
+ const objectPurposeOrderNumberEq = (_q = (_p = (_o = params.data) === null || _o === void 0 ? void 0 : _o.purpose) === null || _p === void 0 ? void 0 : _p.orderNumber) === null || _q === void 0 ? void 0 : _q.$eq;
134
129
  if (typeof objectPurposeOrderNumberEq === 'string') {
135
130
  andConditions.push({
136
131
  'data.purpose.orderNumber': {
@@ -141,12 +136,11 @@ class MongoRepository {
141
136
  }
142
137
  return andConditions;
143
138
  }
144
- save(taskAttributes) {
145
- return __awaiter(this, void 0, void 0, function* () {
146
- return this.taskModel.create(taskAttributes)
147
- .then((doc) => doc.toObject());
148
- });
149
- }
139
+ // public async save(taskAttributes: factory.task.IAttributes<factory.taskName>): Promise<void> {
140
+ // // return this.taskModel.create(taskAttributes)
141
+ // // .then((doc) => <factory.task.ITask<factory.taskName>>doc.toObject());
142
+ // await this.taskModel.create(taskAttributes);
143
+ // }
150
144
  saveMany(taskAttributes) {
151
145
  return __awaiter(this, void 0, void 0, function* () {
152
146
  if (taskAttributes.length > 0) {
@@ -312,5 +306,124 @@ class MongoRepository {
312
306
  .exec();
313
307
  });
314
308
  }
309
+ aggregateTask(params) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ const statuses = yield Promise.all([
312
+ factory.taskStatus.Executed,
313
+ factory.taskStatus.Aborted
314
+ ].map((taskStatus) => __awaiter(this, void 0, void 0, function* () {
315
+ var _a, _b;
316
+ const matchConditions = Object.assign({ runsAt: {
317
+ $gte: params.runsFrom,
318
+ $lte: params.runsThrough
319
+ }, status: { $eq: taskStatus } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$ne) === 'string')
320
+ ? { 'project.id': { $ne: params.project.id.$ne } }
321
+ : undefined);
322
+ return this.agggregateByStatus({ matchConditions, status: taskStatus });
323
+ })));
324
+ return { statuses };
325
+ });
326
+ }
327
+ // tslint:disable-next-line:max-func-body-length
328
+ agggregateByStatus(params) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ const matchConditions = params.matchConditions;
331
+ const taskStatus = params.status;
332
+ const aggregations = yield this.taskModel.aggregate([
333
+ {
334
+ $match: matchConditions
335
+ },
336
+ {
337
+ $project: {
338
+ latency: { $subtract: ['$lastTriedAt', '$runsAt'] },
339
+ status: '$status',
340
+ runsAt: '$runsAt',
341
+ lastTriedAt: '$lastTriedAt'
342
+ }
343
+ },
344
+ {
345
+ $group: {
346
+ _id: '$status',
347
+ taskCount: { $sum: 1 },
348
+ maxLatency: { $max: '$latency' },
349
+ minLatency: { $min: '$latency' },
350
+ avgLatency: { $avg: '$latency' }
351
+ }
352
+ },
353
+ {
354
+ $project: {
355
+ _id: 0,
356
+ taskCount: '$taskCount',
357
+ avgLatency: '$avgLatency',
358
+ maxLatency: '$maxLatency',
359
+ minLatency: '$minLatency'
360
+ }
361
+ }
362
+ ])
363
+ .exec();
364
+ // tslint:disable-next-line:no-magic-numbers
365
+ const percents = [50, 95, 99];
366
+ if (aggregations.length === 0) {
367
+ return {
368
+ status: taskStatus,
369
+ aggregation: {
370
+ taskCount: 0,
371
+ avgLatency: 0,
372
+ maxLatency: 0,
373
+ minLatency: 0,
374
+ percentilesLatency: percents.map((percent) => {
375
+ return {
376
+ name: String(percent),
377
+ value: 0
378
+ };
379
+ })
380
+ }
381
+ };
382
+ }
383
+ const ranks4percentile = percents.map((percentile) => {
384
+ return {
385
+ percentile,
386
+ // tslint:disable-next-line:no-magic-numbers
387
+ rank: Math.floor(aggregations[0].taskCount * percentile / 100)
388
+ };
389
+ });
390
+ const aggregations2 = yield this.taskModel.aggregate([
391
+ {
392
+ $match: matchConditions
393
+ },
394
+ {
395
+ $project: {
396
+ latency: { $subtract: ['$lastTriedAt', '$runsAt'] },
397
+ status: '$status',
398
+ runsAt: '$runsAt',
399
+ lastTriedAt: '$lastTriedAt'
400
+ }
401
+ },
402
+ { $sort: { latency: 1 } },
403
+ {
404
+ $group: {
405
+ _id: '$status',
406
+ latencies: { $push: '$latency' }
407
+ }
408
+ },
409
+ {
410
+ $project: {
411
+ _id: 0,
412
+ percentilesLatency: ranks4percentile.map((rank) => {
413
+ return {
414
+ name: String(rank.percentile),
415
+ value: { $arrayElemAt: ['$latencies', rank.rank] }
416
+ };
417
+ })
418
+ }
419
+ }
420
+ ])
421
+ .exec();
422
+ return {
423
+ status: taskStatus,
424
+ aggregation: Object.assign(Object.assign({}, aggregations[0]), aggregations2[0])
425
+ };
426
+ });
427
+ }
315
428
  }
316
429
  exports.MongoRepository = MongoRepository;
@@ -2,6 +2,29 @@ import { Connection } from 'mongoose';
2
2
  import * as factory from '../factory';
3
3
  import { modelName } from './mongoose/model/transaction';
4
4
  export { modelName };
5
+ interface IAggregationByStatus {
6
+ transactionCount: number;
7
+ avgDuration: number;
8
+ maxDuration: number;
9
+ minDuration: number;
10
+ percentilesDuration: {
11
+ name: string;
12
+ value: number;
13
+ }[];
14
+ acceptedOfferCount: number;
15
+ avgAcceptedOfferCount: number;
16
+ totalPrice: number;
17
+ maxPrice: number;
18
+ minPrice: number;
19
+ avgPrice: number;
20
+ }
21
+ interface IStatus {
22
+ status: factory.transactionStatusType;
23
+ aggregation: IAggregationByStatus;
24
+ }
25
+ export interface IAggregatePlaceOrder {
26
+ statuses: IStatus[];
27
+ }
5
28
  /**
6
29
  * 取引リポジトリ
7
30
  */
@@ -27,6 +50,18 @@ export declare class MongoRepository {
27
50
  typeOf: T;
28
51
  id: string;
29
52
  }): Promise<factory.transaction.ITransaction<T>>;
53
+ /**
54
+ * 取引の注文番号を検索する
55
+ */
56
+ findInProgressOrderNumberById(params: {
57
+ id: string;
58
+ }): Promise<string | undefined>;
59
+ /**
60
+ * 取引の確認番号を検索する
61
+ */
62
+ findInProgressConfirmationNumberById(params: {
63
+ id: string;
64
+ }): Promise<string | undefined>;
30
65
  /**
31
66
  * 取引進行者プロフィールを更新
32
67
  */
@@ -66,7 +101,7 @@ export declare class MongoRepository {
66
101
  authorizeActions: factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>>[];
67
102
  result: factory.transaction.IResult<T>;
68
103
  potentialActions: factory.transaction.IPotentialActions<T>;
69
- }): Promise<factory.transaction.ITransaction<T>>;
104
+ }): Promise<void>;
70
105
  /**
71
106
  * タスク未エクスポートの取引をひとつ取得してエクスポートを開始する
72
107
  */
@@ -105,7 +140,7 @@ export declare class MongoRepository {
105
140
  cancel<T extends factory.transactionType>(params: {
106
141
  typeOf: T;
107
142
  id: string;
108
- }): Promise<factory.transaction.ITransaction<T>>;
143
+ }): Promise<void>;
109
144
  count<T extends factory.transactionType>(params: factory.transaction.ISearchConditions<T>): Promise<number>;
110
145
  /**
111
146
  * 取引を検索する
@@ -114,10 +149,15 @@ export declare class MongoRepository {
114
149
  /**
115
150
  * 特定の取引を更新する(汎用)
116
151
  */
117
- findByIdAndUpdate<T extends factory.transactionType>(params: {
152
+ findByIdAndUpdate(params: {
118
153
  id: string;
119
- update: any;
120
- }): Promise<factory.transaction.ITransaction<T>>;
154
+ update: {
155
+ $set?: any;
156
+ $unset?: any;
157
+ $pull?: any;
158
+ $push?: any;
159
+ };
160
+ }): Promise<void>;
121
161
  saveOrderNumberIfNotExist(params: {
122
162
  id: string;
123
163
  orderNumber: string;
@@ -129,4 +169,16 @@ export declare class MongoRepository {
129
169
  findByIdAndDelete(params: {
130
170
  id: string;
131
171
  }): Promise<void>;
172
+ aggregatePlaceOrder(params: {
173
+ project?: {
174
+ id?: {
175
+ $ne?: string;
176
+ };
177
+ };
178
+ startFrom: Date;
179
+ startThrough: Date;
180
+ typeOf: factory.transactionType;
181
+ clientId?: string;
182
+ }): Promise<IAggregatePlaceOrder>;
183
+ private agggregateByStatus;
132
184
  }