@chevre/domain 21.2.0-alpha.99 → 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 (162) 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/processRegisterMembership.ts +8 -4
  12. package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
  13. package/example/src/chevre/processReserve.ts +1 -1
  14. package/example/src/chevre/searchAbortedTasks.ts +4 -6
  15. package/example/src/chevre/searchEventSeats.ts +5 -2
  16. package/example/src/chevre/searchHoldReservations.ts +38 -0
  17. package/example/src/chevre/searchPermissions.ts +54 -0
  18. package/example/src/chevre/searchScreeningRooms.ts +35 -0
  19. package/example/src/chevre/sendEmailMessage.ts +1 -2
  20. package/example/src/chevre/syncScreeningRooms.ts +22 -0
  21. package/example/src/chevre/syncScreeningRoomsAll.ts +44 -0
  22. package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +41 -0
  23. package/lib/chevre/factory/order.d.ts +4 -1
  24. package/lib/chevre/factory/order.js +19 -6
  25. package/lib/chevre/repo/account.js +3 -2
  26. package/lib/chevre/repo/accountTransaction.js +2 -1
  27. package/lib/chevre/repo/accountingReport.d.ts +1 -3
  28. package/lib/chevre/repo/action.d.ts +50 -1
  29. package/lib/chevre/repo/action.js +53 -2
  30. package/lib/chevre/repo/additionalProperty.js +2 -1
  31. package/lib/chevre/repo/aggregation.d.ts +3 -0
  32. package/lib/chevre/repo/aggregation.js +3 -0
  33. package/lib/chevre/repo/assetTransaction.js +6 -5
  34. package/lib/chevre/repo/categoryCode.d.ts +1 -1
  35. package/lib/chevre/repo/categoryCode.js +37 -25
  36. package/lib/chevre/repo/code.js +3 -2
  37. package/lib/chevre/repo/comment.js +2 -1
  38. package/lib/chevre/repo/creativeWork.d.ts +1 -1
  39. package/lib/chevre/repo/creativeWork.js +35 -12
  40. package/lib/chevre/repo/customer.js +2 -1
  41. package/lib/chevre/repo/emailMessage.js +2 -1
  42. package/lib/chevre/repo/event.d.ts +30 -2
  43. package/lib/chevre/repo/event.js +87 -36
  44. package/lib/chevre/repo/member.d.ts +14 -0
  45. package/lib/chevre/repo/member.js +31 -3
  46. package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
  47. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +3 -3
  48. package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
  49. package/lib/chevre/repo/mongoose/schemas/holdReservation.js +93 -0
  50. package/lib/chevre/repo/mongoose/schemas/offer.d.ts +3 -3
  51. package/lib/chevre/repo/mongoose/schemas/order.d.ts +21 -21
  52. package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -0
  53. package/lib/chevre/repo/mongoose/schemas/place.js +16 -1
  54. package/lib/chevre/repo/mongoose/schemas/product.js +6 -0
  55. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +9 -9
  56. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +3 -3
  57. package/lib/chevre/repo/offer.js +3 -2
  58. package/lib/chevre/repo/offerCatalog.js +0 -27
  59. package/lib/chevre/repo/offerItemCondition.js +2 -1
  60. package/lib/chevre/repo/order.js +8 -7
  61. package/lib/chevre/repo/ownershipInfo.js +2 -7
  62. package/lib/chevre/repo/paymentServiceProvider.d.ts +65 -0
  63. package/lib/chevre/repo/paymentServiceProvider.js +156 -0
  64. package/lib/chevre/repo/place.d.ts +203 -27
  65. package/lib/chevre/repo/place.js +1726 -694
  66. package/lib/chevre/repo/priceSpecification.js +3 -2
  67. package/lib/chevre/repo/product.d.ts +5 -3
  68. package/lib/chevre/repo/product.js +92 -5
  69. package/lib/chevre/repo/project.js +2 -1
  70. package/lib/chevre/repo/reservation.d.ts +9 -1
  71. package/lib/chevre/repo/reservation.js +29 -20
  72. package/lib/chevre/repo/role.d.ts +7 -0
  73. package/lib/chevre/repo/role.js +39 -2
  74. package/lib/chevre/repo/seller.d.ts +21 -1
  75. package/lib/chevre/repo/seller.js +59 -4
  76. package/lib/chevre/repo/serviceOutput.js +2 -1
  77. package/lib/chevre/repo/stockHolder.d.ts +143 -7
  78. package/lib/chevre/repo/stockHolder.js +622 -104
  79. package/lib/chevre/repo/task.d.ts +12 -1
  80. package/lib/chevre/repo/task.js +17 -7
  81. package/lib/chevre/repo/transaction.js +6 -5
  82. package/lib/chevre/repo/trip.js +2 -1
  83. package/lib/chevre/repository.d.ts +6 -0
  84. package/lib/chevre/repository.js +8 -1
  85. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +18 -8
  86. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -8
  87. package/lib/chevre/service/aggregation/system.d.ts +43 -1
  88. package/lib/chevre/service/aggregation/system.js +112 -2
  89. package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
  90. package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
  91. package/lib/chevre/service/assetTransaction/pay.js +2 -2
  92. package/lib/chevre/service/assetTransaction/refund.js +1 -1
  93. package/lib/chevre/service/assetTransaction/reserve.js +10 -3
  94. package/lib/chevre/service/event.d.ts +3 -0
  95. package/lib/chevre/service/event.js +52 -21
  96. package/lib/chevre/service/iam.d.ts +6 -2
  97. package/lib/chevre/service/iam.js +23 -9
  98. package/lib/chevre/service/offer/event/factory.js +22 -13
  99. package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
  100. package/lib/chevre/service/offer/eventServiceByCOA/factory.js +15 -8
  101. package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
  102. package/lib/chevre/service/offer/product/factory.js +13 -6
  103. package/lib/chevre/service/offer/product.js +2 -2
  104. package/lib/chevre/service/offer.d.ts +16 -8
  105. package/lib/chevre/service/offer.js +71 -8
  106. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +31 -17
  107. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +1 -1
  108. package/lib/chevre/service/order/onOrderStatusChanged.js +2 -2
  109. package/lib/chevre/service/order/placeOrder.js +4 -4
  110. package/lib/chevre/service/order/returnOrder.js +1 -1
  111. package/lib/chevre/service/order/sendOrder.js +3 -3
  112. package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +4 -6
  113. package/lib/chevre/service/payment/any/onRefund.js +46 -42
  114. package/lib/chevre/service/payment/creditCard.js +2 -2
  115. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +1 -1
  116. package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
  117. package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
  118. package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
  119. package/lib/chevre/service/payment/movieTicket/validation.js +16 -9
  120. package/lib/chevre/service/payment/movieTicket.js +2 -2
  121. package/lib/chevre/service/reserve/cancelReservation.js +15 -3
  122. package/lib/chevre/service/reserve/confirmReservation.js +19 -11
  123. package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
  124. package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
  125. package/lib/chevre/service/task/cancelReservation.js +1 -1
  126. package/lib/chevre/service/task/deleteTransaction.js +2 -0
  127. package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
  128. package/lib/chevre/service/task/onEventChanged.js +29 -0
  129. package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
  130. package/lib/chevre/service/task/onResourceUpdated.js +396 -0
  131. package/lib/chevre/service/task/syncScreeningRooms.d.ts +7 -0
  132. package/lib/chevre/service/task/syncScreeningRooms.js +24 -0
  133. package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
  134. package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -0
  135. package/lib/chevre/service/transaction/deleteTransaction.js +129 -1
  136. package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +1 -0
  137. package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
  138. package/lib/chevre/service/transaction/moneyTransfer.js +1 -1
  139. package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
  140. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
  141. package/lib/chevre/service/transaction/orderProgramMembership.js +1 -1
  142. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +1 -0
  143. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
  144. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
  145. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
  146. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
  147. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
  148. package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +8 -12
  149. package/lib/chevre/service/transaction/placeOrderInProgress.js +6 -4
  150. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +1 -0
  151. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
  152. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +5 -5
  153. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
  154. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
  155. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
  156. package/lib/chevre/service/transaction/returnOrder.js +3 -1
  157. package/lib/chevre/settings.d.ts +11 -0
  158. package/lib/chevre/settings.js +44 -2
  159. package/package.json +3 -3
  160. package/example/src/chevre/eventCatalog2eventService.ts +0 -123
  161. package/example/src/chevre/migrateOrderAdditionalProperties.ts +0 -85
  162. package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
