@chevre/domain 26.0.0-alpha.8 → 26.0.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.
- package/lib/chevre/eventEmitter/task.d.ts +8 -23
- package/lib/chevre/eventEmitter/task.js +2 -2
- package/lib/chevre/repo/acceptedOffer.d.ts +0 -7
- package/lib/chevre/repo/acceptedOffer.js +27 -27
- package/lib/chevre/repo/action/acceptCOAOffer.d.ts +3 -1
- package/lib/chevre/repo/action/acceptCOAOffer.js +8 -2
- package/lib/chevre/repo/action/acceptPay.d.ts +3 -1
- package/lib/chevre/repo/action/acceptPay.js +8 -4
- package/lib/chevre/repo/action/anyAction/actionProcess.d.ts +120 -0
- package/lib/chevre/repo/action/{actionProcess.js → anyAction/actionProcess.js} +28 -157
- package/lib/chevre/repo/action/anyAction/actionRecipe.d.ts +37 -0
- package/lib/chevre/repo/action/anyAction/actionRecipe.js +53 -0
- package/lib/chevre/repo/action/authorizeInvoice.d.ts +5 -8
- package/lib/chevre/repo/action/authorizeInvoice.js +7 -4
- package/lib/chevre/repo/action/authorizeOffer.d.ts +3 -1
- package/lib/chevre/repo/action/authorizeOffer.js +7 -2
- package/lib/chevre/repo/action/authorizePaymentMethod.d.ts +3 -1
- package/lib/chevre/repo/action/authorizePaymentMethod.js +7 -4
- package/lib/chevre/repo/action/authorizeTicketedObject.d.ts +3 -1
- package/lib/chevre/repo/action/authorizeTicketedObject.js +7 -2
- package/lib/chevre/repo/action/cancel.d.ts +25 -0
- package/lib/chevre/repo/action/cancel.js +47 -0
- package/lib/chevre/repo/action/checkMovieTicket.d.ts +3 -1
- package/lib/chevre/repo/action/checkMovieTicket.js +8 -1
- package/lib/chevre/repo/action/confirm.d.ts +11 -0
- package/lib/chevre/repo/action/confirm.js +16 -0
- package/lib/chevre/repo/action/create.d.ts +10 -0
- package/lib/chevre/repo/action/create.js +17 -0
- package/lib/chevre/repo/action/inform.d.ts +38 -0
- package/lib/chevre/repo/action/inform.js +146 -0
- package/lib/chevre/repo/action/order.d.ts +21 -0
- package/lib/chevre/repo/action/order.js +35 -0
- package/lib/chevre/repo/action/pay.d.ts +3 -1
- package/lib/chevre/repo/action/pay.js +7 -4
- package/lib/chevre/repo/action/refund.d.ts +3 -1
- package/lib/chevre/repo/action/refund.js +7 -4
- package/lib/chevre/repo/action/reserve.d.ts +21 -0
- package/lib/chevre/repo/action/reserve.js +37 -0
- package/lib/chevre/repo/action/returnAction.d.ts +11 -0
- package/lib/chevre/repo/action/returnAction.js +16 -0
- package/lib/chevre/repo/action/sendEmailMessage.d.ts +10 -0
- package/lib/chevre/repo/action/sendEmailMessage.js +17 -0
- package/lib/chevre/repo/action/sendOrder.d.ts +10 -0
- package/lib/chevre/repo/action/sendOrder.js +16 -0
- package/lib/chevre/repo/action/unknown2actionError.d.ts +6 -0
- package/lib/chevre/repo/action/unknown2actionError.js +15 -0
- package/lib/chevre/repo/action/update.d.ts +48 -0
- package/lib/chevre/repo/action/update.js +166 -0
- package/lib/chevre/repo/action/use.d.ts +39 -0
- package/lib/chevre/repo/action/use.js +153 -0
- package/lib/chevre/repo/{action.d.ts → adminAction.d.ts} +11 -37
- package/lib/chevre/repo/adminAction.js +176 -0
- package/lib/chevre/repo/adminAssetTransaction.d.ts +126 -0
- package/lib/chevre/repo/adminAssetTransaction.js +491 -0
- package/lib/chevre/repo/adminAsyncAction.d.ts +2 -2
- package/lib/chevre/repo/adminScheduledTask.d.ts +1 -1
- package/lib/chevre/repo/adminTask.d.ts +25 -8
- package/lib/chevre/repo/adminTask.js +31 -32
- package/lib/chevre/repo/adminTransaction.d.ts +131 -0
- package/lib/chevre/repo/adminTransaction.js +237 -0
- package/lib/chevre/repo/aggregateAction.d.ts +8 -11
- package/lib/chevre/repo/aggregateAction.js +0 -61
- package/lib/chevre/repo/aggregateAssetTransaction.d.ts +43 -0
- package/lib/chevre/repo/aggregateAssetTransaction.js +166 -0
- package/lib/chevre/repo/aggregateTransaction.d.ts +39 -0
- package/lib/chevre/repo/aggregateTransaction.js +166 -0
- package/lib/chevre/repo/aggregateUseAction.d.ts +35 -0
- package/lib/chevre/repo/aggregateUseAction.js +164 -0
- package/lib/chevre/repo/aggregation.d.ts +0 -8
- package/lib/chevre/repo/aggregation.js +0 -10
- package/lib/chevre/repo/assetTransaction.d.ts +10 -235
- package/lib/chevre/repo/assetTransaction.js +48 -636
- package/lib/chevre/repo/asyncAction.d.ts +2 -2
- package/lib/chevre/repo/authorization.d.ts +0 -6
- package/lib/chevre/repo/authorization.js +15 -27
- package/lib/chevre/repo/message.d.ts +0 -7
- package/lib/chevre/repo/message.js +0 -38
- package/lib/chevre/repo/migrateAction.d.ts +48 -0
- package/lib/chevre/repo/migrateAction.js +32 -0
- package/lib/chevre/repo/mongoose/schemas/action/inform.d.ts +11 -0
- package/lib/chevre/repo/mongoose/schemas/action/inform.js +82 -0
- package/lib/chevre/repo/mongoose/schemas/action/update.d.ts +12 -0
- package/lib/chevre/repo/mongoose/schemas/action/update.js +112 -0
- package/lib/chevre/repo/mongoose/schemas/{ownershipInfo.d.ts → action/use.d.ts} +4 -6
- package/lib/chevre/repo/mongoose/schemas/action/use.js +92 -0
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +1 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +22 -7
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +1 -0
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.js +19 -1
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +8 -9
- package/lib/chevre/repo/mongoose/schemas/aggregation.js +8 -1
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +95 -76
- package/lib/chevre/repo/mongoose/schemas/authorization.js +25 -18
- package/lib/chevre/repo/mongoose/schemas/event.js +7 -0
- package/lib/chevre/repo/mongoose/schemas/eventOffer.js +7 -0
- package/lib/chevre/repo/mongoose/schemas/message.js +8 -1
- package/lib/chevre/repo/mongoose/schemas/pendingReservation.js +11 -4
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +5 -16
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +2 -5
- package/lib/chevre/repo/mongoose/schemas/task.js +134 -118
- package/lib/chevre/repo/mongoose/schemas/ticket.js +8 -1
- package/lib/chevre/repo/orderInTransaction.d.ts +0 -3
- package/lib/chevre/repo/orderInTransaction.js +30 -22
- package/lib/chevre/repo/scheduledTask.d.ts +4 -1
- package/lib/chevre/repo/scheduledTask.js +3 -25
- package/lib/chevre/repo/task.d.ts +44 -150
- package/lib/chevre/repo/task.js +13 -446
- package/lib/chevre/repo/taskDelayed.d.ts +74 -0
- package/lib/chevre/repo/taskDelayed.js +195 -0
- package/lib/chevre/repo/taskRunning.d.ts +35 -0
- package/lib/chevre/repo/taskRunning.js +89 -0
- package/lib/chevre/repo/ticket.d.ts +0 -6
- package/lib/chevre/repo/ticket.js +0 -11
- package/lib/chevre/repo/transaction.d.ts +1 -187
- package/lib/chevre/repo/transaction.js +2 -383
- package/lib/chevre/repository.d.ts +65 -25
- package/lib/chevre/repository.js +144 -56
- package/lib/chevre/service/aggregation/system.d.ts +9 -8
- package/lib/chevre/service/aggregation/system.js +5 -5
- package/lib/chevre/service/assetTransaction/cancelReservation/start.js +10 -17
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +0 -10
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/refund.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/refund.js +2 -2
- package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +4 -2
- package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +4 -2
- package/lib/chevre/service/assetTransaction/reserveCOA/cancel.d.ts +8 -4
- package/lib/chevre/service/assetTransaction/reserveCOA/cancel.js +1 -1
- package/lib/chevre/service/asyncAction.d.ts +2 -2
- package/lib/chevre/service/asyncAction.js +1 -4
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.d.ts +2 -2
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.js +0 -2
- package/lib/chevre/service/asyncActionHandler.d.ts +4 -4
- package/lib/chevre/service/asyncActionHandler.js +11 -13
- package/lib/chevre/service/event/processUpdateMovieTheater.d.ts +4 -2
- package/lib/chevre/service/event/processUpdateMovieTheater.js +3 -3
- package/lib/chevre/service/event.d.ts +4 -2
- package/lib/chevre/service/event.js +3 -3
- package/lib/chevre/service/notification/sendEmailMessage.d.ts +4 -2
- package/lib/chevre/service/notification/sendEmailMessage.js +3 -3
- package/lib/chevre/service/notification/triggerWebhook.d.ts +4 -2
- package/lib/chevre/service/notification/triggerWebhook.js +5 -16
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -1
- package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +0 -1
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +4 -2
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.js +1 -3
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4coa.d.ts +9 -5
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4coa.js +1 -1
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +6 -4
- package/lib/chevre/service/offer/event/voidTransaction.js +7 -9
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +6 -4
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +3 -15
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +0 -4
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +19 -19
- package/lib/chevre/service/offer/onEventChanged.js +0 -2
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +4 -10
- package/lib/chevre/service/order/confirmPayTransaction.js +7 -11
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +2 -56
- package/lib/chevre/service/order/deleteOrder.d.ts +2 -2
- package/lib/chevre/service/order/deleteOrder.js +1 -2
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/isDeliverable.js +1 -49
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.js +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +1 -9
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +4 -8
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.js +5 -11
- package/lib/chevre/service/order/onOrderUpdated/factory.js +0 -3
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +4 -2
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +2 -2
- package/lib/chevre/service/order/placeOrder.d.ts +6 -4
- package/lib/chevre/service/order/placeOrder.js +9 -17
- package/lib/chevre/service/order/returnOrder.d.ts +4 -4
- package/lib/chevre/service/order/returnOrder.js +11 -43
- package/lib/chevre/service/order/sendOrder.d.ts +4 -6
- package/lib/chevre/service/order/sendOrder.js +30 -72
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +0 -1
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +0 -1
- package/lib/chevre/service/payment/any/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +0 -4
- package/lib/chevre/service/payment/any/findAcceptAction.js +19 -19
- package/lib/chevre/service/payment/any/findAuthorizeAction.d.ts +0 -4
- package/lib/chevre/service/payment/any/findAuthorizeAction.js +19 -19
- package/lib/chevre/service/payment/any/findCheckAction.d.ts +0 -4
- package/lib/chevre/service/payment/any/findCheckAction.js +19 -19
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +0 -1
- package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +0 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +2 -2
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +0 -1
- package/lib/chevre/service/payment/any/processVoidPayTransaction.d.ts +0 -1
- package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -2
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +0 -2
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +2 -2
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/faceToFace.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +0 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +0 -1
- package/lib/chevre/service/project.d.ts +0 -6
- package/lib/chevre/service/project.js +0 -2
- package/lib/chevre/service/reserve/cancelReservation.d.ts +7 -3
- package/lib/chevre/service/reserve/cancelReservation.js +15 -25
- package/lib/chevre/service/reserve/checkInReservation.d.ts +4 -2
- package/lib/chevre/service/reserve/checkInReservation.js +2 -2
- package/lib/chevre/service/reserve/confirmReservation.d.ts +4 -2
- package/lib/chevre/service/reserve/confirmReservation.js +10 -36
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -1
- package/lib/chevre/service/reserve/useReservation.d.ts +6 -2
- package/lib/chevre/service/reserve/useReservation.js +6 -24
- package/lib/chevre/service/reserveCOA/cancelReservation.d.ts +4 -2
- package/lib/chevre/service/reserveCOA/cancelReservation.js +3 -3
- package/lib/chevre/service/scheduledTask.d.ts +1 -4
- package/lib/chevre/service/scheduledTask.js +3 -10
- package/lib/chevre/service/scheduledTaskHandler/onOperationFailed.js +1 -2
- package/lib/chevre/service/scheduledTaskHandler.js +0 -13
- package/lib/chevre/service/task/acceptCOAOffer.js +1 -14
- package/lib/chevre/service/task/authorizePayment.js +1 -7
- package/lib/chevre/service/task/cancelPendingReservation.js +3 -4
- package/lib/chevre/service/task/cancelReservation.js +3 -5
- package/lib/chevre/service/task/checkMovieTicket.js +1 -7
- package/lib/chevre/service/task/checkResource.js +14 -57
- package/lib/chevre/service/task/confirmPayTransaction.js +11 -12
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +6 -2
- package/lib/chevre/service/task/confirmReserveTransaction.js +12 -7
- package/lib/chevre/service/task/createAccountingReport.js +8 -15
- package/lib/chevre/service/task/deleteTransaction.js +10 -41
- package/lib/chevre/service/task/importEventsFromCOA.js +4 -2
- package/lib/chevre/service/task/invalidatePaymentUrl.js +0 -1
- package/lib/chevre/service/task/onAuthorizationCreated.js +4 -13
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByAggregateOffer.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByAggregateOffer.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByEventSeries.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByEventSeries.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByMovieTheater.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByMovieTheater.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByOfferCatalog.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByOfferCatalog.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByRoom.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByRoom.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +4 -4
- package/lib/chevre/service/task/onResourceDeleted.js +4 -3
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated.js +0 -10
- package/lib/chevre/service/task/pay.js +0 -1
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/payByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/refundByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +0 -2
- package/lib/chevre/service/task/placeOrder.js +8 -6
- package/lib/chevre/service/task/publishPaymentUrl.js +2 -13
- package/lib/chevre/service/task/refund.js +0 -1
- package/lib/chevre/service/task/reserve.js +3 -6
- package/lib/chevre/service/task/returnOrder.js +3 -7
- package/lib/chevre/service/task/returnPayTransaction.js +9 -19
- package/lib/chevre/service/task/returnReserveTransaction.js +5 -6
- package/lib/chevre/service/task/sendEmailMessage.js +2 -2
- package/lib/chevre/service/task/sendOrder.js +4 -8
- package/lib/chevre/service/task/syncResourcesFromCOA.js +31 -23
- package/lib/chevre/service/task/triggerWebhook.js +4 -2
- package/lib/chevre/service/task/useReservation.js +6 -2
- package/lib/chevre/service/task/voidPayment.js +0 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +11 -13
- package/lib/chevre/service/task.d.ts +3 -22
- package/lib/chevre/service/task.js +8 -40
- package/lib/chevre/service/taskHandler/onOperationFailed/informTaskIfNeeded.js +0 -1
- package/lib/chevre/service/taskHandler/onOperationFailed.d.ts +3 -2
- package/lib/chevre/service/taskHandler/onOperationFailed.js +5 -16
- package/lib/chevre/service/taskHandler.d.ts +1 -2
- package/lib/chevre/service/taskHandler.js +7 -19
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +2 -2
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +2 -2
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +8 -4
- package/lib/chevre/service/transaction/deleteTransaction.js +7 -7
- package/lib/chevre/service/transaction/placeOrder/confirm.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +11 -17
- package/lib/chevre/service/transaction/returnOrder.js +11 -17
- package/lib/chevre/service/validation/validateOrder.d.ts +0 -4
- package/lib/chevre/service/validation/validateOrder.js +3 -3
- package/lib/chevre/taskSettings.d.ts +4 -4
- package/package.json +2 -2
- package/lib/chevre/repo/action/actionProcess.d.ts +0 -147
- package/lib/chevre/repo/action/checkThing.d.ts +0 -8
- package/lib/chevre/repo/action/checkThing.js +0 -13
- package/lib/chevre/repo/action.js +0 -468
- package/lib/chevre/repo/asyncActionLegacy.d.ts +0 -23
- package/lib/chevre/repo/asyncActionLegacy.js +0 -59
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +0 -227
- package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +0 -25
- package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.js +0 -100
- package/lib/chevre/repo/ownershipInfo.d.ts +0 -122
- package/lib/chevre/repo/ownershipInfo.js +0 -466
- package/lib/chevre/repo/scheduledTaskLegacy.d.ts +0 -19
- package/lib/chevre/repo/scheduledTaskLegacy.js +0 -42
- package/lib/chevre/repo/scheduledTaskMigration.d.ts +0 -21
- package/lib/chevre/repo/scheduledTaskMigration.js +0 -70
- package/lib/chevre/service/validation/validateEvent.d.ts +0 -11
- package/lib/chevre/service/validation/validateEvent.js +0 -21
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TaskDelayedRepo = void 0;
|
|
7
|
+
const moment_1 = __importDefault(require("moment"));
|
|
8
|
+
const task_1 = require("../eventEmitter/task");
|
|
9
|
+
const factory_1 = require("../factory");
|
|
10
|
+
const settings_1 = require("../settings");
|
|
11
|
+
const task_2 = require("./mongoose/schemas/task");
|
|
12
|
+
/**
|
|
13
|
+
* 遅延タスクリポジトリ
|
|
14
|
+
*/
|
|
15
|
+
class TaskDelayedRepo {
|
|
16
|
+
taskModel;
|
|
17
|
+
constructor(connection) {
|
|
18
|
+
this.taskModel = connection.model(task_2.modelName, (0, task_2.createSchema)());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 潜在的に実行されるべきタスクをカウントする
|
|
22
|
+
* add(2025-03-16~)
|
|
23
|
+
*/
|
|
24
|
+
async countPotentiallyRunning(params) {
|
|
25
|
+
const { runsAt, limit, name } = params;
|
|
26
|
+
const nameEq = name?.$eq;
|
|
27
|
+
const nameIn = name?.$in;
|
|
28
|
+
if (!(runsAt.$lt instanceof Date)) {
|
|
29
|
+
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
30
|
+
}
|
|
31
|
+
const query = this.taskModel.countDocuments({
|
|
32
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
33
|
+
...(typeof nameEq === 'string' || Array.isArray(nameIn))
|
|
34
|
+
? {
|
|
35
|
+
name: {
|
|
36
|
+
...(typeof nameEq === 'string') ? { $eq: nameEq } : undefined,
|
|
37
|
+
...(Array.isArray(nameIn)) ? { $in: nameIn } : undefined
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
: undefined,
|
|
41
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
42
|
+
});
|
|
43
|
+
if (typeof limit === 'number' && limit >= 0) {
|
|
44
|
+
query.limit(limit);
|
|
45
|
+
}
|
|
46
|
+
const count = await query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
47
|
+
.exec();
|
|
48
|
+
return { count };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更する
|
|
52
|
+
*/
|
|
53
|
+
async runDelayedTask(params) {
|
|
54
|
+
const { filter } = params;
|
|
55
|
+
const projection = {
|
|
56
|
+
_id: 0,
|
|
57
|
+
id: { $toString: '$_id' },
|
|
58
|
+
name: 1
|
|
59
|
+
};
|
|
60
|
+
return this.taskModel.findOneAndUpdate(filter, {
|
|
61
|
+
$set: {
|
|
62
|
+
status: factory_1.factory.taskStatus.Running, // 実行中に変更
|
|
63
|
+
lastTriedAt: new Date(),
|
|
64
|
+
executor: params.executor
|
|
65
|
+
},
|
|
66
|
+
$inc: {
|
|
67
|
+
remainingNumberOfTries: -1, // 残りトライ可能回数減らす
|
|
68
|
+
numberOfTried: 1 // トライ回数増やす
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
new: true,
|
|
72
|
+
projection,
|
|
73
|
+
sort: {
|
|
74
|
+
runsAt: factory_1.factory.sortType.Ascending // ソートはrunsAtで固定化(2026-08-07~)
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
78
|
+
.lean()
|
|
79
|
+
.exec();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
83
|
+
*/
|
|
84
|
+
async runDelayedTaskIfExistsByName(params) {
|
|
85
|
+
if (!(params.runsAt.$lt instanceof Date)) {
|
|
86
|
+
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
87
|
+
}
|
|
88
|
+
// インデックスについては、name指定であれば'runDelayedTaskByName'を想定
|
|
89
|
+
const filter = {
|
|
90
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
91
|
+
name: params.name,
|
|
92
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
93
|
+
};
|
|
94
|
+
const doc = await this.runDelayedTask({
|
|
95
|
+
filter,
|
|
96
|
+
executor: params.executor
|
|
97
|
+
});
|
|
98
|
+
if (doc === null) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
const nameEq = params.name?.$eq;
|
|
102
|
+
let changedTask;
|
|
103
|
+
if (typeof nameEq === 'string') {
|
|
104
|
+
changedTask = {
|
|
105
|
+
id: doc.id,
|
|
106
|
+
status: factory_1.factory.taskStatus.Running,
|
|
107
|
+
name: nameEq
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
changedTask = {
|
|
112
|
+
id: doc.id,
|
|
113
|
+
status: factory_1.factory.taskStatus.Running
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
task_1.taskEventEmitter.emitTaskStatusChanged(changedTask);
|
|
117
|
+
return doc;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
121
|
+
* 2026-08-06~
|
|
122
|
+
*/
|
|
123
|
+
async runDelayedTaskIfExists(params) {
|
|
124
|
+
if (!(params.runsAt.$lt instanceof Date)) {
|
|
125
|
+
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
126
|
+
}
|
|
127
|
+
// インデックスについては、name未指定であれば'executeOneByNameIfExists'を想定
|
|
128
|
+
const filter = {
|
|
129
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
130
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
131
|
+
};
|
|
132
|
+
const doc = await this.runDelayedTask({
|
|
133
|
+
filter,
|
|
134
|
+
executor: params.executor
|
|
135
|
+
});
|
|
136
|
+
if (doc === null) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
const changedTask = {
|
|
140
|
+
id: doc.id,
|
|
141
|
+
status: factory_1.factory.taskStatus.Running
|
|
142
|
+
};
|
|
143
|
+
task_1.taskEventEmitter.emitTaskStatusChanged(changedTask);
|
|
144
|
+
return doc;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Runningのまま一定期間超過し、かつ、remainingNumberOfTries>0のタスクをReadyに変更する
|
|
148
|
+
*/
|
|
149
|
+
async retryTasks(params) {
|
|
150
|
+
const lastTriedAtShoudBeLessThan = (0, moment_1.default)()
|
|
151
|
+
.add(-params.intervalInMinutes, 'minutes')
|
|
152
|
+
.toDate();
|
|
153
|
+
return this.taskModel.updateMany(
|
|
154
|
+
// name: 'retry'のindexと連動しているので、条件の順序などには注意すること
|
|
155
|
+
// @see schemas/task
|
|
156
|
+
{
|
|
157
|
+
status: { $eq: factory_1.factory.taskStatus.Running },
|
|
158
|
+
remainingNumberOfTries: { $gte: 1 },
|
|
159
|
+
lastTriedAt: {
|
|
160
|
+
$type: 'date',
|
|
161
|
+
$lt: lastTriedAtShoudBeLessThan
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
$set: {
|
|
165
|
+
status: factory_1.factory.taskStatus.Ready // 実行前に変更
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
.exec();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* $lte:0をReadyにする -> Readyにすれば自動的にAbortedになる
|
|
172
|
+
*/
|
|
173
|
+
async retryAbortingTasks(params) {
|
|
174
|
+
const lastTriedAtShoudBeLessThan = (0, moment_1.default)()
|
|
175
|
+
.add(-params.intervalInMinutes, 'minutes')
|
|
176
|
+
.toDate();
|
|
177
|
+
return this.taskModel.updateMany(
|
|
178
|
+
// name: 'retry'のindexと連動しているので、条件の順序などには注意すること
|
|
179
|
+
// @see schemas/task
|
|
180
|
+
{
|
|
181
|
+
status: { $eq: factory_1.factory.taskStatus.Running },
|
|
182
|
+
remainingNumberOfTries: { $lte: 0 },
|
|
183
|
+
lastTriedAt: {
|
|
184
|
+
$type: 'date',
|
|
185
|
+
$lt: lastTriedAtShoudBeLessThan
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
$set: {
|
|
189
|
+
status: factory_1.factory.taskStatus.Ready // 実行前に変更
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
.exec();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.TaskDelayedRepo = TaskDelayedRepo;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import { factory } from '../factory';
|
|
3
|
+
import type { IExecutableTask } from '../taskSettings';
|
|
4
|
+
/**
|
|
5
|
+
* 実行中タスクリポジトリ
|
|
6
|
+
*/
|
|
7
|
+
export declare class TaskRunningRepo {
|
|
8
|
+
private readonly taskModel;
|
|
9
|
+
constructor(connection: Connection);
|
|
10
|
+
/**
|
|
11
|
+
* Ready -> remainingNumberOfTriesが1減る
|
|
12
|
+
* Running -> findOneするだけ
|
|
13
|
+
*/
|
|
14
|
+
executeOneById(params: {
|
|
15
|
+
id: string;
|
|
16
|
+
status: factory.taskStatus.Ready | factory.taskStatus.Running;
|
|
17
|
+
executor: {
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
expires?: never;
|
|
21
|
+
}): Promise<IExecutableTask<factory.taskName> | null>;
|
|
22
|
+
/**
|
|
23
|
+
* タスクIDから実行結果とステータスを保管する
|
|
24
|
+
* Abortedの場合、dateAbortedもセットする
|
|
25
|
+
*/
|
|
26
|
+
setExecutionResultAndStatus(params: {
|
|
27
|
+
/**
|
|
28
|
+
* タスクID
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
}, update: {
|
|
32
|
+
status: factory.taskStatus.Executed | factory.taskStatus.Running | factory.taskStatus.Aborted;
|
|
33
|
+
executionResult: factory.task.IExecutionResult;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskRunningRepo = void 0;
|
|
4
|
+
const factory_1 = require("../factory");
|
|
5
|
+
const settings_1 = require("../settings");
|
|
6
|
+
const task_1 = require("./mongoose/schemas/task");
|
|
7
|
+
const executableTaskProjection = {
|
|
8
|
+
_id: 0,
|
|
9
|
+
id: { $toString: '$_id' },
|
|
10
|
+
// 必要最低限にprojection(2024-04-23~)
|
|
11
|
+
data: 1,
|
|
12
|
+
name: 1,
|
|
13
|
+
status: 1,
|
|
14
|
+
numberOfTried: 1,
|
|
15
|
+
project: 1,
|
|
16
|
+
remainingNumberOfTries: 1,
|
|
17
|
+
runsAt: 1,
|
|
18
|
+
// expires: 1 // 非同期アクションは移行につきexpires廃止(2026-08-05~)
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 実行中タスクリポジトリ
|
|
22
|
+
*/
|
|
23
|
+
class TaskRunningRepo {
|
|
24
|
+
taskModel;
|
|
25
|
+
constructor(connection) {
|
|
26
|
+
this.taskModel = connection.model(task_1.modelName, (0, task_1.createSchema)());
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Ready -> remainingNumberOfTriesが1減る
|
|
30
|
+
* Running -> findOneするだけ
|
|
31
|
+
*/
|
|
32
|
+
async executeOneById(params) {
|
|
33
|
+
const now = new Date();
|
|
34
|
+
let doc;
|
|
35
|
+
if (params.status === factory_1.factory.taskStatus.Running) {
|
|
36
|
+
doc = await this.taskModel.findOne({
|
|
37
|
+
_id: { $eq: params.id },
|
|
38
|
+
status: { $eq: params.status },
|
|
39
|
+
runsAt: { $lt: now },
|
|
40
|
+
// ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined // 非同期アクションは移行につきexpires廃止(2026-08-05~)
|
|
41
|
+
}, executableTaskProjection)
|
|
42
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
43
|
+
.lean()
|
|
44
|
+
.exec();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
doc = await this.taskModel.findOneAndUpdate({
|
|
48
|
+
_id: { $eq: params.id },
|
|
49
|
+
status: { $eq: params.status },
|
|
50
|
+
runsAt: { $lt: now },
|
|
51
|
+
// ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined // 非同期アクションは移行につきexpires廃止(2026-08-05~)
|
|
52
|
+
}, {
|
|
53
|
+
$set: {
|
|
54
|
+
status: factory_1.factory.taskStatus.Running, // 実行中に変更
|
|
55
|
+
lastTriedAt: now,
|
|
56
|
+
executor: params.executor
|
|
57
|
+
},
|
|
58
|
+
$inc: {
|
|
59
|
+
remainingNumberOfTries: -1, // 残りトライ可能回数減らす
|
|
60
|
+
numberOfTried: 1 // トライ回数増やす
|
|
61
|
+
}
|
|
62
|
+
}, { new: true, projection: executableTaskProjection })
|
|
63
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
64
|
+
.lean() // lean(2024-09-26~)
|
|
65
|
+
.exec();
|
|
66
|
+
}
|
|
67
|
+
if (doc === null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return doc;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* タスクIDから実行結果とステータスを保管する
|
|
74
|
+
* Abortedの場合、dateAbortedもセットする
|
|
75
|
+
*/
|
|
76
|
+
async setExecutionResultAndStatus(params, update) {
|
|
77
|
+
const { id } = params;
|
|
78
|
+
const { status, executionResult } = update;
|
|
79
|
+
await this.taskModel.updateOne({ _id: { $eq: id } }, {
|
|
80
|
+
$set: {
|
|
81
|
+
status,
|
|
82
|
+
...(status === factory_1.factory.taskStatus.Aborted) ? { dateAborted: executionResult.endDate } : undefined // 2025-08-04~
|
|
83
|
+
},
|
|
84
|
+
$push: { executionResults: executionResult }
|
|
85
|
+
})
|
|
86
|
+
.exec();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.TaskRunningRepo = TaskRunningRepo;
|
|
@@ -39,10 +39,4 @@ export declare class TicketRepo {
|
|
|
39
39
|
*/
|
|
40
40
|
issueByTicketToken(params: IIssueParams): Promise<Pick<ITicket, 'id'>>;
|
|
41
41
|
findTickets(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<ITicket[]>;
|
|
42
|
-
/**
|
|
43
|
-
* 発行日時を一定期間過ぎたチケットを削除する
|
|
44
|
-
*/
|
|
45
|
-
deleteTicketsByDateIssued(params: {
|
|
46
|
-
dateIssuedLt: Date;
|
|
47
|
-
}): Promise<void>;
|
|
48
42
|
}
|
|
@@ -81,16 +81,5 @@ class TicketRepo {
|
|
|
81
81
|
.lean() // 2024-08-20~
|
|
82
82
|
.exec();
|
|
83
83
|
}
|
|
84
|
-
/**
|
|
85
|
-
* 発行日時を一定期間過ぎたチケットを削除する
|
|
86
|
-
*/
|
|
87
|
-
async deleteTicketsByDateIssued(params) {
|
|
88
|
-
await this.ticketModel.deleteMany({
|
|
89
|
-
dateIssued: {
|
|
90
|
-
$lt: params.dateIssuedLt
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
.exec();
|
|
94
|
-
}
|
|
95
84
|
}
|
|
96
85
|
exports.TicketRepo = TicketRepo;
|
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
|
-
import { IDocType } from './mongoose/schemas/transaction';
|
|
4
|
-
interface IAggregationByStatus {
|
|
5
|
-
transactionCount: number;
|
|
6
|
-
avgDuration: number;
|
|
7
|
-
maxDuration: number;
|
|
8
|
-
minDuration: number;
|
|
9
|
-
percentilesDuration: {
|
|
10
|
-
name: string;
|
|
11
|
-
value: number;
|
|
12
|
-
}[];
|
|
13
|
-
}
|
|
14
|
-
interface IStatus {
|
|
15
|
-
status: factory.transactionStatusType;
|
|
16
|
-
aggregation: IAggregationByStatus;
|
|
17
|
-
}
|
|
18
|
-
export interface IAggregatePlaceOrder {
|
|
19
|
-
statuses: IStatus[];
|
|
20
|
-
}
|
|
21
3
|
/**
|
|
22
4
|
* 取引リポジトリ
|
|
23
5
|
*/
|
|
24
6
|
export declare class TransactionRepo {
|
|
25
7
|
private readonly transactionModel;
|
|
26
8
|
constructor(connection: Connection);
|
|
27
|
-
countPotentiallyExportTasks(params: {
|
|
28
|
-
endDate: {
|
|
29
|
-
$lt: Date;
|
|
30
|
-
};
|
|
31
|
-
limit?: number;
|
|
32
|
-
}): Promise<{
|
|
33
|
-
count: number;
|
|
34
|
-
}>;
|
|
35
9
|
/**
|
|
36
10
|
* タスク未エクスポートの取引をひとつ取得してエクスポートを開始する
|
|
37
11
|
*/
|
|
@@ -53,27 +27,6 @@ export declare class TransactionRepo {
|
|
|
53
27
|
startDate?: factory.sortType;
|
|
54
28
|
};
|
|
55
29
|
}): Promise<Pick<factory.transaction.ITransaction<factory.transactionType>, 'id' | 'typeOf'> | null>;
|
|
56
|
-
/**
|
|
57
|
-
* tasksExportAction.actionStatusがActiveActionStatusのまま一定時間経過した取引について
|
|
58
|
-
* PotentialActionStatusに変更する
|
|
59
|
-
* 2025-03-10~
|
|
60
|
-
*/
|
|
61
|
-
reExportAction(params: {
|
|
62
|
-
startDate: {
|
|
63
|
-
$lt: Date;
|
|
64
|
-
};
|
|
65
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
66
|
-
/**
|
|
67
|
-
* タスクエクスポートの遅延している取引について明示的にemitTransactionStatusChangedを実行する
|
|
68
|
-
*/
|
|
69
|
-
exportTasksMany(params: {
|
|
70
|
-
now: Date;
|
|
71
|
-
delayInSeconds: number;
|
|
72
|
-
status: {
|
|
73
|
-
$in: factory.transactionStatusType[];
|
|
74
|
-
};
|
|
75
|
-
limit: number;
|
|
76
|
-
}): Promise<Pick<import("@chevre/factory/lib/chevre/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/chevre/transaction/returnOrder").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
77
30
|
/**
|
|
78
31
|
* set task status exported by transaction id
|
|
79
32
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -81,143 +34,4 @@ export declare class TransactionRepo {
|
|
|
81
34
|
setTasksExportedById(params: {
|
|
82
35
|
id: string;
|
|
83
36
|
}): Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* add(2025-03-13~)
|
|
86
|
-
*/
|
|
87
|
-
countPotentiallyExpired(params: {
|
|
88
|
-
expires: {
|
|
89
|
-
$lt: Date;
|
|
90
|
-
};
|
|
91
|
-
limit?: number;
|
|
92
|
-
}): Promise<{
|
|
93
|
-
count: number;
|
|
94
|
-
}>;
|
|
95
|
-
/**
|
|
96
|
-
* add(2025-03-03~)
|
|
97
|
-
*/
|
|
98
|
-
makeOneExpiredIfExists(params: {
|
|
99
|
-
expires: {
|
|
100
|
-
$lt: Date;
|
|
101
|
-
};
|
|
102
|
-
}): Promise<Pick<factory.transaction.ITransaction<factory.transactionType>, 'id' | 'typeOf'> | undefined>;
|
|
103
|
-
/**
|
|
104
|
-
* 取引を期限切れにする
|
|
105
|
-
*/
|
|
106
|
-
makeExpired(params: {
|
|
107
|
-
expires: {
|
|
108
|
-
$lt: Date;
|
|
109
|
-
};
|
|
110
|
-
limit: number;
|
|
111
|
-
}): Promise<Pick<factory.transaction.ITransaction<factory.transactionType>, 'id' | 'typeOf'>[]>;
|
|
112
|
-
findByIdAndDelete(params: {
|
|
113
|
-
id: string;
|
|
114
|
-
}): Promise<void>;
|
|
115
|
-
unsetUnnecessaryFields(params: {
|
|
116
|
-
filter: any;
|
|
117
|
-
$unset: any;
|
|
118
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
119
|
-
updateById4migration(params: {
|
|
120
|
-
id: string;
|
|
121
|
-
update: UpdateQuery<IDocType>;
|
|
122
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
123
|
-
/**
|
|
124
|
-
* 終了日時を一定期間過ぎたアクションを削除する
|
|
125
|
-
*/
|
|
126
|
-
deleteEndDatePassedCertainPeriod(params: {
|
|
127
|
-
typeOf: factory.transactionType;
|
|
128
|
-
endDate: {
|
|
129
|
-
$gte: Date;
|
|
130
|
-
$lt: Date;
|
|
131
|
-
};
|
|
132
|
-
}): Promise<import("mongodb").DeleteResult>;
|
|
133
|
-
getCursor(conditions: any, projection: any, sort?: factory.sortType): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
134
|
-
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
135
|
-
error?: any;
|
|
136
|
-
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
137
|
-
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
138
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
139
|
-
expires: Date;
|
|
140
|
-
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
141
|
-
startDate: Date;
|
|
142
|
-
endDate?: Date | undefined;
|
|
143
|
-
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
144
|
-
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
145
|
-
status: factory.transactionStatusType;
|
|
146
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
147
|
-
potentialActions?: undefined;
|
|
148
|
-
} & {
|
|
149
|
-
_id: import("mongoose").Types.ObjectId;
|
|
150
|
-
} & {
|
|
151
|
-
__v: number;
|
|
152
|
-
}) | ({
|
|
153
|
-
object: import("@chevre/factory/lib/chevre/transaction/returnOrder").IObject;
|
|
154
|
-
error?: any;
|
|
155
|
-
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
156
|
-
seller: import("@chevre/factory/lib/chevre/transaction").ISeller;
|
|
157
|
-
typeOf: factory.transactionType.ReturnOrder;
|
|
158
|
-
expires: Date;
|
|
159
|
-
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
160
|
-
startDate: Date;
|
|
161
|
-
endDate?: Date | undefined;
|
|
162
|
-
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
163
|
-
recipient?: undefined;
|
|
164
|
-
status: factory.transactionStatusType;
|
|
165
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
166
|
-
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
167
|
-
} & {
|
|
168
|
-
_id: import("mongoose").Types.ObjectId;
|
|
169
|
-
} & {
|
|
170
|
-
__v: number;
|
|
171
|
-
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
172
|
-
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
173
|
-
error?: any;
|
|
174
|
-
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
175
|
-
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
176
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
177
|
-
expires: Date;
|
|
178
|
-
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
179
|
-
startDate: Date;
|
|
180
|
-
endDate?: Date | undefined;
|
|
181
|
-
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
182
|
-
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
183
|
-
status: factory.transactionStatusType;
|
|
184
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
185
|
-
potentialActions?: undefined;
|
|
186
|
-
} & {
|
|
187
|
-
_id: import("mongoose").Types.ObjectId;
|
|
188
|
-
} & {
|
|
189
|
-
__v: number;
|
|
190
|
-
}) | ({
|
|
191
|
-
object: import("@chevre/factory/lib/chevre/transaction/returnOrder").IObject;
|
|
192
|
-
error?: any;
|
|
193
|
-
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
194
|
-
seller: import("@chevre/factory/lib/chevre/transaction").ISeller;
|
|
195
|
-
typeOf: factory.transactionType.ReturnOrder;
|
|
196
|
-
expires: Date;
|
|
197
|
-
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
198
|
-
startDate: Date;
|
|
199
|
-
endDate?: Date | undefined;
|
|
200
|
-
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
201
|
-
recipient?: undefined;
|
|
202
|
-
status: factory.transactionStatusType;
|
|
203
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
204
|
-
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
205
|
-
} & {
|
|
206
|
-
_id: import("mongoose").Types.ObjectId;
|
|
207
|
-
} & {
|
|
208
|
-
__v: number;
|
|
209
|
-
}))) | null>;
|
|
210
|
-
aggregatePlaceOrder(params: {
|
|
211
|
-
project?: {
|
|
212
|
-
id?: {
|
|
213
|
-
$ne?: string;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
startFrom: Date;
|
|
217
|
-
startThrough: Date;
|
|
218
|
-
typeOf: factory.transactionType;
|
|
219
|
-
clientId?: string;
|
|
220
|
-
}): Promise<IAggregatePlaceOrder>;
|
|
221
|
-
private agggregateByStatus;
|
|
222
37
|
}
|
|
223
|
-
export {};
|