@chevre/domain 26.0.0-alpha.9 → 26.1.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.
- 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 +11 -1
- package/lib/chevre/repo/action/acceptCOAOffer.js +25 -2
- package/lib/chevre/repo/action/acceptPay.d.ts +11 -1
- package/lib/chevre/repo/action/acceptPay.js +27 -6
- package/lib/chevre/repo/action/anyAction/actionProcess.d.ts +111 -0
- package/lib/chevre/repo/action/anyAction/actionProcess.js +290 -0
- 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 +8 -5
- package/lib/chevre/repo/action/authorizeOffer.d.ts +3 -1
- package/lib/chevre/repo/action/authorizeOffer.js +8 -7
- package/lib/chevre/repo/action/authorizePaymentMethod.d.ts +11 -1
- package/lib/chevre/repo/action/authorizePaymentMethod.js +25 -5
- 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 +11 -1
- package/lib/chevre/repo/action/checkMovieTicket.js +25 -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/dedicatedAction/dedicatedActionProcess.d.ts +46 -0
- package/lib/chevre/repo/action/dedicatedAction/dedicatedActionProcess.js +92 -0
- package/lib/chevre/repo/action/inform.d.ts +39 -0
- package/lib/chevre/repo/action/inform.js +115 -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 +8 -5
- 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 +50 -0
- package/lib/chevre/repo/action/update.js +129 -0
- package/lib/chevre/repo/action/use.d.ts +40 -0
- package/lib/chevre/repo/action/use.js +122 -0
- package/lib/chevre/repo/{action.d.ts → adminAction.d.ts} +11 -37
- package/lib/chevre/repo/adminAction.js +202 -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/factory/action/createMongoConditions.d.ts +4 -0
- package/lib/chevre/repo/factory/action/createMongoConditions.js +335 -0
- 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/abstractAction.d.ts +5 -0
- package/lib/chevre/repo/mongoose/schemas/action/abstractAction.js +2 -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/check.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +0 -10
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -2
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -2
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -2
- 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 +23 -24
- 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 +1 -2
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +0 -4
- package/lib/chevre/service/payment/any/findAcceptAction.js +23 -24
- package/lib/chevre/service/payment/any/findAuthorizeAction.d.ts +0 -4
- package/lib/chevre/service/payment/any/findAuthorizeAction.js +23 -24
- package/lib/chevre/service/payment/any/findCheckAction.d.ts +3 -5
- package/lib/chevre/service/payment/any/findCheckAction.js +24 -25
- 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 +1 -2
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +3 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +3 -3
- 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/payment/movieTicket/validation.d.ts +3 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +2 -2
- 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 +5 -19
- package/lib/chevre/service/task/authorizePayment.js +6 -13
- 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 +8 -13
- 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 +3 -3
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/payByTask.d.ts +3 -2
- package/lib/chevre/service/task/payment/payByTask.js +1 -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 +6 -18
- 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/actionProcess.js +0 -775
- 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,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
4
|
+
// import { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
5
|
+
// import { AccountingReportRepo } from '../../repo/accountingReport';
|
|
6
|
+
const confirm_1 = require("../../repo/action/confirm");
|
|
7
7
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
8
|
-
|
|
8
|
+
// import { EventRepo } from '../../repo/event';
|
|
9
9
|
const order_1 = require("../../repo/order");
|
|
10
|
-
|
|
10
|
+
// import { ProjectRepo } from '../../repo/project';
|
|
11
11
|
const task_1 = require("../../repo/task");
|
|
12
|
-
// import { TransactionRepo } from '../../repo/transaction';
|
|
13
12
|
const confirmPayTransaction_1 = require("../order/confirmPayTransaction");
|
|
14
13
|
/**
|
|
15
14
|
* タスク実行関数
|
|
@@ -20,15 +19,15 @@ function call(params) {
|
|
|
20
19
|
...params.data,
|
|
21
20
|
project: params.project
|
|
22
21
|
}, {})({
|
|
23
|
-
acceptedOffer: new
|
|
24
|
-
action: new
|
|
22
|
+
// acceptedOffer: new AcceptedOfferRepo(connection),
|
|
23
|
+
// action: new ActionRepo(connection),
|
|
24
|
+
actions: { confirm: new confirm_1.ConfirmActionRepo(connection) },
|
|
25
25
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
26
26
|
order: new order_1.OrderRepo(connection),
|
|
27
|
-
accountingReport: new
|
|
28
|
-
event: new
|
|
29
|
-
project: new
|
|
27
|
+
// accountingReport: new AccountingReportRepo(connection),
|
|
28
|
+
// event: new EventRepo(connection),
|
|
29
|
+
// project: new ProjectRepo(connection),
|
|
30
30
|
task: new task_1.TaskRepo(connection),
|
|
31
|
-
// transaction: new TransactionRepo(connection)
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
33
|
}
|
|
@@ -3,7 +3,8 @@ import { factory } from '../../factory';
|
|
|
3
3
|
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
4
4
|
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
5
5
|
import { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
6
|
-
import {
|
|
6
|
+
import { ConfirmActionRepo } from '../../repo/action/confirm';
|
|
7
|
+
import { ReserveActionRepo } from '../../repo/action/reserve';
|
|
7
8
|
import { AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
8
9
|
import { AuthorizationRepo } from '../../repo/authorization';
|
|
9
10
|
import { OrderRepo } from '../../repo/order';
|
|
@@ -30,7 +31,10 @@ export declare function confirmReserveTransaction(params: Omit<factory.task.IDat
|
|
|
30
31
|
useOnOrderStatusChanged: boolean;
|
|
31
32
|
}): (repos: {
|
|
32
33
|
acceptedOffer: AcceptedOfferRepo;
|
|
33
|
-
|
|
34
|
+
actions: {
|
|
35
|
+
confirm: ConfirmActionRepo;
|
|
36
|
+
reserve: ReserveActionRepo;
|
|
37
|
+
};
|
|
34
38
|
assetTransaction: AssetTransactionRepo;
|
|
35
39
|
code: AuthorizationRepo;
|
|
36
40
|
order: OrderRepo;
|
|
@@ -10,7 +10,8 @@ const confirm_1 = require("../assetTransaction/reserve/confirm");
|
|
|
10
10
|
const reserveCOA_1 = require("../assetTransaction/reserveCOA");
|
|
11
11
|
const factory_2 = require("../assetTransaction/reserveCOA/factory");
|
|
12
12
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
13
|
-
const
|
|
13
|
+
const confirm_2 = require("../../repo/action/confirm");
|
|
14
|
+
const reserve_1 = require("../../repo/action/reserve");
|
|
14
15
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
16
|
const authorization_1 = require("../../repo/authorization");
|
|
16
17
|
const order_1 = require("../../repo/order");
|
|
@@ -23,7 +24,6 @@ let coaAuthClientCreated = false;
|
|
|
23
24
|
let coaAuthClient = new coa_service_1.COA.auth.RefreshToken({
|
|
24
25
|
endpoint: '', // 使用されないので空文字でok
|
|
25
26
|
refreshToken: '', // 使用されないので空文字でok
|
|
26
|
-
// useFetch: true
|
|
27
27
|
});
|
|
28
28
|
/**
|
|
29
29
|
* タスク実行関数
|
|
@@ -53,7 +53,10 @@ function call(params) {
|
|
|
53
53
|
useOnOrderStatusChanged: true
|
|
54
54
|
})({
|
|
55
55
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
56
|
-
|
|
56
|
+
actions: {
|
|
57
|
+
confirm: new confirm_2.ConfirmActionRepo(connection),
|
|
58
|
+
reserve: new reserve_1.ReserveActionRepo(connection),
|
|
59
|
+
},
|
|
57
60
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
58
61
|
code: new authorization_1.AuthorizationRepo(connection),
|
|
59
62
|
order: new order_1.OrderRepo(connection),
|
|
@@ -179,7 +182,7 @@ function confirmReserveTransaction(params, options) {
|
|
|
179
182
|
object: confirmActionObject,
|
|
180
183
|
...(typeof sameAs?.id === 'string') ? { sameAs: { id: sameAs.id, typeOf: 'Task' } } : undefined // link sameAs(2024-06-10~)
|
|
181
184
|
};
|
|
182
|
-
const action = await repos.
|
|
185
|
+
const action = await repos.actions.confirm.start(confirmActionAttributes, {
|
|
183
186
|
...(recipe !== undefined) ? { recipe } : undefined // add recipe(2024-06-11~)
|
|
184
187
|
});
|
|
185
188
|
try {
|
|
@@ -209,7 +212,7 @@ function confirmReserveTransaction(params, options) {
|
|
|
209
212
|
}
|
|
210
213
|
catch (error) {
|
|
211
214
|
try {
|
|
212
|
-
await repos.
|
|
215
|
+
await repos.actions.confirm.giveUp({ typeOf: confirmActionAttributes.typeOf, id: action.id, error });
|
|
213
216
|
}
|
|
214
217
|
catch (__) {
|
|
215
218
|
// 失敗したら仕方ない
|
|
@@ -219,7 +222,7 @@ function confirmReserveTransaction(params, options) {
|
|
|
219
222
|
const result = {
|
|
220
223
|
// ...(updReserveResult !== undefined) ? { updReserveResult } : {} // discontinue(2024-06-11~)
|
|
221
224
|
};
|
|
222
|
-
await repos.
|
|
225
|
+
await repos.actions.confirm.completeWithVoid({
|
|
223
226
|
typeOf: confirmActionAttributes.typeOf, id: action.id, result,
|
|
224
227
|
...(recipe !== undefined) ? { recipe } : undefined // add recipe(2024-06-11~)
|
|
225
228
|
});
|
|
@@ -247,7 +250,9 @@ function onConfirmed(params, options) {
|
|
|
247
250
|
},
|
|
248
251
|
useOnOrderStatusChanged: options.useOnOrderStatusChanged === true
|
|
249
252
|
};
|
|
253
|
+
const taskIdentifier = (0, util_1.format)('%s:%s:%s:%s', params.project.id, factory_1.factory.taskName.OnAssetTransactionStatusChanged, onAssetTransactionStatusChangedTaskData.purpose.orderNumber, onAssetTransactionStatusChangedTaskData.object.transactionNumber);
|
|
250
254
|
const onAssetTransactionStatusChangedTask = {
|
|
255
|
+
identifier: taskIdentifier,
|
|
251
256
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
252
257
|
name: factory_1.factory.taskName.OnAssetTransactionStatusChanged,
|
|
253
258
|
status: factory_1.factory.taskStatus.Ready,
|
|
@@ -257,7 +262,7 @@ function onConfirmed(params, options) {
|
|
|
257
262
|
executionResults: [],
|
|
258
263
|
data: onAssetTransactionStatusChangedTaskData
|
|
259
264
|
};
|
|
260
|
-
await repos.task.
|
|
265
|
+
await repos.task.runTaskByIdentifier(onAssetTransactionStatusChangedTask);
|
|
261
266
|
}
|
|
262
267
|
};
|
|
263
268
|
}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const factory_1 = require("../../factory");
|
|
5
|
-
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
6
5
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
7
|
-
const
|
|
6
|
+
const create_1 = require("../../repo/action/create");
|
|
8
7
|
const order_1 = require("../../repo/order");
|
|
9
8
|
const createAccountingReportIfNotExist_1 = require("../order/createAccountingReportIfNotExist");
|
|
10
9
|
/**
|
|
@@ -13,9 +12,10 @@ const createAccountingReportIfNotExist_1 = require("../order/createAccountingRep
|
|
|
13
12
|
function call(params) {
|
|
14
13
|
return async ({ connection }) => {
|
|
15
14
|
await createAccountingReport(params)({
|
|
16
|
-
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
17
15
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
18
|
-
|
|
16
|
+
actions: {
|
|
17
|
+
create: new create_1.CreateActionRepo(connection)
|
|
18
|
+
},
|
|
19
19
|
order: new order_1.OrderRepo(connection)
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -28,10 +28,6 @@ function createAccountingReport(params) {
|
|
|
28
28
|
project: { id: params.project.id },
|
|
29
29
|
inclusion: [
|
|
30
30
|
'orderNumber', 'project', 'paymentMethods', 'seller', 'typeOf', 'orderDate'
|
|
31
|
-
// 'customer', 'confirmationNumber',
|
|
32
|
-
// 'orderedItem',
|
|
33
|
-
// 'broker',
|
|
34
|
-
// 'price', 'priceCurrency',
|
|
35
31
|
]
|
|
36
32
|
});
|
|
37
33
|
const simpleOrder = {
|
|
@@ -51,16 +47,13 @@ function createAccountingReport(params) {
|
|
|
51
47
|
purpose: simpleOrder,
|
|
52
48
|
sameAs: { id: params.id, typeOf: 'Task' } // add sameAs(2025-09-21~)
|
|
53
49
|
};
|
|
54
|
-
const action = await repos.
|
|
50
|
+
const action = await repos.actions.create.start(actionAttributes);
|
|
55
51
|
try {
|
|
56
|
-
await (0, createAccountingReportIfNotExist_1.createAccountingReportIfNotExist)(
|
|
57
|
-
...order,
|
|
58
|
-
// acceptedOffers
|
|
59
|
-
})(repos);
|
|
52
|
+
await (0, createAccountingReportIfNotExist_1.createAccountingReportIfNotExist)(order)(repos);
|
|
60
53
|
}
|
|
61
54
|
catch (error) {
|
|
62
55
|
try {
|
|
63
|
-
await repos.
|
|
56
|
+
await repos.actions.create.giveUp({ typeOf: action.typeOf, id: action.id, error });
|
|
64
57
|
}
|
|
65
58
|
catch (__) {
|
|
66
59
|
// 失敗したら仕方ない
|
|
@@ -68,6 +61,6 @@ function createAccountingReport(params) {
|
|
|
68
61
|
throw error;
|
|
69
62
|
}
|
|
70
63
|
const result = {};
|
|
71
|
-
await repos.
|
|
64
|
+
await repos.actions.create.completeWithVoid({ typeOf: action.typeOf, id: action.id, result });
|
|
72
65
|
};
|
|
73
66
|
}
|
|
@@ -1,67 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.call = call;
|
|
37
4
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
38
5
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
39
|
-
const
|
|
6
|
+
const update_1 = require("../../repo/action/update");
|
|
7
|
+
const adminAction_1 = require("../../repo/adminAction");
|
|
8
|
+
const adminTransaction_1 = require("../../repo/adminTransaction");
|
|
40
9
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
41
|
-
// import { MessageRepo } from '../../repo/message';
|
|
42
10
|
const note_1 = require("../../repo/note");
|
|
43
11
|
const order_1 = require("../../repo/order");
|
|
44
12
|
const reservation_1 = require("../../repo/reservation");
|
|
45
|
-
const transaction_1 = require("../../repo/transaction");
|
|
46
13
|
const placeOrder_1 = require("../../repo/transaction/placeOrder");
|
|
47
14
|
const returnOrder_1 = require("../../repo/transaction/returnOrder");
|
|
48
|
-
const
|
|
15
|
+
const transaction_1 = require("../transaction");
|
|
49
16
|
/**
|
|
50
17
|
* タスク実行関数
|
|
51
18
|
*/
|
|
52
19
|
function call(params) {
|
|
53
20
|
return async ({ connection }) => {
|
|
54
21
|
const { data } = params;
|
|
55
|
-
await
|
|
22
|
+
await (0, transaction_1.deleteTransaction)(data)({
|
|
56
23
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
57
24
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
58
|
-
|
|
25
|
+
actions: {
|
|
26
|
+
update: new update_1.UpdateActionRepo(connection),
|
|
27
|
+
},
|
|
28
|
+
adminAction: new adminAction_1.AdminActionRepo(connection),
|
|
29
|
+
adminTransaction: new adminTransaction_1.AdminTransactionRepo(connection),
|
|
59
30
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
60
|
-
// message: new MessageRepo(connection),
|
|
61
31
|
note: new note_1.NoteRepo(connection),
|
|
62
32
|
order: new order_1.OrderRepo(connection),
|
|
63
33
|
reservation: new reservation_1.ReservationRepo(connection),
|
|
64
|
-
transaction: new transaction_1.TransactionRepo(connection),
|
|
65
34
|
placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
|
|
66
35
|
returnOrder: new returnOrder_1.ReturnOrderRepo(connection),
|
|
67
36
|
});
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.call = call;
|
|
37
37
|
const coa_service_1 = require("@motionpicture/coa-service");
|
|
38
|
-
const
|
|
38
|
+
const update_1 = require("../../repo/action/update");
|
|
39
39
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
40
40
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
41
41
|
const event_1 = require("../../repo/event");
|
|
@@ -71,7 +71,9 @@ function call(params) {
|
|
|
71
71
|
...params.data,
|
|
72
72
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project }
|
|
73
73
|
})({
|
|
74
|
-
|
|
74
|
+
actions: {
|
|
75
|
+
update: new update_1.UpdateActionRepo(connection),
|
|
76
|
+
},
|
|
75
77
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
76
78
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
77
79
|
event: new event_1.EventRepo(connection),
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
5
|
-
// import { ActionRepo } from '../../repo/action';
|
|
6
5
|
const pay_1 = require("../../repo/action/pay");
|
|
7
6
|
const refund_1 = require("../../repo/action/refund");
|
|
8
7
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const factory_1 = require("../../factory");
|
|
5
5
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
6
|
-
const
|
|
6
|
+
const reserve_1 = require("../../repo/action/reserve");
|
|
7
7
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
8
8
|
const authorization_1 = require("../../repo/authorization");
|
|
9
9
|
const order_1 = require("../../repo/order");
|
|
10
|
-
const ownershipInfo_1 = require("../../repo/ownershipInfo");
|
|
11
10
|
const reservation_1 = require("../../repo/reservation");
|
|
12
11
|
const setting_1 = require("../../repo/setting");
|
|
13
12
|
const task_1 = require("../../repo/task");
|
|
14
|
-
const
|
|
13
|
+
const reserve_2 = require("../reserve");
|
|
15
14
|
/**
|
|
16
15
|
* タスク実行関数
|
|
17
16
|
*/
|
|
@@ -19,11 +18,10 @@ function call(params) {
|
|
|
19
18
|
return async ({ connection }) => {
|
|
20
19
|
await onAuthorizationCreated(params)({
|
|
21
20
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
22
|
-
|
|
21
|
+
actions: { reserve: new reserve_1.ReserveActionRepo(connection) },
|
|
23
22
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
24
23
|
code: new authorization_1.AuthorizationRepo(connection),
|
|
25
24
|
order: new order_1.OrderRepo(connection),
|
|
26
|
-
ownershipInfo: new ownershipInfo_1.OwnershipInfoRepo(connection),
|
|
27
25
|
reservation: new reservation_1.ReservationRepo(connection),
|
|
28
26
|
setting: new setting_1.SettingRepo(connection),
|
|
29
27
|
task: new task_1.TaskRepo(connection)
|
|
@@ -49,12 +47,6 @@ function onAuthorizationCreated(params) {
|
|
|
49
47
|
reservationNumbers = await repos.acceptedOffer.distinctValues({
|
|
50
48
|
orderNumber: { $in: [orderNumber] }
|
|
51
49
|
}, 'acceptedOffers.itemOffered.reservationNumber');
|
|
52
|
-
// reservationForIds = await repos.acceptedOffer.distinctValues(
|
|
53
|
-
// {
|
|
54
|
-
// orderNumber: { $in: [orderNumber] }
|
|
55
|
-
// },
|
|
56
|
-
// 'acceptedOffers.itemOffered.reservationFor.id'
|
|
57
|
-
// );
|
|
58
50
|
}
|
|
59
51
|
break;
|
|
60
52
|
case 'OwnershipInfo':
|
|
@@ -64,12 +56,11 @@ function onAuthorizationCreated(params) {
|
|
|
64
56
|
default:
|
|
65
57
|
// no op
|
|
66
58
|
}
|
|
67
|
-
await (0,
|
|
59
|
+
await (0, reserve_2.checkInReservation)({
|
|
68
60
|
project: { id: params.project.id },
|
|
69
61
|
object: {
|
|
70
62
|
ids: reservationIds,
|
|
71
63
|
reservationNumbers: reservationNumbers
|
|
72
|
-
// reservationFor: { ids: reservationForIds }
|
|
73
64
|
},
|
|
74
65
|
purpose: { code: params.data.code },
|
|
75
66
|
instrument: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
3
3
|
import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
|
|
4
4
|
export declare function deleteResourcesByAggregateOffer(params: {
|
|
@@ -7,7 +7,9 @@ export declare function deleteResourcesByAggregateOffer(params: {
|
|
|
7
7
|
};
|
|
8
8
|
ids: string[];
|
|
9
9
|
}): (repos: {
|
|
10
|
-
|
|
10
|
+
actions: {
|
|
11
|
+
update: UpdateActionRepo;
|
|
12
|
+
};
|
|
11
13
|
offerCatalog: OfferCatalogRepo;
|
|
12
14
|
offerCatalogItem: OfferCatalogItemRepo;
|
|
13
15
|
}) => Promise<void>;
|
|
@@ -14,8 +14,8 @@ function deleteResourcesByAggregateOffer(params) {
|
|
|
14
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
|
-
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
17
|
+
let deleteResult;
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// カタログからpullItemListElement
|
|
21
21
|
const updateCatalogResult = await repos.offerCatalog.pullItemListElement({
|
|
@@ -31,14 +31,14 @@ function deleteResourcesByAggregateOffer(params) {
|
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
try {
|
|
34
|
-
await repos.
|
|
34
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
35
35
|
}
|
|
36
36
|
catch (_) {
|
|
37
37
|
// no op
|
|
38
38
|
}
|
|
39
39
|
throw error;
|
|
40
40
|
}
|
|
41
|
-
await repos.
|
|
41
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
export declare function deleteResourcesByEventSeries(params: {
|
|
4
4
|
project: {
|
|
@@ -6,6 +6,8 @@ export declare function deleteResourcesByEventSeries(params: {
|
|
|
6
6
|
};
|
|
7
7
|
ids: string[];
|
|
8
8
|
}): (repos: {
|
|
9
|
-
|
|
9
|
+
actions: {
|
|
10
|
+
update: UpdateActionRepo;
|
|
11
|
+
};
|
|
10
12
|
event: EventRepo;
|
|
11
13
|
}) => Promise<void>;
|
|
@@ -14,8 +14,8 @@ function deleteResourcesByEventSeries(params) {
|
|
|
14
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
|
-
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
17
|
+
let deleteResult;
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// イベント削除
|
|
21
21
|
const deleteScreeningEventResult = await repos.event.deleteManyBySuperEventId({
|
|
@@ -28,14 +28,14 @@ function deleteResourcesByEventSeries(params) {
|
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
try {
|
|
31
|
-
await repos.
|
|
31
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
32
32
|
}
|
|
33
33
|
catch (_) {
|
|
34
34
|
// no op
|
|
35
35
|
}
|
|
36
36
|
throw error;
|
|
37
37
|
}
|
|
38
|
-
await repos.
|
|
38
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
4
4
|
import type { ScreeningRoomRepo } from '../../../repo/place/screeningRoom';
|
|
@@ -8,7 +8,9 @@ export declare function deleteResourcesByMovieTheater(params: {
|
|
|
8
8
|
};
|
|
9
9
|
ids: string[];
|
|
10
10
|
}): (repos: {
|
|
11
|
-
|
|
11
|
+
actions: {
|
|
12
|
+
update: UpdateActionRepo;
|
|
13
|
+
};
|
|
12
14
|
event: EventRepo;
|
|
13
15
|
eventSeries: EventSeriesRepo;
|
|
14
16
|
screeningRoom: ScreeningRoomRepo;
|
|
@@ -14,8 +14,8 @@ function deleteResourcesByMovieTheater(params) {
|
|
|
14
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
|
-
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
17
|
+
let deleteResult;
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// イベント削除
|
|
21
21
|
const deleteScreeningEventResult = await repos.event.deleteManyBySuperEventLocationId({
|
|
@@ -36,14 +36,14 @@ function deleteResourcesByMovieTheater(params) {
|
|
|
36
36
|
}
|
|
37
37
|
catch (error) {
|
|
38
38
|
try {
|
|
39
|
-
await repos.
|
|
39
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
40
40
|
}
|
|
41
41
|
catch (_) {
|
|
42
42
|
// no op
|
|
43
43
|
}
|
|
44
44
|
throw error;
|
|
45
45
|
}
|
|
46
|
-
await repos.
|
|
46
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
3
3
|
import type { EventRepo } from '../../../repo/event';
|
|
4
4
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
@@ -9,7 +9,9 @@ export declare function deleteResourcesByOfferCatalog(params: {
|
|
|
9
9
|
};
|
|
10
10
|
ids: string[];
|
|
11
11
|
}): (repos: {
|
|
12
|
-
|
|
12
|
+
actions: {
|
|
13
|
+
update: UpdateActionRepo;
|
|
14
|
+
};
|
|
13
15
|
aggregateOffer: AggregateOfferRepo;
|
|
14
16
|
event: EventRepo;
|
|
15
17
|
offerCatalog: OfferCatalogRepo;
|
|
@@ -14,8 +14,8 @@ function deleteResourcesByOfferCatalog(params) {
|
|
|
14
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
|
-
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
17
|
+
let deleteResult;
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// カタログからプロダクト検索
|
|
21
21
|
const productsWithCatalog = await repos.product.projectFields({
|
|
@@ -53,14 +53,14 @@ function deleteResourcesByOfferCatalog(params) {
|
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
55
|
try {
|
|
56
|
-
await repos.
|
|
56
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
57
57
|
}
|
|
58
58
|
catch (_) {
|
|
59
59
|
// no op
|
|
60
60
|
}
|
|
61
61
|
throw error;
|
|
62
62
|
}
|
|
63
|
-
await repos.
|
|
63
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
3
3
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
4
4
|
import type { EventRepo } from '../../../repo/event';
|
|
5
5
|
import type { NoteRepo } from '../../../repo/note';
|
|
@@ -11,7 +11,9 @@ export declare function deleteResourcesByProduct(params: {
|
|
|
11
11
|
ids: string[];
|
|
12
12
|
typeOf: factory.product.ProductType;
|
|
13
13
|
}): (repos: {
|
|
14
|
-
|
|
14
|
+
actions: {
|
|
15
|
+
update: UpdateActionRepo;
|
|
16
|
+
};
|
|
15
17
|
aggregateOffer: AggregateOfferRepo;
|
|
16
18
|
event: EventRepo;
|
|
17
19
|
note: NoteRepo;
|
|
@@ -14,8 +14,8 @@ function deleteResourcesByProduct(params) {
|
|
|
14
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
|
-
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
17
|
+
let deleteResult;
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// 興行を設定されたイベント削除
|
|
21
21
|
const deleteEventResult = await repos.event.deleteManyEventsByItemOfferedId({
|
|
@@ -35,14 +35,14 @@ function deleteResourcesByProduct(params) {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
try {
|
|
38
|
-
await repos.
|
|
38
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
39
39
|
}
|
|
40
40
|
catch (_) {
|
|
41
41
|
// no op
|
|
42
42
|
}
|
|
43
43
|
throw error;
|
|
44
44
|
}
|
|
45
|
-
await repos.
|
|
45
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
export declare function deleteResourcesByRoom(params: {
|
|
4
4
|
project: {
|
|
@@ -15,6 +15,8 @@ export declare function deleteResourcesByRoom(params: {
|
|
|
15
15
|
id: string;
|
|
16
16
|
};
|
|
17
17
|
}): (repos: {
|
|
18
|
-
|
|
18
|
+
actions: {
|
|
19
|
+
update: UpdateActionRepo;
|
|
20
|
+
};
|
|
19
21
|
event: EventRepo;
|
|
20
22
|
}) => Promise<void>;
|