@@ -97,14 +97,20 @@ export declare class MongoRepository {
97
97
  expectsNoContent: boolean;
98
98
  }): Promise<factory.event.IEvent<T>[] | void>;
99
99
  /**
100
- * 特定の追加特性をキーにして、なければ作成する(複数対応)
100
+ * 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
101
+ * 存在すれば、eventStatusのみ更新する
101
102
  */
102
103
  createManyIfNotExist<T extends factory.eventType>(params: {
103
104
  attributes: factory.event.IAttributes<T>;
104
105
  filter: {
105
106
  name: string;
106
107
  };
107
- }[]): Promise<BulkWriteOpResultObject | void>;
108
+ }[]): Promise<{
109
+ bulkWriteResult: BulkWriteOpResultObject;
110
+ modifiedEvents: {
111
+ id: string;
112
+ }[];
113
+ } | void>;
108
114
  /**
109
115
  * コンテンツ+バージョンをキーにして、なければ作成する(複数対応)
110
116
  */
@@ -179,6 +185,28 @@ export declare class MongoRepository {
179
185
  filter: any;
180
186
  $unset: any;
181
187
  }): Promise<import("mongodb").UpdateResult>;
188
+ /**
189
+ * 既存施設コンテンツの最大バージョンを集計する
190
+ */
191
+ aggregateScreeningEventMaxVersion(params: {
192
+ project: {
193
+ id: {
194
+ $eq: string;
195
+ };
196
+ };
197
+ workPerformed: {
198
+ identifier: {
199
+ $eq: string;
200
+ };
201
+ };
202
+ location: {
203
+ branchCode: {
204
+ $in: string[];
205
+ };
206
+ };
207
+ }): Promise<{
208
+ maxVersion: string;
209
+ }>;
182
210
  aggregateEvent(params: {
183
211
  project?: {
184
212
  id?: {
@@ -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': {
@@ -473,11 +471,13 @@ class MongoRepository {
473
471
  });
474
472
  }
475
473
  /**
476
- * 特定の追加特性をキーにして、なければ作成する(複数対応)
474
+ * 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
475
+ * 存在すれば、eventStatusのみ更新する
477
476
  */
478
477
  createManyIfNotExist(params) {
479
478
  return __awaiter(this, void 0, void 0, function* () {
480
479
  const bulkWriteOps = [];
480
+ const additionalProperties = [];
481
481
  if (Array.isArray(params)) {
482
482
  params.forEach((creatingEventParams) => {
483
483
  var _a, _b;
@@ -488,11 +488,12 @@ class MongoRepository {
488
488
  if (typeof additionalPropertyValue !== 'string') {
489
489
  throw new factory.errors.NotFound('additionalProperty.value');
490
490
  }
491
+ additionalProperties.push({ name: creatingEventParams.filter.name, value: additionalPropertyValue });
491
492
  const _c = creatingEventParams.attributes, { eventStatus } = _c, setOnInsertFields = __rest(_c, ["eventStatus"]);
492
493
  bulkWriteOps.push({
493
494
  updateOne: {
494
495
  filter: {
495
- typeOf: creatingEventParams.attributes.typeOf,
496
+ typeOf: { $eq: creatingEventParams.attributes.typeOf },
496
497
  // 追加特性をキーにした冪等イベント作成時のfilterにproject.idを追加(2023-04-06~)
497
498
  'project.id': { $eq: creatingEventParams.attributes.project.id },
498
499
  // 追加特性をキーに更新
@@ -512,7 +513,21 @@ class MongoRepository {
512
513
  });
513
514
  }
514
515
  if (bulkWriteOps.length > 0) {
515
- return this.eventModel.bulkWrite(bulkWriteOps, { ordered: false });
516
+ const bulkWriteResult = yield this.eventModel.bulkWrite(bulkWriteOps, { ordered: false });
517
+ // modifiedの場合upsertedIdsに含まれないので、idを検索する
518
+ const modifiedEvents = yield this.eventModel.find({
519
+ typeOf: { $eq: params[0].attributes.typeOf },
520
+ // 追加特性をキーにした冪等イベント作成時のfilterにproject.idを追加(2023-04-06~)
521
+ 'project.id': { $eq: params[0].attributes.project.id },
522
+ // 追加特性をキーに更新
523
+ additionalProperty: {
524
+ $exists: true,
525
+ $in: additionalProperties
526
+ }
527
+ })
528
+ .select(['_id'])
529
+ .exec();
530
+ return { bulkWriteResult, modifiedEvents };
516
531
  }
517
532
  });
518
533
  }
@@ -700,7 +715,7 @@ class MongoRepository {
700
715
  return __awaiter(this, void 0, void 0, function* () {
701
716
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
702
717
  return this.eventModel.countDocuments({ $and: conditions })
703
- .setOptions({ maxTimeMS: 10000 })
718
+ .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
704
719
  .exec();
705
720
  });
706
721
  }
@@ -738,7 +753,7 @@ class MongoRepository {
738
753
  // console.log(explainResult[0].queryPlanner?.winningPlan?.inputStage?.inputStage?.inputStage);
739
754
  // console.log(explainResult);
740
755
  // return [];
741
- return query.setOptions({ maxTimeMS: 10000 })
756
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
742
757
  .exec()
743
758
  .then((docs) => docs.map((doc) => doc.toObject()));
744
759
  });
@@ -747,7 +762,7 @@ class MongoRepository {
747
762
  return __awaiter(this, void 0, void 0, function* () {
748
763
  const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
749
764
  const query = this.eventModel.distinct('_id', { $and: conditions });
750
- return query.setOptions({ maxTimeMS: 10000 })
765
+ return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
751
766
  .exec();
752
767
  });
753
768
  }
@@ -831,6 +846,42 @@ class MongoRepository {
831
846
  .exec();
832
847
  });
833
848
  }
849
+ /**
850
+ * 既存施設コンテンツの最大バージョンを集計する
851
+ */
852
+ aggregateScreeningEventMaxVersion(params) {
853
+ var _a;
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ const aggregations = yield this.eventModel.aggregate([
856
+ {
857
+ $match: {
858
+ typeOf: { $eq: factory.eventType.ScreeningEventSeries },
859
+ 'project.id': { $eq: params.project.id.$eq },
860
+ 'workPerformed.identifier': { $exists: true, $eq: params.workPerformed.identifier.$eq },
861
+ 'workPerformed.version': { $exists: true },
862
+ 'location.branchCode': { $exists: true, $in: params.location.branchCode.$in }
863
+ }
864
+ },
865
+ {
866
+ $project: {
867
+ workPerformed: '$workPerformed',
868
+ version: { $toInt: '$workPerformed.version' }
869
+ }
870
+ },
871
+ {
872
+ $group: {
873
+ _id: '$typeOf',
874
+ maxVersion: { $max: '$version' }
875
+ }
876
+ }
877
+ ])
878
+ .exec();
879
+ const maxVersion = (aggregations.length > 0)
880
+ ? String((_a = aggregations.shift()) === null || _a === void 0 ? void 0 : _a.maxVersion)
881
+ : '0';
882
+ return { maxVersion };
883
+ });
884
+ }
834
885
  aggregateEvent(params) {
835
886
  return __awaiter(this, void 0, void 0, function* () {
836
887
  const statuses = yield Promise.all([
@@ -9,6 +9,20 @@ export declare class MongoRepository {
9
9
  static CREATE_MONGO_CONDITIONS(params: factory.iam.ISearchConditions): any[];
10
10
  count(params: factory.iam.ISearchConditions): Promise<number>;
11
11
  search(params: factory.iam.ISearchConditions): Promise<factory.iam.IMember[]>;
12
+ aggregateRoleNames(params: {
13
+ project: {
14
+ id: {
15
+ $eq: string;
16
+ };
17
+ };
18
+ member: {
19
+ id: {
20
+ $eq: string;
21
+ };
22
+ };
23
+ }): Promise<{
24
+ roleName: string;
25
+ }[]>;
12
26
  findById(params: {
13
27
  id: string;
14
28
  }): Promise<factory.iam.IMember>;
@@ -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,11 +127,38 @@ 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
  });
133
134
  }
135
+ aggregateRoleNames(params) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const matchStages = [
138
+ { $match: { 'project.id': { $eq: params.project.id.$eq } } },
139
+ { $match: { 'member.id': { $eq: params.member.id.$eq } } }
140
+ ];
141
+ const aggregate = this.memberModel.aggregate([
142
+ // ...(typeof params.sort?.productID === 'number')
143
+ // ? [{ $sort: { productID: params.sort.productID } }]
144
+ // : [],
145
+ ...matchStages,
146
+ {
147
+ $unwind: {
148
+ path: '$member.hasRole'
149
+ }
150
+ },
151
+ {
152
+ $project: {
153
+ _id: 0,
154
+ roleName: '$member.hasRole.roleName'
155
+ }
156
+ }
157
+ ]);
158
+ return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
159
+ .exec();
160
+ });
161
+ }
134
162
  findById(params) {
135
163
  return __awaiter(this, void 0, void 0, function* () {
136
164
  const doc = yield this.memberModel.findOne({
@@ -227,7 +255,7 @@ class MongoRepository {
227
255
  query.limit(params.limit)
228
256
  .skip(params.limit * (page - 1));
229
257
  }
230
- const projectMembers = yield query.setOptions({ maxTimeMS: 10000 })
258
+ const projectMembers = yield query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
231
259
  .exec()
232
260
  .then((docs) => docs.map((doc) => doc.toObject()));
233
261
  return projectMembers.map((m) => m.project.id);
@@ -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
  });
@@ -59,6 +59,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
59
59
  result?: any;
60
60
  expires?: Date | undefined;
61
61
  project?: any;
62
+ seller?: any;
62
63
  agent?: any;
63
64
  recipient?: any;
64
65
  startDate?: Date | undefined;
@@ -68,7 +69,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
68
69
  tasksExportationStatus?: string | undefined;
69
70
  tasksExportedAt?: Date | undefined;
70
71
  location?: any;
71
- seller?: any;
72
72
  tasksExportAction?: any;
73
73
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
74
74
  object?: any;
@@ -78,6 +78,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
78
78
  result?: any;
79
79
  expires?: Date | undefined;
80
80
  project?: any;
81
+ seller?: any;
81
82
  agent?: any;
82
83
  recipient?: any;
83
84
  startDate?: Date | undefined;
@@ -87,7 +88,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
87
88
  tasksExportationStatus?: string | undefined;
88
89
  tasksExportedAt?: Date | undefined;
89
90
  location?: any;
90
- seller?: any;
91
91
  tasksExportAction?: any;
92
92
  }>> & Omit<import("mongoose").FlatRecord<{
93
93
  object?: any;
@@ -97,6 +97,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
97
97
  result?: any;
98
98
  expires?: Date | undefined;
99
99
  project?: any;
100
+ seller?: any;
100
101
  agent?: any;
101
102
  recipient?: any;
102
103
  startDate?: Date | undefined;
@@ -106,7 +107,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
106
107
  tasksExportationStatus?: string | undefined;
107
108
  tasksExportedAt?: Date | undefined;
108
109
  location?: any;
109
- seller?: any;
110
110
  tasksExportAction?: any;
111
111
  }> & {
112
112
  _id: import("mongoose").Types.ObjectId;
@@ -0,0 +1,75 @@
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" />
25
+ import { Schema } from 'mongoose';
26
+ declare const modelName = "HoldReservation";
27
+ /**
28
+ * 保留予約スキーマ
29
+ */
30
+ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
31
+ collection: string;
32
+ id: true;
33
+ read: string;
34
+ writeConcern: import("mongodb").WriteConcern;
35
+ strict: true;
36
+ strictQuery: false;
37
+ useNestedStrict: boolean;
38
+ timestamps: {
39
+ createdAt: string;
40
+ updatedAt: string;
41
+ };
42
+ toJSON: {
43
+ getters: false;
44
+ virtuals: false;
45
+ minimize: false;
46
+ versionKey: false;
47
+ };
48
+ toObject: {
49
+ getters: false;
50
+ virtuals: true;
51
+ minimize: false;
52
+ versionKey: false;
53
+ };
54
+ }, {
55
+ typeOf: string;
56
+ project: any;
57
+ reservationFor: any;
58
+ reservations: any[];
59
+ reservationCount: number;
60
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
61
+ typeOf: string;
62
+ project: any;
63
+ reservationFor: any;
64
+ reservations: any[];
65
+ reservationCount: number;
66
+ }>> & Omit<import("mongoose").FlatRecord<{
67
+ typeOf: string;
68
+ project: any;
69
+ reservationFor: any;
70
+ reservations: any[];
71
+ reservationCount: number;
72
+ }> & {
73
+ _id: import("mongoose").Types.ObjectId;
74
+ }, never>>;
75
+ export { modelName, schema };