@chevre/domain 21.2.0-alpha.98 → 21.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 (171) hide show
  1. package/example/src/chevre/aggregateEventReservation.ts +1 -1
  2. package/example/src/chevre/aggregateSellerPaymentAccepted.ts +27 -0
  3. package/example/src/chevre/aggregation/aggregateSystem.ts +53 -22
  4. package/example/src/chevre/countDelayedTasks.ts +7 -2
  5. package/example/src/chevre/createManyEventsIfNotExist.ts +199 -46
  6. package/example/src/chevre/findScreeningRoomsByBranchCode.ts +4 -3
  7. package/example/src/chevre/giveUpStartDatePassedCertainPeriod.ts +56 -0
  8. package/example/src/chevre/lockStockHolder.ts +5 -2
  9. package/example/src/chevre/migrateCategoryCodeAdditionalProperties.ts +116 -0
  10. package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +79 -0
  11. package/example/src/chevre/processPay.ts +5 -2
  12. package/example/src/chevre/processRegisterMembership.ts +8 -4
  13. package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
  14. package/example/src/chevre/processReserve.ts +1 -1
  15. package/example/src/chevre/searchAbortedTasks.ts +4 -6
  16. package/example/src/chevre/searchActions.ts +33 -0
  17. package/example/src/chevre/searchEventSeats.ts +5 -2
  18. package/example/src/chevre/searchHoldReservations.ts +38 -0
  19. package/example/src/chevre/searchPermissions.ts +54 -0
  20. package/example/src/chevre/searchScreeningRooms.ts +35 -0
  21. package/example/src/chevre/sendEmailMessage.ts +1 -2
  22. package/example/src/chevre/syncScreeningRooms.ts +22 -0
  23. package/example/src/chevre/syncScreeningRoomsAll.ts +44 -0
  24. package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +41 -0
  25. package/lib/chevre/factory/order.d.ts +4 -1
  26. package/lib/chevre/factory/order.js +19 -6
  27. package/lib/chevre/repo/account.js +3 -2
  28. package/lib/chevre/repo/accountTransaction.js +2 -1
  29. package/lib/chevre/repo/accountingReport.d.ts +1 -3
  30. package/lib/chevre/repo/action.d.ts +50 -1
  31. package/lib/chevre/repo/action.js +103 -34
  32. package/lib/chevre/repo/additionalProperty.js +2 -1
  33. package/lib/chevre/repo/aggregation.d.ts +3 -0
  34. package/lib/chevre/repo/aggregation.js +3 -0
  35. package/lib/chevre/repo/assetTransaction.js +6 -5
  36. package/lib/chevre/repo/categoryCode.d.ts +1 -1
  37. package/lib/chevre/repo/categoryCode.js +37 -25
  38. package/lib/chevre/repo/code.js +3 -2
  39. package/lib/chevre/repo/comment.js +2 -1
  40. package/lib/chevre/repo/creativeWork.d.ts +1 -1
  41. package/lib/chevre/repo/creativeWork.js +35 -12
  42. package/lib/chevre/repo/customer.js +2 -1
  43. package/lib/chevre/repo/emailMessage.js +2 -1
  44. package/lib/chevre/repo/event.d.ts +30 -2
  45. package/lib/chevre/repo/event.js +87 -36
  46. package/lib/chevre/repo/member.d.ts +14 -0
  47. package/lib/chevre/repo/member.js +31 -3
  48. package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
  49. package/lib/chevre/repo/mongoose/schemas/action.js +12 -0
  50. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +3 -3
  51. package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
  52. package/lib/chevre/repo/mongoose/schemas/holdReservation.js +93 -0
  53. package/lib/chevre/repo/mongoose/schemas/offer.d.ts +3 -3
  54. package/lib/chevre/repo/mongoose/schemas/order.d.ts +21 -21
  55. package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -0
  56. package/lib/chevre/repo/mongoose/schemas/place.js +16 -1
  57. package/lib/chevre/repo/mongoose/schemas/product.js +6 -0
  58. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +9 -9
  59. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +3 -3
  60. package/lib/chevre/repo/offer.js +3 -2
  61. package/lib/chevre/repo/offerCatalog.js +0 -27
  62. package/lib/chevre/repo/offerItemCondition.js +2 -1
  63. package/lib/chevre/repo/order.js +8 -7
  64. package/lib/chevre/repo/ownershipInfo.js +2 -7
  65. package/lib/chevre/repo/paymentServiceProvider.d.ts +65 -0
  66. package/lib/chevre/repo/paymentServiceProvider.js +156 -0
  67. package/lib/chevre/repo/place.d.ts +203 -27
  68. package/lib/chevre/repo/place.js +1726 -694
  69. package/lib/chevre/repo/priceSpecification.js +3 -2
  70. package/lib/chevre/repo/product.d.ts +5 -3
  71. package/lib/chevre/repo/product.js +92 -5
  72. package/lib/chevre/repo/project.js +2 -1
  73. package/lib/chevre/repo/reservation.d.ts +9 -1
  74. package/lib/chevre/repo/reservation.js +29 -20
  75. package/lib/chevre/repo/role.d.ts +7 -0
  76. package/lib/chevre/repo/role.js +39 -2
  77. package/lib/chevre/repo/seller.d.ts +21 -1
  78. package/lib/chevre/repo/seller.js +59 -4
  79. package/lib/chevre/repo/serviceOutput.js +2 -1
  80. package/lib/chevre/repo/stockHolder.d.ts +143 -7
  81. package/lib/chevre/repo/stockHolder.js +622 -104
  82. package/lib/chevre/repo/task.d.ts +12 -1
  83. package/lib/chevre/repo/task.js +17 -7
  84. package/lib/chevre/repo/transaction.js +6 -5
  85. package/lib/chevre/repo/trip.js +2 -1
  86. package/lib/chevre/repository.d.ts +6 -0
  87. package/lib/chevre/repository.js +8 -1
  88. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +18 -8
  89. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -8
  90. package/lib/chevre/service/aggregation/system.d.ts +43 -1
  91. package/lib/chevre/service/aggregation/system.js +112 -2
  92. package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
  93. package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
  94. package/lib/chevre/service/assetTransaction/pay.d.ts +5 -1
  95. package/lib/chevre/service/assetTransaction/pay.js +7 -7
  96. package/lib/chevre/service/assetTransaction/refund.js +1 -1
  97. package/lib/chevre/service/assetTransaction/reserve.js +10 -3
  98. package/lib/chevre/service/event.d.ts +3 -0
  99. package/lib/chevre/service/event.js +52 -21
  100. package/lib/chevre/service/iam.d.ts +6 -2
  101. package/lib/chevre/service/iam.js +23 -9
  102. package/lib/chevre/service/offer/event/factory.js +22 -13
  103. package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
  104. package/lib/chevre/service/offer/eventServiceByCOA/factory.js +15 -8
  105. package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
  106. package/lib/chevre/service/offer/product/factory.js +13 -6
  107. package/lib/chevre/service/offer/product.js +2 -2
  108. package/lib/chevre/service/offer.d.ts +16 -8
  109. package/lib/chevre/service/offer.js +71 -8
  110. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +31 -17
  111. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +1 -1
  112. package/lib/chevre/service/order/onOrderStatusChanged.js +2 -2
  113. package/lib/chevre/service/order/placeOrder.js +4 -4
  114. package/lib/chevre/service/order/returnOrder.js +1 -1
  115. package/lib/chevre/service/order/sendOrder.js +3 -3
  116. package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +4 -6
  117. package/lib/chevre/service/payment/any/onRefund.js +46 -42
  118. package/lib/chevre/service/payment/any.d.ts +9 -6
  119. package/lib/chevre/service/payment/any.js +6 -2
  120. package/lib/chevre/service/payment/creditCard.js +2 -2
  121. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +8 -7
  122. package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
  123. package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
  124. package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
  125. package/lib/chevre/service/payment/movieTicket/validation.d.ts +3 -4
  126. package/lib/chevre/service/payment/movieTicket/validation.js +53 -12
  127. package/lib/chevre/service/payment/movieTicket.d.ts +1 -1
  128. package/lib/chevre/service/payment/movieTicket.js +4 -4
  129. package/lib/chevre/service/reserve/cancelReservation.js +15 -3
  130. package/lib/chevre/service/reserve/confirmReservation.js +19 -11
  131. package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
  132. package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
  133. package/lib/chevre/service/task/cancelReservation.js +1 -1
  134. package/lib/chevre/service/task/deleteTransaction.js +2 -0
  135. package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
  136. package/lib/chevre/service/task/onEventChanged.js +29 -0
  137. package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
  138. package/lib/chevre/service/task/onResourceUpdated.js +396 -0
  139. package/lib/chevre/service/task/syncScreeningRooms.d.ts +7 -0
  140. package/lib/chevre/service/task/syncScreeningRooms.js +24 -0
  141. package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
  142. package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -0
  143. package/lib/chevre/service/transaction/deleteTransaction.js +129 -1
  144. package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +1 -0
  145. package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
  146. package/lib/chevre/service/transaction/moneyTransfer.js +1 -1
  147. package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
  148. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
  149. package/lib/chevre/service/transaction/orderProgramMembership.js +7 -4
  150. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +1 -0
  151. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
  152. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
  153. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
  154. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
  155. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
  156. package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +8 -12
  157. package/lib/chevre/service/transaction/placeOrderInProgress.js +6 -4
  158. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +1 -0
  159. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
  160. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +5 -5
  161. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
  162. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
  163. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
  164. package/lib/chevre/service/transaction/returnOrder.js +3 -1
  165. package/lib/chevre/settings.d.ts +11 -0
  166. package/lib/chevre/settings.js +44 -2
  167. package/package.json +3 -3
  168. package/example/src/chevre/eventCatalog2eventService.ts +0 -123
  169. package/example/src/chevre/migrateOrderAdditionalProperties.ts +0 -85
  170. package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
  171. package/example/src/chevre/searchAssetTransactions.ts +0 -30
