@chevre/domain 25.2.0-alpha.9 → 26.0.0-alpha.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 (260) hide show
  1. package/lib/chevre/eventEmitter/task.d.ts +2 -1
  2. package/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
  3. package/lib/chevre/factory/customerTelephone2COATelNum.js +22 -0
  4. package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
  5. package/lib/chevre/repo/action/acceptPay.js +47 -19
  6. package/lib/chevre/repo/action.d.ts +16 -9
  7. package/lib/chevre/repo/action.js +99 -180
  8. package/lib/chevre/repo/adminTask.d.ts +37 -0
  9. package/lib/chevre/repo/adminTask.js +163 -0
  10. package/lib/chevre/repo/aggregateOffer.d.ts +3 -14
  11. package/lib/chevre/repo/aggregateOffer.js +16 -125
  12. package/lib/chevre/repo/aggregateTask.d.ts +37 -0
  13. package/lib/chevre/repo/aggregateTask.js +136 -0
  14. package/lib/chevre/repo/asyncAction.d.ts +69 -0
  15. package/lib/chevre/repo/asyncAction.js +237 -0
  16. package/lib/chevre/repo/concurrentLock.d.ts +3 -1
  17. package/lib/chevre/repo/creativeWork.d.ts +2 -3
  18. package/lib/chevre/repo/credentials.d.ts +2 -1
  19. package/lib/chevre/repo/customerType.d.ts +2 -3
  20. package/lib/chevre/repo/event.d.ts +10 -11
  21. package/lib/chevre/repo/eventOffer.d.ts +4 -5
  22. package/lib/chevre/repo/eventSellerMakesOffer.d.ts +2 -3
  23. package/lib/chevre/repo/eventSeries.d.ts +4 -5
  24. package/lib/chevre/repo/message.d.ts +1 -1
  25. package/lib/chevre/repo/message.js +1 -1
  26. package/lib/chevre/repo/mongoose/schemas/asyncAction.d.ts +13 -0
  27. package/lib/chevre/repo/mongoose/schemas/asyncAction.js +89 -0
  28. package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
  29. package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
  30. package/lib/chevre/repo/mongoose/schemas/scheduledTasks.d.ts +16 -0
  31. package/lib/chevre/repo/mongoose/schemas/scheduledTasks.js +103 -0
  32. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
  33. package/lib/chevre/repo/mongoose/schemas/task.d.ts +6 -1
  34. package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
  35. package/lib/chevre/repo/note.d.ts +3 -4
  36. package/lib/chevre/repo/noteAboutOrder.d.ts +2 -3
  37. package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +2 -2
  38. package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +2 -2
  39. package/lib/chevre/repo/offer/unitPriceInCatalog.js +59 -11
  40. package/lib/chevre/repo/offerCatalog.d.ts +2 -3
  41. package/lib/chevre/repo/offerCatalogItem.d.ts +2 -3
  42. package/lib/chevre/repo/order.d.ts +2 -0
  43. package/lib/chevre/repo/order.js +14 -14
  44. package/lib/chevre/repo/orderInTransaction.d.ts +68 -1
  45. package/lib/chevre/repo/orderInTransaction.js +181 -3
  46. package/lib/chevre/repo/passport.d.ts +2 -1
  47. package/lib/chevre/repo/person.d.ts +0 -15
  48. package/lib/chevre/repo/person.js +122 -108
  49. package/lib/chevre/repo/place/entranceGate.d.ts +4 -5
  50. package/lib/chevre/repo/place/movieTheater.d.ts +3 -4
  51. package/lib/chevre/repo/place/screeningRoom.d.ts +4 -5
  52. package/lib/chevre/repo/place/seat.d.ts +4 -5
  53. package/lib/chevre/repo/place/section.d.ts +3 -4
  54. package/lib/chevre/repo/priceSpecification.d.ts +4 -4
  55. package/lib/chevre/repo/product.d.ts +3 -4
  56. package/lib/chevre/repo/rateLimit/offer.d.ts +3 -1
  57. package/lib/chevre/repo/rateLimit/offer.js +0 -12
  58. package/lib/chevre/repo/reservation.d.ts +2 -3
  59. package/lib/chevre/repo/scheduledTask.d.ts +90 -0
  60. package/lib/chevre/repo/scheduledTask.js +223 -0
  61. package/lib/chevre/repo/sellerMakesOffer.d.ts +3 -4
  62. package/lib/chevre/repo/stockHolder.d.ts +1 -1
  63. package/lib/chevre/repo/stockHolder.js +0 -146
  64. package/lib/chevre/repo/task.d.ts +30 -71
  65. package/lib/chevre/repo/task.js +59 -345
  66. package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
  67. package/lib/chevre/repo/transaction/placeOrder.js +43 -83
  68. package/lib/chevre/repo/transaction.d.ts +2 -2
  69. package/lib/chevre/repo/transactionNumberCounter.js +0 -34
  70. package/lib/chevre/repo/transactionProcess.d.ts +2 -1
  71. package/lib/chevre/repo/transactionProcess.js +0 -13
  72. package/lib/chevre/repository.d.ts +20 -0
  73. package/lib/chevre/repository.js +46 -2
  74. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +1 -1
  75. package/lib/chevre/service/aggregation/system.d.ts +2 -2
  76. package/lib/chevre/service/aggregation/system.js +1 -1
  77. package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -1
  78. package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +1 -1
  79. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
  80. package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +1 -1
  81. package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
  82. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  83. package/lib/chevre/service/assetTransaction/refund.js +1 -1
  84. package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +1 -1
  85. package/lib/chevre/service/assetTransaction/reserveCOA/cancel.js +1 -67
  86. package/lib/chevre/service/asyncAction.d.ts +16 -0
  87. package/lib/chevre/service/asyncAction.js +36 -0
  88. package/lib/chevre/service/asyncActionHandler/onOperationFailed.d.ts +15 -0
  89. package/lib/chevre/service/asyncActionHandler/onOperationFailed.js +42 -0
  90. package/lib/chevre/service/asyncActionHandler.d.ts +13 -0
  91. package/lib/chevre/service/asyncActionHandler.js +89 -0
  92. package/lib/chevre/service/notification/factory.d.ts +2 -4
  93. package/lib/chevre/service/notification/factory.js +26 -24
  94. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +12 -6
  95. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +12 -4
  96. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -5
  97. package/lib/chevre/service/offer/event/authorize/factory.js +93 -75
  98. package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
  99. package/lib/chevre/service/offer/event/authorize.js +2 -2
  100. package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
  101. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
  102. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
  103. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
  104. package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +2 -1
  105. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
  106. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +15 -12
  107. package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
  108. package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
  109. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +4 -0
  110. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +20 -9
  111. package/lib/chevre/service/offer/onEventChanged.js +2 -2
  112. package/lib/chevre/service/order/confirmPayTransaction.js +1 -1
  113. package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
  114. package/lib/chevre/service/order/deleteOrder.js +8 -1
  115. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionCanceled.js +19 -11
  116. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
  117. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -2
  118. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +1 -7
  119. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
  120. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -0
  121. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
  122. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.js +1 -1
  123. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +1 -1
  124. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
  125. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +1 -1
  126. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +3 -3
  127. package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +0 -3
  128. package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +73 -44
  129. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
  130. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +53 -33
  131. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +1 -1
  132. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -2
  133. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +6 -4
  134. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
  135. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +3 -7
  136. package/lib/chevre/service/order/onOrderUpdated.js +1 -1
  137. package/lib/chevre/service/order/payOrder.d.ts +2 -0
  138. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -1
  139. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +13 -58
  140. package/lib/chevre/service/order/placeOrder/factory.js +3 -21
  141. package/lib/chevre/service/order/placeOrder.d.ts +4 -5
  142. package/lib/chevre/service/order/placeOrder.js +20 -31
  143. package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
  144. package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
  145. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
  146. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
  147. package/lib/chevre/service/payment/any/authorize.js +7 -5
  148. package/lib/chevre/service/payment/any/factory.d.ts +7 -7
  149. package/lib/chevre/service/payment/any/factory.js +18 -21
  150. package/lib/chevre/service/payment/any/findAcceptAction.d.ts +7 -1
  151. package/lib/chevre/service/payment/any/findAcceptAction.js +34 -15
  152. package/lib/chevre/service/payment/any/findAuthorizeAction.d.ts +4 -0
  153. package/lib/chevre/service/payment/any/findAuthorizeAction.js +20 -9
  154. package/lib/chevre/service/payment/any/findCheckAction.d.ts +4 -0
  155. package/lib/chevre/service/payment/any/findCheckAction.js +20 -9
  156. package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
  157. package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +5 -67
  158. package/lib/chevre/service/payment/any/onPayActionCompleted.js +1 -1
  159. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +1 -1
  160. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
  161. package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
  162. package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
  163. package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
  164. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
  165. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
  166. package/lib/chevre/service/reserve/adminFindReservations.d.ts +15 -0
  167. package/lib/chevre/service/reserve/adminFindReservations.js +35 -0
  168. package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +1 -1
  169. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +1 -1
  170. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +1 -1
  171. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +20 -11
  172. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +1 -1
  173. package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +1 -1
  174. package/lib/chevre/service/reserve/searchByOrder.js +2 -6
  175. package/lib/chevre/service/reserve.d.ts +2 -2
  176. package/lib/chevre/service/reserve.js +3 -3
  177. package/lib/chevre/service/scheduledTask.d.ts +11 -0
  178. package/lib/chevre/service/scheduledTask.js +40 -0
  179. package/lib/chevre/service/scheduledTaskHandler/onOperationFailed.d.ts +14 -0
  180. package/lib/chevre/service/scheduledTaskHandler/onOperationFailed.js +56 -0
  181. package/lib/chevre/service/scheduledTaskHandler.d.ts +12 -0
  182. package/lib/chevre/service/scheduledTaskHandler.js +66 -0
  183. package/lib/chevre/service/task/aggregateOffers.d.ts +2 -2
  184. package/lib/chevre/service/task/aggregateOffers.js +2 -1
  185. package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +2 -2
  186. package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -1
  187. package/lib/chevre/service/task/authorizePayment.js +3 -1
  188. package/lib/chevre/service/task/cancelReservation.d.ts +2 -2
  189. package/lib/chevre/service/task/cancelReservation.js +2 -1
  190. package/lib/chevre/service/task/confirmPayTransaction.js +0 -1
  191. package/lib/chevre/service/task/confirmReserveTransaction.js +3 -8
  192. package/lib/chevre/service/task/deleteTransaction.d.ts +2 -2
  193. package/lib/chevre/service/task/deleteTransaction.js +2 -1
  194. package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +2 -2
  195. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -3
  196. package/lib/chevre/service/task/onEventChanged.d.ts +2 -2
  197. package/lib/chevre/service/task/onEventChanged.js +2 -1
  198. package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +2 -2
  199. package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -1
  200. package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +2 -2
  201. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +1 -1
  202. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
  203. package/lib/chevre/service/task/onResourceUpdated.d.ts +2 -2
  204. package/lib/chevre/service/task/onResourceUpdated.js +10 -9
  205. package/lib/chevre/service/task/placeOrder.d.ts +2 -2
  206. package/lib/chevre/service/task/placeOrder.js +6 -3
  207. package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
  208. package/lib/chevre/service/task/refund.d.ts +2 -2
  209. package/lib/chevre/service/task/refund.js +4 -10
  210. package/lib/chevre/service/task/reserve.d.ts +2 -2
  211. package/lib/chevre/service/task/reserve.js +2 -1
  212. package/lib/chevre/service/task/returnOrder.d.ts +2 -2
  213. package/lib/chevre/service/task/returnOrder.js +2 -1
  214. package/lib/chevre/service/task/returnPayTransaction.js +1 -1
  215. package/lib/chevre/service/task/sendOrder.d.ts +2 -2
  216. package/lib/chevre/service/task/sendOrder.js +2 -1
  217. package/lib/chevre/service/task/voidPayTransaction.js +3 -7
  218. package/lib/chevre/service/task/voidPayment.d.ts +2 -2
  219. package/lib/chevre/service/task/voidPayment.js +2 -1
  220. package/lib/chevre/service/task/voidReserveTransaction.d.ts +1 -1
  221. package/lib/chevre/service/taskHandler/onOperationFailed/informTaskIfNeeded.js +1 -1
  222. package/lib/chevre/service/taskHandler/onOperationFailed.js +1 -1
  223. package/lib/chevre/service/taskHandler.d.ts +2 -2
  224. package/lib/chevre/service/taskHandler.js +36 -37
  225. package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
  226. package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
  227. package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
  228. package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
  229. package/lib/chevre/service/transaction/deleteTransaction.d.ts +1 -1
  230. package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
  231. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +28 -2
  232. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +11 -12
  233. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +4 -2
  234. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +6 -7
  235. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +32 -4
  236. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +10 -1
  237. package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
  238. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +6 -2
  239. package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +23 -9
  240. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +6 -5
  241. package/lib/chevre/service/transaction/placeOrder/confirm.js +30 -40
  242. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +1 -1
  243. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
  244. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
  245. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
  246. package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
  247. package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.d.ts +20 -0
  248. package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.js +63 -0
  249. package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -1
  250. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +17 -86
  251. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
  252. package/lib/chevre/service/transaction/returnOrder.js +1 -1
  253. package/lib/chevre/service.d.ts +8 -0
  254. package/lib/chevre/service.js +23 -1
  255. package/lib/chevre/taskSettings.d.ts +3 -4
  256. package/package.json +8 -11
  257. package/lib/chevre/service/order/findConfirmedPlaceOrder.d.ts +0 -13
  258. package/lib/chevre/service/order/findConfirmedPlaceOrder.js +0 -32
  259. package/lib/chevre/service/reserve/findReservations.d.ts +0 -33
  260. package/lib/chevre/service/reserve/findReservations.js +0 -61
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import type { Connection } from 'mongoose';
3
- import type { RedisClientType } from 'redis';
3
+ import type { createClient } from 'redis';
4
4
  import { factory } from '../factory';
