@chevre/domain 26.0.0-alpha.9 → 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/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/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 -155
- package/lib/chevre/repo/task.js +13 -555
- 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 +4 -4
- package/lib/chevre/service/task.js +8 -12
- 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 -39
- package/lib/chevre/repo/scheduledTaskLegacy.js +0 -96
- 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
|
@@ -1,36 +1,15 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
|
-
import { IDocType } from './mongoose/schemas/assetTransaction';
|
|
3
2
|
import { factory } from '../factory';
|
|
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
|
-
reservationCount: number;
|
|
14
|
-
avgGraceTime: number;
|
|
15
|
-
maxGraceTime: number;
|
|
16
|
-
minGraceTime: number;
|
|
17
|
-
}
|
|
18
|
-
interface IStatus {
|
|
19
|
-
status: factory.transactionStatusType;
|
|
20
|
-
aggregation: IAggregationByStatus;
|
|
21
|
-
}
|
|
22
|
-
export interface IAggregateReserve {
|
|
23
|
-
statuses: IStatus[];
|
|
24
|
-
}
|
|
25
3
|
type IKeyOfProjection<T extends factory.assetTransactionType> = keyof Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'agent' | 'endDate' | 'expires' | 'project' | 'startDate' | 'status' | 'typeOf' | 'transactionNumber'> | Exclude<keyof factory.assetTransaction.ITransaction<T>, 'id'>;
|
|
26
4
|
type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservation | factory.assetTransactionType.Pay | factory.assetTransactionType.Refund | factory.assetTransactionType.Reserve;
|
|
5
|
+
type IFindParams<T extends factory.assetTransactionType> = T extends factory.assetTransactionType.CancelReservation ? Pick<factory.assetTransaction.cancelReservation.ISearchConditions, 'ids' | 'limit' | 'object' | 'page' | 'project' | 'status' | 'statuses' | 'transactionNumber' | 'typeOf'> : T extends factory.assetTransactionType.Pay ? Pick<factory.assetTransaction.pay.ISearchConditions, 'ids' | 'limit' | 'object' | 'page' | 'project' | 'status' | 'statuses' | 'transactionNumber' | 'typeOf'> : T extends factory.assetTransactionType.Refund ? Pick<factory.assetTransaction.refund.ISearchConditions, 'ids' | 'limit' | 'object' | 'page' | 'project' | 'status' | 'statuses' | 'transactionNumber' | 'typeOf'> : T extends factory.assetTransactionType.Reserve ? Pick<factory.assetTransaction.reserve.ISearchConditions, 'ids' | 'limit' | 'object' | 'page' | 'project' | 'status' | 'statuses' | 'transactionNumber' | 'typeOf'> : never;
|
|
27
6
|
/**
|
|
28
7
|
* 資産取引リポジトリ
|
|
29
8
|
*/
|
|
30
9
|
export declare class AssetTransactionRepo {
|
|
31
10
|
private readonly transactionModel;
|
|
32
11
|
constructor(connection: Connection);
|
|
33
|
-
static CREATE_MONGO_CONDITIONS(params:
|
|
12
|
+
static CREATE_MONGO_CONDITIONS(params: IFindParams<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction>[];
|
|
34
13
|
/**
|
|
35
14
|
* 取引を開始する
|
|
36
15
|
*/
|
|
@@ -76,14 +55,6 @@ export declare class AssetTransactionRepo {
|
|
|
76
55
|
}): Promise<{
|
|
77
56
|
id: string;
|
|
78
57
|
}>;
|
|
79
|
-
countPotentiallyExportTasks(params: {
|
|
80
|
-
endDate: {
|
|
81
|
-
$lt: Date;
|
|
82
|
-
};
|
|
83
|
-
limit?: number;
|
|
84
|
-
}): Promise<{
|
|
85
|
-
count: number;
|
|
86
|
-
}>;
|
|
87
58
|
/**
|
|
88
59
|
* タスク未エクスポートの取引をひとつ取得してエクスポートを開始する
|
|
89
60
|
*/
|
|
@@ -104,27 +75,6 @@ export declare class AssetTransactionRepo {
|
|
|
104
75
|
endDate?: factory.sortType;
|
|
105
76
|
};
|
|
106
77
|
}): Promise<Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'id' | 'typeOf'> | null>;
|
|
107
|
-
/**
|
|
108
|
-
* tasksExportAction.actionStatusがActiveActionStatusのまま一定時間経過した取引について
|
|
109
|
-
* PotentialActionStatusに変更する
|
|
110
|
-
* 2025-03-10~
|
|
111
|
-
*/
|
|
112
|
-
reExportAction(params: {
|
|
113
|
-
startDate: {
|
|
114
|
-
$lt: Date;
|
|
115
|
-
};
|
|
116
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
117
|
-
/**
|
|
118
|
-
* タスクエクスポートの遅延している取引について明示的にemitTransactionStatusChangedを実行する
|
|
119
|
-
*/
|
|
120
|
-
exportTasksMany(params: {
|
|
121
|
-
now: Date;
|
|
122
|
-
delayInSeconds: number;
|
|
123
|
-
status: {
|
|
124
|
-
$in: factory.transactionStatusType[];
|
|
125
|
-
};
|
|
126
|
-
limit: number;
|
|
127
|
-
}): Promise<Pick<import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
128
78
|
/**
|
|
129
79
|
* set task status exported by transaction id
|
|
130
80
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -132,33 +82,6 @@ export declare class AssetTransactionRepo {
|
|
|
132
82
|
setTasksExportedById(params: {
|
|
133
83
|
id: string;
|
|
134
84
|
}): Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* add(2025-03-17~)
|
|
137
|
-
*/
|
|
138
|
-
countPotentiallyExpired(params: {
|
|
139
|
-
expires: {
|
|
140
|
-
$lt: Date;
|
|
141
|
-
};
|
|
142
|
-
limit?: number;
|
|
143
|
-
}): Promise<{
|
|
144
|
-
count: number;
|
|
145
|
-
}>;
|
|
146
|
-
/**
|
|
147
|
-
* add(2025-03-12~)
|
|
148
|
-
*/
|
|
149
|
-
makeOneExpiredIfExists(params: {
|
|
150
|
-
expires: {
|
|
151
|
-
$lt: Date;
|
|
152
|
-
};
|
|
153
|
-
}): Promise<Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'id' | 'typeOf'> | undefined>;
|
|
154
|
-
/**
|
|
155
|
-
* 取引を期限切れにする
|
|
156
|
-
*/
|
|
157
|
-
makeExpired(params: {
|
|
158
|
-
expires: {
|
|
159
|
-
$lt: Date;
|
|
160
|
-
};
|
|
161
|
-
}): Promise<void>;
|
|
162
85
|
/**
|
|
163
86
|
* 取引を中止する
|
|
164
87
|
*/
|
|
@@ -169,13 +92,17 @@ export declare class AssetTransactionRepo {
|
|
|
169
92
|
}): Promise<{
|
|
170
93
|
id: string;
|
|
171
94
|
}>;
|
|
172
|
-
count<T extends factory.assetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>): Promise<{
|
|
173
|
-
count: number;
|
|
174
|
-
}>;
|
|
175
95
|
/**
|
|
176
96
|
* 取引を検索する
|
|
177
97
|
*/
|
|
178
|
-
|
|
98
|
+
findAssetTransactionsByTypeOf<T extends AvailableAssetTransactionType>(params: IFindParams<T> & {
|
|
99
|
+
sort?: never;
|
|
100
|
+
startFrom?: never;
|
|
101
|
+
startThrough?: never;
|
|
102
|
+
endFrom?: never;
|
|
103
|
+
endThrough?: never;
|
|
104
|
+
tasksExportAction?: never;
|
|
105
|
+
}, inclusion?: string[]): Promise<factory.assetTransaction.ITransaction<T>[]>;
|
|
179
106
|
/**
|
|
180
107
|
* 取引番号指定で削除する
|
|
181
108
|
*/
|
|
@@ -198,157 +125,5 @@ export declare class AssetTransactionRepo {
|
|
|
198
125
|
id: string;
|
|
199
126
|
};
|
|
200
127
|
}): Promise<void>;
|
|
201
|
-
/**
|
|
202
|
-
* 終了日時を一定期間過ぎたアクションを削除する
|
|
203
|
-
*/
|
|
204
|
-
deleteEndDatePassedCertainPeriod(params: {
|
|
205
|
-
$lt: Date;
|
|
206
|
-
}): Promise<import("mongodb").DeleteResult>;
|
|
207
|
-
/**
|
|
208
|
-
* 特定の取引を更新する(汎用)
|
|
209
|
-
*/
|
|
210
|
-
findByIdAndUpdateInProgress<T extends factory.assetTransactionType>(params: {
|
|
211
|
-
id: string;
|
|
212
|
-
update: any;
|
|
213
|
-
}): Promise<factory.assetTransaction.ITransaction<T>>;
|
|
214
|
-
/**
|
|
215
|
-
* 互換性維持対応
|
|
216
|
-
*/
|
|
217
|
-
migrateObjectReservationNumber(params: {
|
|
218
|
-
id: string;
|
|
219
|
-
object: {
|
|
220
|
-
reservationNumber: string;
|
|
221
|
-
};
|
|
222
|
-
}): Promise<(import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").IAttributes & {
|
|
223
|
-
id: string;
|
|
224
|
-
} & {
|
|
225
|
-
seller?: any;
|
|
226
|
-
} & {
|
|
227
|
-
_id: import("mongoose").Types.ObjectId;
|
|
228
|
-
} & {
|
|
229
|
-
__v: number;
|
|
230
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/pay").IAttributes & {
|
|
231
|
-
id: string;
|
|
232
|
-
} & {
|
|
233
|
-
seller?: any;
|
|
234
|
-
} & {
|
|
235
|
-
_id: import("mongoose").Types.ObjectId;
|
|
236
|
-
} & {
|
|
237
|
-
__v: number;
|
|
238
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/refund").IAttributes & {
|
|
239
|
-
id: string;
|
|
240
|
-
} & {
|
|
241
|
-
seller?: any;
|
|
242
|
-
} & {
|
|
243
|
-
_id: import("mongoose").Types.ObjectId;
|
|
244
|
-
} & {
|
|
245
|
-
__v: number;
|
|
246
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/reserve").IAttributes & {
|
|
247
|
-
id: string;
|
|
248
|
-
} & {
|
|
249
|
-
seller?: any;
|
|
250
|
-
} & {
|
|
251
|
-
_id: import("mongoose").Types.ObjectId;
|
|
252
|
-
} & {
|
|
253
|
-
__v: number;
|
|
254
|
-
})>;
|
|
255
|
-
/**
|
|
256
|
-
* 互換性維持対応専用
|
|
257
|
-
*/
|
|
258
|
-
fixReservedTicketIdentifier(params: {
|
|
259
|
-
project: {
|
|
260
|
-
id: string;
|
|
261
|
-
};
|
|
262
|
-
transactionNumber: string;
|
|
263
|
-
object: {
|
|
264
|
-
paymentMethod: {
|
|
265
|
-
movieTickets: factory.action.trade.pay.IMovieTicket[];
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
}): Promise<void>;
|
|
269
|
-
findByIdAndDelete(params: {
|
|
270
|
-
id: string;
|
|
271
|
-
}): Promise<void>;
|
|
272
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").IAttributes & {
|
|
273
|
-
id: string;
|
|
274
|
-
} & {
|
|
275
|
-
seller?: any;
|
|
276
|
-
} & {
|
|
277
|
-
_id: import("mongoose").Types.ObjectId;
|
|
278
|
-
} & {
|
|
279
|
-
__v: number;
|
|
280
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/pay").IAttributes & {
|
|
281
|
-
id: string;
|
|
282
|
-
} & {
|
|
283
|
-
seller?: any;
|
|
284
|
-
} & {
|
|
285
|
-
_id: import("mongoose").Types.ObjectId;
|
|
286
|
-
} & {
|
|
287
|
-
__v: number;
|
|
288
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/refund").IAttributes & {
|
|
289
|
-
id: string;
|
|
290
|
-
} & {
|
|
291
|
-
seller?: any;
|
|
292
|
-
} & {
|
|
293
|
-
_id: import("mongoose").Types.ObjectId;
|
|
294
|
-
} & {
|
|
295
|
-
__v: number;
|
|
296
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/reserve").IAttributes & {
|
|
297
|
-
id: string;
|
|
298
|
-
} & {
|
|
299
|
-
seller?: any;
|
|
300
|
-
} & {
|
|
301
|
-
_id: import("mongoose").Types.ObjectId;
|
|
302
|
-
} & {
|
|
303
|
-
__v: number;
|
|
304
|
-
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").IAttributes & {
|
|
305
|
-
id: string;
|
|
306
|
-
} & {
|
|
307
|
-
seller?: any;
|
|
308
|
-
} & {
|
|
309
|
-
_id: import("mongoose").Types.ObjectId;
|
|
310
|
-
} & {
|
|
311
|
-
__v: number;
|
|
312
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/pay").IAttributes & {
|
|
313
|
-
id: string;
|
|
314
|
-
} & {
|
|
315
|
-
seller?: any;
|
|
316
|
-
} & {
|
|
317
|
-
_id: import("mongoose").Types.ObjectId;
|
|
318
|
-
} & {
|
|
319
|
-
__v: number;
|
|
320
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/refund").IAttributes & {
|
|
321
|
-
id: string;
|
|
322
|
-
} & {
|
|
323
|
-
seller?: any;
|
|
324
|
-
} & {
|
|
325
|
-
_id: import("mongoose").Types.ObjectId;
|
|
326
|
-
} & {
|
|
327
|
-
__v: number;
|
|
328
|
-
}) | (import("@chevre/factory/lib/chevre/assetTransaction/reserve").IAttributes & {
|
|
329
|
-
id: string;
|
|
330
|
-
} & {
|
|
331
|
-
seller?: any;
|
|
332
|
-
} & {
|
|
333
|
-
_id: import("mongoose").Types.ObjectId;
|
|
334
|
-
} & {
|
|
335
|
-
__v: number;
|
|
336
|
-
}))) | null>;
|
|
337
|
-
unsetUnnecessaryFields(params: {
|
|
338
|
-
filter: any;
|
|
339
|
-
$unset: any;
|
|
340
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
341
|
-
aggregateAssetTransaction(params: {
|
|
342
|
-
project?: {
|
|
343
|
-
id?: {
|
|
344
|
-
$eq?: string;
|
|
345
|
-
$ne?: string;
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
startFrom: Date;
|
|
349
|
-
startThrough: Date;
|
|
350
|
-
typeOf: factory.assetTransactionType;
|
|
351
|
-
}): Promise<IAggregateReserve>;
|
|
352
|
-
private agggregateByStatus;
|
|
353
128
|
}
|
|
354
129
|
export {};
|