@chevre/domain 24.0.0-alpha.40 → 24.0.0-alpha.41

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 (228) hide show
  1. package/lib/chevre/repo/accountTitle.d.ts +3 -3
  2. package/lib/chevre/repo/action/pay.d.ts +9 -0
  3. package/lib/chevre/repo/action/pay.js +13 -0
  4. package/lib/chevre/repo/action/refund.d.ts +9 -0
  5. package/lib/chevre/repo/action/refund.js +13 -0
  6. package/lib/chevre/repo/action.d.ts +3 -3
  7. package/lib/chevre/repo/additionalProperty.js +2 -2
  8. package/lib/chevre/repo/advanceBookingRequirement.d.ts +1 -3
  9. package/lib/chevre/repo/advanceBookingRequirement.js +2 -2
  10. package/lib/chevre/repo/aggregateOffer.d.ts +5 -9
  11. package/lib/chevre/repo/aggregateOffer.js +3 -3
  12. package/lib/chevre/repo/assetTransaction.d.ts +3 -3
  13. package/lib/chevre/repo/assetTransaction.js +12 -6
  14. package/lib/chevre/repo/categoryCode.d.ts +4 -6
  15. package/lib/chevre/repo/categoryCode.js +2 -2
  16. package/lib/chevre/repo/comment.d.ts +3 -3
  17. package/lib/chevre/repo/creativeWork.d.ts +3 -3
  18. package/lib/chevre/repo/creativeWork.js +3 -3
  19. package/lib/chevre/repo/customer.d.ts +3 -3
  20. package/lib/chevre/repo/customer.js +2 -2
  21. package/lib/chevre/repo/emailMessage.js +1 -1
  22. package/lib/chevre/repo/event.d.ts +6 -6
  23. package/lib/chevre/repo/event.js +10 -4
  24. package/lib/chevre/repo/eventSeries.d.ts +6 -6
  25. package/lib/chevre/repo/eventSeries.js +2 -2
  26. package/lib/chevre/repo/identity.d.ts +4 -6
  27. package/lib/chevre/repo/identityProvider.d.ts +4 -6
  28. package/lib/chevre/repo/identityProvider.js +2 -2
  29. package/lib/chevre/repo/issuer.d.ts +3 -3
  30. package/lib/chevre/repo/issuer.js +3 -3
  31. package/lib/chevre/repo/member.d.ts +3 -3
  32. package/lib/chevre/repo/merchantReturnPolicy.d.ts +3 -3
  33. package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
  34. package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +2 -2
  35. package/lib/chevre/repo/mongoose/schemas/account.d.ts +2 -2
  36. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +2 -2
  37. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +2 -2
  38. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +2 -2
  39. package/lib/chevre/repo/mongoose/schemas/action.d.ts +2 -2
  40. package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +2 -2
  41. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
  42. package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +2 -2
  43. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +2 -2
  44. package/lib/chevre/repo/mongoose/schemas/aggregateOrder.d.ts +2 -2
  45. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +2 -2
  46. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +2 -2
  47. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +2 -2
  48. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +2 -2
  49. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
  50. package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +2 -2
  51. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +2 -2
  52. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
  53. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
  54. package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
  55. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +2 -2
  56. package/lib/chevre/repo/mongoose/schemas/event.d.ts +2 -2
  57. package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +2 -2
  58. package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +2 -2
  59. package/lib/chevre/repo/mongoose/schemas/identity.d.ts +2 -2
  60. package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +2 -2
  61. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +2 -2
  62. package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +2 -2
  63. package/lib/chevre/repo/mongoose/schemas/member.d.ts +2 -2
  64. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +2 -2
  65. package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
  66. package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +2 -2
  67. package/lib/chevre/repo/mongoose/schemas/note.d.ts +2 -2
  68. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +2 -2
  69. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +2 -2
  70. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
  71. package/lib/chevre/repo/mongoose/schemas/order.d.ts +2 -2
  72. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
  73. package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +2 -2
  74. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +2 -2
  75. package/lib/chevre/repo/mongoose/schemas/pendingReservation.d.ts +2 -2
  76. package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +2 -2
  77. package/lib/chevre/repo/mongoose/schemas/place.d.ts +2 -2
  78. package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +2 -2
  79. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +2 -2
  80. package/lib/chevre/repo/mongoose/schemas/product.d.ts +2 -2
  81. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +2 -2
  82. package/lib/chevre/repo/mongoose/schemas/productOffer.d.ts +2 -2
  83. package/lib/chevre/repo/mongoose/schemas/project.d.ts +2 -2
  84. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +2 -2
  85. package/lib/chevre/repo/mongoose/schemas/reserveInterface.d.ts +2 -2
  86. package/lib/chevre/repo/mongoose/schemas/role.d.ts +2 -2
  87. package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +2 -2
  88. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +2 -2
  89. package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +2 -2
  90. package/lib/chevre/repo/mongoose/schemas/service/availableHour.d.ts +2 -2
  91. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +2 -2
  92. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +2 -2
  93. package/lib/chevre/repo/mongoose/schemas/task.d.ts +2 -2
  94. package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +2 -2
  95. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +2 -2
  96. package/lib/chevre/repo/mongoose/schemas/transactionNumber.d.ts +2 -2
  97. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +2 -2
  98. package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +2 -2
  99. package/lib/chevre/repo/movieTicketType.d.ts +1 -3
  100. package/lib/chevre/repo/movieTicketType.js +2 -2
  101. package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +1 -3
  102. package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +1 -3
  103. package/lib/chevre/repo/offerCatalog.d.ts +3 -3
  104. package/lib/chevre/repo/offerCatalog.js +5 -4
  105. package/lib/chevre/repo/offerCatalogItem.js +4 -4
  106. package/lib/chevre/repo/offerItemCondition.js +2 -2
  107. package/lib/chevre/repo/order.d.ts +3 -3
  108. package/lib/chevre/repo/ownershipInfo.d.ts +3 -3
  109. package/lib/chevre/repo/passport.js +1 -1
  110. package/lib/chevre/repo/paymentService.d.ts +1 -3
  111. package/lib/chevre/repo/paymentService.js +2 -2
  112. package/lib/chevre/repo/paymentServiceChannel.d.ts +1 -3
  113. package/lib/chevre/repo/paymentServiceChannel.js +2 -2
  114. package/lib/chevre/repo/person.js +2 -2
  115. package/lib/chevre/repo/place/busStop.js +1 -1
  116. package/lib/chevre/repo/place/movieTheater.d.ts +3 -3
  117. package/lib/chevre/repo/place/movieTheater.js +10 -4
  118. package/lib/chevre/repo/place/screeningRoom.d.ts +3 -3
  119. package/lib/chevre/repo/place/screeningRoom.js +2 -2
  120. package/lib/chevre/repo/place/seat.d.ts +2 -4
  121. package/lib/chevre/repo/potentialAction.d.ts +4 -6
  122. package/lib/chevre/repo/potentialAction.js +2 -2
  123. package/lib/chevre/repo/priceSpecification.d.ts +3 -3
  124. package/lib/chevre/repo/priceSpecification.js +2 -2
  125. package/lib/chevre/repo/product.d.ts +5 -9
  126. package/lib/chevre/repo/product.js +3 -3
  127. package/lib/chevre/repo/productModel.js +2 -2
  128. package/lib/chevre/repo/project.d.ts +3 -3
  129. package/lib/chevre/repo/rateLimit/offer.js +1 -1
  130. package/lib/chevre/repo/reservation.d.ts +4 -6
  131. package/lib/chevre/repo/seller.d.ts +5 -9
  132. package/lib/chevre/repo/seller.js +2 -2
  133. package/lib/chevre/repo/sellerReturnPolicy.d.ts +1 -3
  134. package/lib/chevre/repo/sellerReturnPolicy.js +2 -2
  135. package/lib/chevre/repo/task.d.ts +3 -3
  136. package/lib/chevre/repo/task.js +1 -1
  137. package/lib/chevre/repo/transaction.d.ts +3 -3
  138. package/lib/chevre/repo/transactionProcess.js +1 -1
  139. package/lib/chevre/repo/trip.d.ts +4 -12
  140. package/lib/chevre/repo/trip.js +3 -3
  141. package/lib/chevre/repo/webSite.d.ts +1 -3
  142. package/lib/chevre/repo/webSite.js +3 -2
  143. package/lib/chevre/repository.d.ts +10 -0
  144. package/lib/chevre/repository.js +22 -0
  145. package/lib/chevre/service/assetTransaction/moneyTransfer.js +8 -5
  146. package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +1 -1
  147. package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +2 -1
  148. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +2 -1
  149. package/lib/chevre/service/assetTransaction/pay/start/factory.js +2 -1
  150. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +6 -0
  151. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +6 -0
  152. package/lib/chevre/service/assetTransaction/pay/start.d.ts +6 -0
  153. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +6 -3
  154. package/lib/chevre/service/delivery/factory.js +2 -1
  155. package/lib/chevre/service/event/saveScreeningEvents.js +2 -2
  156. package/lib/chevre/service/event.js +1 -1
  157. package/lib/chevre/service/notification/notifyByEmail.d.ts +1 -1
  158. package/lib/chevre/service/notification/triggerWebhook.js +1 -1
  159. package/lib/chevre/service/offer/event/authorize.js +2 -1
  160. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +2 -1
  161. package/lib/chevre/service/offer/event/searchOffersByIds.js +2 -1
  162. package/lib/chevre/service/offer/event/voidTransaction.js +6 -3
  163. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +2 -1
  164. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +1 -1
  165. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +1 -1
  166. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +2 -1
  167. package/lib/chevre/service/offer/product.js +1 -1
  168. package/lib/chevre/service/order/confirmPayTransaction.d.ts +1 -1
  169. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -1
  170. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +4 -2
  171. package/lib/chevre/service/payment/any/authorize.d.ts +6 -0
  172. package/lib/chevre/service/payment/any/findAcceptAction.js +2 -1
  173. package/lib/chevre/service/payment/any/findAuthorizeAction.js +2 -1
  174. package/lib/chevre/service/payment/any/findCheckAction.js +2 -1
  175. package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +2 -1
  176. package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +6 -2
  177. package/lib/chevre/service/payment/any/onPayActionCompleted.js +7 -2
  178. package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +10 -5
  179. package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +21 -11
  180. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +12 -10
  181. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +9 -6
  182. package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -1
  183. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +2 -1
  184. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
  185. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +6 -0
  186. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +6 -0
  187. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  188. package/lib/chevre/service/payment/faceToFace.d.ts +10 -0
  189. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +2 -1
  190. package/lib/chevre/service/payment/factory.js +4 -2
  191. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +6 -0
  192. package/lib/chevre/service/payment/movieTicket/authorize.js +1 -1
  193. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.d.ts +12 -0
  194. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +72 -0
  195. package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.d.ts +8 -0
  196. package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.js +29 -0
  197. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +7 -1
  198. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +4 -71
  199. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +6 -0
  200. package/lib/chevre/service/payment/movieTicket/validation.d.ts +1 -2
  201. package/lib/chevre/service/payment/movieTicket/validation.js +37 -29
  202. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +6 -0
  203. package/lib/chevre/service/payment/paymentCard.d.ts +10 -0
  204. package/lib/chevre/service/permit.js +4 -2
  205. package/lib/chevre/service/reserve/factory.d.ts +1 -1
  206. package/lib/chevre/service/reserve/findByCode.js +2 -1
  207. package/lib/chevre/service/reserve/searchByOrder.js +2 -1
  208. package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -1
  209. package/lib/chevre/service/task/authorizePayment.js +6 -0
  210. package/lib/chevre/service/task/confirmReserveTransaction.js +4 -2
  211. package/lib/chevre/service/task/invalidatePaymentUrl.js +6 -0
  212. package/lib/chevre/service/task/onResourceUpdated.js +1 -1
  213. package/lib/chevre/service/task/pay.js +6 -0
  214. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +6 -0
  215. package/lib/chevre/service/task/payment/payByTask.d.ts +6 -0
  216. package/lib/chevre/service/task/payment/payByTask.js +2 -1
  217. package/lib/chevre/service/task/payment/refundByTask.d.ts +6 -0
  218. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +6 -0
  219. package/lib/chevre/service/task/refund.js +6 -0
  220. package/lib/chevre/service/task/returnReserveTransaction.js +2 -1
  221. package/lib/chevre/service/task/voidPayment.js +6 -0
  222. package/lib/chevre/service/transaction/deleteTransaction.js +4 -2
  223. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +2 -1
  224. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +2 -1
  225. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -2
  226. package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +5 -3
  227. package/lib/chevre/service/validation/validateOrder.js +4 -2
  228. package/package.json +1 -1
