@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
|
@@ -17,8 +17,7 @@ function placeOrder(params) {
|
|
|
17
17
|
confirmationNumber: params.object.confirmationNumber,
|
|
18
18
|
orderNumber: params.object.orderNumber
|
|
19
19
|
})({
|
|
20
|
-
|
|
21
|
-
authorizePaymentMethodAction: repos.authorizePaymentMethodAction,
|
|
20
|
+
actions: repos.actions,
|
|
22
21
|
orderInTransaction: repos.orderInTransaction,
|
|
23
22
|
placeOrder: repos.placeOrder,
|
|
24
23
|
});
|
|
@@ -42,19 +41,12 @@ function placeOrder(params) {
|
|
|
42
41
|
typeOf: factory_1.factory.actionType.OrderAction
|
|
43
42
|
};
|
|
44
43
|
// 冪等性を担保(2023-05-31~)
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
purpose: {
|
|
52
|
-
id: { $in: [orderActionPurpose.id] },
|
|
53
|
-
typeOf: { $in: [orderActionPurpose.typeOf] }
|
|
54
|
-
}
|
|
55
|
-
}, ['id']);
|
|
56
|
-
if (completedActions.length === 0) {
|
|
57
|
-
const action = await repos.action.start(orderActionAttributes);
|
|
44
|
+
const completedAction = await repos.actions.order.findCompletedOrderAction({
|
|
45
|
+
object: { orderNumber: orderActionAttributes.object.orderNumber },
|
|
46
|
+
purpose: { id: orderActionPurpose.id }
|
|
47
|
+
});
|
|
48
|
+
if (completedAction === null) {
|
|
49
|
+
const action = await repos.actions.order.start(orderActionAttributes);
|
|
58
50
|
try {
|
|
59
51
|
// 冗長なオファーを除外する(念のため)
|
|
60
52
|
await (0, voidAcceptedOfferIfNecessary_1.voidAcceptedOfferIfNecessary)({
|
|
@@ -65,14 +57,14 @@ function placeOrder(params) {
|
|
|
65
57
|
}
|
|
66
58
|
catch (error) {
|
|
67
59
|
try {
|
|
68
|
-
await repos.
|
|
60
|
+
await repos.actions.order.giveUp({ typeOf: orderActionAttributes.typeOf, id: action.id, error });
|
|
69
61
|
}
|
|
70
62
|
catch (__) {
|
|
71
63
|
// 失敗したら仕方ない
|
|
72
64
|
}
|
|
73
65
|
throw error;
|
|
74
66
|
}
|
|
75
|
-
await repos.
|
|
67
|
+
await repos.actions.order.completeWithVoid({ typeOf: orderActionAttributes.typeOf, id: action.id, result: {} });
|
|
76
68
|
}
|
|
77
69
|
if (params.useOnOrderStatusChanged) {
|
|
78
70
|
// 経理レポートを保管->CreateAccountingReportへ移行(2024-02-02~)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReturnActionRepo } from '../../repo/action/returnAction';
|
|
3
3
|
import type { OrderRepo } from '../../repo/order';
|
|
4
|
-
import type { OwnershipInfoRepo } from '../../repo/ownershipInfo';
|
|
5
4
|
import type { SettingRepo } from '../../repo/setting';
|
|
6
5
|
import type { TaskRepo } from '../../repo/task';
|
|
7
6
|
import type { ReturnOrderRepo } from '../../repo/transaction/returnOrder';
|
|
@@ -18,9 +17,10 @@ declare function returnOrder(params: {
|
|
|
18
17
|
useOnOrderStatusChanged: boolean;
|
|
19
18
|
}): (repos: {
|
|
20
19
|
acceptedOffer: AcceptedOfferRepo;
|
|
21
|
-
|
|
20
|
+
actions: {
|
|
21
|
+
returnAction: ReturnActionRepo;
|
|
22
|
+
};
|
|
22
23
|
order: OrderRepo;
|
|
23
|
-
ownershipInfo: OwnershipInfoRepo;
|
|
24
24
|
setting: SettingRepo;
|
|
25
25
|
task: TaskRepo;
|
|
26
26
|
returnOrder: ReturnOrderRepo;
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.returnOrder = returnOrder;
|
|
7
7
|
const debug_1 = __importDefault(require("debug"));
|
|
8
|
-
// import { createMaskedCustomer } from '../../factory/order';
|
|
9
8
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
10
9
|
const factory_1 = require("../../factory");
|
|
11
10
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
@@ -19,9 +18,7 @@ function createReturnPolicy(params) {
|
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
20
|
function returnOrder(params) {
|
|
22
|
-
return async (repos
|
|
23
|
-
// settings: Settings
|
|
24
|
-
) => {
|
|
21
|
+
return async (repos) => {
|
|
25
22
|
if (typeof params.useOnOrderStatusChanged !== 'boolean') {
|
|
26
23
|
throw new factory_1.factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
|
|
27
24
|
}
|
|
@@ -81,14 +78,15 @@ function returnOrder(params) {
|
|
|
81
78
|
recipient,
|
|
82
79
|
typeOf: factory_1.factory.actionType.ReturnAction
|
|
83
80
|
};
|
|
84
|
-
|
|
81
|
+
const returnedOwnershipInfos = [];
|
|
85
82
|
let returnedOrder;
|
|
86
|
-
const action = await repos.
|
|
83
|
+
const action = await repos.actions.returnAction.start(returnOrderActionAttributes);
|
|
87
84
|
try {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
// ひとまず所有権管理を廃止するため、所有権返却処理は不要(2026-08-10)
|
|
86
|
+
// returnedOwnershipInfos = await processReturnOrder(order, dateReturned)({
|
|
87
|
+
// acceptedOffer: repos.acceptedOffer,
|
|
88
|
+
// ownershipInfo: repos.ownershipInfo
|
|
89
|
+
// });
|
|
92
90
|
// 注文ステータス変更
|
|
93
91
|
returnedOrder = await repos.order.returnOrder({
|
|
94
92
|
project: { id: order.project.id },
|
|
@@ -100,7 +98,7 @@ function returnOrder(params) {
|
|
|
100
98
|
}
|
|
101
99
|
catch (error) {
|
|
102
100
|
try {
|
|
103
|
-
await repos.
|
|
101
|
+
await repos.actions.returnAction.giveUp({ typeOf: action.typeOf, id: action.id, error });
|
|
104
102
|
}
|
|
105
103
|
catch (__) {
|
|
106
104
|
// 失敗したら仕方ない
|
|
@@ -108,7 +106,7 @@ function returnOrder(params) {
|
|
|
108
106
|
throw error;
|
|
109
107
|
}
|
|
110
108
|
const result = returnedOwnershipInfos;
|
|
111
|
-
await repos.
|
|
109
|
+
await repos.actions.returnAction.completeWithVoid({ typeOf: action.typeOf, id: action.id, result });
|
|
112
110
|
if (params.useOnOrderStatusChanged) {
|
|
113
111
|
await (0, onOrderStatusChanged_1.onOrderReturned)({
|
|
114
112
|
order: {
|
|
@@ -130,37 +128,7 @@ function returnOrder(params) {
|
|
|
130
128
|
...returnOrderActionAttributes,
|
|
131
129
|
id: action.id
|
|
132
130
|
}
|
|
133
|
-
})(repos
|
|
134
|
-
// settings
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function processReturnOrder(order, dateReturned) {
|
|
140
|
-
return async (repos) => {
|
|
141
|
-
const returnedOwnershipInfos = [];
|
|
142
|
-
// 所有権の所有期間変更
|
|
143
|
-
// 注文オファーリポジトリから所有権識別子を検索する(2023-12-07~)
|
|
144
|
-
const ownershipInfos = await repos.acceptedOffer.aggreateOwnershipInfosByOrder({ orderNumber: { $eq: order.orderNumber } });
|
|
145
|
-
if (Array.isArray(ownershipInfos)) {
|
|
146
|
-
await Promise.all(ownershipInfos.map(async (ownershipInfo) => {
|
|
147
|
-
const ownershipInfoReturned = await repos.ownershipInfo.findByIdentifierAndUpdateOwnedThrough({
|
|
148
|
-
project: { id: order.project.id },
|
|
149
|
-
identifier: String(ownershipInfo.identifier),
|
|
150
|
-
ownedThrough: dateReturned
|
|
151
|
-
})
|
|
152
|
-
.then((ownershipInfoByDB) => {
|
|
153
|
-
// 存在しない場合は識別子のみ保管(customer.typeOfによって存在しないこともありうる)
|
|
154
|
-
if (ownershipInfoByDB === undefined) {
|
|
155
|
-
return ownershipInfo;
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
return ownershipInfoByDB;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
returnedOwnershipInfos.push(ownershipInfoReturned);
|
|
162
|
-
}));
|
|
131
|
+
})(repos);
|
|
163
132
|
}
|
|
164
|
-
return returnedOwnershipInfos;
|
|
165
133
|
};
|
|
166
134
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SendOrderActionRepo } from '../../repo/action/sendOrder';
|
|
3
3
|
import type { OrderRepo } from '../../repo/order';
|
|
4
|
-
import type { OwnershipInfoRepo } from '../../repo/ownershipInfo';
|
|
5
4
|
import type { SettingRepo } from '../../repo/setting';
|
|
6
5
|
import type { TaskRepo } from '../../repo/task';
|
|
7
|
-
import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
8
6
|
import { factory } from '../../factory';
|
|
9
7
|
interface ISendOrderRepos {
|
|
10
8
|
acceptedOffer: AcceptedOfferRepo;
|
|
11
|
-
|
|
9
|
+
actions: {
|
|
10
|
+
sendOrder: SendOrderActionRepo;
|
|
11
|
+
};
|
|
12
12
|
order: OrderRepo;
|
|
13
|
-
ownershipInfo: OwnershipInfoRepo;
|
|
14
13
|
setting: SettingRepo;
|
|
15
14
|
task: TaskRepo;
|
|
16
|
-
placeOrder: PlaceOrderRepo;
|
|
17
15
|
}
|
|
18
16
|
type ISendOperation<T> = (repos: ISendOrderRepos) => Promise<T>;
|
|
19
17
|
/**
|
|
@@ -1,46 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.sendOrder = sendOrder;
|
|
7
|
-
|
|
8
|
-
// import { createMaskedCustomer } from '../../factory/order';
|
|
9
|
-
const factory_1 = require("../delivery/factory");
|
|
10
|
-
// import { findPlaceOrderTransaction } from './findPlaceOrderTransaction';
|
|
4
|
+
// import { createOwnershipInfosFromOrder } from '../delivery/factory';
|
|
11
5
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
12
|
-
const
|
|
13
|
-
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
6
|
+
const factory_1 = require("../../factory");
|
|
14
7
|
/**
|
|
15
8
|
* 注文を配送する
|
|
16
9
|
*/
|
|
17
10
|
function sendOrder(params) {
|
|
18
|
-
return async (repos
|
|
19
|
-
// settings: Settings
|
|
20
|
-
) => {
|
|
11
|
+
return async (repos) => {
|
|
21
12
|
if (typeof params.useOnOrderStatusChanged !== 'boolean') {
|
|
22
|
-
throw new
|
|
13
|
+
throw new factory_1.factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
|
|
23
14
|
}
|
|
24
15
|
if (typeof params.object.acceptedOffers?.limit !== 'number') {
|
|
25
|
-
throw new
|
|
16
|
+
throw new factory_1.factory.errors.Argument('object.acceptedOffers.limit', 'must be number');
|
|
26
17
|
}
|
|
27
18
|
if (typeof params.object.acceptedOffers?.page !== 'number') {
|
|
28
|
-
throw new
|
|
19
|
+
throw new factory_1.factory.errors.Argument('object.acceptedOffers.page', 'must be number');
|
|
29
20
|
}
|
|
30
21
|
if (params.object.acceptedOffers.limit <= 0) {
|
|
31
|
-
throw new
|
|
22
|
+
throw new factory_1.factory.errors.Argument('object.acceptedOffers.limit', 'must be greater than 1');
|
|
32
23
|
}
|
|
33
24
|
if (params.object.acceptedOffers.page <= 0) {
|
|
34
|
-
throw new
|
|
25
|
+
throw new factory_1.factory.errors.Argument('object.acceptedOffers.page', 'must be greater than 1');
|
|
35
26
|
}
|
|
36
27
|
try {
|
|
37
28
|
const orderNumber = params.object.orderNumber;
|
|
38
29
|
const confirmationNumber = params.object.confirmationNumber;
|
|
39
|
-
// const placeOrderTransaction = await findPlaceOrderTransaction({
|
|
40
|
-
// project: { id: params.project.id },
|
|
41
|
-
// confirmationNumber,
|
|
42
|
-
// orderNumber
|
|
43
|
-
// })(repos);
|
|
44
30
|
// 注文取得
|
|
45
31
|
let order = await repos.order.projectFieldsByOrderNumber({
|
|
46
32
|
orderNumber,
|
|
@@ -49,24 +35,16 @@ function sendOrder(params) {
|
|
|
49
35
|
});
|
|
50
36
|
// プロジェクト条件検証
|
|
51
37
|
if (order.project.id !== params.project.id) {
|
|
52
|
-
throw new
|
|
38
|
+
throw new factory_1.factory.errors.NotFound('Order');
|
|
53
39
|
}
|
|
54
40
|
// 確認番号検証
|
|
55
41
|
if (order.confirmationNumber !== confirmationNumber) {
|
|
56
|
-
throw new
|
|
42
|
+
throw new factory_1.factory.errors.NotFound('Order');
|
|
57
43
|
}
|
|
58
44
|
// const maskedCustomer = createMaskedCustomer(order, { noProfile: true });
|
|
59
45
|
const simpleOrder = {
|
|
60
46
|
typeOf: order.typeOf,
|
|
61
|
-
// seller: {
|
|
62
|
-
// id: order.seller.id,
|
|
63
|
-
// typeOf: order.seller.typeOf,
|
|
64
|
-
// name: order.seller.name
|
|
65
|
-
// }, // 廃止(2024-03-06~)
|
|
66
|
-
// customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id }, // 廃止(2024-03-06~)
|
|
67
47
|
orderNumber: order.orderNumber,
|
|
68
|
-
// price: order.price,
|
|
69
|
-
// priceCurrency: order.priceCurrency,
|
|
70
48
|
orderDate: order.orderDate
|
|
71
49
|
};
|
|
72
50
|
const { limit, page } = params.object.acceptedOffers;
|
|
@@ -77,24 +55,21 @@ function sendOrder(params) {
|
|
|
77
55
|
const sendOrderActionAttributes = {
|
|
78
56
|
agent: (typeof params.agent?.typeOf === 'string') ? params.agent : order.project,
|
|
79
57
|
object: sendOrderObject,
|
|
80
|
-
// potentialActions: {},
|
|
81
58
|
project: order.project,
|
|
82
|
-
|
|
83
|
-
typeOf: factory_2.factory.actionType.SendAction
|
|
59
|
+
typeOf: factory_1.factory.actionType.SendAction
|
|
84
60
|
};
|
|
85
|
-
const action = await repos.
|
|
86
|
-
let creatingOwnershipInfos = [];
|
|
87
|
-
let createdOwnershipInfos = [];
|
|
61
|
+
const action = await repos.actions.sendOrder.start(sendOrderActionAttributes);
|
|
88
62
|
let allOffersDelivered = false;
|
|
89
63
|
let acceptedOffers;
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
64
|
+
// 所有権管理はひとまず廃止(2026-08-10~)
|
|
65
|
+
// // 所有権生成を最小化(2024-03-01~)
|
|
66
|
+
// let createOwnerships = false;
|
|
67
|
+
// switch (order.customer.typeOf) {
|
|
68
|
+
// case factory.personType.Person:
|
|
69
|
+
// createOwnerships = true; // Personのみに限定(2026-03-15~)
|
|
70
|
+
// break;
|
|
71
|
+
// default:
|
|
72
|
+
// }
|
|
98
73
|
try {
|
|
99
74
|
const offerIndexBase = (limit * (page - 1));
|
|
100
75
|
const searchSlicedAcceptedOffersResult = await repos.acceptedOffer.searchSlicedAcceptedOffersByOrderNumber({
|
|
@@ -103,30 +78,14 @@ function sendOrder(params) {
|
|
|
103
78
|
project: { id: { $eq: order.project.id } }
|
|
104
79
|
});
|
|
105
80
|
acceptedOffers = searchSlicedAcceptedOffersResult.acceptedOffers;
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
creatingOwnershipInfos = (0, factory_1.createOwnershipInfosFromOrder)({
|
|
110
|
-
order: { ...order, acceptedOffers },
|
|
111
|
-
offerIndexBase
|
|
112
|
-
});
|
|
113
|
-
createdOwnershipInfos = await Promise.all(creatingOwnershipInfos.map(async (creatingOwnershipInfo) => {
|
|
114
|
-
const { id } = await repos.ownershipInfo.createIfNotExistByIdentifier(creatingOwnershipInfo);
|
|
115
|
-
return {
|
|
116
|
-
id,
|
|
117
|
-
...(typeof creatingOwnershipInfo.identifier === 'string')
|
|
118
|
-
? { identifier: creatingOwnershipInfo.identifier }
|
|
119
|
-
: undefined
|
|
120
|
-
};
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
// const deliveredCount = limit * page;
|
|
124
|
-
// debug(deliveredCount, 'delivered.', order.orderNumber, params.object.acceptedOffers);
|
|
81
|
+
// 所有権管理はひとまず廃止(2026-08-10~)
|
|
82
|
+
// if (createOwnerships) {
|
|
83
|
+
// }
|
|
125
84
|
if (acceptedOffers.length === 0) {
|
|
126
85
|
order = await repos.order.changeStatus({
|
|
127
86
|
project: { id: order.project.id },
|
|
128
87
|
orderNumber,
|
|
129
|
-
orderStatus:
|
|
88
|
+
orderStatus: factory_1.factory.orderStatus.OrderDelivered,
|
|
130
89
|
previousOrderStatus: params.object.previousOrderStatus
|
|
131
90
|
});
|
|
132
91
|
allOffersDelivered = true;
|
|
@@ -134,16 +93,15 @@ function sendOrder(params) {
|
|
|
134
93
|
}
|
|
135
94
|
catch (error) {
|
|
136
95
|
try {
|
|
137
|
-
await repos.
|
|
96
|
+
await repos.actions.sendOrder.giveUp({ typeOf: sendOrderActionAttributes.typeOf, id: action.id, error });
|
|
138
97
|
}
|
|
139
98
|
catch (_) {
|
|
140
99
|
// no op
|
|
141
100
|
}
|
|
142
101
|
throw error;
|
|
143
102
|
}
|
|
144
|
-
const result =
|
|
145
|
-
await repos.
|
|
146
|
-
debug('allOffersDelivered?:', allOffersDelivered, order.orderNumber);
|
|
103
|
+
const result = [];
|
|
104
|
+
await repos.actions.sendOrder.completeWithVoid({ typeOf: sendOrderActionAttributes.typeOf, id: action.id, result: result });
|
|
147
105
|
if (params.useOnOrderStatusChanged) {
|
|
148
106
|
if (allOffersDelivered) {
|
|
149
107
|
await (0, onOrderStatusChanged_1.onOrderDelivered)({
|
|
@@ -154,7 +112,7 @@ function sendOrder(params) {
|
|
|
154
112
|
orderNumber: order.orderNumber,
|
|
155
113
|
project: order.project,
|
|
156
114
|
typeOf: order.typeOf,
|
|
157
|
-
orderStatus:
|
|
115
|
+
orderStatus: factory_1.factory.orderStatus.OrderDelivered,
|
|
158
116
|
price: order.price,
|
|
159
117
|
priceCurrency: order.priceCurrency
|
|
160
118
|
}
|
|
@@ -180,7 +138,7 @@ function sendOrder(params) {
|
|
|
180
138
|
project: { id: params.project.id },
|
|
181
139
|
inclusion: ['orderStatus']
|
|
182
140
|
});
|
|
183
|
-
if (currentOrder?.orderStatus ===
|
|
141
|
+
if (currentOrder?.orderStatus === factory_1.factory.orderStatus.OrderReturned) {
|
|
184
142
|
throwsError = false;
|
|
185
143
|
}
|
|
186
144
|
if (throwsError) {
|
|
@@ -9,7 +9,6 @@ import type { TransactionNumberRepo } from '../../../../repo/transactionNumber';
|
|
|
9
9
|
import * as PayTransactionService from '../../../assetTransaction/pay';
|
|
10
10
|
import { IInvoiceByTicketToken } from '../factory';
|
|
11
11
|
interface IFixTransactionNumberRepos {
|
|
12
|
-
action?: never;
|
|
13
12
|
acceptPayAction: AcceptPayActionRepo;
|
|
14
13
|
authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
|
|
15
14
|
authorization: AuthorizationRepo;
|
package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ interface IAcceptAction2ticketResult {
|
|
|
13
13
|
ticketToken: string;
|
|
14
14
|
}
|
|
15
15
|
interface IHandlePrePublishedPaymentMethodIdOnAuthorizingRepos {
|
|
16
|
-
action?: never;
|
|
17
16
|
acceptPayAction: AcceptPayActionRepo;
|
|
18
17
|
authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
|
|
19
18
|
authorization: AuthorizationRepo;
|
|
@@ -28,7 +28,6 @@ import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
|
28
28
|
import type { TransactionNumberRepo } from '../../../repo/transactionNumber';
|
|
29
29
|
interface IAuthorizeRepos {
|
|
30
30
|
accountingReport: AccountingReportRepo;
|
|
31
|
-
action?: never;
|
|
32
31
|
actions: {
|
|
33
32
|
pay: PayActionRepo;
|
|
34
33
|
refund: RefundActionRepo;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
3
3
|
import type { AsyncActionRepo } from '../../../repo/asyncAction';
|
|
4
|
-
import type { TaskRepo } from '../../../repo/task';
|
|
5
4
|
interface IFindAcceptActionResult {
|
|
6
5
|
/**
|
|
7
6
|
* アクションID
|
|
@@ -39,11 +38,8 @@ declare function findAcceptAction(params: {
|
|
|
39
38
|
*/
|
|
40
39
|
id: string;
|
|
41
40
|
};
|
|
42
|
-
}, options: {
|
|
43
|
-
useAsyncAction: boolean;
|
|
44
41
|
}): (repos: {
|
|
45
42
|
acceptPayAction: AcceptPayActionRepo;
|
|
46
43
|
asyncAction: AsyncActionRepo;
|
|
47
|
-
task: TaskRepo;
|
|
48
44
|
}) => Promise<IFindAcceptActionResult>;
|
|
49
45
|
export { findAcceptAction, };
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findAcceptAction = findAcceptAction;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
function findAcceptAction(params
|
|
5
|
+
function findAcceptAction(params) {
|
|
6
6
|
return async (repos) => {
|
|
7
7
|
// 非同期アクションに対応(2026-07-28~)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
8
|
+
// let task: Pick<factory.task.publishPaymentUrl.ITask, 'id' | 'status' | 'executionResults'> | undefined;
|
|
9
|
+
// まず非同期アクションを参照
|
|
10
|
+
const task = await repos.asyncAction.findAsyncActionById({
|
|
11
|
+
id: { $eq: params.sameAs.id },
|
|
12
|
+
project: { id: { $eq: params.project.id } },
|
|
13
|
+
name: factory_1.factory.taskName.PublishPaymentUrl
|
|
14
|
+
}, ['status', 'executionResults']);
|
|
15
|
+
// // 非同期アクションが存在しなければタスクを参照
|
|
16
|
+
// if (task === undefined) {
|
|
17
|
+
// task = await repos.task.findTaskById(
|
|
18
|
+
// {
|
|
19
|
+
// id: { $eq: params.sameAs.id },
|
|
20
|
+
// project: { id: { $eq: params.project.id } },
|
|
21
|
+
// name: factory.taskName.PublishPaymentUrl
|
|
22
|
+
// },
|
|
23
|
+
// ['status', 'executionResults']
|
|
24
|
+
// );
|
|
25
|
+
// }
|
|
26
26
|
if (task === undefined) {
|
|
27
27
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.taskName.PublishPaymentUrl);
|
|
28
28
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import type { AuthorizePaymentMethodActionRepo } from '../../../repo/action/authorizePaymentMethod';
|
|
3
3
|
import type { AsyncActionRepo } from '../../../repo/asyncAction';
|
|
4
|
-
import type { TaskRepo } from '../../../repo/task';
|
|
5
4
|
interface IFindAuthorizeActionResult {
|
|
6
5
|
/**
|
|
7
6
|
* アクションID
|
|
@@ -22,7 +21,6 @@ interface IFindAuthorizeActionResult {
|
|
|
22
21
|
interface IFindAuthorizeActionRepos {
|
|
23
22
|
authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
|
|
24
23
|
asyncAction: AsyncActionRepo;
|
|
25
|
-
task: TaskRepo;
|
|
26
24
|
}
|
|
27
25
|
declare function findAuthorizeAction(params: {
|
|
28
26
|
project: {
|
|
@@ -40,7 +38,5 @@ declare function findAuthorizeAction(params: {
|
|
|
40
38
|
*/
|
|
41
39
|
id: string;
|
|
42
40
|
};
|
|
43
|
-
}, options: {
|
|
44
|
-
useAsyncAction: boolean;
|
|
45
41
|
}): (repos: IFindAuthorizeActionRepos) => Promise<IFindAuthorizeActionResult>;
|
|
46
42
|
export { IFindAuthorizeActionRepos, findAuthorizeAction, };
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findAuthorizeAction = findAuthorizeAction;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
function findAuthorizeAction(params
|
|
5
|
+
function findAuthorizeAction(params) {
|
|
6
6
|
return async (repos) => {
|
|
7
7
|
// 非同期アクションに対応(2026-07-28~)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
8
|
+
// let task: Pick<factory.task.authorizePayment.ITask, 'id' | 'status' | 'executionResults'> | undefined;
|
|
9
|
+
// まず非同期アクションを参照
|
|
10
|
+
const task = await repos.asyncAction.findAsyncActionById({
|
|
11
|
+
id: { $eq: params.sameAs.id },
|
|
12
|
+
project: { id: { $eq: params.project.id } },
|
|
13
|
+
name: factory_1.factory.taskName.AuthorizePayment
|
|
14
|
+
}, ['status', 'executionResults']);
|
|
15
|
+
// // 非同期アクションが存在しなければタスクを参照
|
|
16
|
+
// if (task === undefined) {
|
|
17
|
+
// task = await repos.task.findTaskById(
|
|
18
|
+
// {
|
|
19
|
+
// id: { $eq: params.sameAs.id },
|
|
20
|
+
// project: { id: { $eq: params.project.id } },
|
|
21
|
+
// name: factory.taskName.AuthorizePayment
|
|
22
|
+
// },
|
|
23
|
+
// ['status', 'executionResults']
|
|
24
|
+
// );
|
|
25
|
+
// }
|
|
26
26
|
if (task === undefined) {
|
|
27
27
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.taskName.AuthorizePayment);
|
|
28
28
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import type { CheckMovieTicketActionRepo, IMinimizedPurchaseNumberAuthResult } from '../../../repo/action/checkMovieTicket';
|
|
3
3
|
import type { AsyncActionRepo } from '../../../repo/asyncAction';
|
|
4
|
-
import type { TaskRepo } from '../../../repo/task';
|
|
5
4
|
interface IFindCheckActionRepos {
|
|
6
5
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
7
6
|
asyncAction: AsyncActionRepo;
|
|
8
|
-
task: TaskRepo;
|
|
9
7
|
}
|
|
10
8
|
interface IFindCheckActionResult {
|
|
11
9
|
/**
|
|
@@ -43,7 +41,5 @@ declare function findCheckAction(params: {
|
|
|
43
41
|
*/
|
|
44
42
|
id: string;
|
|
45
43
|
};
|
|
46
|
-
}, options: {
|
|
47
|
-
useAsyncAction: boolean;
|
|
48
44
|
}): (repos: IFindCheckActionRepos) => Promise<IFindCheckActionResult>;
|
|
49
45
|
export { IFindCheckActionRepos, findCheckAction, };
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findCheckAction = findCheckAction;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
function findCheckAction(params
|
|
5
|
+
function findCheckAction(params) {
|
|
6
6
|
return async (repos) => {
|
|
7
7
|
// 非同期アクションに対応(2026-07-28~)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
8
|
+
// let task: Pick<factory.task.checkMovieTicket.ITask, 'id' | 'status' | 'executionResults'> | undefined;
|
|
9
|
+
// まず非同期アクションを参照
|
|
10
|
+
const task = await repos.asyncAction.findAsyncActionById({
|
|
11
|
+
id: { $eq: params.sameAs.id },
|
|
12
|
+
project: { id: { $eq: params.project.id } },
|
|
13
|
+
name: factory_1.factory.taskName.CheckMovieTicket
|
|
14
|
+
}, ['status', 'executionResults']);
|
|
15
|
+
// // 非同期アクションが存在しなければタスクを参照
|
|
16
|
+
// if (task === undefined) {
|
|
17
|
+
// task = await repos.task.findTaskById(
|
|
18
|
+
// {
|
|
19
|
+
// id: { $eq: params.sameAs.id },
|
|
20
|
+
// project: { id: { $eq: params.project.id } },
|
|
21
|
+
// name: factory.taskName.CheckMovieTicket
|
|
22
|
+
// },
|
|
23
|
+
// ['status', 'executionResults']
|
|
24
|
+
// );
|
|
25
|
+
// }
|
|
26
26
|
if (task === undefined) {
|
|
27
27
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.taskName.CheckMovieTicket);
|
|
28
28
|
}
|
|
@@ -10,7 +10,6 @@ import type { OrderInTransactionRepo } from '../../../repo/orderInTransaction';
|
|
|
10
10
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
11
11
|
interface IInvalidatePaymentUrlRepos {
|
|
12
12
|
accountingReport: AccountingReportRepo;
|
|
13
|
-
action?: never;
|
|
14
13
|
acceptPayAction: AcceptPayActionRepo;
|
|
15
14
|
assetTransaction: AssetTransactionRepo;
|
|
16
15
|
paymentAccepted: SellerPaymentAcceptedRepo;
|