@@ -13,6 +13,7 @@ exports.MongoRepository = void 0;
13
13
  const moment = require("moment");
14
14
  const accountTransaction_1 = require("./mongoose/schemas/accountTransaction");
15
15
  const factory = require("../factory");
16
+ const settings_1 = require("../settings");
16
17
  /**
17
18
  * 口座取引リポジトリ
18
19
  */
@@ -260,7 +261,7 @@ class MongoRepository {
260
261
  if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.startDate) !== undefined) {
261
262
  query.sort({ startDate: params.sort.startDate });
262
263
  }
263
- return query.setOptions({ maxTimeMS: 10000 })
264
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
264
265
  .exec()
265
266
  .then((docs) => docs.map((doc) => doc.toObject()));
266
267
  });
@@ -1,8 +1,6 @@
1
1
  import { Connection, Model } from 'mongoose';
2
2
  import * as factory from '../factory';
3
- export type IOrder4report = factory.order.IOrder & {
4
- numItems: number;
5
- };
3
+ export type IOrder4report = factory.report.accountingReport.IOrderAsMainEntity;
6
4
  export interface IAccountingReport {
7
5
  project: {
8
6
  id: string;
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import { Connection } from 'mongoose';
2
26
  import * as factory from '../factory';
3
27
  export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : factory.action.IAction<factory.action.IAttributes<T, any, any>>;
@@ -61,6 +85,18 @@ export declare class MongoRepository {
61
85
  id: string;
62
86
  error: any;
63
87
  }): Promise<IAction<T>>;
88
+ /**
89
+ * 一定期間ActiveActionStatusのアクションをFailedActionStatusにする
90
+ */
91
+ giveUpStartDatePassedCertainPeriod(params: {
92
+ id?: {
93
+ $eq?: string;
94
+ };
95
+ error: any;
96
+ startDate: {
97
+ $lt: Date;
98
+ };
99
+ }): Promise<any>;
64
100
  findById<T extends factory.actionType>(params: {
65
101
  typeOf: T;
66
102
  id: string;
@@ -180,7 +216,19 @@ export declare class MongoRepository {
180
216
  startThrough: Date;
181
217
  typeOf: factory.actionType;
182
218
  }): Promise<IAggregateAction>;
183
- aggregateUseAction(params: {
219
+ aggregateCancelReservationAction(params: {
220
+ project?: {
221
+ id?: {
222
+ $ne?: string;
223
+ };
224
+ };
225
+ startFrom: Date;
226
+ startThrough: Date;
227
+ }): Promise<IAggregateAction>;
228
+ /**
229
+ * アクションタイプによる汎用的な集計
230
+ */
231
+ aggregateByTypeOf(params: {
184
232
  project?: {
185
233
  id?: {
186
234
  $ne?: string;
@@ -208,6 +256,7 @@ export declare class MongoRepository {
208
256
  startFrom: Date;
209
257
  startThrough: Date;
210
258
  }): Promise<IAggregateAction>;
259
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
211
260
  private agggregateByStatus;
212
261
  }
213
262
  export {};
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MongoRepository = void 0;
13
13
  const factory = require("../factory");
14
14
  const action_1 = require("./mongoose/schemas/action");
15
+ const settings_1 = require("../settings");
15
16
  /**
16
17
  * アクションリポジトリ
17
18
  */
@@ -21,7 +22,7 @@ class MongoRepository {
21
22
  }
22
23
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
23
24
  static CREATE_MONGO_CONDITIONS(params) {
24
- 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;
25
+ 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;
25
26
  const andConditions = [];
26
27
  const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
27
28
  // tslint:disable-next-line:no-single-line-block-comment
@@ -75,9 +76,27 @@ class MongoRepository {
75
76
  }
76
77
  });
77
78
  }
79
+ const objectMovieTicketsIdentifierEq = (_o = (_m = (_l = params.object) === null || _l === void 0 ? void 0 : _l.movieTickets) === null || _m === void 0 ? void 0 : _m.identifier) === null || _o === void 0 ? void 0 : _o.$eq;
80
+ if (typeof objectMovieTicketsIdentifierEq === 'string') {
81
+ andConditions.push({
82
+ 'object.movieTickets.identifier': {
83
+ $exists: true,
84
+ $eq: objectMovieTicketsIdentifierEq
85
+ }
86
+ });
87
+ }
88
+ const objectMovieTicketsServiceOutputReservationForIdEq = (_t = (_s = (_r = (_q = (_p = params.object) === null || _p === void 0 ? void 0 : _p.movieTickets) === null || _q === void 0 ? void 0 : _q.serviceOutput) === null || _r === void 0 ? void 0 : _r.reservationFor) === null || _s === void 0 ? void 0 : _s.id) === null || _t === void 0 ? void 0 : _t.$eq;
89
+ if (typeof objectMovieTicketsServiceOutputReservationForIdEq === 'string') {
90
+ andConditions.push({
91
+ 'object.movieTickets.serviceOutput.reservationFor.id': {
92
+ $exists: true,
93
+ $eq: objectMovieTicketsServiceOutputReservationForIdEq
94
+ }
95
+ });
96
+ }
78
97
  // tslint:disable-next-line:no-single-line-block-comment
79
98
  /* istanbul ignore else */
80
- const objectPaymentMethodIdEq = (_m = (_l = params.object) === null || _l === void 0 ? void 0 : _l.paymentMethodId) === null || _m === void 0 ? void 0 : _m.$eq;
99
+ const objectPaymentMethodIdEq = (_v = (_u = params.object) === null || _u === void 0 ? void 0 : _u.paymentMethodId) === null || _v === void 0 ? void 0 : _v.$eq;
81
100
  if (typeof objectPaymentMethodIdEq === 'string') {
82
101
  andConditions.push({
83
102
  'object.paymentMethodId': {
@@ -86,7 +105,7 @@ class MongoRepository {
86
105
  }
87
106
  });
88
107
  }
89
- const objectObjectPaymentMethodIdEq = (_q = (_p = (_o = params.object) === null || _o === void 0 ? void 0 : _o.object) === null || _p === void 0 ? void 0 : _p.paymentMethodId) === null || _q === void 0 ? void 0 : _q.$eq;
108
+ const objectObjectPaymentMethodIdEq = (_y = (_x = (_w = params.object) === null || _w === void 0 ? void 0 : _w.object) === null || _x === void 0 ? void 0 : _x.paymentMethodId) === null || _y === void 0 ? void 0 : _y.$eq;
90
109
  if (typeof objectObjectPaymentMethodIdEq === 'string') {
91
110
  andConditions.push({
92
111
  'object.object.paymentMethodId': {
@@ -95,7 +114,7 @@ class MongoRepository {
95
114
  }
96
115
  });
97
116
  }
98
- const objectReservationForIdEq = (_t = (_s = (_r = params.object) === null || _r === void 0 ? void 0 : _r.reservationFor) === null || _s === void 0 ? void 0 : _s.id) === null || _t === void 0 ? void 0 : _t.$eq;
117
+ const objectReservationForIdEq = (_1 = (_0 = (_z = params.object) === null || _z === void 0 ? void 0 : _z.reservationFor) === null || _0 === void 0 ? void 0 : _0.id) === null || _1 === void 0 ? void 0 : _1.$eq;
99
118
  // tslint:disable-next-line:no-single-line-block-comment
100
119
  /* istanbul ignore else */
101
120
  if (typeof objectReservationForIdEq === 'string') {
@@ -106,7 +125,7 @@ class MongoRepository {
106
125
  }
107
126
  });
108
127
  }
109
- const objectReservationNumberEq = (_v = (_u = params.object) === null || _u === void 0 ? void 0 : _u.reservationNumber) === null || _v === void 0 ? void 0 : _v.$eq;
128
+ const objectReservationNumberEq = (_3 = (_2 = params.object) === null || _2 === void 0 ? void 0 : _2.reservationNumber) === null || _3 === void 0 ? void 0 : _3.$eq;
110
129
  if (typeof objectReservationNumberEq === 'string') {
111
130
  andConditions.push({
112
131
  'object.reservationNumber': {
@@ -115,7 +134,7 @@ class MongoRepository {
115
134
  }
116
135
  });
117
136
  }
118
- const objectReservationNumberIn = (_x = (_w = params.object) === null || _w === void 0 ? void 0 : _w.reservationNumber) === null || _x === void 0 ? void 0 : _x.$in;
137
+ const objectReservationNumberIn = (_5 = (_4 = params.object) === null || _4 === void 0 ? void 0 : _4.reservationNumber) === null || _5 === void 0 ? void 0 : _5.$in;
119
138
  if (Array.isArray(objectReservationNumberIn)) {
120
139
  andConditions.push({
121
140
  'object.reservationNumber': {
@@ -124,7 +143,7 @@ class MongoRepository {
124
143
  }
125
144
  });
126
145
  }
127
- const objectPaymentMethodAccountIdEq = (_0 = (_z = (_y = params.object) === null || _y === void 0 ? void 0 : _y.paymentMethod) === null || _z === void 0 ? void 0 : _z.accountId) === null || _0 === void 0 ? void 0 : _0.$eq;
146
+ const objectPaymentMethodAccountIdEq = (_8 = (_7 = (_6 = params.object) === null || _6 === void 0 ? void 0 : _6.paymentMethod) === null || _7 === void 0 ? void 0 : _7.accountId) === null || _8 === void 0 ? void 0 : _8.$eq;
128
147
  // tslint:disable-next-line:no-single-line-block-comment
129
148
  /* istanbul ignore else */
130
149
  if (typeof objectPaymentMethodAccountIdEq === 'string') {
@@ -135,7 +154,7 @@ class MongoRepository {
135
154
  }
136
155
  });
137
156
  }
138
- const objectPaymentMethodPaymentMethodIdEq = (_3 = (_2 = (_1 = params.object) === null || _1 === void 0 ? void 0 : _1.paymentMethod) === null || _2 === void 0 ? void 0 : _2.paymentMethodId) === null || _3 === void 0 ? void 0 : _3.$eq;
157
+ const objectPaymentMethodPaymentMethodIdEq = (_11 = (_10 = (_9 = params.object) === null || _9 === void 0 ? void 0 : _9.paymentMethod) === null || _10 === void 0 ? void 0 : _10.paymentMethodId) === null || _11 === void 0 ? void 0 : _11.$eq;
139
158
  // tslint:disable-next-line:no-single-line-block-comment
140
159
  /* istanbul ignore else */
141
160
  if (typeof objectPaymentMethodPaymentMethodIdEq === 'string') {
@@ -146,7 +165,7 @@ class MongoRepository {
146
165
  }
147
166
  });
148
167
  }
149
- const objectPaymentMethodPaymentMethodIdIn = (_6 = (_5 = (_4 = params.object) === null || _4 === void 0 ? void 0 : _4.paymentMethod) === null || _5 === void 0 ? void 0 : _5.paymentMethodId) === null || _6 === void 0 ? void 0 : _6.$in;
168
+ const objectPaymentMethodPaymentMethodIdIn = (_14 = (_13 = (_12 = params.object) === null || _12 === void 0 ? void 0 : _12.paymentMethod) === null || _13 === void 0 ? void 0 : _13.paymentMethodId) === null || _14 === void 0 ? void 0 : _14.$in;
150
169
  if (Array.isArray(objectPaymentMethodPaymentMethodIdIn)) {
151
170
  andConditions.push({
152
171
  'object.paymentMethod.paymentMethodId': {
@@ -155,7 +174,7 @@ class MongoRepository {
155
174
  }
156
175
  });
157
176
  }
158
- const objectPaymentMethodTypeOfEq = (_9 = (_8 = (_7 = params.object) === null || _7 === void 0 ? void 0 : _7.paymentMethod) === null || _8 === void 0 ? void 0 : _8.typeOf) === null || _9 === void 0 ? void 0 : _9.$eq;
177
+ const objectPaymentMethodTypeOfEq = (_17 = (_16 = (_15 = params.object) === null || _15 === void 0 ? void 0 : _15.paymentMethod) === null || _16 === void 0 ? void 0 : _16.typeOf) === null || _17 === void 0 ? void 0 : _17.$eq;
159
178
  // tslint:disable-next-line:no-single-line-block-comment
160
179
  /* istanbul ignore else */
161
180
  if (typeof objectPaymentMethodTypeOfEq === 'string') {
@@ -166,7 +185,7 @@ class MongoRepository {
166
185
  }
167
186
  });
168
187
  }
169
- const objectTypeOfEq = (_11 = (_10 = params.object) === null || _10 === void 0 ? void 0 : _10.typeOf) === null || _11 === void 0 ? void 0 : _11.$eq;
188
+ const objectTypeOfEq = (_19 = (_18 = params.object) === null || _18 === void 0 ? void 0 : _18.typeOf) === null || _19 === void 0 ? void 0 : _19.$eq;
170
189
  // tslint:disable-next-line:no-single-line-block-comment
171
190
  /* istanbul ignore else */
172
191
  if (typeof objectTypeOfEq === 'string') {
@@ -177,7 +196,7 @@ class MongoRepository {
177
196
  }
178
197
  });