@@ -153,12 +153,13 @@ class OfferCatalogRepo {
153
153
  if (typeof params.id !== 'string' || params.id === '') {
154
154
  const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
155
155
  const newId = uniqid();
156
- const { id, $unset, ...creatingDoc } = params;
156
+ const { id, $unset, ...creatingDoc } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
157
157
  doc = await this.offerCatalogModel.create({ ...creatingDoc, _id: newId });
158
158
  savedId = newId;
159
159
  }
160
160
  else {
161
- const { id, identifier, itemOffered, project, typeOf, $unset, ...updateFields } = params; // 上書き禁止属性を除外
161
+ // 上書き禁止属性を除外
162
+ const { id, identifier, itemOffered, project, typeOf, $unset, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
162
163
  doc = await this.offerCatalogModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
163
164
  $set: updateFields,
164
165
  ...(params.$unset !== undefined) ? { $unset: params.$unset } : undefined
@@ -177,7 +178,7 @@ class OfferCatalogRepo {
177
178
  async saveByIdentifier(params) {
178
179
  const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
179
180
  const newId = uniqid();
180
- const { id, identifier, itemOffered, project, typeOf, ...updateFields } = params;
181
+ const { id, identifier, itemOffered, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
181
182
  const doc = await this.offerCatalogModel.findOneAndUpdate({
182
183
  identifier: { $eq: params.identifier },
183
184
  'project.id': { $eq: params.project.id }
@@ -203,7 +204,7 @@ class OfferCatalogRepo {
203
204
  const queryFilters = [];
204
205
  if (Array.isArray(params)) {
205
206
  params.forEach(({ $set, $unset }) => {
206
- const { id, identifier, project, typeOf, ...setFields } = $set;
207
+ const { id, identifier, project, typeOf, ...setFields } = $set; // eslint-disable-line @typescript-eslint/no-unused-vars
207
208
  if (typeof identifier !== 'string' || identifier.length === 0) {
208
209
  throw new factory.errors.ArgumentNull('identifier');
209
210
  }
@@ -126,11 +126,11 @@ class OfferCatalogItemRepo {
126
126
  async save(params) {
127
127
  let doc;
128
128
  if (typeof params.id !== 'string' || params.id.length === 0) {
129
- const { id, $unset, ...creatingDoc } = params;
129
+ const { id, $unset, ...creatingDoc } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
130
130
  doc = await this.offerCatalogItemModel.create(creatingDoc);
131
131
  }
132
132
  else {
133
- const { id, identifier, project, typeOf, $unset, ...updateFields } = params;
133
+ const { id, identifier, project, typeOf, $unset, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
134
134
  doc = await this.offerCatalogItemModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
135
135
  $set: updateFields,
136
136
  ...(params.$unset !== undefined) ? { $unset: params.$unset } : undefined
@@ -146,7 +146,7 @@ class OfferCatalogItemRepo {
146
146
  * プロジェクトとコードから冪等保管
147
147
  */
148
148
  async saveByIdentifier(params) {
149
- const { id, identifier, project, typeOf, ...updateFields } = params;
149
+ const { id, identifier, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
150
150
  const doc = await this.offerCatalogItemModel.findOneAndUpdate({
151
151
  identifier: { $eq: params.identifier },
152
152
  'project.id': { $eq: params.project.id }
@@ -166,7 +166,7 @@ class OfferCatalogItemRepo {
166
166
  const queryFilters = [];
167
167
  if (Array.isArray(params)) {
168
168
  params.forEach(({ $set, $unset }) => {
169
- const { id, identifier, project, typeOf, ...setFields } = $set;
169
+ const { id, identifier, project, typeOf, ...setFields } = $set; // eslint-disable-line @typescript-eslint/no-unused-vars
170
170
  if (typeof identifier !== 'string' || identifier.length === 0) {
171
171
  throw new factory.errors.ArgumentNull('identifier');
172
172
  }
@@ -103,12 +103,12 @@ class OfferItemConditionRepo {
103
103
  let savedId;
104
104
  let doc;
105
105
  if (typeof params.id !== 'string' || params.id === '') {
106
- const { id, ...creatingParams } = params; // omit id(2024-09-12~)
106
+ const { id, ...creatingParams } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
107
107
  doc = await this.offerItemConditionModel.create(creatingParams);
108
108
  savedId = doc.id;
109
109
  }
110
110
  else {
111
- const { id, identifier, project, typeOf, ...updateFields } = params;
111
+ const { id, identifier, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
112
112
  doc = await this.offerItemConditionModel.findOneAndUpdate({ _id: { $eq: id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
113
113
  .exec();
114
114
  savedId = id;
@@ -143,19 +143,19 @@ export declare class OrderRepo {
143
143
  }): Promise<(IOrderWithoutAcceptedOffers & {
144
144
  id: string;
145
145
  })[]>;
146
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.order.IOrder, "id"> & {
146
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.order.IOrder, "id"> & {
147
147
  acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[];
148
148
  } & {
149
149
  _id: import("mongoose").Types.ObjectId;
150
150
  } & {
151
151
  __v: number;
152
- }, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.order.IOrder, "id"> & {
152
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.order.IOrder, "id"> & {
153
153
  acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[];
154
154
  } & {
155
155
  _id: import("mongoose").Types.ObjectId;
156
156
  } & {
157
157
  __v: number;
158
- }, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
158
+ }) | null>;
159
159
  unsetUnnecessaryFields(params: {
160
160
  filter: FilterQuery<factory.order.IOrder>;
161
161
  $unset: any;
@@ -80,19 +80,19 @@ export declare class OwnershipInfoRepo {
80
80
  deleteExpiredOwnershipInfos(params: {
81
81
  ownedThroughLte: Date;
82
82
  }): Promise<void>;
83
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, "id"> & {
83
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, "id"> & {
84
84
  _id: string;
85
85
  } & Required<{
86
86
  _id: string;
87
87
  }> & {
88
88
  __v: number;
89
- }, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, "id"> & {
89
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, "id"> & {
90
90
  _id: string;
91
91
  } & Required<{
92
92
  _id: string;
93
93
  }> & {
94
94
  __v: number;
95
- }, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
95
+ }) | null>;
96
96
  /**
97
97
  * 所有者を追加する
98
98
  */
@@ -100,7 +100,7 @@ class PassportRepo {
100
100
  });
101
101
  debug('locked,', params.issueUnit.identifier, passportExpires);
102
102
  }
103
- catch (error) {
103
+ catch (_error) {
104
104
  throw new factory.errors.AlreadyInUse('passport', [], 'passport already in use');
105
105
  }
106
106
  // const ttl = (passportExpires.isAfter(now))
@@ -26,9 +26,7 @@ export declare class PaymentServiceRepo {
26
26
  $set: factory.service.paymentService.IService & {
27
27
  provider?: never;
28
28
  };
29
- $unset: {
30
- [key in IUnsetKey]?: 1;
31
- };
29
+ $unset: Partial<Record<IUnsetKey, 1>>;
32
30
  /**
33
31
  * 指定プロジェクトの指定プロダクトタイプが存在しなければ作成する
34
32
  */
@@ -186,7 +186,7 @@ class PaymentServiceRepo {
186
186
  let savedId;
187
187
  if (typeof params.id === 'string') {
188
188
  // 上書き禁止属性を除外
189
- const { id, productID, project, typeOf, provider, serviceType, ...setFields } = params.$set;
189
+ const { id, productID, project, typeOf, provider, serviceType, ...setFields } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
190
190
  switch (typeOf) {
191
191
  case factory.service.paymentService.PaymentServiceType.CreditCard:
192
192
  case factory.service.paymentService.PaymentServiceType.MovieTicket:
@@ -209,7 +209,7 @@ class PaymentServiceRepo {
209
209
  savedId = params.id;
210
210
  }
211
211
  else {
212
- const { id, provider, ...createParams } = params.$set;
212
+ const { id, provider, ...createParams } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
213
213
  if (params.createIfNotExist === true) {
214
214
  doc = await this.paymentServiceModel.findOneAndUpdate({
215
215
  'project.id': { $eq: createParams.project.id },
@@ -4,9 +4,7 @@ export type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'crede
4
4
  id?: never;
5
5
  };
6
6
  interface IUnset {
7
- $unset?: {
8
- [key: string]: 1;
9
- };
7
+ $unset?: Record<string, 1>;
10
8
  }
11
9
  type IServiceChannelWithId = factory.serviceChannel.IServiceChannel & {
12
10
  id: string;
@@ -75,7 +75,7 @@ class PaymentServiceChannelRepo {
75
75
  if (savingId === '') {
76
76
  throw new factory.errors.ArgumentNull('id');
77
77
  }
78
- const { id, serviceUrl, providesService, project, typeOf, $unset, ...updateFields } = params.attributes;
78
+ const { id, serviceUrl, providesService, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
79
79
  const filter = {
80
80
  _id: { $eq: savingId },
81
81
  'project.id': { $eq: project.id }
@@ -98,7 +98,7 @@ class PaymentServiceChannelRepo {
98
98
  savedId = savingId;
99
99
  }
100
100
  else {
101
- const { $unset, id, ...createParams } = params.attributes;
101
+ const { $unset, id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
102
102
  const result = await this.paymentServiceChannelModel.insertMany(createParams, { rawResult: true });
103
103
  const insertedId = result.insertedIds?.[0]?.toHexString();
104
104
  if (typeof insertedId !== 'string') {
@@ -127,7 +127,7 @@ class PersonRepo {
127
127
  }
128
128
  formatedPhoneNumber = phoneUtil.format(phoneNumber, google_libphonenumber_1.PhoneNumberFormat.E164);
129
129
  }
130
- catch (error) {
130
+ catch (_error) {
131
131
  throw new factory.errors.Argument('telephone', 'Invalid phone number');
132
132
  }
133
133
  }
@@ -170,7 +170,7 @@ class PersonRepo {
170
170
  }
171
171
  userAttributesValue = phoneUtil.format(phoneNumber, google_libphonenumber_1.PhoneNumberFormat.E164);
172
172
  }
173
- catch (error) {
173
+ catch (_error) {
174
174
  throw new factory.errors.Argument('custome:telephone', 'Invalid phone number');
175
175
  }
176
176
  }
@@ -114,7 +114,7 @@ class BusStopRepo {
114
114
  }
115
115
  else {
116
116
  // 上書き禁止属性を除外(2022-08-24~)
117
- const { id, branchCode, project, typeOf, ...updateFields } = params;
117
+ const { id, branchCode, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
118
118
  doc = await this.civicStructureModel.findOneAndUpdate({ _id: params.id }, updateFields, { upsert: false, new: true })
119
119
  .exec();
120
120
  }
@@ -95,19 +95,19 @@ export declare class MovieTheaterRepo {
95
95
  id: string;
96
96
  };
97
97
  }): Promise<void>;
98
- getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/place/movieTheater").IPlace, "id"> & {
98
+ getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/place/movieTheater").IPlace, "id"> & {
99
99
  hasPOS?: factory.place.movieTheater.IPOS[];
100
100
  } & {
101
101
  _id: import("mongoose").Types.ObjectId;
102
102
  } & {
103
103
  __v: number;
104
- }, "id"> & import("../mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/place/movieTheater").IPlace, "id"> & {
104
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/place/movieTheater").IPlace, "id"> & {
105
105
  hasPOS?: factory.place.movieTheater.IPOS[];
106
106
  } & {
107
107
  _id: import("mongoose").Types.ObjectId;
108
108
  } & {
109
109
  __v: number;
110
- }, "id"> & import("../mongoose/virtuals").IVirtuals) | null>;
110
+ }) | null>;
111
111
  unsetUnnecessaryFields(params: {
112
112
  filter: any;
113
113
  $unset: any;
@@ -103,14 +103,18 @@ class MovieTheaterRepo {
103
103
  let savedId;
104
104
  let doc;
105
105
  if (params.id === '') {
106
- const { id, hasEntranceGate, // 入場ゲートを保管しない(2026-01-11~)
106
+ const {
107
+ // 入場ゲートを保管しない(2026-01-11~)
108
+ id, hasEntranceGate, // eslint-disable-line @typescript-eslint/no-unused-vars
107
109
  ...creatingParams } = params; // omit id(2024-09-12~)
108
110
  doc = await this.civicStructureModel.create(creatingParams);
109
111
  savedId = doc.id;
110
112
  }
111
113
  else {
112
114
  // 上書き禁止属性を除外(2022-08-24~)
113
- const { id, branchCode, project, typeOf, hasEntranceGate, // 入場ゲートを保管しない(2026-01-11~)
115
+ const {
116
+ // 入場ゲートを保管しない(2026-01-11~)
117
+ id, branchCode, project, typeOf, hasEntranceGate, // eslint-disable-line @typescript-eslint/no-unused-vars
114
118
  ...updateFields } = params;
115
119
  doc = await this.civicStructureModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
116
120
  .exec();
@@ -122,7 +126,7 @@ class MovieTheaterRepo {
122
126
  return { id: savedId };
123
127
  }
124
128
  async saveMovieTheaterByBranchCode4coa(params) {
125
- const { containsPlace, ...movieTheater4update } = params;
129
+ const { containsPlace, ...movieTheater4update } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
126
130
  const movieTheaterDoc = await this.civicStructureModel.findOneAndUpdate({
127
131
  typeOf: { $eq: factory.placeType.MovieTheater },
128
132
  'project.id': { $eq: params.project.id },
@@ -146,7 +150,9 @@ class MovieTheaterRepo {
146
150
  const queryFilters = [];
147
151
  if (Array.isArray(params)) {
148
152
  params.forEach(({ $set, $unset }) => {
149
- const { branchCode, hasEntranceGate, hasPOS, // 入場ゲート,POSを決して編集しないように
153
+ const {
154
+ // 入場ゲート,POSを決して編集しないように
155
+ branchCode, hasEntranceGate, hasPOS, // eslint-disable-line @typescript-eslint/no-unused-vars
150
156
  ...setFields } = $set;
151
157
  if (typeof branchCode !== 'string' || branchCode === '') {
152
158
  throw new factory.errors.ArgumentNull('branchCode');
@@ -124,7 +124,7 @@ export declare class ScreeningRoomRepo {
124
124
  id: string;
125
125
  };
126
126
  }): Promise<void>;
127
- getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/place/screeningRoom").IPlace, "containsPlace"> & {
127
+ getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/place/screeningRoom").IPlace, "containsPlace"> & {
128
128
  description?: any;
129
129
  openingHoursSpecification?: any;
130
130
  smokingAllowed?: boolean;
@@ -135,7 +135,7 @@ export declare class ScreeningRoomRepo {
135
135
  _id: import("mongoose").Types.ObjectId;
136
136
  } & {
137
137
  __v: number;
138
- }, "id"> & import("../mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/place/screeningRoom").IPlace, "containsPlace"> & {
138
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/place/screeningRoom").IPlace, "containsPlace"> & {
139
139
  description?: any;
140
140
  openingHoursSpecification?: any;
141
141
  smokingAllowed?: boolean;
@@ -146,6 +146,6 @@ export declare class ScreeningRoomRepo {
146
146
  _id: import("mongoose").Types.ObjectId;
147
147
  } & {
148
148
  __v: number;
149
- }, "id"> & import("../mongoose/virtuals").IVirtuals) | null>;
149
+ }) | null>;
150
150
  }
151
151
  export {};
@@ -151,7 +151,7 @@ class ScreeningRoomRepo {
151
151
  return matchStages;
152
152
  }
153
153
  async saveScreeningRooms4coa(params) {
154
- const { containsPlace, ...movieTheater4update } = params;
154
+ const { containsPlace, ...movieTheater4update } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
155
155
  const movieTheater = await this.civicStructureModel.findOne({
156
156
  typeOf: { $eq: factory.placeType.MovieTheater },
157
157
  'project.id': { $eq: params.project.id },
@@ -176,7 +176,7 @@ class ScreeningRoomRepo {
176
176
  };
177
177
  });
178
178
  await Promise.all(creatingScreeningRooms.map(async (createScreeningRoom) => {
179
- const { typeOf, project, branchCode, ...setFields } = createScreeningRoom;
179
+ const { typeOf, project, branchCode, ...setFields } = createScreeningRoom; // eslint-disable-line @typescript-eslint/no-unused-vars
180
180
  if (typeof branchCode === 'string' && branchCode.length > 0) {
181
181
  await this.placeModel.findOneAndUpdate({
182
182
  typeOf: { $eq: factory.placeType.ScreeningRoom },
@@ -26,7 +26,7 @@ interface IUpdateSeatResult {
26
26
  };
27
27
  typeOf: factory.placeType.ScreeningRoom;
28
28
  }
29
- export declare const DEFAULT_ROOM_MAXIMUM_CAPACITY: number;
29
+ export declare const DEFAULT_ROOM_MAXIMUM_CAPACITY = 10000;
30
30
  /**
31
31
  * 座席リポジトリ
32
32
  */
@@ -34,9 +34,7 @@ export declare class SeatRepo {
34
34
  private readonly civicStructureModel;
35
35
  private readonly placeModel;
36
36
  constructor(connection: Connection);
37
- static CREATE_SEARCH_SEATS_PROJECTION(params: factory.place.seat.IProjection): {
38
- [field: string]: AnyExpression;
39
- };
37
+ static CREATE_SEARCH_SEATS_PROJECTION(params: factory.place.seat.IProjection): Record<string, AnyExpression>;
40
38
  static CREATE_MATCH_STAGES(params: factory.place.seat.ISearchConditions, options: {
41
39
  filterTypeOf: boolean;
42
40
  }): IMatchStage[];
@@ -5,9 +5,7 @@ export type ISavingPotentialAction = Pick<factory.potentialAction.IPotentialActi
5
5
  id?: never;
6
6
  };
7
7
  interface IUnset {
8
- $unset?: {
9
- [key: string]: 1;
10
- };
8
+ $unset?: Record<string, 1>;
11
9
  }
12
10
  type IKeyOfProjection = keyof factory.potentialAction.IPotentialAction;
13
11
  /**
@@ -24,14 +22,14 @@ export declare class PotentialActionRepo {
24
22
  id: string;
25
23
  }>;
26
24
  projectFields(conditions: factory.potentialAction.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.potentialAction.IPotentialAction[]>;
27
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
25
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
28
26
  _id: import("mongoose").Types.ObjectId;
29
27
  } & {
30
28
  __v: number;
31
- }, "id"> & import("./mongoose/virtuals").IVirtuals, QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
29
+ }, QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
32
30
  _id: import("mongoose").Types.ObjectId;
33
31
  } & {
34
32
  __v: number;
35
- }, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
33
+ }) | null>;
36
34
  }
37
35
  export {};
@@ -74,7 +74,7 @@ class PotentialActionRepo {
74
74
  if (savingId === '') {
75
75
  throw new factory.errors.ArgumentNull('id');
76
76
  }
77
- const { id, project, typeOf, identifier, $unset, ...updateFields } = params.attributes;
77
+ const { id, project, typeOf, identifier, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
78
78
  const filter = {
79
79
  _id: { $eq: savingId },
80
80
  'project.id': { $eq: project.id }
@@ -97,7 +97,7 @@ class PotentialActionRepo {
97
97
  savedId = savingId;
98
98
  }
99
99
  else {
100
- const { $unset, id, ...createParams } = params.attributes;
100
+ const { $unset, id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
101
101
  const result = await this.potentialActionModel.insertMany(createParams, { rawResult: true });
102
102
  const insertedId = result.insertedIds?.[0]?.toHexString();
103
103
  if (typeof insertedId !== 'string') {
@@ -36,7 +36,7 @@ export declare class PriceSpecificationRepo {
36
36
  id: string;
37
37
  };
38
38
  }): Promise<void>;
39
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<({
39
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
40
40
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
41
41
  name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
42
42
  price: number;
@@ -69,7 +69,7 @@ export declare class PriceSpecificationRepo {
69
69
  _id: import("mongoose").Types.ObjectId;
70
70
  } & {
71
71
  __v: number;
72
- }), "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<({
72
+ })), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
73
73
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
74
74
  name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
75
75
  price: number;
@@ -102,7 +102,7 @@ export declare class PriceSpecificationRepo {
102
102
  _id: import("mongoose").Types.ObjectId;
103
103
  } & {
104
104
  __v: number;
105
- }), "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
105
+ }))) | null>;
106
106
  unsetUnnecessaryFields(params: {
107
107
  filter: any;
108
108
  $unset: any;
@@ -222,13 +222,13 @@ class PriceSpecificationRepo {
222
222
  async save(params) {
223
223
  let savedId;
224
224
  if (typeof params.id !== 'string') {
225
- const { $unset, id, ...creatingDoc } = params.attributes;
225
+ const { $unset, id, ...creatingDoc } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
226
226
  const createdDoc = await this.priceSpecificationModel.create(creatingDoc);
227
227
  savedId = createdDoc.id;
228
228
  }
229
229
  else {
230
230
  // 上書き禁止属性を除外(2022-08-24~)
231
- const { $unset, id, project, typeOf, ...updateFields } = params.attributes;
231
+ const { $unset, id, project, typeOf, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
232
232
  const updatedDoc = await this.priceSpecificationModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
233
233
  $set: updateFields
234
234
  }, { upsert: false, new: true, projection: { _id: 1 } })
@@ -48,9 +48,7 @@ export declare class ProductRepo {
48
48
  $set: factory.product.IProduct & {
49
49
  offers?: never;
50
50
  };
51
- $unset: {
52
- [key in IUnsetKey]?: 1;
53
- };
51
+ $unset: Partial<Record<IUnsetKey, 1>>;
54
52
  /**
55
53
  * 指定プロジェクトの指定プロダクトタイプが存在しなければ作成する
56
54
  */
@@ -65,9 +63,7 @@ export declare class ProductRepo {
65
63
  $set: factory.product.IProduct & {
66
64
  offers?: never;
67
65
  };
68
- $unset?: {
69
- [key in IUnsetKey]?: 1;
70
- };
66
+ $unset?: Partial<Record<IUnsetKey, 1>>;
71
67
  }[]): Promise<{
72
68
  bulkWriteResult?: BulkWriteResult;
73
69
  modifiedProducts?: {
@@ -103,15 +99,15 @@ export declare class ProductRepo {
103
99
  id: string;
104
100
  };
105
101
  }): Promise<void>;
106
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
102
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
107
103
  _id: Types.ObjectId;
108
104
  } & {
109
105
  __v: number;
110
- }, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
106
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
111
107
  _id: Types.ObjectId;
112
108
  } & {
113
109
  __v: number;
114
- }, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
110
+ }) | null>;
115
111
  unsetUnnecessaryFields(params: {
116
112
  filter: FilterQuery<factory.product.IProduct>;
117
113
  $unset: any;
@@ -239,7 +239,7 @@ class ProductRepo {
239
239
  let savedId;
240
240
  if (typeof params.id === 'string') {
241
241
  // 上書き禁止属性を除外
242
- const { id, productID, project, typeOf, offers, ...setFields } = params.$set;
242
+ const { id, productID, project, typeOf, offers, ...setFields } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
243
243
  switch (typeOf) {
244
244
  case factory.product.ProductType.EventService:
245
245
  case factory.product.ProductType.MembershipService:
@@ -265,7 +265,7 @@ class ProductRepo {
265
265
  savedId = params.id;
266
266
  }
267
267
  else {
268
- const { id, ...createParams } = params.$set;
268
+ const { id, ...createParams } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
269
269
  if (params.createIfNotExist === true) {
270
270
  doc = await this.productModel.findOneAndUpdate({
271
271
  'project.id': { $eq: createParams.project.id },
@@ -301,7 +301,7 @@ class ProductRepo {
301
301
  const queryFilters = [];
302
302
  if (Array.isArray(params)) {
303
303
  params.forEach(({ $set, $unset }) => {
304
- const { id, productID, project, typeOf, offers, ...setFields } = $set;
304
+ const { id, productID, project, typeOf, offers, ...setFields } = $set; // eslint-disable-line @typescript-eslint/no-unused-vars
305
305
  if (typeof productID !== 'string' || productID.length === 0) {
306
306
  throw new factory.errors.ArgumentNull('productID');
307
307
  }
@@ -106,7 +106,7 @@ class ProductModelRepo {
106
106
  let savedId;
107
107
  if (typeof params.id === 'string') {
108
108
  // 上書き禁止属性を除外
109
- const { category, id, project, typeOf, ...setFields } = params.$set;
109
+ const { category, id, project, typeOf, ...setFields } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
110
110
  const updatedDoc = await this.productModelModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
111
111
  $set: setFields
112
112
  }, { upsert: false, new: true, projection: { _id: 1 } })
@@ -117,7 +117,7 @@ class ProductModelRepo {
117
117
  savedId = updatedDoc.id;
118
118
  }
119
119
  else {
120
- const { id, ...createParams } = params.$set;
120
+ const { id, ...createParams } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
121
121
  const createdDoc = await this.productModelModel.create(createParams);
122
122
  savedId = createdDoc.id;
123
123
  }
@@ -50,7 +50,7 @@ export declare class ProjectRepo {
50
50
  deleteById(params: {
51
51
  id: string;
52
52
  }): Promise<void>;
53
- getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.project.IProject, "id"> & {
53
+ getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.project.IProject, "id"> & {
54
54
  _id: string;
55
55
  aggregateReservation?: any;
56
56
  makesOffer?: factory.project.IMakesOffer[];
@@ -58,7 +58,7 @@ export declare class ProjectRepo {
58
58
  _id: string;
59
59
  }> & {
60
60
  __v: number;
61
- }, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<factory.project.IProject, "id"> & {
61
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.project.IProject, "id"> & {
62
62
  _id: string;
63
63
  aggregateReservation?: any;
64
64
  makesOffer?: factory.project.IMakesOffer[];
@@ -66,7 +66,7 @@ export declare class ProjectRepo {
66
66
  _id: string;
67
67
  }> & {
68
68
  __v: number;
69
- }, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
69
+ }) | null>;
70
70
  unsetUnnecessaryFields(params: {
71
71
  filter: any;
72
72
  $unset: any;
@@ -70,7 +70,7 @@ class OfferRateLimitRepo {
70
70
  audience: { identifier: value, typeOf: 'Audience' }
71
71
  });
72
72
  }
73
- catch (error) {
73
+ catch (_error) {
74
74
  throw new factory.errors.RateLimitExceeded('Offer');
75
75
  }
76
76
  // const multi = this.redisClient.multi();