5
5
  interface IExecuteSettings {
6
6
  /**
@@ -60,6 +60,7 @@ type IChangedTask = IReadyTask | IRunningTask | IRunningTaskByName | IExecutedTa
60
60
  type IOperationExecute<T> = (settings: IExecuteSettings) => Promise<T>;
61
61
  type INextFunction = (task: IExecutedTask) => IOperationExecute<void>;
62
62
  type IOnTaskStatusChangedListener = (task: IChangedTask, next?: INextFunction) => void;
63
+ type RedisClientType = ReturnType<typeof createClient>;
63
64
  /**
64
65
  * タスクイベントエミッター
65
66
  */
@@ -0,0 +1,3 @@
1
+ export declare function customerTelephone2COATelNum(params: {
2
+ telephone: string;
3
+ }): string;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customerTelephone2COATelNum = customerTelephone2COATelNum;
4
+ const libphonenumber_js_1 = require("libphonenumber-js");
5
+ const factory_1 = require("../factory");
6
+ function customerTelephone2COATelNum(params) {
7
+ const { telephone } = params;
8
+ // 電話番号のフォーマットを日本人にリーダブルに調整(COAではこのフォーマットで扱うので)
9
+ // const phoneUtil = PhoneNumberUtil.getInstance();
10
+ // const phoneNumber = phoneUtil.parse(telephone, 'JP');
11
+ // let telNum = phoneUtil.format(phoneNumber, PhoneNumberFormat.NATIONAL);
12
+ const phoneNumber = (0, libphonenumber_js_1.parsePhoneNumberFromString)(telephone, 'JP');
13
+ // isValid検証はgoogle-libphonenumber時代にしていなかったため、ひとまずなし
14
+ // if (phoneNumber === undefined || !phoneNumber.isValid()) {
15
+ if (phoneNumber === undefined) {
16
+ throw new factory_1.factory.errors.Internal(`phoneNumber undefined. telephone: ${telephone}`);
17
+ }
18
+ let telNum = phoneNumber.format('NATIONAL');
19
+ // COAでは数字のみ受け付けるので数字以外を除去
20
+ telNum = telNum.replace(/[^\d]/g, '');
21
+ return telNum;
22
+ }
@@ -37,4 +37,19 @@ export declare class AcceptPayActionRepo extends ActionProcessRepo<IAcceptPayAct
37
37
  transactionNumber: string;
38
38
  };
