@chevre/domain 21.2.0-alpha.13 → 21.2.0-alpha.130

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 (296) hide show
  1. package/example/src/chevre/aggregateEventReservation.ts +1 -1
  2. package/example/src/chevre/aggregation/aggregateSystem.ts +85 -27
  3. package/example/src/chevre/countDelayedTasks.ts +7 -2
  4. package/example/src/chevre/deleteTasksByName.ts +10 -2
  5. package/example/src/chevre/findMovieTheaterById.ts +40 -0
  6. package/example/src/chevre/importEventsFromCOA.ts +3 -4
  7. package/example/src/chevre/lockStockHolder.ts +5 -2
  8. package/example/src/chevre/migrateOrderAdditionalProperties.ts +85 -0
  9. package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +79 -0
  10. package/example/src/chevre/processPay.ts +5 -1
  11. package/example/src/chevre/processRegisterMembership.ts +8 -4
  12. package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
  13. package/example/src/chevre/processReserve.ts +5 -2
  14. package/example/src/chevre/saveTasks.ts +13 -10
  15. package/example/src/chevre/searchAbortedTasks.ts +34 -0
  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/searchReservationNumbersByOrderNumbers.ts +37 -1
  20. package/example/src/chevre/searchScreeningRooms.ts +23 -0
  21. package/example/src/chevre/searchSendEmailActions.ts +44 -0
  22. package/example/src/chevre/task/executeTasks.ts +26 -0
  23. package/example/src/chevre/transaction/findCreditCard.ts +1 -1
  24. package/example/src/chevre/transaction/orderMembershipService.ts +1 -1
  25. package/example/src/chevre/transaction/processReturnOrder.ts +40 -0
  26. package/example/src/chevre/transaction/startExportTasks.ts +2 -1
  27. package/example/src/chevre/updateScreeningRoom.ts +41 -0
  28. package/example/src/chevre/updateTransaction.ts +1 -1
  29. package/example/src/playOnMoment.ts +24 -0
  30. package/lib/chevre/credentials.d.ts +1 -0
  31. package/lib/chevre/credentials.js +2 -1
  32. package/lib/chevre/eventEmitter/assetTransaction.d.ts +21 -0
  33. package/lib/chevre/eventEmitter/assetTransaction.js +25 -0
  34. package/lib/chevre/eventEmitter/task.d.ts +18 -0
  35. package/lib/chevre/eventEmitter/task.js +25 -0
  36. package/lib/chevre/eventEmitter/transaction.d.ts +21 -0
  37. package/lib/chevre/eventEmitter/transaction.js +25 -0
  38. package/lib/chevre/eventEmitter.d.ts +4 -0
  39. package/lib/chevre/eventEmitter.js +9 -0
  40. package/lib/chevre/index.d.ts +3 -2
  41. package/lib/chevre/index.js +5 -3
  42. package/lib/chevre/repo/account.js +3 -2
  43. package/lib/chevre/repo/accountTransaction.d.ts +3 -1
  44. package/lib/chevre/repo/accountTransaction.js +3 -2
  45. package/lib/chevre/repo/action.d.ts +42 -2
  46. package/lib/chevre/repo/action.js +130 -57
  47. package/lib/chevre/repo/additionalProperty.js +2 -1
  48. package/lib/chevre/repo/aggregation.d.ts +3 -0
  49. package/lib/chevre/repo/aggregation.js +3 -0
  50. package/lib/chevre/repo/assetTransaction.d.ts +23 -8
  51. package/lib/chevre/repo/assetTransaction.js +253 -80
  52. package/lib/chevre/repo/categoryCode.d.ts +1 -1
  53. package/lib/chevre/repo/categoryCode.js +37 -25
  54. package/lib/chevre/repo/code.js +3 -2
  55. package/lib/chevre/repo/comment.d.ts +4 -1
  56. package/lib/chevre/repo/comment.js +22 -6
  57. package/lib/chevre/repo/confirmationNumber.d.ts +0 -1
  58. package/lib/chevre/repo/confirmationNumber.js +3 -15
  59. package/lib/chevre/repo/creativeWork.d.ts +2 -4
  60. package/lib/chevre/repo/creativeWork.js +35 -12
  61. package/lib/chevre/repo/customer.js +2 -1
  62. package/lib/chevre/repo/emailMessage.d.ts +1 -27
  63. package/lib/chevre/repo/emailMessage.js +2 -1
  64. package/lib/chevre/repo/event.d.ts +27 -1
  65. package/lib/chevre/repo/event.js +67 -33
  66. package/lib/chevre/repo/member.js +4 -3
  67. package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -3
  68. package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
  69. package/lib/chevre/repo/mongoose/schemas/account.d.ts +4 -2
  70. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +29 -3
  71. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +31 -3
  72. package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
  73. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +13 -3
  74. package/lib/chevre/repo/mongoose/schemas/action.d.ts +43 -3
  75. package/lib/chevre/repo/mongoose/schemas/action.js +19 -1
  76. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +17 -3
  77. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +4 -2
  78. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +44 -3
  79. package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +32 -19
  80. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +19 -3
  81. package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
  82. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +25 -3
  83. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +27 -3
  84. package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
  85. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +43 -3
  86. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +25 -3
  87. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +21 -3
  88. package/lib/chevre/repo/mongoose/schemas/event.d.ts +71 -3
  89. package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
  90. package/lib/chevre/repo/mongoose/schemas/holdReservation.js +62 -0
  91. package/lib/chevre/repo/mongoose/schemas/member.d.ts +13 -3
  92. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +21 -3
  93. package/lib/chevre/repo/mongoose/schemas/offer.d.ts +65 -3
  94. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +27 -3
  95. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +74 -0
  96. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +45 -0
  97. package/lib/chevre/repo/mongoose/schemas/order.d.ts +51 -3
  98. package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
  99. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +25 -3
  100. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
  101. package/lib/chevre/repo/mongoose/schemas/place.d.ts +49 -3
  102. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +29 -3
  103. package/lib/chevre/repo/mongoose/schemas/product.d.ts +31 -3
  104. package/lib/chevre/repo/mongoose/schemas/project.d.ts +23 -3
  105. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +63 -5
  106. package/lib/chevre/repo/mongoose/schemas/reservation.js +1 -1
  107. package/lib/chevre/repo/mongoose/schemas/role.d.ts +11 -3
  108. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +31 -3
  109. package/lib/chevre/repo/mongoose/schemas/seller.js +6 -0
  110. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +11 -3
  111. package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
  112. package/lib/chevre/repo/mongoose/schemas/task.d.ts +30 -3
  113. package/lib/chevre/repo/mongoose/schemas/task.js +2 -1
  114. package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +21 -3
  115. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +40 -3
  116. package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -1
  117. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +11 -3
  118. package/lib/chevre/repo/offer.js +3 -2
  119. package/lib/chevre/repo/offerCatalog.js +0 -27
  120. package/lib/chevre/repo/offerItemCondition.d.ts +22 -0
  121. package/lib/chevre/repo/offerItemCondition.js +121 -0
  122. package/lib/chevre/repo/order.d.ts +55 -3
  123. package/lib/chevre/repo/order.js +62 -10
  124. package/lib/chevre/repo/ownershipInfo.js +2 -7
  125. package/lib/chevre/repo/place.d.ts +20 -5
  126. package/lib/chevre/repo/place.js +63 -23
  127. package/lib/chevre/repo/priceSpecification.js +3 -2
  128. package/lib/chevre/repo/product.d.ts +1 -3
  129. package/lib/chevre/repo/product.js +25 -4
  130. package/lib/chevre/repo/project.js +2 -1
  131. package/lib/chevre/repo/reservation.d.ts +20 -4
  132. package/lib/chevre/repo/reservation.js +40 -59
  133. package/lib/chevre/repo/role.js +3 -2
  134. package/lib/chevre/repo/seller.d.ts +1 -1
  135. package/lib/chevre/repo/seller.js +44 -23
  136. package/lib/chevre/repo/serviceOutput.js +2 -1
  137. package/lib/chevre/repo/stockHolder.d.ts +137 -7
  138. package/lib/chevre/repo/stockHolder.js +527 -102
  139. package/lib/chevre/repo/task.d.ts +45 -2
  140. package/lib/chevre/repo/task.js +94 -15
  141. package/lib/chevre/repo/transaction.d.ts +21 -2
  142. package/lib/chevre/repo/transaction.js +171 -50
  143. package/lib/chevre/repo/trip.js +2 -1
  144. package/lib/chevre/repository.d.ts +5 -2
  145. package/lib/chevre/repository.js +8 -4
  146. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +6 -2
  147. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +8 -6
  148. package/lib/chevre/service/aggregation/system.d.ts +110 -23
  149. package/lib/chevre/service/aggregation/system.js +213 -91
  150. package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -28
  151. package/lib/chevre/service/assetTransaction/moneyTransfer.js +2 -24
  152. package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
  153. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +17 -1
  154. package/lib/chevre/service/assetTransaction/pay.d.ts +5 -1
  155. package/lib/chevre/service/assetTransaction/pay.js +20 -34
  156. package/lib/chevre/service/assetTransaction/refund.js +2 -24
  157. package/lib/chevre/service/assetTransaction/registerService.js +1 -25
  158. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +15 -5
  159. package/lib/chevre/service/assetTransaction/reserve/factory.js +122 -58
  160. package/lib/chevre/service/assetTransaction/reserve.d.ts +10 -1
  161. package/lib/chevre/service/assetTransaction/reserve.js +92 -69
  162. package/lib/chevre/service/assetTransaction.d.ts +6 -0
  163. package/lib/chevre/service/assetTransaction.js +9 -4
  164. package/lib/chevre/service/event.js +25 -6
  165. package/lib/chevre/service/notification/factory.js +2 -2
  166. package/lib/chevre/service/notification.d.ts +3 -1
  167. package/lib/chevre/service/notification.js +41 -7
  168. package/lib/chevre/service/offer/event/authorize.d.ts +3 -0
  169. package/lib/chevre/service/offer/event/authorize.js +8 -2
  170. package/lib/chevre/service/offer/event/factory.d.ts +3 -0
  171. package/lib/chevre/service/offer/event/factory.js +16 -5
  172. package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
  173. package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
  174. package/lib/chevre/service/offer/event/voidTransaction.js +17 -1
  175. package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
  176. package/lib/chevre/service/offer/product.js +2 -2
  177. package/lib/chevre/service/offer.d.ts +16 -8
  178. package/lib/chevre/service/offer.js +71 -8
  179. package/lib/chevre/service/order/deleteOrder.d.ts +3 -1
  180. package/lib/chevre/service/order/deleteOrder.js +8 -8
  181. package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +5 -2
  182. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +41 -81
  183. package/lib/chevre/service/order/onOrderStatusChanged.js +1 -3
  184. package/lib/chevre/service/order/onOrderUpdated.d.ts +16 -0
  185. package/lib/chevre/service/order/onOrderUpdated.js +22 -0
  186. package/lib/chevre/service/order/placeOrder.d.ts +1 -0
  187. package/lib/chevre/service/order/placeOrder.js +41 -24
  188. package/lib/chevre/service/order/returnOrder.d.ts +1 -0
  189. package/lib/chevre/service/order/returnOrder.js +7 -12
  190. package/lib/chevre/service/order/sendOrder.d.ts +1 -0
  191. package/lib/chevre/service/order/sendOrder.js +7 -10
  192. package/lib/chevre/service/order.d.ts +2 -1
  193. package/lib/chevre/service/order.js +3 -1
  194. package/lib/chevre/service/payment/any/onPaid.js +1 -1
  195. package/lib/chevre/service/payment/any/onRefund.js +1 -1
  196. package/lib/chevre/service/payment/any.d.ts +9 -5
  197. package/lib/chevre/service/payment/any.js +80 -18
  198. package/lib/chevre/service/payment/creditCard.d.ts +1 -1
  199. package/lib/chevre/service/payment/creditCard.js +23 -17
  200. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +8 -7
  201. package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
  202. package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
  203. package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
  204. package/lib/chevre/service/payment/movieTicket/validation.d.ts +6 -6
  205. package/lib/chevre/service/payment/movieTicket/validation.js +55 -32
  206. package/lib/chevre/service/payment/movieTicket.d.ts +2 -2
  207. package/lib/chevre/service/payment/movieTicket.js +7 -6
  208. package/lib/chevre/service/product.js +1 -5
  209. package/lib/chevre/service/report/telemetry.d.ts +0 -11
  210. package/lib/chevre/service/report/telemetry.js +21 -24
  211. package/lib/chevre/service/reserve/cancelReservation.d.ts +5 -3
  212. package/lib/chevre/service/reserve/cancelReservation.js +162 -142
  213. package/lib/chevre/service/reserve/checkInReservation.d.ts +9 -4
  214. package/lib/chevre/service/reserve/checkInReservation.js +77 -3
  215. package/lib/chevre/service/reserve/confirmReservation.d.ts +7 -4
  216. package/lib/chevre/service/reserve/confirmReservation.js +133 -58
  217. package/lib/chevre/service/reserve/factory.d.ts +1 -1
  218. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +17 -5
  219. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +26 -24
  220. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -3
  221. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -31
  222. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -3
  223. package/lib/chevre/service/reserve/useReservation.d.ts +7 -3
  224. package/lib/chevre/service/reserve/useReservation.js +61 -71
  225. package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +15 -0
  226. package/lib/chevre/service/reserve/verifyToken4reservation.js +56 -0
  227. package/lib/chevre/service/reserve.d.ts +3 -2
  228. package/lib/chevre/service/reserve.js +4 -2
  229. package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
  230. package/lib/chevre/service/task/cancelPendingReservation.js +6 -2
  231. package/lib/chevre/service/task/cancelReservation.js +1 -1
  232. package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
  233. package/lib/chevre/service/task/deleteTransaction.js +10 -8
  234. package/lib/chevre/service/task/importOffersFromCOA.js +4 -0
  235. package/lib/chevre/service/task/onAuthorizationCreated.d.ts +7 -0
  236. package/lib/chevre/service/task/onAuthorizationCreated.js +108 -0
  237. package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
  238. package/lib/chevre/service/task/{deleteOrder.js → onEventChanged.js} +8 -14
  239. package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
  240. package/lib/chevre/service/task/onResourceUpdated.js +352 -0
  241. package/lib/chevre/service/task/placeOrder.js +1 -1
  242. package/lib/chevre/service/task/reserve.js +10 -7
  243. package/lib/chevre/service/task/returnOrder.js +1 -1
  244. package/lib/chevre/service/task/returnPayTransaction.js +2 -12
  245. package/lib/chevre/service/task/sendOrder.js +1 -1
  246. package/lib/chevre/service/task/useReservation.d.ts +7 -0
  247. package/lib/chevre/service/task/useReservation.js +36 -0
  248. package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
  249. package/lib/chevre/service/task.d.ts +9 -0
  250. package/lib/chevre/service/task.js +43 -4
  251. package/lib/chevre/service/transaction/deleteTransaction.d.ts +21 -0
  252. package/lib/chevre/service/transaction/deleteTransaction.js +232 -0
  253. package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +11 -1
  254. package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
  255. package/lib/chevre/service/transaction/moneyTransfer/factory.js +3 -1
  256. package/lib/chevre/service/transaction/moneyTransfer/potentialActions.d.ts +1 -0
  257. package/lib/chevre/service/transaction/moneyTransfer/potentialActions.js +1 -1
  258. package/lib/chevre/service/transaction/moneyTransfer.js +10 -13
  259. package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
  260. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
  261. package/lib/chevre/service/transaction/orderProgramMembership.js +7 -3
  262. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +42 -30
  263. package/lib/chevre/service/transaction/placeOrder.js +1 -5
  264. package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +1 -1
  265. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -0
  266. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
  267. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +1 -0
  268. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
  269. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +1 -0
  270. package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +3 -0
  271. package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +7 -3
  272. package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -0
  273. package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -2
  274. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +1 -1
  275. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +2 -2
  276. package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +2 -1
  277. package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +23 -17
  278. package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +0 -3
  279. package/lib/chevre/service/transaction/placeOrderInProgress.js +28 -15
  280. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +10 -1
  281. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +25 -17
  282. package/lib/chevre/service/transaction/returnOrder.d.ts +4 -0
  283. package/lib/chevre/service/transaction/returnOrder.js +228 -36
  284. package/lib/chevre/service/transaction.d.ts +7 -13
  285. package/lib/chevre/service/transaction.js +12 -139
  286. package/lib/chevre/settings.d.ts +13 -1
  287. package/lib/chevre/settings.js +56 -6
  288. package/package.json +5 -5
  289. package/example/src/chevre/createManyEventsIfNotExist.ts +0 -205
  290. package/example/src/chevre/eventCatalog2eventService.ts +0 -123
  291. package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
  292. package/example/src/chevre/migrateMovieAdditionalProperties.ts +0 -98
  293. package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
  294. package/lib/chevre/service/task/deleteAssetTransaction.d.ts +0 -12
  295. package/lib/chevre/service/task/deleteAssetTransaction.js +0 -65
  296. package/lib/chevre/service/task/deleteOrder.d.ts +0 -6