179
198
  }
180
- const objectTypeOfIn = (_13 = (_12 = params.object) === null || _12 === void 0 ? void 0 : _12.typeOf) === null || _13 === void 0 ? void 0 : _13.$in;
199
+ const objectTypeOfIn = (_21 = (_20 = params.object) === null || _20 === void 0 ? void 0 : _20.typeOf) === null || _21 === void 0 ? void 0 : _21.$in;
181
200
  if (Array.isArray(objectTypeOfIn)) {
182
201
  andConditions.push({
183
202
  'object.typeOf': {
@@ -186,7 +205,7 @@ class MongoRepository {
186
205
  }
187
206
  });
188
207
  }
189
- const objectIdEq = (_15 = (_14 = params.object) === null || _14 === void 0 ? void 0 : _14.id) === null || _15 === void 0 ? void 0 : _15.$eq;
208
+ const objectIdEq = (_23 = (_22 = params.object) === null || _22 === void 0 ? void 0 : _22.id) === null || _23 === void 0 ? void 0 : _23.$eq;
190
209
  // tslint:disable-next-line:no-single-line-block-comment
191
210
  /* istanbul ignore else */
192
211
  if (typeof objectIdEq === 'string') {
@@ -197,7 +216,7 @@ class MongoRepository {
197
216
  }
198
217
  });