39
39
  }, inclusion: IKeyOfProjection[]): Promise<IAcceptPayAction[]>;
40
+ /**
41
+ * アクションIDからレシピのafterMediaを参照する
42
+ */
43
+ findPaymentUrlById(params: {
44
+ project: {
45
+ id: string;
46
+ };
47
+ /**
48
+ * アクションID
49
+ */
50
+ id: string;
51
+ }): Promise<{
52
+ paymentMethodId: string;
53
+ paymentUrl?: string;
54
+ }>;
40
55
  }
@@ -29,25 +29,6 @@ class AcceptPayActionRepo extends actionProcess_1.ActionProcessRepo {
29
29
  ...(typeof limit === 'number') ? { limit } : undefined,
30
30
  ...(typeof page === 'number') ? { page } : undefined,
31
31
  }, inclusion);
32
- // const andConditions: FilterQuery<IAcceptPayAction>[] = [
33
- // { typeOf: { $eq: factory.actionType.AcceptAction } },
34
- // { 'project.id': { $eq: params.project.id } },
35
- // { 'object.typeOf': { $exists: true, $eq: factory.assetTransactionType.Pay } },
36
- // { 'purpose.id': { $exists: true, $eq: params.purpose.id } }
37
- // ];
38
- // let positiveProjectionFields: IKeyOfProjection[] = AVAILABLE_PROJECT_FIELDS;
39
- // if (Array.isArray(inclusion) && inclusion.length > 0) {
40
- // positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
41
- // }
42
- // const projection: ProjectionType<IAcceptPayAction> = {
43
- // _id: 0,
44
- // id: { $toString: '$_id' },
45
- // ...Object.fromEntries<1>(positiveProjectionFields.map((key) => ([key, 1])))
46
- // };
47
- // const query = this.actionModel.find({ $and: andConditions }, projection);
48
- // return query.setOptions({ maxTimeMS: MONGO_MAX_TIME_MS })
49
- // .lean<IAcceptPayAction[]>()
50
- // .exec();
51
32
  }
