@chevre/domain 21.37.0 → 22.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example/src/chevre/findReservationByCode.ts +1 -1
- package/example/src/chevre/findValidAuthorization.ts +1 -1
- package/example/src/chevre/transaction/processPlaceOrder.ts +11 -5
- package/lib/chevre/repo/acceptedOffer.d.ts +1 -1
- package/lib/chevre/repo/acceptedOffer.js +4 -4
- package/lib/chevre/repo/account.d.ts +1 -1
- package/lib/chevre/repo/account.js +5 -5
- package/lib/chevre/repo/accountTitle.d.ts +1 -1
- package/lib/chevre/repo/accountTitle.js +3 -3
- package/lib/chevre/repo/accountTransaction.d.ts +1 -1
- package/lib/chevre/repo/accountTransaction.js +4 -4
- package/lib/chevre/repo/accountingReport.d.ts +1 -1
- package/lib/chevre/repo/accountingReport.js +4 -4
- package/lib/chevre/repo/action.d.ts +1 -1
- package/lib/chevre/repo/action.js +4 -4
- package/lib/chevre/repo/additionalProperty.d.ts +1 -1
- package/lib/chevre/repo/additionalProperty.js +4 -4
- package/lib/chevre/repo/aggregateOffer.d.ts +1 -1
- package/lib/chevre/repo/aggregateOffer.js +6 -6
- package/lib/chevre/repo/aggregateReservation.d.ts +1 -1
- package/lib/chevre/repo/aggregateReservation.js +4 -4
- package/lib/chevre/repo/assetTransaction.d.ts +1 -1
- package/lib/chevre/repo/assetTransaction.js +5 -5
- package/lib/chevre/repo/categoryCode.d.ts +1 -1
- package/lib/chevre/repo/categoryCode.js +6 -6
- package/lib/chevre/repo/comment.d.ts +1 -1
- package/lib/chevre/repo/comment.js +4 -4
- package/lib/chevre/repo/creativeWork.d.ts +1 -1
- package/lib/chevre/repo/creativeWork.js +4 -4
- package/lib/chevre/repo/customer.d.ts +1 -1
- package/lib/chevre/repo/customer.js +4 -4
- package/lib/chevre/repo/customerType.d.ts +1 -1
- package/lib/chevre/repo/customerType.js +4 -4
- package/lib/chevre/repo/emailMessage.d.ts +1 -1
- package/lib/chevre/repo/emailMessage.js +4 -4
- package/lib/chevre/repo/event.d.ts +1 -1
- package/lib/chevre/repo/event.js +5 -5
- package/lib/chevre/repo/member.d.ts +1 -1
- package/lib/chevre/repo/member.js +4 -4
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -1
- package/lib/chevre/repo/merchantReturnPolicy.js +4 -4
- package/lib/chevre/repo/note.d.ts +1 -1
- package/lib/chevre/repo/note.js +4 -4
- package/lib/chevre/repo/offer.d.ts +1 -1
- package/lib/chevre/repo/offer.js +7 -7
- package/lib/chevre/repo/offerCatalog.d.ts +1 -1
- package/lib/chevre/repo/offerCatalog.js +4 -4
- package/lib/chevre/repo/offerCatalogItem.d.ts +1 -1
- package/lib/chevre/repo/offerCatalogItem.js +5 -5
- package/lib/chevre/repo/offerItemCondition.d.ts +1 -1
- package/lib/chevre/repo/offerItemCondition.js +4 -4
- package/lib/chevre/repo/order.d.ts +1 -1
- package/lib/chevre/repo/order.js +5 -5
- package/lib/chevre/repo/orderInTransaction.d.ts +1 -1
- package/lib/chevre/repo/orderInTransaction.js +3 -3
- package/lib/chevre/repo/orderNumber.d.ts +1 -1
- package/lib/chevre/repo/orderNumber.js +6 -6
- package/lib/chevre/repo/ownershipInfo.d.ts +1 -1
- package/lib/chevre/repo/ownershipInfo.js +4 -4
- package/lib/chevre/repo/passport.d.ts +7 -0
- package/lib/chevre/repo/passport.js +4 -1
- package/lib/chevre/repo/paymentMethod/creditCard.d.ts +1 -1
- package/lib/chevre/repo/paymentMethod/creditCard.js +3 -3
- package/lib/chevre/repo/paymentService.d.ts +1 -1
- package/lib/chevre/repo/paymentService.js +4 -4
- package/lib/chevre/repo/paymentServiceProvider.d.ts +1 -1
- package/lib/chevre/repo/paymentServiceProvider.js +3 -3
- package/lib/chevre/repo/permit.d.ts +1 -1
- package/lib/chevre/repo/permit.js +3 -3
- package/lib/chevre/repo/person.d.ts +1 -1
- package/lib/chevre/repo/person.js +10 -10
- package/lib/chevre/repo/place/busStop.d.ts +1 -1
- package/lib/chevre/repo/place/busStop.js +4 -4
- package/lib/chevre/repo/place/hasPOS.d.ts +1 -1
- package/lib/chevre/repo/place/hasPOS.js +3 -3
- package/lib/chevre/repo/place/movieTheater.d.ts +1 -1
- package/lib/chevre/repo/place/movieTheater.js +4 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +1 -1
- package/lib/chevre/repo/place/screeningRoom.js +3 -3
- package/lib/chevre/repo/place/seat.d.ts +1 -1
- package/lib/chevre/repo/place/seat.js +4 -4
- package/lib/chevre/repo/place/section.d.ts +1 -1
- package/lib/chevre/repo/place/section.js +3 -3
- package/lib/chevre/repo/priceSpecification.d.ts +1 -1
- package/lib/chevre/repo/priceSpecification.js +5 -5
- package/lib/chevre/repo/product.d.ts +1 -1
- package/lib/chevre/repo/product.js +4 -4
- package/lib/chevre/repo/productModel.d.ts +1 -1
- package/lib/chevre/repo/productModel.js +4 -4
- package/lib/chevre/repo/productOffer.d.ts +1 -1
- package/lib/chevre/repo/productOffer.js +3 -3
- package/lib/chevre/repo/project.d.ts +2 -1
- package/lib/chevre/repo/project.js +5 -4
- package/lib/chevre/repo/projectMakesOffer.d.ts +1 -1
- package/lib/chevre/repo/projectMakesOffer.js +3 -3
- package/lib/chevre/repo/rateLimit/offer.d.ts +1 -1
- package/lib/chevre/repo/rateLimit/offer.js +9 -8
- package/lib/chevre/repo/reservation.d.ts +1 -1
- package/lib/chevre/repo/reservation.js +5 -5
- package/lib/chevre/repo/role.d.ts +1 -1
- package/lib/chevre/repo/role.js +4 -4
- package/lib/chevre/repo/seller.d.ts +4 -2
- package/lib/chevre/repo/seller.js +19 -17
- package/lib/chevre/repo/sellerPaymentAccepted.d.ts +1 -1
- package/lib/chevre/repo/sellerPaymentAccepted.js +3 -3
- package/lib/chevre/repo/serviceOutput.d.ts +1 -1
- package/lib/chevre/repo/serviceOutput.js +4 -4
- package/lib/chevre/repo/serviceOutputIdentifier.d.ts +1 -1
- package/lib/chevre/repo/serviceOutputIdentifier.js +6 -6
- package/lib/chevre/repo/stockHolder.d.ts +1 -1
- package/lib/chevre/repo/stockHolder.js +21 -21
- package/lib/chevre/repo/task.d.ts +1 -1
- package/lib/chevre/repo/task.js +5 -5
- package/lib/chevre/repo/telemetry.d.ts +1 -1
- package/lib/chevre/repo/telemetry.js +3 -3
- package/lib/chevre/repo/transaction.d.ts +1 -4
- package/lib/chevre/repo/transaction.js +6 -6
- package/lib/chevre/repo/transactionNumber.d.ts +1 -1
- package/lib/chevre/repo/transactionNumber.js +6 -6
- package/lib/chevre/repo/transactionProcess.d.ts +1 -1
- package/lib/chevre/repo/transactionProcess.js +5 -5
- package/lib/chevre/repo/trip.d.ts +1 -1
- package/lib/chevre/repo/trip.js +4 -4
- package/lib/chevre/repository.d.ts +64 -64
- package/lib/chevre/repository.js +65 -65
- package/lib/chevre/service/account.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/deposit.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/transfer.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +2 -2
- package/lib/chevre/service/accountTransaction.d.ts +1 -1
- package/lib/chevre/service/aggregation/event/aggregateOffers.d.ts +10 -10
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +9 -9
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +7 -7
- package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +3 -3
- package/lib/chevre/service/aggregation/event/importFromCOA.d.ts +1 -1
- package/lib/chevre/service/aggregation/project.d.ts +3 -3
- package/lib/chevre/service/aggregation/system.d.ts +6 -6
- package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/moneyTransfer.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/account/validation.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/pay.d.ts +16 -16
- package/lib/chevre/service/assetTransaction/refund.d.ts +5 -5
- package/lib/chevre/service/assetTransaction/registerService.d.ts +8 -8
- package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +6 -6
- package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +5 -5
- package/lib/chevre/service/assetTransaction/reserve/exportTasksById.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.d.ts +5 -5
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +14 -14
- package/lib/chevre/service/assetTransaction.d.ts +2 -2
- package/lib/chevre/service/code.d.ts +2 -2
- package/lib/chevre/service/delivery.d.ts +7 -7
- package/lib/chevre/service/event/createEvent.d.ts +4 -4
- package/lib/chevre/service/event.d.ts +9 -9
- package/lib/chevre/service/iam.d.ts +2 -2
- package/lib/chevre/service/moneyTransfer.d.ts +5 -5
- package/lib/chevre/service/notification.d.ts +2 -2
- package/lib/chevre/service/offer/any.d.ts +4 -4
- package/lib/chevre/service/offer/any.js +2 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +16 -16
- package/lib/chevre/service/offer/event/authorize.d.ts +20 -20
- package/lib/chevre/service/offer/event/importFromCOA.d.ts +3 -3
- package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +7 -7
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +8 -8
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4coa.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +8 -8
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +8 -8
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.d.ts +3 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +8 -8
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
- package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +8 -8
- package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.d.ts +5 -5
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.d.ts +3 -3
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.d.ts +3 -3
- package/lib/chevre/service/offer/onEventChanged.d.ts +3 -3
- package/lib/chevre/service/offer/product/searchProductOffers.d.ts +3 -3
- package/lib/chevre/service/offer/product.d.ts +15 -15
- package/lib/chevre/service/offer/product.js +2 -2
- package/lib/chevre/service/offer.d.ts +4 -4
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +9 -9
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/deleteOrder.d.ts +7 -7
- package/lib/chevre/service/order/findPlaceOrderTransaction.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +5 -5
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.d.ts +2 -2
- package/lib/chevre/service/order/onOrderUpdated.d.ts +1 -1
- package/lib/chevre/service/order/payOrder.d.ts +4 -4
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +3 -3
- package/lib/chevre/service/order/placeOrder/factory.d.ts +10 -1
- package/lib/chevre/service/order/placeOrder/factory.js +58 -5
- package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.js +1 -1
- package/lib/chevre/service/order/placeOrder.d.ts +7 -7
- package/lib/chevre/service/order/placeOrderWithoutTransaction.d.ts +4 -4
- package/lib/chevre/service/order/returnOrder.d.ts +6 -6
- package/lib/chevre/service/order/sendOrder.d.ts +6 -6
- package/lib/chevre/service/payment/any/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +2 -2
- package/lib/chevre/service/payment/any/onPaid.d.ts +3 -3
- package/lib/chevre/service/payment/any/onPaymentStatusChanged/onPaid.d.ts +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged/onRefunded.d.ts +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +2 -2
- package/lib/chevre/service/payment/any/onRefund.d.ts +3 -3
- package/lib/chevre/service/payment/any/person2username.js +1 -1
- package/lib/chevre/service/payment/any.d.ts +18 -18
- package/lib/chevre/service/payment/any.js +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +5 -5
- package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.d.ts +3 -3
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +7 -7
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +7 -7
- package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +5 -5
- package/lib/chevre/service/payment/faceToFace.d.ts +4 -4
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +8 -8
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +6 -6
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +8 -8
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +2 -2
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +4 -4
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +7 -7
- package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +4 -4
- package/lib/chevre/service/payment/paymentCard.d.ts +6 -6
- package/lib/chevre/service/payment.d.ts +16 -16
- package/lib/chevre/service/permit.d.ts +2 -2
- package/lib/chevre/service/product.d.ts +3 -3
- package/lib/chevre/service/project.d.ts +17 -17
- package/lib/chevre/service/report/telemetry.d.ts +4 -4
- package/lib/chevre/service/reserve/cancelReservation.d.ts +6 -6
- package/lib/chevre/service/reserve/checkInReservation.d.ts +5 -5
- package/lib/chevre/service/reserve/confirmReservation.d.ts +5 -5
- package/lib/chevre/service/reserve/findByCode.d.ts +3 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.d.ts +2 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +1 -1
- package/lib/chevre/service/reserve/searchByOrder.d.ts +3 -3
- package/lib/chevre/service/reserve/useReservation.d.ts +5 -5
- package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +2 -2
- package/lib/chevre/service/task/acceptCOAOffer.js +6 -6
- package/lib/chevre/service/task/aggregateOffers.js +10 -10
- package/lib/chevre/service/task/aggregateScreeningEvent.js +9 -9
- package/lib/chevre/service/task/aggregateUseActionsOnEvent.js +7 -7
- package/lib/chevre/service/task/authorizePayment.js +14 -14
- package/lib/chevre/service/task/cancelMoneyTransfer.js +2 -2
- package/lib/chevre/service/task/cancelPendingReservation.js +6 -6
- package/lib/chevre/service/task/cancelReservation.js +6 -6
- package/lib/chevre/service/task/checkMovieTicket.js +6 -6
- package/lib/chevre/service/task/checkResource.js +4 -4
- package/lib/chevre/service/task/confirmMoneyTransfer.js +3 -3
- package/lib/chevre/service/task/confirmPayTransaction.js +9 -9
- package/lib/chevre/service/task/confirmRegisterService.js +3 -3
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.d.ts +3 -3
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +3 -3
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +6 -6
- package/lib/chevre/service/task/confirmReserveTransaction.js +6 -6
- package/lib/chevre/service/task/createAccountingReport.js +4 -4
- package/lib/chevre/service/task/createEvent.js +4 -4
- package/lib/chevre/service/task/deleteTransaction.js +11 -11
- package/lib/chevre/service/task/givePointAward.js +5 -5
- package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +7 -7
- package/lib/chevre/service/task/importOffersFromCOA.js +3 -3
- package/lib/chevre/service/task/moneyTransfer.js +3 -3
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +5 -5
- package/lib/chevre/service/task/onAuthorizationCreated.js +10 -10
- package/lib/chevre/service/task/onEventChanged.js +3 -3
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -4
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated/onCategoryCodeUpdated.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +3 -3
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.d.ts +4 -4
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +18 -18
- package/lib/chevre/service/task/onResourceUpdated/syncCategoryCode.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.d.ts +3 -3
- package/lib/chevre/service/task/onResourceUpdated.js +19 -19
- package/lib/chevre/service/task/pay.js +12 -12
- package/lib/chevre/service/task/placeOrder.js +7 -7
- package/lib/chevre/service/task/publishPaymentUrl.js +8 -8
- package/lib/chevre/service/task/refund.js +10 -10
- package/lib/chevre/service/task/registerService.js +3 -3
- package/lib/chevre/service/task/reserve.js +4 -4
- package/lib/chevre/service/task/returnMoneyTransfer.js +5 -5
- package/lib/chevre/service/task/returnOrder.js +6 -6
- package/lib/chevre/service/task/returnPayTransaction.js +8 -8
- package/lib/chevre/service/task/returnPointAward.js +5 -5
- package/lib/chevre/service/task/returnReserveTransaction.js +5 -5
- package/lib/chevre/service/task/sendEmailMessage.js +2 -2
- package/lib/chevre/service/task/sendOrder.js +6 -6
- package/lib/chevre/service/task/triggerWebhook.js +1 -1
- package/lib/chevre/service/task/useReservation.js +5 -5
- package/lib/chevre/service/task/voidMoneyTransferTransaction.js +3 -3
- package/lib/chevre/service/task/voidPayTransaction.js +8 -8
- package/lib/chevre/service/task/voidPayment.js +8 -8
- package/lib/chevre/service/task/voidRegisterServiceTransaction.js +3 -3
- package/lib/chevre/service/task/voidReserveTransaction.js +9 -9
- package/lib/chevre/service/task.d.ts +1 -1
- package/lib/chevre/service/task.js +3 -3
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +11 -11
- package/lib/chevre/service/transaction/moneyTransfer.d.ts +10 -10
- package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.d.ts +11 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.js +32 -0
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/potentialActions/sendEmailMessage.d.ts +1 -1
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/potentialActions/sendEmailMessage.js +2 -2
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/potentialActions.d.ts +1 -1
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/publishCode.d.ts +2 -2
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/publishCode.js +1 -1
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/validation/validateMovieTicket.js +2 -2
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/validation.d.ts +2 -2
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/validation.js +2 -2
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/confirm.d.ts +8 -8
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/confirm.js +18 -25
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.d.ts +17 -0
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +39 -0
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/publishConfirmationNumberIfNotExist.d.ts +1 -1
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/publishOrderNumberIfNotExist.d.ts +3 -3
- package/lib/chevre/service/transaction/{placeOrderInProgress/validation → placeOrder/start}/validateStartRequest.d.ts +3 -3
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/start.d.ts +4 -4
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/start.js +4 -2
- package/lib/chevre/service/transaction/placeOrder.d.ts +8 -14
- package/lib/chevre/service/transaction/placeOrder.js +13 -37
- package/lib/chevre/service/transaction/returnOrder/preStart.d.ts +9 -9
- package/lib/chevre/service/transaction/returnOrder.d.ts +12 -12
- package/lib/chevre/service/transaction.d.ts +5 -11
- package/lib/chevre/service/transaction.js +13 -7
- package/lib/chevre/service/validation/validateOrder.d.ts +3 -3
- package/lib/chevre/service/validation/validateOrder.js +1 -1
- package/package.json +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +0 -24
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +0 -120
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +0 -9
- package/lib/chevre/service/transaction/placeOrderInProgress.js +0 -16
- /package/lib/chevre/repo/{code.d.ts → authorization.d.ts} +0 -0
- /package/lib/chevre/repo/{code.js → authorization.js} +0 -0
- /package/lib/chevre/service/{transaction/placeOrderInProgress/result → order/placeOrder/factory}/orderedItem.d.ts +0 -0
- /package/lib/chevre/service/{transaction/placeOrderInProgress/result → order/placeOrder/factory}/orderedItem.js +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder/confirm}/potentialActions.js +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/publishConfirmationNumberIfNotExist.js +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/publishOrderNumberIfNotExist.js +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/start/factory.d.ts +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/start/factory.js +0 -0
- /package/lib/chevre/service/transaction/{placeOrderInProgress/validation → placeOrder/start}/validateStartRequest.js +0 -0
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.StockHolderRepo = void 0;
|
|
13
13
|
const createDebug = require("debug");
|
|
14
14
|
const moment = require("moment");
|
|
15
15
|
const factory = require("../factory");
|
|
@@ -17,7 +17,7 @@ const debug = createDebug('chevre-domain:repo:stockHolder');
|
|
|
17
17
|
/**
|
|
18
18
|
* イベントストックホルダーリポジトリ
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class StockHolderRepo {
|
|
21
21
|
constructor(redisClient, __) {
|
|
22
22
|
this.redisClient = redisClient;
|
|
23
23
|
}
|
|
@@ -41,7 +41,7 @@ class StockHolderRepository {
|
|
|
41
41
|
if (!(params.startDate instanceof Date)) {
|
|
42
42
|
throw new factory.errors.Argument('startDate', 'must be Date');
|
|
43
43
|
}
|
|
44
|
-
return `${
|
|
44
|
+
return `${StockHolderRepo.KEY_PREFIX_NEW}:${params.eventId}`;
|
|
45
45
|
// const useNewKey: boolean = moment(params.startDate)
|
|
46
46
|
// .isSameOrAfter(USE_NEW_EVENT_AVAILABILITY_KEY_FROM);
|
|
47
47
|
// if (useNewKey) {
|
|
@@ -64,7 +64,7 @@ class StockHolderRepository {
|
|
|
64
64
|
*/
|
|
65
65
|
lockIfNotLimitExceeded(lockKey, maximum) {
|
|
66
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const useMongoose =
|
|
67
|
+
const useMongoose = StockHolderRepo.useMongoose({
|
|
68
68
|
eventId: lockKey.eventId,
|
|
69
69
|
startDate: lockKey.startDate,
|
|
70
70
|
hasTicketedSeat: lockKey.hasTicketedSeat
|
|
@@ -73,7 +73,7 @@ class StockHolderRepository {
|
|
|
73
73
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
|
-
const key =
|
|
76
|
+
const key = StockHolderRepo.createKey({ eventId: lockKey.eventId, startDate: lockKey.startDate });
|
|
77
77
|
yield this.redisClient.watch(key);
|
|
78
78
|
const hashCount = yield this.redisClient.hLen(key);
|
|
79
79
|
// Process result
|
|
@@ -95,12 +95,12 @@ class StockHolderRepository {
|
|
|
95
95
|
if (!(lockKey.expires instanceof Date)) {
|
|
96
96
|
throw new factory.errors.Argument('expires', 'must be Date');
|
|
97
97
|
}
|
|
98
|
-
const useMongoose =
|
|
98
|
+
const useMongoose = StockHolderRepo.useMongoose({
|
|
99
99
|
eventId: lockKey.eventId,
|
|
100
100
|
startDate: lockKey.startDate,
|
|
101
101
|
hasTicketedSeat: lockKey.hasTicketedSeat
|
|
102
102
|
});
|
|
103
|
-
const key =
|
|
103
|
+
const key = StockHolderRepo.createKey({ eventId: lockKey.eventId, startDate: lockKey.startDate });
|
|
104
104
|
// await this.checkIfConflicted({ key, eventId: lockKey.eventId, useMongoose });
|
|
105
105
|
if (useMongoose) {
|
|
106
106
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
@@ -108,7 +108,7 @@ class StockHolderRepository {
|
|
|
108
108
|
else {
|
|
109
109
|
const value = lockKey.holder;
|
|
110
110
|
const multi = this.redisClient.multi();
|
|
111
|
-
const fields = lockKey.offers.map((offer) =>
|
|
111
|
+
const fields = lockKey.offers.map((offer) => StockHolderRepo.offer2field(offer, lockKey.hasTicketedSeat));
|
|
112
112
|
fields.forEach((field) => {
|
|
113
113
|
multi.hSetNX(key, field, value);
|
|
114
114
|
});
|
|
@@ -152,18 +152,18 @@ class StockHolderRepository {
|
|
|
152
152
|
*/
|
|
153
153
|
unlock(params) {
|
|
154
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
-
const useMongoose =
|
|
155
|
+
const useMongoose = StockHolderRepo.useMongoose({
|
|
156
156
|
eventId: params.eventId,
|
|
157
157
|
startDate: params.startDate,
|
|
158
158
|
hasTicketedSeat: params.hasTicketedSeat
|
|
159
159
|
});
|
|
160
|
-
const key =
|
|
160
|
+
const key = StockHolderRepo.createKey({ eventId: params.eventId, startDate: params.startDate });
|
|
161
161
|
// await this.checkIfConflicted({ key, eventId: params.eventId, useMongoose });
|
|
162
162
|
if (useMongoose) {
|
|
163
163
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
|
-
const field =
|
|
166
|
+
const field = StockHolderRepo.offer2field(params.offer, params.hasTicketedSeat);
|
|
167
167
|
yield this.redisClient.multi()
|
|
168
168
|
.hDel(key, field)
|
|
169
169
|
.exec();
|
|
@@ -175,7 +175,7 @@ class StockHolderRepository {
|
|
|
175
175
|
*/
|
|
176
176
|
countUnavailableOffers(params) {
|
|
177
177
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
if (
|
|
178
|
+
if (StockHolderRepo.useMongoose({
|
|
179
179
|
eventId: params.event.id,
|
|
180
180
|
startDate: params.event.startDate,
|
|
181
181
|
hasTicketedSeat: params.event.hasTicketedSeat
|
|
@@ -183,7 +183,7 @@ class StockHolderRepository {
|
|
|
183
183
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
|
-
const key =
|
|
186
|
+
const key = StockHolderRepo.createKey({ eventId: params.event.id, startDate: params.event.startDate });
|
|
187
187
|
const reply = yield this.redisClient.hLen(key);
|
|
188
188
|
let fieldCount = 0;
|
|
189
189
|
if (typeof reply === 'number') {
|
|
@@ -198,7 +198,7 @@ class StockHolderRepository {
|
|
|
198
198
|
*/
|
|
199
199
|
getHolder(params) {
|
|
200
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
if (
|
|
201
|
+
if (StockHolderRepo.useMongoose({
|
|
202
202
|
eventId: params.eventId,
|
|
203
203
|
startDate: params.startDate,
|
|
204
204
|
hasTicketedSeat: params.hasTicketedSeat
|
|
@@ -206,15 +206,15 @@ class StockHolderRepository {
|
|
|
206
206
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
209
|
-
const key =
|
|
210
|
-
const field =
|
|
209
|
+
const key = StockHolderRepo.createKey({ eventId: params.eventId, startDate: params.startDate });
|
|
210
|
+
const field = StockHolderRepo.offer2field(params.offer, params.hasTicketedSeat);
|
|
211
211
|
return this.redisClient.hGet(key, field);
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
searchHolders(params) {
|
|
216
216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
-
if (
|
|
217
|
+
if (StockHolderRepo.useMongoose({
|
|
218
218
|
eventId: params.eventId,
|
|
219
219
|
startDate: params.startDate,
|
|
220
220
|
hasTicketedSeat: params.hasTicketedSeat
|
|
@@ -222,9 +222,9 @@ class StockHolderRepository {
|
|
|
222
222
|
throw new factory.errors.NotImplemented('new stock holder repository not implemented');
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
|
-
const key =
|
|
225
|
+
const key = StockHolderRepo.createKey({ eventId: params.eventId, startDate: params.startDate });
|
|
226
226
|
const fields = params.offers.map((o) => {
|
|
227
|
-
return
|
|
227
|
+
return StockHolderRepo.offer2field(o, params.hasTicketedSeat);
|
|
228
228
|
});
|
|
229
229
|
// Array reply: list of values associated with the given fields, in the same order as they are requested.
|
|
230
230
|
const result = yield this.redisClient.hmGet(key, fields);
|
|
@@ -237,5 +237,5 @@ class StockHolderRepository {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
exports.
|
|
240
|
+
StockHolderRepo.KEY_PREFIX_NEW = 'stockHolder';
|
|
241
|
+
exports.StockHolderRepo = StockHolderRepo;
|
|
@@ -54,7 +54,7 @@ type IProjection = {
|
|
|
54
54
|
/**
|
|
55
55
|
* タスクリポジトリ
|
|
56
56
|
*/
|
|
57
|
-
export declare class
|
|
57
|
+
export declare class TaskRepo {
|
|
58
58
|
readonly taskModel: typeof Model;
|
|
59
59
|
constructor(connection: Connection);
|
|
60
60
|
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): any[];
|
package/lib/chevre/repo/task.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.TaskRepo = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
14
|
const factory = require("../factory");
|
|
15
15
|
const task_1 = require("./mongoose/schemas/task");
|
|
@@ -25,7 +25,7 @@ const sortOrder4executionOfTasks = {
|
|
|
25
25
|
/**
|
|
26
26
|
* タスクリポジトリ
|
|
27
27
|
*/
|
|
28
|
-
class
|
|
28
|
+
class TaskRepo {
|
|
29
29
|
constructor(connection) {
|
|
30
30
|
this.taskModel = connection.model(task_1.modelName, (0, task_1.createSchema)());
|
|
31
31
|
}
|
|
@@ -620,7 +620,7 @@ class MongoRepository {
|
|
|
620
620
|
}
|
|
621
621
|
count(params) {
|
|
622
622
|
return __awaiter(this, void 0, void 0, function* () {
|
|
623
|
-
const conditions =
|
|
623
|
+
const conditions = TaskRepo.CREATE_MONGO_CONDITIONS(params);
|
|
624
624
|
return this.taskModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
625
625
|
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
626
626
|
.exec();
|
|
@@ -632,7 +632,7 @@ class MongoRepository {
|
|
|
632
632
|
search(params, projection) {
|
|
633
633
|
var _a;
|
|
634
634
|
return __awaiter(this, void 0, void 0, function* () {
|
|
635
|
-
const conditions =
|
|
635
|
+
const conditions = TaskRepo.CREATE_MONGO_CONDITIONS(params);
|
|
636
636
|
const positiveProjectionExists = (projection !== undefined && projection !== null)
|
|
637
637
|
? Object.values(projection)
|
|
638
638
|
.some((value) => value !== 0)
|
|
@@ -827,4 +827,4 @@ class MongoRepository {
|
|
|
827
827
|
});
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
exports.
|
|
830
|
+
exports.TaskRepo = TaskRepo;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TelemetryRepo = void 0;
|
|
4
4
|
const telemetry_1 = require("./mongoose/schemas/telemetry");
|
|
5
5
|
/**
|
|
6
6
|
* 測定リポジトリ
|
|
7
7
|
*/
|
|
8
|
-
class
|
|
8
|
+
class TelemetryRepo {
|
|
9
9
|
constructor(connection) {
|
|
10
10
|
this.telemetryModel = connection.model(telemetry_1.modelName, (0, telemetry_1.createSchema)());
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
exports.
|
|
13
|
+
exports.TelemetryRepo = TelemetryRepo;
|
|
@@ -55,7 +55,7 @@ export type IStartedTransaction = Pick<factory.transaction.ITransaction<factory.
|
|
|
55
55
|
/**
|
|
56
56
|
* 取引リポジトリ
|
|
57
57
|
*/
|
|
58
|
-
export declare class
|
|
58
|
+
export declare class TransactionRepo {
|
|
59
59
|
private readonly transactionModel;
|
|
60
60
|
constructor(connection: Connection);
|
|
61
61
|
static CREATE_MONGO_CONDITIONS(params: factory.transaction.ISearchConditions<factory.transactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction | import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction>[];
|
|
@@ -141,9 +141,6 @@ export declare class MongoRepository {
|
|
|
141
141
|
* タスク未エクスポートの取引をひとつ取得してエクスポートを開始する
|
|
142
142
|
*/
|
|
143
143
|
startExportTasks<T extends factory.transactionType>(params: {
|
|
144
|
-
project?: {
|
|
145
|
-
id: string;
|
|
146
|
-
};
|
|
147
144
|
typeOf?: {
|
|
148
145
|
$in: T[];
|
|
149
146
|
};
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.TransactionRepo = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
14
|
const transaction_1 = require("../eventEmitter/transaction");
|
|
15
15
|
const factory = require("../factory");
|
|
@@ -18,7 +18,7 @@ const transaction_2 = require("./mongoose/schemas/transaction");
|
|
|
18
18
|
/**
|
|
19
19
|
* 取引リポジトリ
|
|
20
20
|
*/
|
|
21
|
-
class
|
|
21
|
+
class TransactionRepo {
|
|
22
22
|
constructor(connection) {
|
|
23
23
|
this.transactionModel = connection.model(transaction_2.modelName, (0, transaction_2.createSchema)());
|
|
24
24
|
}
|
|
@@ -518,7 +518,7 @@ class MongoRepository {
|
|
|
518
518
|
// no op
|
|
519
519
|
}
|
|
520
520
|
const typeOfIn = (_a = params.typeOf) === null || _a === void 0 ? void 0 : _a.$in;
|
|
521
|
-
return this.transactionModel.findOneAndUpdate(Object.assign(Object.assign(Object.assign(
|
|
521
|
+
return this.transactionModel.findOneAndUpdate(Object.assign(Object.assign(Object.assign({}, (Array.isArray(typeOfIn)) ? { typeOf: { $in: typeOfIn } } : undefined), { status: { $eq: params.status },
|
|
522
522
|
// remove dependency on tasksExportationStatus(2024-06-17~)
|
|
523
523
|
// tasksExportationStatus: { $eq: factory.transactionTasksExportationStatus.Unexported },
|
|
524
524
|
'tasksExportAction.actionStatus': {
|
|
@@ -723,7 +723,7 @@ class MongoRepository {
|
|
|
723
723
|
}
|
|
724
724
|
count(params) {
|
|
725
725
|
return __awaiter(this, void 0, void 0, function* () {
|
|
726
|
-
const conditions =
|
|
726
|
+
const conditions = TransactionRepo.CREATE_MONGO_CONDITIONS(params);
|
|
727
727
|
return this.transactionModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
728
728
|
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
729
729
|
.exec();
|
|
@@ -735,7 +735,7 @@ class MongoRepository {
|
|
|
735
735
|
search(params) {
|
|
736
736
|
var _a;
|
|
737
737
|
return __awaiter(this, void 0, void 0, function* () {
|
|
738
|
-
const conditions =
|
|
738
|
+
const conditions = TransactionRepo.CREATE_MONGO_CONDITIONS(params);
|
|
739
739
|
let projection = {};
|
|
740
740
|
if (Array.isArray(params.inclusion) && params.inclusion.length > 0) {
|
|
741
741
|
params.inclusion.forEach((field) => {
|
|
@@ -1027,4 +1027,4 @@ class MongoRepository {
|
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
exports.
|
|
1030
|
+
exports.TransactionRepo = TransactionRepo;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.TransactionNumberRepo = void 0;
|
|
13
13
|
const cdigit = require("cdigit");
|
|
14
14
|
const moment = require("moment-timezone");
|
|
15
15
|
const util = require("util");
|
|
@@ -19,12 +19,12 @@ const factory = require("../factory");
|
|
|
19
19
|
/**
|
|
20
20
|
* 取引番号リポジトリ
|
|
21
21
|
*/
|
|
22
|
-
class
|
|
22
|
+
class TransactionNumberRepo {
|
|
23
23
|
constructor(redisClient) {
|
|
24
24
|
this.redisClient = redisClient;
|
|
25
25
|
}
|
|
26
26
|
static createKey(params) {
|
|
27
|
-
return util.format('%s:%s',
|
|
27
|
+
return util.format('%s:%s', TransactionNumberRepo.REDIS_KEY_PREFIX, params.timestamp);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* タイムスタンプから発行する
|
|
@@ -38,7 +38,7 @@ class RedisRepository {
|
|
|
38
38
|
const TTL = moment(params.startDate)
|
|
39
39
|
.add(1, 'minute') // ミリ秒でカウントしていくので、予約日時後1分で十分
|
|
40
40
|
.diff(now, 'seconds');
|
|
41
|
-
const key =
|
|
41
|
+
const key = TransactionNumberRepo.createKey({ startDate: params.startDate, timestamp });
|
|
42
42
|
const [incrReply] = yield this.redisClient.multi()
|
|
43
43
|
.incr(key)
|
|
44
44
|
.expire(key, TTL)
|
|
@@ -59,5 +59,5 @@ class RedisRepository {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
exports.
|
|
62
|
+
TransactionNumberRepo.REDIS_KEY_PREFIX = 'transactionNumber';
|
|
63
|
+
exports.TransactionNumberRepo = TransactionNumberRepo;
|
|
@@ -13,7 +13,7 @@ interface IOptions {
|
|
|
13
13
|
/**
|
|
14
14
|
* 取引プロセスリポジトリ
|
|
15
15
|
*/
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class TransactionProcessRepo {
|
|
17
17
|
private readonly options;
|
|
18
18
|
private readonly redisClient;
|
|
19
19
|
constructor(redisClient: RedisClientType, options: IOptions);
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.TransactionProcessRepo = void 0;
|
|
13
13
|
const createDebug = require("debug");
|
|
14
14
|
const factory = require("../factory");
|
|
15
15
|
const debug = createDebug('chevre-domain:repo:transactionProcess');
|
|
@@ -17,7 +17,7 @@ const DEFAULT_LOCK_EXPIRES = 120;
|
|
|
17
17
|
/**
|
|
18
18
|
* 取引プロセスリポジトリ
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class TransactionProcessRepo {
|
|
21
21
|
constructor(redisClient, options) {
|
|
22
22
|
this.redisClient = redisClient;
|
|
23
23
|
this.options = options;
|
|
@@ -29,7 +29,7 @@ class TransactionProcessRepository {
|
|
|
29
29
|
}
|
|
30
30
|
lock(params) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const key =
|
|
32
|
+
const key = TransactionProcessRepo.CREATE_REDIS_KEY(params);
|
|
33
33
|
// const ttl = TRANSACTION_RROCESS_LOCK_EXPIRES;
|
|
34
34
|
const ttl = (typeof this.options.lockExpiresInSeconds === 'number') ? this.options.lockExpiresInSeconds : DEFAULT_LOCK_EXPIRES;
|
|
35
35
|
const results = yield this.redisClient.multi()
|
|
@@ -47,9 +47,9 @@ class TransactionProcessRepository {
|
|
|
47
47
|
}
|
|
48
48
|
unlock(params) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const key =
|
|
50
|
+
const key = TransactionProcessRepo.CREATE_REDIS_KEY(params);
|
|
51
51
|
yield this.redisClient.del([key]);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
exports.
|
|
55
|
+
exports.TransactionProcessRepo = TransactionProcessRepo;
|
|
@@ -7,7 +7,7 @@ export interface IAttributes4patchUpdate<T extends factory.tripType> {
|
|
|
7
7
|
/**
|
|
8
8
|
* トリップリポジトリ
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class TripRepo {
|
|
11
11
|
private readonly tripModel;
|
|
12
12
|
constructor(connection: Connection);
|
|
13
13
|
static CREATE_MONGO_CONDITIONS<T extends factory.tripType>(conditions: ISearchConditions<T>): any[];
|
package/lib/chevre/repo/trip.js
CHANGED
|
@@ -20,14 +20,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
23
|
+
exports.TripRepo = void 0;
|
|
24
24
|
const factory = require("../factory");
|
|
25
25
|
const trip_1 = require("./mongoose/schemas/trip");
|
|
26
26
|
const settings_1 = require("../settings");
|
|
27
27
|
/**
|
|
28
28
|
* トリップリポジトリ
|
|
29
29
|
*/
|
|
30
|
-
class
|
|
30
|
+
class TripRepo {
|
|
31
31
|
constructor(connection) {
|
|
32
32
|
this.tripModel = connection.model(trip_1.modelName, (0, trip_1.createSchema)());
|
|
33
33
|
}
|
|
@@ -174,7 +174,7 @@ class MongoRepository {
|
|
|
174
174
|
}
|
|
175
175
|
search(params, projection) {
|
|
176
176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
const conditions =
|
|
177
|
+
const conditions = TripRepo.CREATE_MONGO_CONDITIONS(params);
|
|
178
178
|
const query = this.tripModel.find({ $and: conditions }, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection));
|
|
179
179
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
180
180
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
@@ -226,4 +226,4 @@ class MongoRepository {
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
exports.
|
|
229
|
+
exports.TripRepo = TripRepo;
|
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* リポジトリ
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
4
|
+
import type { AcceptedOfferRepo } from './repo/acceptedOffer';
|
|
5
|
+
import type { AccountRepo } from './repo/account';
|
|
6
|
+
import type { AccountingReportRepo } from './repo/accountingReport';
|
|
7
|
+
import type { AccountTitleRepo } from './repo/accountTitle';
|
|
8
|
+
import type { AccountTransactionRepo } from './repo/accountTransaction';
|
|
9
|
+
import type { ActionRepo } from './repo/action';
|
|
10
|
+
import type { AdditionalPropertyRepo } from './repo/additionalProperty';
|
|
11
|
+
import type { AggregateOfferRepo } from './repo/aggregateOffer';
|
|
12
|
+
import type { AggregateReservationRepo } from './repo/aggregateReservation';
|
|
13
13
|
import type { AggregationRepo } from './repo/aggregation';
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
20
|
-
import type {
|
|
21
|
-
import type {
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
14
|
+
import type { AssetTransactionRepo } from './repo/assetTransaction';
|
|
15
|
+
import type { AuthorizationRepo } from './repo/authorization';
|
|
16
|
+
import type { CategoryCodeRepo } from './repo/categoryCode';
|
|
17
|
+
import type { CommentRepo } from './repo/comment';
|
|
18
|
+
import type { CreativeWorkRepo } from './repo/creativeWork';
|
|
19
|
+
import type { CustomerRepo } from './repo/customer';
|
|
20
|
+
import type { CustomerTypeRepo } from './repo/customerType';
|
|
21
|
+
import type { EmailMessageRepo } from './repo/emailMessage';
|
|
22
|
+
import type { EventRepo } from './repo/event';
|
|
23
|
+
import type { MemberRepo } from './repo/member';
|
|
24
|
+
import type { MerchantReturnPolicyRepo } from './repo/merchantReturnPolicy';
|
|
25
25
|
import type { MessageRepo } from './repo/message';
|
|
26
|
-
import type {
|
|
27
|
-
import type {
|
|
28
|
-
import type {
|
|
29
|
-
import type {
|
|
30
|
-
import type {
|
|
31
|
-
import type {
|
|
32
|
-
import type {
|
|
33
|
-
import type {
|
|
26
|
+
import type { NoteRepo } from './repo/note';
|
|
27
|
+
import type { OfferRepo } from './repo/offer';
|
|
28
|
+
import type { OfferCatalogRepo } from './repo/offerCatalog';
|
|
29
|
+
import type { OfferCatalogItemRepo } from './repo/offerCatalogItem';
|
|
30
|
+
import type { OfferItemConditionRepo } from './repo/offerItemCondition';
|
|
31
|
+
import type { OrderRepo } from './repo/order';
|
|
32
|
+
import type { OrderInTransactionRepo } from './repo/orderInTransaction';
|
|
33
|
+
import type { OwnershipInfoRepo } from './repo/ownershipInfo';
|
|
34
34
|
import type { PassportRepo } from './repo/passport';
|
|
35
|
-
import type {
|
|
36
|
-
import type {
|
|
37
|
-
import type {
|
|
38
|
-
import type {
|
|
39
|
-
import type {
|
|
40
|
-
import type {
|
|
41
|
-
import type {
|
|
42
|
-
import type {
|
|
43
|
-
import type {
|
|
44
|
-
import type {
|
|
45
|
-
import type {
|
|
46
|
-
import type {
|
|
47
|
-
import type {
|
|
48
|
-
import type {
|
|
49
|
-
import type {
|
|
50
|
-
import type {
|
|
51
|
-
import type {
|
|
52
|
-
import type {
|
|
53
|
-
import type {
|
|
54
|
-
import type {
|
|
55
|
-
import type {
|
|
56
|
-
import type {
|
|
57
|
-
import type {
|
|
58
|
-
import type {
|
|
59
|
-
import type {
|
|
35
|
+
import type { PaymentServiceRepo } from './repo/paymentService';
|
|
36
|
+
import type { PaymentServiceProviderRepo } from './repo/paymentServiceProvider';
|
|
37
|
+
import type { PermitRepo } from './repo/permit';
|
|
38
|
+
import type { BusStopRepo } from './repo/place/busStop';
|
|
39
|
+
import type { HasPOSRepo } from './repo/place/hasPOS';
|
|
40
|
+
import type { MovieTheaterRepo } from './repo/place/movieTheater';
|
|
41
|
+
import type { ScreeningRoomRepo } from './repo/place/screeningRoom';
|
|
42
|
+
import type { SeatRepo } from './repo/place/seat';
|
|
43
|
+
import type { SectionRepo } from './repo/place/section';
|
|
44
|
+
import type { PriceSpecificationRepo } from './repo/priceSpecification';
|
|
45
|
+
import type { ProductRepo } from './repo/product';
|
|
46
|
+
import type { ProductModelRepo } from './repo/productModel';
|
|
47
|
+
import type { ProductOfferRepo } from './repo/productOffer';
|
|
48
|
+
import type { ProjectRepo } from './repo/project';
|
|
49
|
+
import type { ProjectMakesOfferRepo } from './repo/projectMakesOffer';
|
|
50
|
+
import type { OfferRateLimitRepo } from './repo/rateLimit/offer';
|
|
51
|
+
import type { ReservationRepo } from './repo/reservation';
|
|
52
|
+
import type { RoleRepo } from './repo/role';
|
|
53
|
+
import type { SellerRepo } from './repo/seller';
|
|
54
|
+
import type { SellerPaymentAcceptedRepo } from './repo/sellerPaymentAccepted';
|
|
55
|
+
import type { ServiceOutputRepo } from './repo/serviceOutput';
|
|
56
|
+
import type { ServiceOutputIdentifierRepo } from './repo/serviceOutputIdentifier';
|
|
57
|
+
import type { StockHolderRepo } from './repo/stockHolder';
|
|
58
|
+
import type { TaskRepo } from './repo/task';
|
|
59
|
+
import type { TelemetryRepo } from './repo/telemetry';
|
|
60
60
|
import type { TicketRepo } from './repo/ticket';
|
|
61
|
-
import type {
|
|
62
|
-
import type {
|
|
63
|
-
import type {
|
|
64
|
-
import type {
|
|
61
|
+
import type { TransactionRepo } from './repo/transaction';
|
|
62
|
+
import type { TransactionNumberRepo } from './repo/transactionNumber';
|
|
63
|
+
import type { TransactionProcessRepo } from './repo/transactionProcess';
|
|
64
|
+
import type { TripRepo } from './repo/trip';
|
|
65
65
|
import type { ConfirmationNumberRepo } from './repo/confirmationNumber';
|
|
66
|
-
import type {
|
|
67
|
-
import type {
|
|
68
|
-
import type {
|
|
66
|
+
import type { OrderNumberRepo } from './repo/orderNumber';
|
|
67
|
+
import type { CreditCardRepo } from './repo/paymentMethod/creditCard';
|
|
68
|
+
import type { PersonRepo } from './repo/person';
|
|
69
69
|
export type AcceptedOffer = AcceptedOfferRepo;
|
|
70
70
|
export declare namespace AcceptedOffer {
|
|
71
71
|
function createInstance(...params: ConstructorParameters<typeof AcceptedOfferRepo>): Promise<AcceptedOfferRepo>;
|
|
@@ -114,8 +114,8 @@ export type CategoryCode = CategoryCodeRepo;
|
|
|
114
114
|
export declare namespace CategoryCode {
|
|
115
115
|
function createInstance(...params: ConstructorParameters<typeof CategoryCodeRepo>): Promise<CategoryCodeRepo>;
|
|
116
116
|
}
|
|
117
|
-
export type
|
|
118
|
-
export declare namespace
|
|
117
|
+
export type Authorization = AuthorizationRepo;
|
|
118
|
+
export declare namespace Authorization {
|
|
119
119
|
function createInstance(...params: ConstructorParameters<typeof AuthorizationRepo>): Promise<AuthorizationRepo>;
|
|
120
120
|
}
|
|
121
121
|
export type Comment = CommentRepo;
|
|
@@ -339,9 +339,9 @@ export type TransactionNumber = TransactionNumberRepo;
|
|
|
339
339
|
export declare namespace TransactionNumber {
|
|
340
340
|
function createInstance(...params: ConstructorParameters<typeof TransactionNumberRepo>): Promise<TransactionNumberRepo>;
|
|
341
341
|
}
|
|
342
|
-
export type TransactionProcess =
|
|
342
|
+
export type TransactionProcess = TransactionProcessRepo;
|
|
343
343
|
export declare namespace TransactionProcess {
|
|
344
|
-
function createInstance(...params: ConstructorParameters<typeof
|
|
344
|
+
function createInstance(...params: ConstructorParameters<typeof TransactionProcessRepo>): Promise<TransactionProcessRepo>;
|
|
345
345
|
}
|
|
346
346
|
export type Trip = TripRepo;
|
|
347
347
|
export declare namespace Trip {
|