199
218
  }
200
- const objectIdIn = (_17 = (_16 = params.object) === null || _16 === void 0 ? void 0 : _16.id) === null || _17 === void 0 ? void 0 : _17.$in;
219
+ const objectIdIn = (_25 = (_24 = params.object) === null || _24 === void 0 ? void 0 : _24.id) === null || _25 === void 0 ? void 0 : _25.$in;
201
220
  if (Array.isArray(objectIdIn)) {
202
221
  andConditions.push({
203
222
  'object.id': {
@@ -206,7 +225,7 @@ class MongoRepository {
206
225
  }
207
226
  });
208
227
  }
209
- const objectOrderNumberIn = (_19 = (_18 = params.object) === null || _18 === void 0 ? void 0 : _18.orderNumber) === null || _19 === void 0 ? void 0 : _19.$in;
228
+ const objectOrderNumberIn = (_27 = (_26 = params.object) === null || _26 === void 0 ? void 0 : _26.orderNumber) === null || _27 === void 0 ? void 0 : _27.$in;
210
229
  if (Array.isArray(objectOrderNumberIn)) {
211
230
  andConditions.push({
212
231
  'object.orderNumber': {
@@ -215,7 +234,7 @@ class MongoRepository {
215
234
  }
216
235
  });
217
236
  }
218
- const objectEventIdIn = (_22 = (_21 = (_20 = params.object) === null || _20 === void 0 ? void 0 : _20.event) === null || _21 === void 0 ? void 0 : _21.id) === null || _22 === void 0 ? void 0 : _22.$in;
237
+ const objectEventIdIn = (_30 = (_29 = (_28 = params.object) === null || _28 === void 0 ? void 0 : _28.event) === null || _29 === void 0 ? void 0 : _29.id) === null || _30 === void 0 ? void 0 : _30.$in;
219
238
  if (Array.isArray(objectEventIdIn)) {
220
239
  andConditions.push({
221
240
  'object.event.id': {
@@ -224,7 +243,7 @@ class MongoRepository {
224
243
  }
225
244
  });
226
245
  }
227
- const objectAcceptedOfferSeatNumberIn = (_29 = (_28 = (_27 = (_26 = (_25 = (_24 = (_23 = params.object) === null || _23 === void 0 ? void 0 : _23.acceptedOffer) === null || _24 === void 0 ? void 0 : _24.itemOffered) === null || _25 === void 0 ? void 0 : _25.serviceOutput) === null || _26 === void 0 ? void 0 : _26.reservedTicket) === null || _27 === void 0 ? void 0 : _27.ticketedSeat) === null || _28 === void 0 ? void 0 : _28.seatNumber) === null || _29 === void 0 ? void 0 : _29.$in;
246
+ const objectAcceptedOfferSeatNumberIn = (_37 = (_36 = (_35 = (_34 = (_33 = (_32 = (_31 = params.object) === null || _31 === void 0 ? void 0 : _31.acceptedOffer) === null || _32 === void 0 ? void 0 : _32.itemOffered) === null || _33 === void 0 ? void 0 : _33.serviceOutput) === null || _34 === void 0 ? void 0 : _34.reservedTicket) === null || _35 === void 0 ? void 0 : _35.ticketedSeat) === null || _36 === void 0 ? void 0 : _36.seatNumber) === null || _37 === void 0 ? void 0 : _37.$in;
228
247
  if (Array.isArray(objectAcceptedOfferSeatNumberIn)) {
229
248
  andConditions.push({
230
249
  'object.acceptedOffer.itemOffered.serviceOutput.reservedTicket.ticketedSeat.seatNumber': {
@@ -241,7 +260,7 @@ class MongoRepository {
241
260
  });
242
261
  }
243
262
  else {
244
- const typeOfEq = (_30 = params.typeOf) === null || _30 === void 0 ? void 0 : _30.$eq;
263
+ const typeOfEq = (_38 = params.typeOf) === null || _38 === void 0 ? void 0 : _38.$eq;
245
264
  // tslint:disable-next-line:no-single-line-block-comment
246
265
  /* istanbul ignore else */
247
266
  if (typeof typeOfEq === 'string') {
@@ -250,7 +269,7 @@ class MongoRepository {
250
269
  });
251
270
  }
252
271
  }
253
- const actionStatusIn = (_31 = params.actionStatus) === null || _31 === void 0 ? void 0 : _31.$in;
272
+ const actionStatusIn = (_39 = params.actionStatus) === null || _39 === void 0 ? void 0 : _39.$in;
254
273
  // tslint:disable-next-line:no-single-line-block-comment
255
274
  /* istanbul ignore else */
256
275
  if (Array.isArray(actionStatusIn)) {
@@ -281,7 +300,7 @@ class MongoRepository {
281
300
  startDate: { $lte: startDateLte }
282
301
  });
283
302
  }
284
- const fromLocationTypeOfIn = (_33 = (_32 = params.fromLocation) === null || _32 === void 0 ? void 0 : _32.typeOf) === null || _33 === void 0 ? void 0 : _33.$in;
303
+ const fromLocationTypeOfIn = (_41 = (_40 = params.fromLocation) === null || _40 === void 0 ? void 0 : _40.typeOf) === null || _41 === void 0 ? void 0 : _41.$in;
285
304
  if (Array.isArray(fromLocationTypeOfIn)) {
286
305
  andConditions.push({
287
306
  'fromLocation.typeOf': {
@@ -290,7 +309,7 @@ class MongoRepository {
290
309
  }
291
310
  });
292
311
  }
293
- const fromLocationAccountNumberIn = (_35 = (_34 = params.fromLocation) === null || _34 === void 0 ? void 0 : _34.accountNumber) === null || _35 === void 0 ? void 0 : _35.$in;
312
+ const fromLocationAccountNumberIn = (_43 = (_42 = params.fromLocation) === null || _42 === void 0 ? void 0 : _42.accountNumber) === null || _43 === void 0 ? void 0 : _43.$in;
294
313
  if (Array.isArray(fromLocationAccountNumberIn)) {
295
314
  andConditions.push({
296
315
  'fromLocation.accountNumber': {
@@ -299,7 +318,7 @@ class MongoRepository {
299
318
  }
300
319
  });
301
320
  }
302
- const fromLocationAccountTypeIn = (_37 = (_36 = params.fromLocation) === null || _36 === void 0 ? void 0 : _36.accountType) === null || _37 === void 0 ? void 0 : _37.$in;
321
+ const fromLocationAccountTypeIn = (_45 = (_44 = params.fromLocation) === null || _44 === void 0 ? void 0 : _44.accountType) === null || _45 === void 0 ? void 0 : _45.$in;
303
322
  if (Array.isArray(fromLocationAccountTypeIn)) {
304
323
  andConditions.push({
305
324
  'fromLocation.accountType': {
@@ -308,7 +327,7 @@ class MongoRepository {
308
327
  }
309
328
  });
310
329
  }
311
- const toLocationTypeOfIn = (_39 = (_38 = params.toLocation) === null || _38 === void 0 ? void 0 : _38.typeOf) === null || _39 === void 0 ? void 0 : _39.$in;
330
+ const toLocationTypeOfIn = (_47 = (_46 = params.toLocation) === null || _46 === void 0 ? void 0 : _46.typeOf) === null || _47 === void 0 ? void 0 : _47.$in;
312
331
  if (Array.isArray(toLocationTypeOfIn)) {
313
332
  andConditions.push({
314
333
  'toLocation.typeOf': {
@@ -317,7 +336,7 @@ class MongoRepository {
317
336
  }
318
337
  });
319
338
  }
320
- const toLocationAccountNumberIn = (_41 = (_40 = params.toLocation) === null || _40 === void 0 ? void 0 : _40.accountNumber) === null || _41 === void 0 ? void 0 : _41.$in;
339
+ const toLocationAccountNumberIn = (_49 = (_48 = params.toLocation) === null || _48 === void 0 ? void 0 : _48.accountNumber) === null || _49 === void 0 ? void 0 : _49.$in;
321
340
  if (Array.isArray(toLocationAccountNumberIn)) {
322
341
  andConditions.push({
323
342
  'toLocation.accountNumber': {
@@ -326,7 +345,7 @@ class MongoRepository {
326
345
  }
327
346
  });
328
347
  }
329
- const toLocationAccountTypeIn = (_43 = (_42 = params.toLocation) === null || _42 === void 0 ? void 0 : _42.accountType) === null || _43 === void 0 ? void 0 : _43.$in;
348
+ const toLocationAccountTypeIn = (_51 = (_50 = params.toLocation) === null || _50 === void 0 ? void 0 : _50.accountType) === null || _51 === void 0 ? void 0 : _51.$in;
330
349
  if (Array.isArray(toLocationAccountTypeIn)) {
331
350
  andConditions.push({
332
351
  'toLocation.accountType': {
@@ -335,7 +354,7 @@ class MongoRepository {
335
354
  }
336
355
  });
337
356
  }
338
- const purposeTypeOfIn = (_45 = (_44 = params.purpose) === null || _44 === void 0 ? void 0 : _44.typeOf) === null || _45 === void 0 ? void 0 : _45.$in;
357
+ const purposeTypeOfIn = (_53 = (_52 = params.purpose) === null || _52 === void 0 ? void 0 : _52.typeOf) === null || _53 === void 0 ? void 0 : _53.$in;
339
358
  if (Array.isArray(purposeTypeOfIn)) {
340
359
  andConditions.push({
341
360
  'purpose.typeOf': {
@@ -344,7 +363,7 @@ class MongoRepository {
344
363
  }
345
364
  });
346
365
  }
347
- const purposeIdIn = (_47 = (_46 = params.purpose) === null || _46 === void 0 ? void 0 : _46.id) === null || _47 === void 0 ? void 0 : _47.$in;
366
+ const purposeIdIn = (_55 = (_54 = params.purpose) === null || _54 === void 0 ? void 0 : _54.id) === null || _55 === void 0 ? void 0 : _55.$in;
348
367
  if (Array.isArray(purposeIdIn)) {
349
368
  andConditions.push({
350
369
  'purpose.id': {
@@ -353,7 +372,7 @@ class MongoRepository {
353
372
  }
354
373
  });
355
374
  }
356
- const purposeOrderNumberIn = (_49 = (_48 = params.purpose) === null || _48 === void 0 ? void 0 : _48.orderNumber) === null || _49 === void 0 ? void 0 : _49.$in;
375
+ const purposeOrderNumberIn = (_57 = (_56 = params.purpose) === null || _56 === void 0 ? void 0 : _56.orderNumber) === null || _57 === void 0 ? void 0 : _57.$in;
357
376
  if (Array.isArray(purposeOrderNumberIn)) {
358
377
  andConditions.push({
359
378
  'purpose.orderNumber': {
@@ -362,7 +381,7 @@ class MongoRepository {
362
381
  }
363
382
  });
364
383
  }
365
- const resultTypeOfIn = (_51 = (_50 = params.result) === null || _50 === void 0 ? void 0 : _50.typeOf) === null || _51 === void 0 ? void 0 : _51.$in;
384
+ const resultTypeOfIn = (_59 = (_58 = params.result) === null || _58 === void 0 ? void 0 : _58.typeOf) === null || _59 === void 0 ? void 0 : _59.$in;
366
385
  if (Array.isArray(resultTypeOfIn)) {
367
386
  andConditions.push({
368
387
  'result.typeOf': {
@@ -371,7 +390,7 @@ class MongoRepository {
371
390
  }
372
391
  });
373
392
  }
374
- const resultIdIn = (_53 = (_52 = params.result) === null || _52 === void 0 ? void 0 : _52.id) === null || _53 === void 0 ? void 0 : _53.$in;
393
+ const resultIdIn = (_61 = (_60 = params.result) === null || _60 === void 0 ? void 0 : _60.id) === null || _61 === void 0 ? void 0 : _61.$in;
375
394
  if (Array.isArray(resultIdIn)) {
376
395
  andConditions.push({
377
396
  'result.id': {
@@ -380,7 +399,7 @@ class MongoRepository {
380
399
  }
381
400
  });
382
401
  }
383
- const resultOrderNumberIn = (_55 = (_54 = params.result) === null || _54 === void 0 ? void 0 : _54.orderNumber) === null || _55 === void 0 ? void 0 : _55.$in;
402
+ const resultOrderNumberIn = (_63 = (_62 = params.result) === null || _62 === void 0 ? void 0 : _62.orderNumber) === null || _63 === void 0 ? void 0 : _63.$in;
384
403
  if (Array.isArray(resultOrderNumberIn)) {
385
404
  andConditions.push({
386
405
  'result.orderNumber': {
@@ -389,7 +408,7 @@ class MongoRepository {
389
408
  }
390
409
  });
391
410
  }
392
- const resultCodeIn = (_57 = (_56 = params.result) === null || _56 === void 0 ? void 0 : _56.code) === null || _57 === void 0 ? void 0 : _57.$in;
411
+ const resultCodeIn = (_65 = (_64 = params.result) === null || _64 === void 0 ? void 0 : _64.code) === null || _65 === void 0 ? void 0 : _65.$in;
393
412
  if (Array.isArray(resultCodeIn)) {
394
413
  andConditions.push({
395
414
  'result.code': {
@@ -438,7 +457,7 @@ class MongoRepository {
438
457
  }
439
458
  // const explainResult = await (<any>query).explain();
440
459
  // console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
441
- return query.setOptions({ maxTimeMS: 10000 })
460
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
442
461
  .exec()
443
462
  .then((docs) => docs.map((doc) => doc.toObject()));
444
463
  });
@@ -511,6 +530,22 @@ class MongoRepository {
511
530
  return doc.toObject();
512
531
  });
513
532
  }
533
+ /**
534
+ * 一定期間ActiveActionStatusのアクションをFailedActionStatusにする
535
+ */
536
+ giveUpStartDatePassedCertainPeriod(params) {
537
+ var _a;
538
+ return __awaiter(this, void 0, void 0, function* () {
539
+ return this.actionModel.updateMany(Object.assign({ actionStatus: { $eq: factory.actionStatusType.ActiveActionStatus },
540
+ // 一定期間過ぎたもの
541
+ startDate: { $lt: params.startDate.$lt } }, (typeof ((_a = params.id) === null || _a === void 0 ? void 0 : _a.$eq) === 'string') ? { _id: { $eq: params.id.$eq } } : undefined), {
542
+ actionStatus: factory.actionStatusType.FailedActionStatus,
543
+ error: params.error,
544
+ endDate: new Date()
545
+ })
546
+ .exec();
547
+ });
548
+ }
514
549
  findById(params) {
515
550
  return __awaiter(this, void 0, void 0, function* () {
516
551
  const doc = yield this.actionModel.findOne({
@@ -782,7 +817,36 @@ class MongoRepository {
782
817
  return { statuses };
783
818
  });
784
819
  }
785
- aggregateUseAction(params) {
820
+ aggregateCancelReservationAction(params) {
821
+ return __awaiter(this, void 0, void 0, function* () {
822
+ const statuses = yield Promise.all([
823
+ factory.actionStatusType.CompletedActionStatus,
824
+ factory.actionStatusType.CanceledActionStatus,
825
+ factory.actionStatusType.FailedActionStatus
826
+ ].map((actionStatus) => __awaiter(this, void 0, void 0, function* () {
827
+ var _a, _b;
828
+ const matchConditions = Object.assign({ startDate: {
829
+ $gte: params.startFrom,
830
+ $lte: params.startThrough
831
+ }, typeOf: { $eq: factory.actionType.CancelAction }, actionStatus: { $eq: actionStatus }, 'object.typeOf': {
832
+ $exists: true,
833
+ $in: [
834
+ factory.reservationType.BusReservation,
835
+ factory.reservationType.EventReservation,
836
+ factory.reservationType.ReservationPackage
837
+ ]
838
+ } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$ne) === 'string')
839
+ ? { 'project.id': { $ne: params.project.id.$ne } }
840
+ : undefined);
841
+ return this.agggregateByStatus({ matchConditions, actionStatus });
842
+ })));
843
+ return { statuses };
844
+ });
845
+ }
846
+ /**
847
+ * アクションタイプによる汎用的な集計
848
+ */
849
+ aggregateByTypeOf(params) {
786
850
  return __awaiter(this, void 0, void 0, function* () {
787
851
  const statuses = yield Promise.all([
788
852
  factory.actionStatusType.CompletedActionStatus,
@@ -845,6 +909,11 @@ class MongoRepository {
845
909
  return { statuses };
846
910
  });
847
911
  }
912
+ getCursor(conditions, projection) {
913
+ return this.actionModel.find(conditions, projection)
914
+ .sort({ startDate: factory.sortType.Ascending })
915
+ .cursor();
916
+ }
848
917
  // tslint:disable-next-line:max-func-body-length
849
918
  agggregateByStatus(params) {
850
919
  return __awaiter(this, void 0, void 0, function* () {
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.MongoRepository = void 0;
24
24
  const additionalProperty_1 = require("./mongoose/schemas/additionalProperty");
25
25
  const factory = require("../factory");
26
+ const settings_1 = require("../settings");
26
27
  /**
27
28
  * 追加特性リポジトリ
28
29
  */
@@ -145,7 +146,7 @@ class MongoRepository {
145
146
  if (params.sort !== undefined) {
146
147
  query.sort(params.sort);
147
148
  }
148
- return query.setOptions({ maxTimeMS: 10000 })
149
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
149
150
  .exec()
150
151
  .then((docs) => docs.map((doc) => doc.toObject()));
151
152
  });
@@ -4,12 +4,15 @@ export declare enum AggregationType {
4
4
  AggregateAuthorizeEventServiceOfferAction = "AggregateAuthorizeEventServiceOfferAction",
5
5
  AggregateAuthorizeOrderAction = "AggregateAuthorizeOrderAction",
6
6
  AggregateAuthorizePaymentAction = "AggregateAuthorizePaymentAction",
7
+ AggregateCancelReservationAction = "AggregateCancelReservationAction",
7
8
  AggregateCheckMovieTicketAction = "AggregateCheckMovieTicketAction",
8
9
  AggregateEvent = "AggregateEvent",
10
+ AggregateOrderAction = "AggregateOrderAction",
9
11
  AggregatePay = "AggregatePay",
10
12
  AggregatePayMovieTicketAction = "AggregatePayMovieTicketAction",
11
13
  AggregatePlaceOrder = "AggregatePlaceOrder",
12
14
  AggregateReserve = "AggregateReserve",
15
+ AggregateReserveAction = "AggregateReserveAction",
13
16
  AggregateTask = "AggregateTask",
14
17
  AggregateUseAction = "AggregateUseAction"
15
18
  }
@@ -27,12 +27,15 @@ var AggregationType;
27
27
  AggregationType["AggregateAuthorizeEventServiceOfferAction"] = "AggregateAuthorizeEventServiceOfferAction";
28
28
  AggregationType["AggregateAuthorizeOrderAction"] = "AggregateAuthorizeOrderAction";
29
29
  AggregationType["AggregateAuthorizePaymentAction"] = "AggregateAuthorizePaymentAction";
30
+ AggregationType["AggregateCancelReservationAction"] = "AggregateCancelReservationAction";
30
31
  AggregationType["AggregateCheckMovieTicketAction"] = "AggregateCheckMovieTicketAction";
31
32
  AggregationType["AggregateEvent"] = "AggregateEvent";
33
+ AggregationType["AggregateOrderAction"] = "AggregateOrderAction";
32
34
  AggregationType["AggregatePay"] = "AggregatePay";
33
35
  AggregationType["AggregatePayMovieTicketAction"] = "AggregatePayMovieTicketAction";
34
36
  AggregationType["AggregatePlaceOrder"] = "AggregatePlaceOrder";
35
37
  AggregationType["AggregateReserve"] = "AggregateReserve";
38
+ AggregationType["AggregateReserveAction"] = "AggregateReserveAction";
36
39
  AggregationType["AggregateTask"] = "AggregateTask";
37
40
  AggregationType["AggregateUseAction"] = "AggregateUseAction";
38
41
  })(AggregationType = exports.AggregationType || (exports.AggregationType = {}));
@@ -14,6 +14,7 @@ const moment = require("moment");
14
14
  const assetTransaction_1 = require("./mongoose/schemas/assetTransaction");
15
15
  const factory = require("../factory");
16
16
  const assetTransaction_2 = require("../eventEmitter/assetTransaction");
17
+ const settings_1 = require("../settings");
17
18
  /**
18
19
  * 資産取引リポジトリ
19
20
  */
@@ -448,7 +449,7 @@ class MongoRepository {
448
449
  typeOf: 1,
449
450
  status: 1
450
451
  })
451
- .setOptions({ maxTimeMS: 10000 })
452
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
452
453
  .exec();
453
454
  if (reexportingTransactions.length > 0) {
454
455
  for (const reexportingTransaction of reexportingTransactions) {
@@ -491,7 +492,7 @@ class MongoRepository {
491
492
  typeOf: 1,
492
493
  status: 1
493
494
  })
494
- .setOptions({ maxTimeMS: 10000 })
495
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
495
496
  .exec();
496
497
  if (delayedTransactions.length > 0) {
497
498
  delayedTransactions.forEach((delayedTransaction) => {
@@ -538,7 +539,7 @@ class MongoRepository {
538
539
  _id: 1,
539
540
  typeOf: 1
540
541
  })
541
- .setOptions({ maxTimeMS: 10000 })
542
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
542
543
  .exec();
543
544
  if (expiringTransactions.length > 0) {
544
545
  // ステータスと期限を見て更新
@@ -618,7 +619,7 @@ class MongoRepository {
618
619
  return __awaiter(this, void 0, void 0, function* () {
619
620
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
620
621
  return this.transactionModel.countDocuments({ $and: conditions })
621
- .setOptions({ maxTimeMS: 10000 })
622
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
622
623
  .exec();
623
624
  });
624
625
  }
@@ -659,7 +660,7 @@ class MongoRepository {
659
660
  if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.startDate) !== undefined) {
660
661
  query.sort({ startDate: params.sort.startDate });
661
662
  }
662
- return query.setOptions({ maxTimeMS: 10000 })
663
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
663
664
  .exec()
664
665
  .then((docs) => docs.map((doc) => doc.toObject()));
665
666
  });
@@ -35,7 +35,7 @@ export declare class MongoRepository {
35
35
  /**
36
36
  * 検索
37
37
  */
38
- search(params: factory.categoryCode.ISearchConditions): Promise<factory.categoryCode.ICategoryCode[]>;
38
+ search(params: factory.categoryCode.ISearchConditions, inclusion: string[], exclusion: string[]): Promise<factory.categoryCode.ICategoryCode[]>;
39
39
  findById(params: {
40
40
  id: string;
41
41
  }): Promise<factory.categoryCode.ICategoryCode>;