52
33
  /**
53
34
  * 決済取引番号から完了済の決済採用アクションを参照する
@@ -66,5 +47,52 @@ class AcceptPayActionRepo extends actionProcess_1.ActionProcessRepo {
66
47
  }
67
48
  }, inclusion);
68
49
  }
50
+ /**
51
+ * アクションIDからレシピのafterMediaを参照する
52
+ */
53
+ async findPaymentUrlById(params) {
54
+ const acceptActionWithResult = await this.actionModel.findOne({
55
+ typeOf: { $eq: factory_1.factory.actionType.AcceptAction }, // 採用アクション
56
+ _id: { $eq: params.id }
57
+ }, {
58
+ _id: 0,
59
+ result: 1,
60
+ object: 1
61
+ })
62
+ .lean() // 2024-08-26~
63
+ .exec();
64
+ if (acceptActionWithResult === null) {
65
+ throw new factory_1.factory.errors.NotFound(this.actionModel.modelName);
66
+ }
67
+ const paymentMethodId = acceptActionWithResult.object.transactionNumber;
68
+ // アクション未完了であればpaymentMethodIdだけ返す
69
+ if (acceptActionWithResult.result === undefined) {
70
+ return { paymentMethodId };
71
+ }
72
+ const recipe = await this.actionRecipeModel.findOne({
73
+ 'project.id': { $eq: params.project.id },
74
+ 'recipeFor.id': { $eq: params.id }
75
+ }, {
76
+ _id: 0,
77
+ step: 1
78
+ })
79
+ .lean()
80
+ .exec();
81
+ const afterMedia = recipe?.step[0]?.itemListElement[1]?.itemListElement[0]?.afterMedia;
82
+ let paymentUrl;
83
+ // 3DS拡張(2024-01-02~)
84
+ const retUrl = acceptActionWithResult.object.object.paymentMethod.creditCard?.retUrl;
85
+ if (typeof retUrl === 'string' && retUrl.length > 0) {
86
+ paymentUrl = afterMedia?.redirectUrl;
87
+ }
88
+ else {
89
+ paymentUrl = afterMedia?.acsUrl;
90
+ }
91
+ // アクション完了済であれば、レシピからpaymentUrlを必ず参照できるはず
92
+ if (typeof paymentUrl !== 'string' || paymentUrl === '') {
93
+ throw new factory_1.factory.errors.Internal(`Payment URL unable to publish. [retUrl: ${retUrl}]`);
94
+ }
95
+ return { paymentMethodId, paymentUrl };
96
+ }
69
97
  }