@@ -25,6 +25,7 @@ const uniqid = require("uniqid");
25
25
  const factory = require("../factory");
26
26
  const event_1 = require("./mongoose/schemas/event");
27
27
  const errorHandler_1 = require("../errorHandler");
28
+ const settings_1 = require("../settings");
28
29
  exports.PROJECTION_MINIMIZED_EVENT = {
29
30
  project: 1,
30
31
  _id: 1,
@@ -50,7 +51,7 @@ class MongoRepository {
50
51
  }
51
52
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
52
53
  static CREATE_MONGO_CONDITIONS(conditions) {
53
- 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;
54
+ 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;
54
55
  const andConditions = [{ typeOf: { $eq: conditions.typeOf } }];
55
56
  const projectIdEq = (_b = (_a = conditions.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
56
57
  if (typeof projectIdEq === 'string') {
@@ -115,18 +116,15 @@ class MongoRepository {
115
116
  }
116
117
  const locationBranchCodeEq = (_e = (_d = conditions.location) === null || _d === void 0 ? void 0 : _d.branchCode) === null || _e === void 0 ? void 0 : _e.$eq;
117
118
  if (typeof locationBranchCodeEq === 'string') {
118
- // tslint:disable-next-line:no-single-line-block-comment
119
- /* istanbul ignore else */
120
- andConditions.push({
121
- 'location.branchCode': {
122
- $exists: true,
123
- $eq: locationBranchCodeEq
124
- }
125
- });
119
+ andConditions.push({ 'location.branchCode': { $exists: true, $eq: locationBranchCodeEq } });
120
+ }
121
+ const locationBranchCodeIn = (_g = (_f = conditions.location) === null || _f === void 0 ? void 0 : _f.branchCode) === null || _g === void 0 ? void 0 : _g.$in;
122
+ if (Array.isArray(locationBranchCodeIn)) {
123
+ andConditions.push({ 'location.branchCode': { $exists: true, $in: locationBranchCodeIn } });
126
124
  }
127
125
  // tslint:disable-next-line:no-single-line-block-comment
128
126
  /* istanbul ignore else */
129
- const hasOfferCatalogIdEq = (_g = (_f = conditions.hasOfferCatalog) === null || _f === void 0 ? void 0 : _f.id) === null || _g === void 0 ? void 0 : _g.$eq;
127
+ const hasOfferCatalogIdEq = (_j = (_h = conditions.hasOfferCatalog) === null || _h === void 0 ? void 0 : _h.id) === null || _j === void 0 ? void 0 : _j.$eq;
130
128
  if (typeof hasOfferCatalogIdEq === 'string') {
131
129
  andConditions.push({
132
130
  'hasOfferCatalog.id': {
@@ -135,7 +133,7 @@ class MongoRepository {
135
133
  }
136
134
  });
137
135
  }
138
- const additionalPropertyElemMatch = (_h = conditions.additionalProperty) === null || _h === void 0 ? void 0 : _h.$elemMatch;
136
+ const additionalPropertyElemMatch = (_k = conditions.additionalProperty) === null || _k === void 0 ? void 0 : _k.$elemMatch;
139
137
  if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
140
138
  andConditions.push({
141
139
  additionalProperty: {
@@ -151,7 +149,7 @@ class MongoRepository {
151
149
  // tslint:disable-next-line:no-single-line-block-comment
152
150
  /* istanbul ignore else */
153
151
  if (params.offers !== undefined) {
154
- const itemOfferedIdIn4event = (_k = (_j = params.offers.itemOffered) === null || _j === void 0 ? void 0 : _j.id) === null || _k === void 0 ? void 0 : _k.$in;
152
+ const itemOfferedIdIn4event = (_m = (_l = params.offers.itemOffered) === null || _l === void 0 ? void 0 : _l.id) === null || _m === void 0 ? void 0 : _m.$in;
155
153
  if (Array.isArray(itemOfferedIdIn4event)) {
156
154
  andConditions.push({
157
155
  'offers.itemOffered.id': {
@@ -201,8 +199,8 @@ class MongoRepository {
201
199
  }
202
200
  }
203
201
  }
204
- const sellerMakesOfferElemMatch4event = (_o = (_m = (_l = params.offers) === null || _l === void 0 ? void 0 : _l.seller) === null || _m === void 0 ? void 0 : _m.makesOffer) === null || _o === void 0 ? void 0 : _o.$elemMatch;
205
- if (typeof ((_p = sellerMakesOfferElemMatch4event === null || sellerMakesOfferElemMatch4event === void 0 ? void 0 : sellerMakesOfferElemMatch4event['availableAtOrFrom.id']) === null || _p === void 0 ? void 0 : _p.$eq) === 'string') {
202
+ const sellerMakesOfferElemMatch4event = (_q = (_p = (_o = params.offers) === null || _o === void 0 ? void 0 : _o.seller) === null || _p === void 0 ? void 0 : _p.makesOffer) === null || _q === void 0 ? void 0 : _q.$elemMatch;
203
+ if (typeof ((_r = sellerMakesOfferElemMatch4event === null || sellerMakesOfferElemMatch4event === void 0 ? void 0 : sellerMakesOfferElemMatch4event['availableAtOrFrom.id']) === null || _r === void 0 ? void 0 : _r.$eq) === 'string') {
206
204
  andConditions.push({
207
205
  'offers.seller.makesOffer': {
208
206
  $exists: true,
@@ -210,7 +208,7 @@ class MongoRepository {
210
208
  }
211
209
  });
212
210
  }
213
- const reservationForIdentifierEq = (_u = (_t = (_s = (_r = (_q = params.offers) === null || _q === void 0 ? void 0 : _q.itemOffered) === null || _r === void 0 ? void 0 : _r.serviceOutput) === null || _s === void 0 ? void 0 : _s.reservationFor) === null || _t === void 0 ? void 0 : _t.identifier) === null || _u === void 0 ? void 0 : _u.$eq;
211
+ const reservationForIdentifierEq = (_w = (_v = (_u = (_t = (_s = params.offers) === null || _s === void 0 ? void 0 : _s.itemOffered) === null || _t === void 0 ? void 0 : _t.serviceOutput) === null || _u === void 0 ? void 0 : _u.reservationFor) === null || _v === void 0 ? void 0 : _v.identifier) === null || _w === void 0 ? void 0 : _w.$eq;
214
212
  if (typeof reservationForIdentifierEq === 'string') {
215
213
  andConditions.push({
216
214
  'offers.itemOffered.serviceOutput.reservationFor.identifier': {
@@ -219,7 +217,7 @@ class MongoRepository {
219
217
  }
220
218
  });
221
219
  }
222
- const reservationForArrivalBusStopBranchCodeEq = (_0 = (_z = (_y = (_x = (_w = (_v = params.offers) === null || _v === void 0 ? void 0 : _v.itemOffered) === null || _w === void 0 ? void 0 : _w.serviceOutput) === null || _x === void 0 ? void 0 : _x.reservationFor) === null || _y === void 0 ? void 0 : _y.arrivalBusStop) === null || _z === void 0 ? void 0 : _z.branchCode) === null || _0 === void 0 ? void 0 : _0.$eq;
220
+ const reservationForArrivalBusStopBranchCodeEq = (_2 = (_1 = (_0 = (_z = (_y = (_x = params.offers) === null || _x === void 0 ? void 0 : _x.itemOffered) === null || _y === void 0 ? void 0 : _y.serviceOutput) === null || _z === void 0 ? void 0 : _z.reservationFor) === null || _0 === void 0 ? void 0 : _0.arrivalBusStop) === null || _1 === void 0 ? void 0 : _1.branchCode) === null || _2 === void 0 ? void 0 : _2.$eq;
223
221
  if (typeof reservationForArrivalBusStopBranchCodeEq === 'string') {
224
222
  andConditions.push({
225
223
  'offers.itemOffered.serviceOutput.reservationFor.arrivalBusStop.branchCode': {
@@ -228,7 +226,7 @@ class MongoRepository {
228
226
  }
229
227
  });
230
228
  }
231
- const reservationForDepartureBusStopBranchCodeEq = (_6 = (_5 = (_4 = (_3 = (_2 = (_1 = params.offers) === null || _1 === void 0 ? void 0 : _1.itemOffered) === null || _2 === void 0 ? void 0 : _2.serviceOutput) === null || _3 === void 0 ? void 0 : _3.reservationFor) === null || _4 === void 0 ? void 0 : _4.departureBusStop) === null || _5 === void 0 ? void 0 : _5.branchCode) === null || _6 === void 0 ? void 0 : _6.$eq;
229
+ const reservationForDepartureBusStopBranchCodeEq = (_8 = (_7 = (_6 = (_5 = (_4 = (_3 = params.offers) === null || _3 === void 0 ? void 0 : _3.itemOffered) === null || _4 === void 0 ? void 0 : _4.serviceOutput) === null || _5 === void 0 ? void 0 : _5.reservationFor) === null || _6 === void 0 ? void 0 : _6.departureBusStop) === null || _7 === void 0 ? void 0 : _7.branchCode) === null || _8 === void 0 ? void 0 : _8.$eq;
232
230
  if (typeof reservationForDepartureBusStopBranchCodeEq === 'string') {
233
231
  andConditions.push({
234
232
  'offers.itemOffered.serviceOutput.reservationFor.departureBusStop.branchCode': {
@@ -262,7 +260,7 @@ class MongoRepository {
262
260
  }
263
261
  // tslint:disable-next-line:no-single-line-block-comment
264
262
  /* istanbul ignore else */
265
- const superEventLocationIdEq = (_9 = (_8 = (_7 = params.superEvent) === null || _7 === void 0 ? void 0 : _7.location) === null || _8 === void 0 ? void 0 : _8.id) === null || _9 === void 0 ? void 0 : _9.$eq;
263
+ const superEventLocationIdEq = (_11 = (_10 = (_9 = params.superEvent) === null || _9 === void 0 ? void 0 : _9.location) === null || _10 === void 0 ? void 0 : _10.id) === null || _11 === void 0 ? void 0 : _11.$eq;
266
264
  if (typeof superEventLocationIdEq === 'string') {
267
265
  andConditions.push({
268
266
  'superEvent.location.id': {
@@ -305,7 +303,7 @@ class MongoRepository {
305
303
  });
306
304
  }
307
305
  }
308
- const itemOfferedIdIn = (_12 = (_11 = (_10 = params.offers) === null || _10 === void 0 ? void 0 : _10.itemOffered) === null || _11 === void 0 ? void 0 : _11.id) === null || _12 === void 0 ? void 0 : _12.$in;
306
+ const itemOfferedIdIn = (_14 = (_13 = (_12 = params.offers) === null || _12 === void 0 ? void 0 : _12.itemOffered) === null || _13 === void 0 ? void 0 : _13.id) === null || _14 === void 0 ? void 0 : _14.$in;
309
307
  if (Array.isArray(itemOfferedIdIn)) {
310
308
  andConditions.push({
311
309
  'offers.itemOffered.id': {
@@ -314,7 +312,7 @@ class MongoRepository {
314
312
  }
315
313
  });
316
314
  }
317
- const itemOfferedTicketedSeatTypeOfIn = (_17 = (_16 = (_15 = (_14 = (_13 = params.offers) === null || _13 === void 0 ? void 0 : _13.itemOffered) === null || _14 === void 0 ? void 0 : _14.serviceOutput) === null || _15 === void 0 ? void 0 : _15.reservedTicket) === null || _16 === void 0 ? void 0 : _16.ticketedSeat) === null || _17 === void 0 ? void 0 : _17.typeOfs;
315
+ const itemOfferedTicketedSeatTypeOfIn = (_19 = (_18 = (_17 = (_16 = (_15 = params.offers) === null || _15 === void 0 ? void 0 : _15.itemOffered) === null || _16 === void 0 ? void 0 : _16.serviceOutput) === null || _17 === void 0 ? void 0 : _17.reservedTicket) === null || _18 === void 0 ? void 0 : _18.ticketedSeat) === null || _19 === void 0 ? void 0 : _19.typeOfs;
318
316
  if (Array.isArray(itemOfferedTicketedSeatTypeOfIn)) {
319
317
  andConditions.push({
320
318
  'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': {
@@ -323,7 +321,7 @@ class MongoRepository {
323
321
  }
324
322
  });
325
323
  }
326
- const itemOfferedServiceTypeIdIn = (_20 = (_19 = (_18 = params.offers) === null || _18 === void 0 ? void 0 : _18.itemOffered) === null || _19 === void 0 ? void 0 : _19.serviceType) === null || _20 === void 0 ? void 0 : _20.ids;
324
+ const itemOfferedServiceTypeIdIn = (_22 = (_21 = (_20 = params.offers) === null || _20 === void 0 ? void 0 : _20.itemOffered) === null || _21 === void 0 ? void 0 : _21.serviceType) === null || _22 === void 0 ? void 0 : _22.ids;
327
325
  if (Array.isArray(itemOfferedServiceTypeIdIn)) {
328
326
  andConditions.push({
329
327
  'offers.itemOffered.serviceType.id': {
@@ -332,8 +330,8 @@ class MongoRepository {
332
330
  }
333
331
  });
334
332
  }
335
- const sellerMakesOfferElemMatch = (_23 = (_22 = (_21 = params.offers) === null || _21 === void 0 ? void 0 : _21.seller) === null || _22 === void 0 ? void 0 : _22.makesOffer) === null || _23 === void 0 ? void 0 : _23.$elemMatch;
336
- if (typeof ((_24 = sellerMakesOfferElemMatch === null || sellerMakesOfferElemMatch === void 0 ? void 0 : sellerMakesOfferElemMatch['availableAtOrFrom.id']) === null || _24 === void 0 ? void 0 : _24.$eq) === 'string') {
333
+ const sellerMakesOfferElemMatch = (_25 = (_24 = (_23 = params.offers) === null || _23 === void 0 ? void 0 : _23.seller) === null || _24 === void 0 ? void 0 : _24.makesOffer) === null || _25 === void 0 ? void 0 : _25.$elemMatch;
334
+ if (typeof ((_26 = sellerMakesOfferElemMatch === null || sellerMakesOfferElemMatch === void 0 ? void 0 : sellerMakesOfferElemMatch['availableAtOrFrom.id']) === null || _26 === void 0 ? void 0 : _26.$eq) === 'string') {
337
335
  andConditions.push({
338
336
  'offers.seller.makesOffer': {
339
337
  $exists: true,
@@ -370,7 +368,7 @@ class MongoRepository {
370
368
  ]
371
369
  });
372
370
  }
373
- const locationIdEq = (_26 = (_25 = params.location) === null || _25 === void 0 ? void 0 : _25.id) === null || _26 === void 0 ? void 0 : _26.$eq;
371
+ const locationIdEq = (_28 = (_27 = params.location) === null || _27 === void 0 ? void 0 : _27.id) === null || _28 === void 0 ? void 0 : _28.$eq;
374
372
  // tslint:disable-next-line:no-single-line-block-comment
375
373
  /* istanbul ignore else */
376
374
  if (typeof locationIdEq === 'string') {
@@ -392,7 +390,7 @@ class MongoRepository {
392
390
  });
393
391
  }
394
392
  }
395
- const workPerformedIdentifierIn = (_27 = params.workPerformed) === null || _27 === void 0 ? void 0 : _27.identifiers;
393
+ const workPerformedIdentifierIn = (_29 = params.workPerformed) === null || _29 === void 0 ? void 0 : _29.identifiers;
396
394
  // tslint:disable-next-line:no-single-line-block-comment
397
395
  /* istanbul ignore else */
398
396
  if (Array.isArray(workPerformedIdentifierIn)) {
@@ -400,13 +398,13 @@ class MongoRepository {
400
398
  'workPerformed.identifier': { $exists: true, $in: workPerformedIdentifierIn }
401
399
  });
402
400
  }
403
- const workPerformedVersionEq = (_29 = (_28 = params.workPerformed) === null || _28 === void 0 ? void 0 : _28.version) === null || _29 === void 0 ? void 0 : _29.$eq;
401
+ const workPerformedVersionEq = (_31 = (_30 = params.workPerformed) === null || _30 === void 0 ? void 0 : _30.version) === null || _31 === void 0 ? void 0 : _31.$eq;
404
402
  if (typeof workPerformedVersionEq === 'string') {
405
403
  andConditions.push({
406
404
  'workPerformed.version': { $exists: true, $eq: workPerformedVersionEq }
407
405
  });
408
406
  }
409
- const videoFormatTypeOfEq = (_31 = (_30 = params.videoFormat) === null || _30 === void 0 ? void 0 : _30.typeOf) === null || _31 === void 0 ? void 0 : _31.$eq;
407
+ const videoFormatTypeOfEq = (_33 = (_32 = params.videoFormat) === null || _32 === void 0 ? void 0 : _32.typeOf) === null || _33 === void 0 ? void 0 : _33.$eq;
410
408
  if (typeof videoFormatTypeOfEq === 'string') {
411
409
  andConditions.push({
412
410
  'videoFormat.typeOf': {
@@ -415,7 +413,7 @@ class MongoRepository {
415
413
  }
416
414
  });
417
415
  }
418
- const videoFormatTypeOfIn = (_33 = (_32 = params.videoFormat) === null || _32 === void 0 ? void 0 : _32.typeOf) === null || _33 === void 0 ? void 0 : _33.$in;
416
+ const videoFormatTypeOfIn = (_35 = (_34 = params.videoFormat) === null || _34 === void 0 ? void 0 : _34.typeOf) === null || _35 === void 0 ? void 0 : _35.$in;
419
417
  if (Array.isArray(videoFormatTypeOfIn)) {
420
418
  andConditions.push({
421
419
  'videoFormat.typeOf': {
@@ -424,7 +422,7 @@ class MongoRepository {
424
422
  }
425
423
  });
426
424
  }
427
- const soundFormatTypeOfEq = (_35 = (_34 = params.soundFormat) === null || _34 === void 0 ? void 0 : _34.typeOf) === null || _35 === void 0 ? void 0 : _35.$eq;
425
+ const soundFormatTypeOfEq = (_37 = (_36 = params.soundFormat) === null || _36 === void 0 ? void 0 : _36.typeOf) === null || _37 === void 0 ? void 0 : _37.$eq;
428
426
  if (typeof soundFormatTypeOfEq === 'string') {
429
427
  andConditions.push({
430
428
  'soundFormat.typeOf': {
@@ -433,7 +431,7 @@ class MongoRepository {
433
431
  }
434
432
  });
435
433
  }
436
- const soundFormatTypeOfIn = (_37 = (_36 = params.soundFormat) === null || _36 === void 0 ? void 0 : _36.typeOf) === null || _37 === void 0 ? void 0 : _37.$in;
434
+ const soundFormatTypeOfIn = (_39 = (_38 = params.soundFormat) === null || _38 === void 0 ? void 0 : _38.typeOf) === null || _39 === void 0 ? void 0 : _39.$in;
437
435
  if (Array.isArray(soundFormatTypeOfIn)) {
438
436
  andConditions.push({
439
437
  'soundFormat.typeOf': {
@@ -700,7 +698,7 @@ class MongoRepository {
700
698
  return __awaiter(this, void 0, void 0, function* () {
701
699
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
702
700
  return this.eventModel.countDocuments({ $and: conditions })
703
- .setOptions({ maxTimeMS: 10000 })
701
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
704
702
  .exec();
705
703
  });
706
704
  }
@@ -738,7 +736,7 @@ class MongoRepository {
738
736
  // console.log(explainResult[0].queryPlanner?.winningPlan?.inputStage?.inputStage?.inputStage);
739
737
  // console.log(explainResult);
740
738
  // return [];
741
- return query.setOptions({ maxTimeMS: 10000 })
739
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
742
740
  .exec()
743
741
  .then((docs) => docs.map((doc) => doc.toObject()));
744
742
  });
@@ -747,7 +745,7 @@ class MongoRepository {
747
745
  return __awaiter(this, void 0, void 0, function* () {
748
746
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
749
747
  const query = this.eventModel.distinct('_id', { $and: conditions });
750
- return query.setOptions({ maxTimeMS: 10000 })
748
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
751
749
  .exec();
752
750
  });
753
751
  }
@@ -831,6 +829,42 @@ class MongoRepository {
831
829
  .exec();
832
830
  });
833
831
  }
832
+ /**
833
+ * 既存施設コンテンツの最大バージョンを集計する
834
+ */
835
+ aggregateScreeningEventMaxVersion(params) {
836
+ var _a;
837
+ return __awaiter(this, void 0, void 0, function* () {
838
+ const aggregations = yield this.eventModel.aggregate([
839
+ {
840
+ $match: {
841
+ typeOf: { $eq: factory.eventType.ScreeningEventSeries },
842
+ 'project.id': { $eq: params.project.id.$eq },
843
+ 'workPerformed.identifier': { $exists: true, $eq: params.workPerformed.identifier.$eq },
844
+ 'workPerformed.version': { $exists: true },
845
+ 'location.branchCode': { $exists: true, $in: params.location.branchCode.$in }
846
+ }
847
+ },
848
+ {
849
+ $project: {
850
+ workPerformed: '$workPerformed',
851
+ version: { $toInt: '$workPerformed.version' }
852
+ }
853
+ },
854
+ {
855
+ $group: {
856
+ _id: '$typeOf',
857
+ maxVersion: { $max: '$version' }
858
+ }
859
+ }
860
+ ])
861
+ .exec();
862
+ const maxVersion = (aggregations.length > 0)
863
+ ? String((_a = aggregations.shift()) === null || _a === void 0 ? void 0 : _a.maxVersion)
864
+ : '0';
865
+ return { maxVersion };
866
+ });
867
+ }
834
868
  aggregateEvent(params) {
835
869
  return __awaiter(this, void 0, void 0, function* () {
836
870
  const statuses = yield Promise.all([
@@ -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 member_1 = require("./mongoose/schemas/member");
15
+ const settings_1 = require("../settings");
15
16
  /**
16
17
  * IAMメンバーリポジトリ
17
18
  */
@@ -102,7 +103,7 @@ class MongoRepository {
102
103
  return __awaiter(this, void 0, void 0, function* () {
103
104
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
104
105
  return this.memberModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
105
- .setOptions({ maxTimeMS: 10000 })
106
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
106
107
  .exec();
107
108
  });
108
109
  }
@@ -126,7 +127,7 @@ class MongoRepository {
126
127
  }
127
128
  // const explainResult = await (<any>query).explain();
128
129
  // console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
129
- return query.setOptions({ maxTimeMS: 10000 })
130
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
130
131
  .exec()
131
132
  .then((docs) => docs.map((doc) => doc.toObject()));
132
133
  });
@@ -227,7 +228,7 @@ class MongoRepository {
227
228
  query.limit(params.limit)
228
229
  .skip(params.limit * (page - 1));
229
230
  }
230
- const projectMembers = yield query.setOptions({ maxTimeMS: 10000 })
231
+ const projectMembers = yield query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
231
232
  .exec()
232
233
  .then((docs) => docs.map((doc) => doc.toObject()));
233
234
  return projectMembers.map((m) => m.project.id);
@@ -31,9 +31,7 @@ export declare class MongoRepository {
31
31
  private readonly merchantReturnPolicyModel;
32
32
  constructor(connection: Connection);
33
33
  static CREATE_MONGO_CONDITIONS(params: factory.unitPriceOffer.IOfferMerchantReturnPolicySearchConditions): any[];
34
- save(params: factory.unitPriceOffer.IOfferMerchantReturnPolicy): Promise<import("mongoose").LeanDocument<any> & Required<{
35
- _id: unknown;
36
- }>>;
34
+ save(params: factory.unitPriceOffer.IOfferMerchantReturnPolicy): Promise<any>;
37
35
  findById(params: {
38
36
  id: string;
39
37
  }): Promise<factory.unitPriceOffer.IOfferMerchantReturnPolicy>;
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.MongoRepository = void 0;
24
24
  const merchantReturnPolicy_1 = require("./mongoose/schemas/merchantReturnPolicy");
25
25
  const factory = require("../factory");
26
+ const settings_1 = require("../settings");
26
27
  /**
27
28
  * 返品ポリシーリポジトリ
28
29
  */
@@ -144,7 +145,7 @@ class MongoRepository {
144
145
  if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.identifier) !== undefined) {
145
146
  query.sort({ identifier: params.sort.identifier });
146
147
  }
147
- return query.setOptions({ maxTimeMS: 10000 })
148
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
148
149
  .exec()
149
150
  .then((docs) => docs.map((doc) => doc.toObject()));
150
151
  });
@@ -27,7 +27,7 @@ declare const modelName = "Account";
27
27
  /**
28
28
  * 口座スキーマ
29
29
  */
30
- declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").ResolveSchemaOptions<{
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
31
  collection: string;
32
32
  id: true;
33
33
  read: string;
@@ -51,5 +51,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
51
51
  minimize: false;
52
52
  versionKey: false;
53
53
  };
54
- }>, {}>;
54
+ }, {}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{}>> & Omit<import("mongoose").FlatRecord<{}> & Required<{
55
+ _id: unknown;
56
+ }>, never>>;
55
57
  export { modelName, schema };
@@ -27,7 +27,7 @@ declare const modelName = "AccountTitle";
27
27
  /**
28
28
  * 勘定科目スキーマ
29
29
  */
30
- declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").ResolveSchemaOptions<{
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
31
  collection: string;
32
32
  id: true;
33
33
  read: string;
@@ -49,7 +49,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
49
49
  minimize: false;
50
50
  versionKey: false;
51
51
  };
52
- }>, {
52
+ }, {
53
53
  typeOf: string;
54
54
  name?: string | undefined;
55
55
  project?: any;
@@ -61,5 +61,31 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
61
61
  inDefinedTermSet?: any;
62
62
  hasDefinedTerm?: any;
63
63
  additionalProperty?: any;
64
- }>;
64
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
65
+ typeOf: string;
66
+ name?: string | undefined;
67
+ project?: any;
68
+ codeValue?: string | undefined;
69
+ alternateName?: string | undefined;
70
+ description?: string | undefined;
71
+ inCodeSet?: any;
72
+ hasCategoryCode?: any;
73
+ inDefinedTermSet?: any;
74
+ hasDefinedTerm?: any;
75
+ additionalProperty?: any;
76
+ }>> & Omit<import("mongoose").FlatRecord<{
77
+ typeOf: string;
78
+ name?: string | undefined;
79
+ project?: any;
80
+ codeValue?: string | undefined;
81
+ alternateName?: string | undefined;
82
+ description?: string | undefined;
83
+ inCodeSet?: any;
84
+ hasCategoryCode?: any;
85
+ inDefinedTermSet?: any;
86
+ hasDefinedTerm?: any;
87
+ additionalProperty?: any;
88
+ }> & {
89
+ _id: import("mongoose").Types.ObjectId;
90
+ }, never>>;
65
91
  export { modelName, schema };
@@ -27,7 +27,7 @@ declare const modelName = "AccountTransaction";
27
27
  /**
28
28
  * 口座取引スキーマ
29
29
  */
30
- declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").ResolveSchemaOptions<{
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
31
  collection: string;
32
32
  id: true;
33
33
  read: string;
@@ -51,7 +51,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
51
51
  minimize: false;
52
52
  versionKey: false;
53
53
  };
54
- }>, {
54
+ }, {
55
55
  typeOf: string;
56
56
  status: string;
57
57
  transactionNumber: string;
@@ -64,5 +64,33 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
64
64
  startDate?: Date | undefined;
65
65
  endDate?: Date | undefined;
66
66
  potentialActions?: any;
67
- }>;
67
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
68
+ typeOf: string;
69
+ status: string;
70
+ transactionNumber: string;
71
+ object?: any;
72
+ expires?: Date | undefined;
73
+ project?: any;
74
+ identifier?: string | undefined;
75
+ agent?: any;
76
+ recipient?: any;
77
+ startDate?: Date | undefined;
78
+ endDate?: Date | undefined;
79
+ potentialActions?: any;
80
+ }>> & Omit<import("mongoose").FlatRecord<{
81
+ typeOf: string;
82
+ status: string;
83
+ transactionNumber: string;
84
+ object?: any;
85
+ expires?: Date | undefined;
86
+ project?: any;
87
+ identifier?: string | undefined;
88
+ agent?: any;
89
+ recipient?: any;
90
+ startDate?: Date | undefined;
91
+ endDate?: Date | undefined;
92
+ potentialActions?: any;
93
+ }> & {
94
+ _id: import("mongoose").Types.ObjectId;
95
+ }, never>>;
68
96
  export { modelName, schema };
@@ -33,7 +33,7 @@ const schema = new mongoose_1.Schema({
33
33
  }, {
34
34
  collection: 'accountTransactions',
35
35
  id: true,
36
- read: 'primaryPreferred',
36
+ read: 'primary',
37
37
  writeConcern: writeConcern_1.writeConcern,
38
38
  strict: true,
39
39
  strictQuery: false,
@@ -27,7 +27,7 @@ declare const modelName = "AccountingReport";
27
27
  /**
28
28
  * 経理レポートスキーマ
29
29
  */
30
- declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").ResolveSchemaOptions<{
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
31
  collection: string;
32
32
  id: true;
33
33
  read: string;
@@ -51,9 +51,19 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
51
51
  minimize: false;
52
52
  versionKey: false;
53
53
  };
54
- }>, {
54
+ }, {
55
55
  hasPart: (typeof Schema.Types.Mixed)[];
56
56
  mainEntity: typeof Schema.Types.Mixed;
57
57
  project: typeof Schema.Types.Mixed;
58
- }>;
58
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
59
+ hasPart: (typeof Schema.Types.Mixed)[];
60
+ mainEntity: typeof Schema.Types.Mixed;
61
+ project: typeof Schema.Types.Mixed;
62
+ }>> & Omit<import("mongoose").FlatRecord<{
63
+ hasPart: (typeof Schema.Types.Mixed)[];
64
+ mainEntity: typeof Schema.Types.Mixed;
65
+ project: typeof Schema.Types.Mixed;
66
+ }> & {
67
+ _id: import("mongoose").Types.ObjectId;
68
+ }, never>>;
59
69
  export { modelName, schema };
@@ -27,7 +27,7 @@ declare const modelName = "Action";
27
27
  /**
28
28
  * アクションスキーマ
29
29
  */
30
- declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").ResolveSchemaOptions<{
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
31
  collection: string;
32
32
  id: true;
33
33
  read: string;
@@ -51,10 +51,30 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
51
51
  minimize: false;
52
52
  versionKey: false;
53
53
  };
54
- }>, {
54
+ }, {
55
55
  object?: any;
56
+ error?: any;
56
57
  typeOf?: string | undefined;
58
+ result?: any;
59
+ project?: any;
60
+ description?: string | undefined;
61
+ agent?: any;
62
+ recipient?: any;
63
+ startDate?: Date | undefined;
64
+ endDate?: Date | undefined;
65
+ potentialActions?: any;
66
+ fromLocation?: any;
67
+ toLocation?: any;
68
+ actionStatus?: string | undefined;
69
+ purpose?: any;
70
+ amount?: any;
71
+ instrument?: any;
72
+ location?: any;
73
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
74
+ object?: any;
57
75
  error?: any;
76
+ typeOf?: string | undefined;
77
+ result?: any;
58
78
  project?: any;
59
79
  description?: string | undefined;
60
80
  agent?: any;
@@ -65,10 +85,30 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
65
85
  fromLocation?: any;
66
86
  toLocation?: any;
67
87
  actionStatus?: string | undefined;
88
+ purpose?: any;
89
+ amount?: any;
90
+ instrument?: any;
91
+ location?: any;
92
+ }>> & Omit<import("mongoose").FlatRecord<{
93
+ object?: any;
94
+ error?: any;
95
+ typeOf?: string | undefined;
68
96
  result?: any;
97
+ project?: any;
98
+ description?: string | undefined;
99
+ agent?: any;
100
+ recipient?: any;
101
+ startDate?: Date | undefined;
102
+ endDate?: Date | undefined;
103
+ potentialActions?: any;
104
+ fromLocation?: any;
105
+ toLocation?: any;
106
+ actionStatus?: string | undefined;
69
107
  purpose?: any;
70
108
  amount?: any;
71
109
  instrument?: any;
72
110
  location?: any;
73
- }>;
111
+ }> & {
112
+ _id: import("mongoose").Types.ObjectId;
113
+ }, never>>;
74
114
  export { modelName, schema };
@@ -31,7 +31,7 @@ const schema = new mongoose_1.Schema({
31
31
  }, {
32
32
  collection: 'actions',
33
33
  id: true,
34
- read: 'primaryPreferred',
34
+ read: 'primary',
35
35
  writeConcern: writeConcern_1.writeConcern,
36
36
  // true化(2022-11-12~)
37
37
  strict: true,
@@ -117,6 +117,18 @@ schema.index({ 'object.id': 1, startDate: -1 }, {
117
117
  'object.id': { $exists: true }
118
118
  }
119
119
  });
120
+ schema.index({ 'object.movieTickets.identifier': 1, startDate: -1 }, {
121
+ name: 'searchByObjectMovieTicketsIdentifier',
122
+ partialFilterExpression: {
123
+ 'object.movieTickets.identifier': { $exists: true }
124
+ }
125
+ });
126
+ schema.index({ 'object.movieTickets.serviceOutput.reservationFor.id': 1, startDate: -1 }, {
127
+ name: 'searchByObjectMovieTicketsServiceOutputReservationForId',
128
+ partialFilterExpression: {
129
+ 'object.movieTickets.serviceOutput.reservationFor.id': { $exists: true }
130
+ }
131
+ });
120
132
  schema.index({ 'object.paymentMethod.accountId': 1, startDate: -1 }, {
121
133
  name: 'searchByObjectPaymentMethodAccountId',
122
134
  partialFilterExpression: {
@@ -177,6 +189,12 @@ schema.index({ 'object.reservationFor.id': 1, startDate: -1 }, {
177
189
  'object.reservationFor.id': { $exists: true }
178
190
  }
179
191
  });
192
+ schema.index({ 'object.reservationNumber': 1, startDate: -1 }, {
193
+ name: 'searchByObjectReservationNumber',
194
+ partialFilterExpression: {
195
+ 'object.reservationNumber': { $exists: true }
196
+ }
197
+ });
180
198
  schema.index({ 'object.reservedTicket.ticketType.id': 1, startDate: -1 }, {
181
199
  name: 'searchByObjectReservedTicketTicketTypeId',
182
200
  partialFilterExpression: {