70
98
  exports.AcceptPayActionRepo = AcceptPayActionRepo;
@@ -9,6 +9,10 @@ export { ICancelActionAction };
9
9
  */
10
10
  type StartableActionType = Exclude<factory.actionType, factory.actionType.AcceptAction | factory.actionType.CheckAction | factory.actionType.AuthorizeAction | factory.actionType.PayAction | factory.actionType.RefundAction>;
11
11
  type IAvailableActionRecipe = IActionRecipe<Exclude<factory.recipe.RecipeCategory, factory.recipe.RecipeCategory.publishPaymentUrl | factory.recipe.RecipeCategory.checkMovieTicket | factory.recipe.RecipeCategory.acceptCOAOffer | factory.recipe.RecipeCategory.authorizeInvoice | factory.recipe.RecipeCategory.authorizeInvoice3ds | factory.recipe.RecipeCategory.payCreditCard | factory.recipe.RecipeCategory.payMovieTicket | factory.recipe.RecipeCategory.refundCreditCard | factory.recipe.RecipeCategory.refundMovieTicket>>;
12
+ export interface IDeleteActionResult {
13
+ identifier: string;
14
+ deletedCount?: number;
15
+ }
12
16
  /**
13
17
  * アクションリポジトリ
14
18
  */
@@ -50,15 +54,20 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
50
54
  orderNumber: string;
51
55
  sort?: factory.action.ISortOrder;
52
56
  }): Promise<IAction<factory.actionType>[]>;
57
+ /**
58
+ * 注文番号から、注文に対するアクションを削除する
59
+ */
60
+ deleteActionsByOrderNumber(params: {
61
+ project: {
62
+ id: string;
63
+ };
64
+ orderNumber: string;
65
+ }): Promise<IDeleteActionResult[]>;
53
66
  deleteByProject(params: {
54
67
  project: {
55
68
  id: string;
56
69
  };
57
70
  }): Promise<void>;
58
- /**
59
- * イベントと入場ゲート指定で予約使用アクションを集計する
60
- * discontinue(2024-12-26~)
61
- */
62
71
  /**
63
72
  * 開始日時を一定期間過ぎたアクションを削除する
64
73
  */
@@ -78,20 +87,18 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
78
87
  /**
79
88
  * 取引からアクションを削除する
80
89
  */
81
- deleteByPurpose(params: {
90
+ deleteActionsByTransactionId(params: {
82
91
  project: {
83
92
  id: string;
84
93
  };
85
- purpose: {
94
+ transaction: {
86
95
  typeOf: factory.transactionType;
87
96
  id: string;
88
97
  };
89
98
  typeOf: {
90
99
  $in: factory.actionType[];
91
100
  };
92
- }): Promise<{
93
- deletedCount?: number;
94
- } | null>;
101
+ }): Promise<IDeleteActionResult[]>;
95
102
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/action").IAction<import("@chevre/factory/lib/chevre/action").IAttributes<factory.actionType, any, any>>, "id"> & {
96
103
  identifier?: string;
97
104
  } & {
@@ -312,130 +312,68 @@ class ActionRepo extends actionProcess_1.ActionProcessRepo {
312
312
  .lean() // 2024-08-26~
313
313
  .exec();
314
314
  }
315
+ /**
316
+ * 注文番号から、注文に対するアクションを削除する
317
+ */
318
+ async deleteActionsByOrderNumber(params) {
319
+ const { project, orderNumber } = params;
320
+ if (typeof project.id !== 'string' || project.id === '') {
321
+ throw new factory_1.factory.errors.ArgumentNull('project.id');
322
+ }
323
+ if (typeof orderNumber !== 'string' || orderNumber === '') {
324
+ throw new factory_1.factory.errors.ArgumentNull('orderNumber');
325
+ }
326
+ const filters = [
327
+ {
328
+ identifier: 'byObject',
329
+ filter: {
330
+ 'project.id': { $eq: project.id },
331
+ 'object.orderNumber': { $exists: true, $eq: orderNumber }
332
+ }
333
+ },
334
+ {
335
+ identifier: 'byPurpose',
336
+ filter: {
337
+ 'project.id': { $eq: project.id },
338
+ 'purpose.orderNumber': { $exists: true, $eq: orderNumber }
339
+ }
340
+ },
341
+ {
342
+ identifier: 'byAbout',
343
+ filter: {
344
+ 'project.id': { $eq: project.id },
345
+ 'about.orderNumber': { $exists: true, $eq: orderNumber }
346
+ }
347
+ },
348
+ {
349
+ identifier: 'byInstrument',
350
+ filter: {
351
+ 'project.id': { $eq: project.id },
352
+ 'instrument.orderNumber': { $exists: true, $eq: orderNumber }
353
+ }
354
+ },
355
+ ];
356
+ return Promise.all(filters.map(async ({ identifier, filter }) => {
357
+ return this.actionModel.deleteMany(filter)
358
+ .exec()
359
+ .then((result) => {
360
+ return {
361
+ identifier,
362
+ // n: result?.n,
363
+ // opTime: result.opTime,
364
+ // ok: result?.ok,
365
+ // operationTime,
366
+ deletedCount: result?.deletedCount
367
+ };
368
+ });
369
+ }));
370
+ }
315
371
  async deleteByProject(params) {
316
372
  await this.actionModel.deleteMany({
317
373
  'project.id': { $eq: params.project.id }
318
374
  })
319
375
  .exec();
320
376
  }
321
- // public async reCompleteAuthorizeEventOfferAction(params: {
322
- // id: string;
323
- // object: factory.action.authorize.offer.eventService.IObject;
324
- // result: factory.action.authorize.offer.eventService.IResult;
325
- // }): Promise<void> {
326
- // return this.actionModel.findOneAndUpdate(
327
- // {
328
- // // typeOf: factory.actionType.AuthorizeAction,
329
- // _id: { $eq: params.id },
330
- // // ActiveActionStatus->CompletedActionStatusで再実装(2024-01-15~)
331
- // // actionStatus: factory.actionStatusType.CompletedActionStatus
332
- // actionStatus: { $eq: factory.actionStatusType.ActiveActionStatus }
333
- // },
334
- // {
335
- // $set: {
336
- // actionStatus: factory.actionStatusType.CompletedActionStatus,
337
- // object: params.object,
338
- // result: params.result,
339
- // endDate: new Date()
340
- // }
341
- // },
342
- // { new: true, projection: { _id: 1 } }
343
- // )
344
- // .lean<{ _id: ObjectId }>()
345
- // .exec()
346
- // .then((doc) => {
347
- // if (doc === null) {
348
- // throw new factory.errors.NotFound(this.actionModel.modelName);
349
- // }
350
- // });
351
- // }
352
- // public async updateById(params: {
353
- // id: string;
354
- // update: any;
355
- // }): Promise<void> {
356
- // await this.actionModel.updateOne(
357
- // { _id: { $eq: params.id } },
358
- // params.update
359
- // )
360
- // .exec();
361
- // }
362
- // public async findByIdAndUpdate(params: {
363
- // id: string;
364
- // update: UpdateQuery<IAction<factory.actionType>>;
365
- // }): Promise<void> {
366
- // await this.actionModel.findOneAndUpdate(
367
- // { _id: { $eq: params.id } },
368
- // params.update,
369
- // { projection: { _id: 1 } }
370
- // )
371
- // .lean<{ _id: ObjectId }>()
372
- // .exec()
373
- // .then((doc) => {
374
- // if (doc === null) {
375
- // throw new factory.errors.NotFound(this.actionModel.modelName);
376
- // }
377
- // });
378
- // }
379
- /**
380
- * イベントと入場ゲート指定で予約使用アクションを集計する
381
- * discontinue(2024-12-26~)
382
- */
383
- // public async countUseActionsByEntranceGate(params: {
384
- // event: { id: string };
385
- // entranceGateIdentifier: string;
386
- // }): Promise<IUseActionCountByOffer[]> {
387
- // return this.actionModel.aggregate([
388
- // {
389
- // $match: {
390
- // actionStatus: { $eq: factory.actionStatusType.CompletedActionStatus }
391
- // }
392
- // },
393
- // {
394
- // $match: {
395
- // typeOf: { $eq: factory.actionType.UseAction }
396
- // }
397
- // },
398
- // {
399
- // $match: {
400
- // 'object.typeOf': {
401
- // $exists: true,
402
- // $eq: factory.reservationType.EventReservation
403
- // }
404
- // }
405
- // },
406
- // {
407
- // $match: {
408
- // 'object.reservationFor.id': {
409
- // $exists: true,
410
- // $eq: params.event.id
411
- // }
412
- // }
413
- // },
414
- // {
415
- // $match: {
416
- // 'location.identifier': {
417
- // $exists: true,
418
- // $eq: params.entranceGateIdentifier
419
- // }
420
- // }
421
- // },
422
- // {
423
- // $group: {
424
- // _id: '$object.id',
425
- // object: { $first: '$object' }
426
- // }
427
- // },
428
- // {
429
- // $group: {
430
- // _id: '$object.reservedTicket.ticketType.id',
431
- // useActionCount: {
432
- // $sum: 1
433
- // }
434
- // }
435
- // }
436
- // ])
437
- // .exec();
438
- // }
439
377
  /**
440
378
  * 開始日時を一定期間過ぎたアクションを削除する
441
379
  */
@@ -473,69 +411,50 @@ class ActionRepo extends actionProcess_1.ActionProcessRepo {
473
411
  /**
474
412
  * 取引からアクションを削除する
475
413
  */
476
- async deleteByPurpose(params) {
477
- return this.actionModel.deleteMany({
478
- 'project.id': { $eq: params.project.id },
479
- typeOf: { $in: params.typeOf.$in },
480
- 'purpose.id': { $exists: true, $eq: params.purpose.id },
481
- 'purpose.typeOf': { $exists: true, $eq: params.purpose.typeOf }
482
- })
483
- .exec()
484
- .then((result) => {
485
- return {
486
- // n: result?.n,
487
- // opTime: result.opTime,
488
- // ok: result?.ok,
489
- // operationTime,
490
- deletedCount: result?.deletedCount
491
- };
492
- });
414
+ async deleteActionsByTransactionId(params) {
415
+ const { project, transaction } = params;
416
+ if (typeof project.id !== 'string' || project.id === '') {
417
+ throw new factory_1.factory.errors.ArgumentNull('project.id');
418
+ }
419
+ if (typeof transaction.id !== 'string' || transaction.id === '') {
420
+ throw new factory_1.factory.errors.ArgumentNull('transaction.id ');
421
+ }
422
+ const filters = [
423
+ {
424
+ identifier: 'byPurpose',
425
+ filter: {
426
+ 'project.id': { $eq: project.id },
427
+ typeOf: { $in: params.typeOf.$in },
428
+ 'purpose.id': { $exists: true, $eq: transaction.id },
429
+ 'purpose.typeOf': { $exists: true, $eq: transaction.typeOf }
430
+ }
431
+ },
432
+ // instrumentによるアクション削除にも対応(2026-07-10~)
433
+ {
434
+ identifier: 'byInstrument',
435
+ filter: {
436
+ 'project.id': { $eq: project.id },
437
+ // typeOf: { $in: params.typeOf.$in }, // typOfでフィルターしない
438
+ 'instrument.id': { $exists: true, $eq: transaction.id },
439
+ 'instrument.typeOf': { $exists: true, $eq: transaction.typeOf }
440
+ }
441
+ }
442
+ ];
443
+ return Promise.all(filters.map(async ({ identifier, filter }) => {
444
+ return this.actionModel.deleteMany(filter)
445
+ .exec()
446
+ .then((result) => {
447
+ return {
448
+ identifier,
449
+ // n: result?.n,
450
+ // opTime: result.opTime,
451
+ // ok: result?.ok,
452
+ // operationTime,
453
+ deletedCount: result?.deletedCount
454
+ };
455
+ });
456
+ }));
493
457
  }
494
- // public async saveActionWithEndDate(savingAction: Omit<factory.action.authorize.invoice.IAction, 'id'>) {
495
- // const { sameAs, typeOf, project, agent, object, ...updateFields } = savingAction;
496
- // const filter: FilterQuery<factory.recipe.IRecipe> = {
497
- // 'project.id': { $eq: project.id },
498
- // // 'agent.id': { $exists: true, $eq: agent.id },
499
- // // 'object.typeOf': { $exists: true, $eq: object.typeOf },
500
- // 'object.paymentMethodId': { $exists: true, $eq: object.paymentMethodId },
501
- // typeOf: { $eq: typeOf },
502
- // 'sameAs.id': { $exists: true, $eq: sameAs.id }
503
- // };
504
- // const setOnInsert: AnyKeys<IAction<factory.actionType>> = { typeOf, project, agent, object, sameAs };
505
- // const setKeys: AnyKeys<IAction<factory.actionType>> = updateFields;
506
- // const update: UpdateQuery<IAction<factory.actionType>> = {
507
- // $setOnInsert: setOnInsert,
508
- // $set: setKeys
509
- // };
510
- // return this.actionModel.updateOne<HydratedDocument<IRecipeAsDocument>>(
511
- // filter,
512
- // update,
513
- // {
514
- // upsert: true,
515
- // includeResultMetadata: true
516
- // }
517
- // )
518
- // .exec();
519
- // }
520
- // public async findRecipeByAction<T extends factory.recipe.RecipeCategory>(params: {
521
- // project: { id: string };
522
- // recipeFor: { id: string };
523
- // }): Promise<Pick<IActionRecipe<T>, 'step' | 'recipeCategory'> | null> {
524
- // return this.actionRecipeModel.findOne(
525
- // {
526
- // 'project.id': { $eq: params.project.id },
527
- // 'recipeFor.id': { $eq: params.recipeFor.id }
528
- // },
529
- // { step: 1, recipeCategory: 1 }
530
- // // { lean: true }
531
- // )
532
- // .lean<Pick<IActionRecipe<T>, 'step' | 'recipeCategory'>>()
533
- // .exec();
534
- // // if (result === null) {
535
- // // throw new factory.errors.NotFound(this.actionRecipeModel.modelName);
536
- // // }
537
- // // return result;
538
- // }
539
458
  getCursor(conditions, projection) {
540
459
  return this.actionModel.find(conditions, projection)
541
460
  .sort({ startDate: factory_1.factory.sortType.Descending })
@@ -0,0 +1,37 @@
1
+ import type { AnyKeys, Connection, FilterQuery, ProjectionType } from 'mongoose';
2
+ import { factory } from '../factory';
3
+ import { IDocType } from './mongoose/schemas/task';
4
+ type IKeyOfProjection = keyof factory.task.ITask<factory.taskName> | 'expires';
5
+ /**
6
+ * タスク管理リポジトリ
7
+ */
8
+ export declare class AdminTaskRepo {
9
+ private readonly taskModel;
10
+ constructor(connection: Connection);
11
+ static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask>[];
12
+ countTasks(params: factory.task.ISearchConditions): Promise<{
13
+ count: number;
14
+ }>;
15
+ /**
16
+ * 検索する
17
+ */
18
+ findTasks(params: factory.task.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.task.ITask<factory.taskName>[]>;
19
+ getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "id"> & {
20
+ expires?: Date;
21
+ } & {
22
+ _id: import("mongoose").Types.ObjectId;
23
+ } & {
24
+ __v: number;
25
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "id"> & {
26
+ expires?: Date;
27
+ } & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ } & {
30
+ __v: number;
31
+ }) | null>;
32
+ unsetUnnecessaryFields(params: {
33
+ filter: FilterQuery<factory.task.ITask<factory.taskName>>;
34
+ $unset: AnyKeys<factory.task.ITask<factory.taskName>>;
35
+ }): Promise<import("mongoose").UpdateWriteOpResult>;
36
+ }
37
+ export {};