@chevre/domain 21.37.0-alpha.9 → 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/processOrder.ts +87 -0
- package/example/src/chevre/transaction/processPlaceOrder.ts +23 -143
- package/lib/chevre/factory/reservedAgentIdentifireNames.js +2 -1
- package/lib/chevre/factory/transaction.d.ts +1 -4
- 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 +46 -0
- package/lib/chevre/repo/passport.js +137 -0
- 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 +10 -1
- package/lib/chevre/repo/task.js +28 -7
- 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 +69 -64
- package/lib/chevre/repository.js +79 -66
- package/lib/chevre/service/account.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/deposit.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/deposit.js +0 -1
- package/lib/chevre/service/accountTransaction/transfer.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/transfer.js +0 -1
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +2 -2
- package/lib/chevre/service/accountTransaction/withdraw.js +0 -1
- 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/createSubReservations.js +6 -3
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.d.ts +3 -0
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +5 -6
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +15 -14
- package/lib/chevre/service/assetTransaction/reserve/start.js +29 -26
- 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/{defaultOffer.d.ts → authorize/defaultOffer.d.ts} +1 -1
- package/lib/chevre/service/offer/event/{defaultOffer.js → authorize/defaultOffer.js} +1 -1
- package/lib/chevre/service/offer/event/{factory.d.ts → authorize/factory.d.ts} +13 -20
- package/lib/chevre/service/offer/event/{factory.js → authorize/factory.js} +72 -146
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +54 -0
- package/lib/chevre/service/offer/event/{processStartReserve4chevre.js → authorize/processStartReserve4chevre.js} +8 -13
- package/lib/chevre/service/offer/event/authorize.d.ts +21 -21
- package/lib/chevre/service/offer/event/authorize.js +60 -95
- package/lib/chevre/service/offer/event/importFromCOA/factory.d.ts +9 -0
- package/lib/chevre/service/offer/event/importFromCOA/factory.js +67 -0
- package/lib/chevre/service/offer/event/importFromCOA.d.ts +3 -3
- package/lib/chevre/service/offer/event/importFromCOA.js +1 -1
- 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/authorize.js +0 -3
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +3 -3
- 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/factory.d.ts +4 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +16 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +168 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +5 -6
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -135
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged.js +2 -1
- 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/order.d.ts +2 -2
- package/lib/chevre/service/order.js +2 -1
- 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 +13 -12
- package/lib/chevre/service/transaction/moneyTransfer.js +1 -2
- 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/placeOrder/start/factory.d.ts +10 -0
- package/lib/chevre/service/transaction/placeOrder/start/factory.js +36 -0
- package/lib/chevre/service/transaction/{placeOrderInProgress/validation → placeOrder/start}/validateStartRequest.d.ts +3 -3
- package/lib/chevre/service/transaction/placeOrder/start.d.ts +23 -0
- package/lib/chevre/service/transaction/{placeOrderInProgress → placeOrder}/start.js +29 -13
- 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 +2 -2
- package/lib/chevre/settings.d.ts +1 -0
- package/lib/chevre/settings.js +5 -1
- package/package.json +3 -3
- package/example/src/chevre/migrateAuthorizeEventServiceOfferResult.ts +0 -163
- package/lib/chevre/service/offer/event/processStartReserve4chevre.d.ts +0 -54
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.d.ts +0 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +0 -29
- 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/start.d.ts +0 -18
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +0 -9
- package/lib/chevre/service/transaction/placeOrderInProgress.js +0 -16
- package/lib/chevre/service/transaction/validation.d.ts +0 -14
- package/lib/chevre/service/transaction/validation.js +0 -101
- /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/validation → placeOrder/start}/validateStartRequest.js +0 -0
|
@@ -16,7 +16,7 @@ const RESERVATION_ID = '589701779538948-0';
|
|
|
16
16
|
async function main() {
|
|
17
17
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
18
18
|
|
|
19
|
-
const authorizationRepo = await chevre.repository.
|
|
19
|
+
const authorizationRepo = await chevre.repository.Authorization.createInstance(mongoose.connection);
|
|
20
20
|
const orderRepo = await chevre.repository.Order.createInstance(mongoose.connection);
|
|
21
21
|
const reservationRepo = await chevre.repository.Reservation.createInstance(mongoose.connection);
|
|
22
22
|
const ticketRepo = await chevre.repository.Ticket.createInstance(mongoose.connection);
|
|
@@ -10,7 +10,7 @@ const CODE = '85de7dc1-3761-4317-80d6-b36bf0b2788f';
|
|
|
10
10
|
async function main() {
|
|
11
11
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
12
12
|
|
|
13
|
-
const authorizationRepo = await chevre.repository.
|
|
13
|
+
const authorizationRepo = await chevre.repository.Authorization.createInstance(mongoose.connection);
|
|
14
14
|
const ticketRepo = await chevre.repository.Ticket.createInstance(mongoose.connection);
|
|
15
15
|
|
|
16
16
|
const result = await authorizationRepo.findValidOneByCode({
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
11
|
+
|
|
12
|
+
const acceptedOfferRepo = await chevre.repository.AcceptedOffer.createInstance(mongoose.connection);
|
|
13
|
+
const orderRepo = await chevre.repository.Order.createInstance(mongoose.connection);
|
|
14
|
+
const taskRepo = await chevre.repository.Task.createInstance(mongoose.connection);
|
|
15
|
+
|
|
16
|
+
const cursor = orderRepo.getCursor(
|
|
17
|
+
{
|
|
18
|
+
'project.id': { $eq: project.id },
|
|
19
|
+
// orderNumber: { $eq: 'SSK9-4896645-5698154' },
|
|
20
|
+
orderDate: {
|
|
21
|
+
$lte: moment('2024-07-03T18:00:00Z')
|
|
22
|
+
.toDate(),
|
|
23
|
+
$gte: moment('2024-06-30T18:00:00Z')
|
|
24
|
+
.toDate()
|
|
25
|
+
},
|
|
26
|
+
orderStatus: { $eq: chevre.factory.orderStatus.OrderProcessing }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
confirmationNumber: 1,
|
|
30
|
+
orderDate: 1, orderNumber: 1,
|
|
31
|
+
project: 1, typeOf: 1, orderStatus: 1
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
console.log('orders found');
|
|
35
|
+
|
|
36
|
+
let i = 0;
|
|
37
|
+
let updateCount = 0;
|
|
38
|
+
await cursor.eachAsync(async (doc) => {
|
|
39
|
+
i += 1;
|
|
40
|
+
const order: Pick<chevre.factory.order.IOrder, 'confirmationNumber' | 'orderDate' | 'orderNumber' | 'project' | 'typeOf' | 'orderStatus'> = doc.toObject();
|
|
41
|
+
if (order.orderStatus !== chevre.factory.orderStatus.OrderProcessing) {
|
|
42
|
+
console.log('nothing to do', order.orderStatus, order.orderNumber);
|
|
43
|
+
} else {
|
|
44
|
+
const { orderNumber } = order;
|
|
45
|
+
|
|
46
|
+
const itemOfferedTypeOfs = <chevre.factory.order.IItemOffered['typeOf'][]>await acceptedOfferRepo.distinctValues(
|
|
47
|
+
{ orderNumber: { $in: [orderNumber] } },
|
|
48
|
+
'acceptedOffers.itemOffered.typeOf'
|
|
49
|
+
);
|
|
50
|
+
const serialNumbers = await acceptedOfferRepo.distinctValues(
|
|
51
|
+
{ orderNumber: { $in: [orderNumber] } },
|
|
52
|
+
'acceptedOffers.serialNumber'
|
|
53
|
+
);
|
|
54
|
+
const offeredThroughIdentifier = (<chevre.factory.service.webAPI.Identifier[]>await acceptedOfferRepo.distinctValues(
|
|
55
|
+
{ orderNumber: { $in: [orderNumber] } },
|
|
56
|
+
'acceptedOffers.offeredThrough.identifier'
|
|
57
|
+
)).shift();
|
|
58
|
+
|
|
59
|
+
console.log('processing order', order, itemOfferedTypeOfs, serialNumbers, offeredThroughIdentifier);
|
|
60
|
+
await (await chevre.service.order.createService()).processOrder({
|
|
61
|
+
order: {
|
|
62
|
+
...order,
|
|
63
|
+
itemOfferedTypeOf: itemOfferedTypeOfs[0], // 1つしかない前提
|
|
64
|
+
serialNumbers,
|
|
65
|
+
offeredThroughIdentifier
|
|
66
|
+
},
|
|
67
|
+
options: { force: true }
|
|
68
|
+
})({ task: taskRepo });
|
|
69
|
+
console.log('order processed', order.orderNumber);
|
|
70
|
+
updateCount += 1;
|
|
71
|
+
console.log('updated.', order.project.id, order.orderNumber, order.orderDate, i);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
console.log(i, 'orders checked');
|
|
76
|
+
console.log(updateCount, 'orders updated');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
main()
|
|
80
|
+
.then()
|
|
81
|
+
.catch(console.error);
|
|
82
|
+
|
|
83
|
+
main()
|
|
84
|
+
.then(() => {
|
|
85
|
+
console.log('success!');
|
|
86
|
+
})
|
|
87
|
+
.catch(console.error);
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
// tslint:disable:no-console
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
|
-
import * as readline from 'readline';
|
|
4
3
|
import * as redis from 'redis';
|
|
5
4
|
|
|
6
5
|
import { chevre } from '../../../../lib/index';
|
|
7
6
|
|
|
8
7
|
const project = { id: String(process.env.PROJECT_ID) };
|
|
9
|
-
const CLIENT_ID = '
|
|
10
|
-
const paymentMethodType = 'CreditCard';
|
|
11
|
-
const paymentServiceId = '5f9a4fed4f3709000abe6415';
|
|
12
|
-
// const paymentMethodType = 'PayPay';
|
|
13
|
-
// const paymentServiceId = '60e9560176a391000b23e20b';
|
|
14
|
-
const AMOUNT: number = 1;
|
|
15
|
-
const creditCard: chevre.factory.paymentMethod.paymentCard.creditCard.IUncheckedCardRaw = {
|
|
16
|
-
cardNo: '4100000000000100',
|
|
17
|
-
expire: '2812',
|
|
18
|
-
cardPass: '123',
|
|
19
|
-
holderName: 'AA AA'
|
|
20
|
-
};
|
|
8
|
+
const CLIENT_ID = 'xxx';
|
|
21
9
|
|
|
22
10
|
// tslint:disable-next-line:max-func-body-length
|
|
23
11
|
async function main() {
|
|
@@ -31,143 +19,35 @@ async function main() {
|
|
|
31
19
|
});
|
|
32
20
|
await client.connect();
|
|
33
21
|
|
|
34
|
-
const transaction = await (await chevre.service.transaction.createService()).
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
const transaction = await (await chevre.service.transaction.createService()).placeOrder.start(
|
|
23
|
+
{
|
|
24
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
25
|
+
agent: { id: CLIENT_ID, typeOf: chevre.factory.creativeWorkType.WebApplication },
|
|
26
|
+
object: {
|
|
27
|
+
clientUser: <any>{ client_id: CLIENT_ID },
|
|
28
|
+
passport: {
|
|
29
|
+
token: 'xxx'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
seller: { id: '622ea934a42374000a1f9114' }
|
|
39
33
|
},
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
{
|
|
35
|
+
lockPassport: true
|
|
36
|
+
}
|
|
37
|
+
)({
|
|
42
38
|
member: await chevre.repository.Member.createInstance(mongoose.connection),
|
|
39
|
+
passport: await chevre.repository.Passport.createInstance(
|
|
40
|
+
client,
|
|
41
|
+
{
|
|
42
|
+
secret: 'xxx',
|
|
43
|
+
issuers: ['https://example.com']
|
|
44
|
+
}
|
|
45
|
+
),
|
|
43
46
|
projectMakesOffer: await chevre.repository.ProjectMakesOffer.createInstance(mongoose.connection),
|
|
44
47
|
seller: await chevre.repository.Seller.createInstance(mongoose.connection),
|
|
45
48
|
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
46
49
|
});
|
|
47
50
|
console.log('transaction started', transaction);
|
|
48
|
-
|
|
49
|
-
const publishPaymentUrlResult = await (await chevre.service.payment.any.createService()).publishPaymentUrl({
|
|
50
|
-
project: { id: project.id },
|
|
51
|
-
agent: { id: CLIENT_ID },
|
|
52
|
-
object: {
|
|
53
|
-
amount: AMOUNT,
|
|
54
|
-
paymentMethod: paymentMethodType,
|
|
55
|
-
issuedThrough: { id: paymentServiceId },
|
|
56
|
-
method: '1',
|
|
57
|
-
creditCard: {
|
|
58
|
-
...creditCard,
|
|
59
|
-
retUrl: String(process.env.SECURE_TRAN_RET_URL)
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
purpose: { id: transaction.id, typeOf: chevre.factory.transactionType.PlaceOrder },
|
|
63
|
-
paymentServiceType: chevre.factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
64
|
-
location: {
|
|
65
|
-
typeOf: chevre.factory.creativeWorkType.WebApplication,
|
|
66
|
-
id: CLIENT_ID
|
|
67
|
-
}
|
|
68
|
-
})({
|
|
69
|
-
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
70
|
-
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
71
|
-
paymentAccepted: await chevre.repository.SellerPaymentAccepted.createInstance(mongoose.connection),
|
|
72
|
-
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
73
|
-
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
74
|
-
transactionNumber: await chevre.repository.TransactionNumber.createInstance(client),
|
|
75
|
-
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
76
|
-
});
|
|
77
|
-
console.log(publishPaymentUrlResult);
|
|
78
|
-
|
|
79
|
-
// wait callback...
|
|
80
|
-
// tslint:disable-next-line:max-func-body-length
|
|
81
|
-
await new Promise<void>((resolve, reject) => {
|
|
82
|
-
const rl = readline.createInterface({
|
|
83
|
-
input: process.stdin,
|
|
84
|
-
output: process.stdout
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// tslint:disable-next-line:max-func-body-length
|
|
88
|
-
rl.question('callback received?:\n', async () => {
|
|
89
|
-
try {
|
|
90
|
-
await new Promise<void>(async (resolve2, reject2) => {
|
|
91
|
-
const rl2 = readline.createInterface({
|
|
92
|
-
input: process.stdin,
|
|
93
|
-
output: process.stdout
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
rl2.question('VOID or AUTH?:\n', async (jobCd) => {
|
|
97
|
-
if (jobCd === 'AUTH') {
|
|
98
|
-
const authorizeResult = await (await chevre.service.payment.any.createService()).authorize({
|
|
99
|
-
project: { id: project.id },
|
|
100
|
-
agent: { id: CLIENT_ID },
|
|
101
|
-
object: {
|
|
102
|
-
amount: AMOUNT,
|
|
103
|
-
paymentMethodId: publishPaymentUrlResult.paymentMethodId,
|
|
104
|
-
paymentMethod: paymentMethodType,
|
|
105
|
-
issuedThrough: { id: paymentServiceId },
|
|
106
|
-
method: '1',
|
|
107
|
-
creditCard
|
|
108
|
-
},
|
|
109
|
-
purpose: { id: transaction.id, typeOf: chevre.factory.transactionType.PlaceOrder },
|
|
110
|
-
paymentServiceType: chevre.factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
111
|
-
location: {
|
|
112
|
-
typeOf: chevre.factory.creativeWorkType.WebApplication,
|
|
113
|
-
id: CLIENT_ID
|
|
114
|
-
},
|
|
115
|
-
options: {
|
|
116
|
-
useCancelPayTransactionOnFailed: false,
|
|
117
|
-
useCheckByIdentifierIfNotYet: false,
|
|
118
|
-
useUnlockTransactionProcess: false
|
|
119
|
-
}
|
|
120
|
-
})({
|
|
121
|
-
accountingReport: await chevre.repository.AccountingReport.createInstance(mongoose.connection),
|
|
122
|
-
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
123
|
-
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
124
|
-
authorization: await chevre.repository.Code.createInstance(mongoose.connection),
|
|
125
|
-
confirmationNumber: await chevre.repository.ConfirmationNumber.createInstance(client),
|
|
126
|
-
event: await chevre.repository.Event.createInstance(mongoose.connection),
|
|
127
|
-
paymentAccepted: await chevre.repository.SellerPaymentAccepted.createInstance(mongoose.connection),
|
|
128
|
-
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
129
|
-
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
130
|
-
product: await chevre.repository.Product.createInstance(mongoose.connection),
|
|
131
|
-
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
132
|
-
ticket: await chevre.repository.Ticket.createInstance(mongoose.connection),
|
|
133
|
-
transactionNumber: await chevre.repository.TransactionNumber.createInstance(client),
|
|
134
|
-
transactionProcess:
|
|
135
|
-
await chevre.repository.TransactionProcess.createInstance(client, { lockExpiresInSeconds: 120 }),
|
|
136
|
-
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
137
|
-
});
|
|
138
|
-
console.log('payment authorized.', authorizeResult.id);
|
|
139
|
-
} else if (jobCd === 'VOID') {
|
|
140
|
-
await (await chevre.service.payment.any.createService()).invalidatePaymentUrl({
|
|
141
|
-
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
142
|
-
purpose: { id: transaction.id, typeOf: chevre.factory.transactionType.PlaceOrder }
|
|
143
|
-
})({
|
|
144
|
-
accountingReport: await chevre.repository.AccountingReport.createInstance(mongoose.connection),
|
|
145
|
-
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
146
|
-
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
147
|
-
paymentAccepted: await chevre.repository.SellerPaymentAccepted.createInstance(mongoose.connection),
|
|
148
|
-
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
149
|
-
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
150
|
-
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
151
|
-
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
152
|
-
});
|
|
153
|
-
console.log('payment voided.');
|
|
154
|
-
} else {
|
|
155
|
-
reject2(`jobCd ${jobCd} not implemented`);
|
|
156
|
-
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// rl.close();
|
|
161
|
-
resolve2();
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
resolve();
|
|
166
|
-
} catch (error) {
|
|
167
|
-
reject(error);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
51
|
}
|
|
172
52
|
|
|
173
53
|
main()
|
|
@@ -3,13 +3,10 @@ export type IPassportValidator = (params: {
|
|
|
3
3
|
passport: factory.waiter.passport.IPassport;
|
|
4
4
|
}) => boolean;
|
|
5
5
|
export declare namespace moneyTransfer {
|
|
6
|
-
type IStartParams = factory.transaction.moneyTransfer.IStartParamsWithoutDetail & {
|
|
7
|
-
passportValidator?: IPassportValidator;
|
|
8
|
-
};
|
|
6
|
+
type IStartParams = factory.transaction.moneyTransfer.IStartParamsWithoutDetail & {};
|
|
9
7
|
}
|
|
10
8
|
export declare namespace placeOrder {
|
|
11
9
|
type IStartParams = factory.transaction.placeOrder.IStartParamsWithoutDetail & {
|
|
12
|
-
passportValidator?: IPassportValidator;
|
|
13
10
|
broker?: factory.order.IBroker;
|
|
14
11
|
};
|
|
15
12
|
type IOrderURLGenerator = (order: factory.transaction.placeOrder.IOrderAsResult) => string;
|
|
@@ -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.AcceptedOfferRepo = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
14
|
const order_1 = require("./mongoose/schemas/order");
|
|
15
15
|
const order_2 = require("./order");
|
|
@@ -17,7 +17,7 @@ const settings_1 = require("../settings");
|
|
|
17
17
|
/**
|
|
18
18
|
* 注文オファーリポジトリ
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class AcceptedOfferRepo {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.orderModel = connection.model(order_1.modelName, (0, order_1.createSchema)());
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ class MongoRepository {
|
|
|
27
27
|
searchWithUnwoundAcceptedOffers(params, projection) {
|
|
28
28
|
var _a;
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const conditions = order_2.
|
|
30
|
+
const conditions = order_2.OrderRepo.CREATE_MONGO_CONDITIONS(params);
|
|
31
31
|
const aggregate = this.orderModel.aggregate();
|
|
32
32
|
// pipelineの順序に注意
|
|
33
33
|
// @see https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
|
|
@@ -259,4 +259,4 @@ class MongoRepository {
|
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
exports.
|
|
262
|
+
exports.AcceptedOfferRepo = AcceptedOfferRepo;
|
|
@@ -3,7 +3,7 @@ import * as factory from '../factory';
|
|
|
3
3
|
/**
|
|
4
4
|
* 口座リポジトリ
|
|
5
5
|
*/
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class AccountRepo {
|
|
7
7
|
private readonly accountModel;
|
|
8
8
|
constructor(connection: Connection);
|
|
9
9
|
static CREATE_MONGO_CONDITIONS(params: factory.account.ISearchConditions): any[];
|
|
@@ -9,14 +9,14 @@ 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.AccountRepo = void 0;
|
|
13
13
|
const account_1 = require("./mongoose/schemas/account");
|
|
14
14
|
const factory = require("../factory");
|
|
15
15
|
const settings_1 = require("../settings");
|
|
16
16
|
/**
|
|
17
17
|
* 口座リポジトリ
|
|
18
18
|
*/
|
|
19
|
-
class
|
|
19
|
+
class AccountRepo {
|
|
20
20
|
constructor(connection) {
|
|
21
21
|
this.accountModel = connection.model(account_1.modelName, (0, account_1.createSchema)());
|
|
22
22
|
}
|
|
@@ -389,7 +389,7 @@ class MongoRepository {
|
|
|
389
389
|
}
|
|
390
390
|
count(params) {
|
|
391
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
-
const conditions =
|
|
392
|
+
const conditions = AccountRepo.CREATE_MONGO_CONDITIONS(params);
|
|
393
393
|
return this.accountModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
394
394
|
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
395
395
|
.exec();
|
|
@@ -401,7 +401,7 @@ class MongoRepository {
|
|
|
401
401
|
search(params) {
|
|
402
402
|
var _a;
|
|
403
403
|
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
-
const conditions =
|
|
404
|
+
const conditions = AccountRepo.CREATE_MONGO_CONDITIONS(params);
|
|
405
405
|
const query = this.accountModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
|
|
406
406
|
__v: 0,
|
|
407
407
|
createdAt: 0,
|
|
@@ -432,4 +432,4 @@ class MongoRepository {
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
exports.
|
|
435
|
+
exports.AccountRepo = AccountRepo;
|
|
@@ -26,7 +26,7 @@ import type { Connection, Model } from 'mongoose';
|
|
|
26
26
|
/**
|
|
27
27
|
* 科目リポジトリ
|
|
28
28
|
*/
|
|
29
|
-
export declare class
|
|
29
|
+
export declare class AccountTitleRepo {
|
|
30
30
|
readonly accountTitleModel: typeof Model;
|
|
31
31
|
constructor(connection: Connection);
|
|
32
32
|
deleteByProject(params: {
|
|
@@ -9,13 +9,13 @@ 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.AccountTitleRepo = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
14
|
const accountTitle_1 = require("./mongoose/schemas/accountTitle");
|
|
15
15
|
/**
|
|
16
16
|
* 科目リポジトリ
|
|
17
17
|
*/
|
|
18
|
-
class
|
|
18
|
+
class AccountTitleRepo {
|
|
19
19
|
constructor(connection) {
|
|
20
20
|
this.accountTitleModel = connection.model(accountTitle_1.modelName, (0, accountTitle_1.createSchema)());
|
|
21
21
|
}
|
|
@@ -33,4 +33,4 @@ class MongoRepository {
|
|
|
33
33
|
.cursor();
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
exports.
|
|
36
|
+
exports.AccountTitleRepo = AccountTitleRepo;
|
|
@@ -3,7 +3,7 @@ import * as factory from '../factory';
|
|
|
3
3
|
/**
|
|
4
4
|
* 口座取引リポジトリ
|
|
5
5
|
*/
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class AccountTransactionRepo {
|
|
7
7
|
private readonly transactionModel;
|
|
8
8
|
constructor(connection: Connection);
|
|
9
9
|
static CREATE_MONGO_CONDITIONS(params: factory.account.transaction.ISearchConditions): any[];
|
|
@@ -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.AccountTransactionRepo = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
14
|
const accountTransaction_1 = require("./mongoose/schemas/accountTransaction");
|
|
15
15
|
const factory = require("../factory");
|
|
@@ -17,7 +17,7 @@ const settings_1 = require("../settings");
|
|
|
17
17
|
/**
|
|
18
18
|
* 口座取引リポジトリ
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class AccountTransactionRepo {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.transactionModel = connection.model(accountTransaction_1.modelName, (0, accountTransaction_1.createSchema)());
|
|
23
23
|
}
|
|
@@ -244,7 +244,7 @@ class MongoRepository {
|
|
|
244
244
|
search(params) {
|
|
245
245
|
var _a;
|
|
246
246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
const conditions =
|
|
247
|
+
const conditions = AccountTransactionRepo.CREATE_MONGO_CONDITIONS(params);
|
|
248
248
|
const query = this.transactionModel.find((conditions.length > 0) ? { $and: conditions } : {})
|
|
249
249
|
.select({
|
|
250
250
|
__v: 0,
|
|
@@ -279,4 +279,4 @@ class MongoRepository {
|
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
exports.
|
|
282
|
+
exports.AccountTransactionRepo = AccountTransactionRepo;
|
|
@@ -18,7 +18,7 @@ export interface IAccountingReport {
|
|
|
18
18
|
/**
|
|
19
19
|
* 経理レポートリポジトリ
|
|
20
20
|
*/
|
|
21
|
-
export declare class
|
|
21
|
+
export declare class AccountingReportRepo {
|
|
22
22
|
private readonly accountingReportModel;
|
|
23
23
|
constructor(connection: Connection);
|
|
24
24
|
static CREATE_MONGO_CONDITIONS(params: factory.report.accountingReport.ISearchConditions & {
|
|
@@ -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.AccountingReportRepo = void 0;
|
|
13
13
|
const accountingReport_1 = require("./mongoose/schemas/accountingReport");
|
|
14
14
|
const errorHandler_1 = require("../errorHandler");
|
|
15
15
|
const factory = require("../factory");
|
|
@@ -17,7 +17,7 @@ const DEFAULT_SEARCH_LIMIT = 100;
|
|
|
17
17
|
/**
|
|
18
18
|
* 経理レポートリポジトリ
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class AccountingReportRepo {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.accountingReportModel = connection.model(accountingReport_1.modelName, (0, accountingReport_1.createSchema)());
|
|
23
23
|
}
|
|
@@ -178,7 +178,7 @@ class MongoRepository {
|
|
|
178
178
|
const limit = (typeof params.limit === 'number') ? Math.min(params.limit, DEFAULT_SEARCH_LIMIT) : DEFAULT_SEARCH_LIMIT;
|
|
179
179
|
const page = (typeof params.page === 'number') ? Math.max(params.page, 1) : 1;
|
|
180
180
|
const unwindAcceptedOffers = params.$unwindAcceptedOffers === '1';
|
|
181
|
-
const matchStages =
|
|
181
|
+
const matchStages = AccountingReportRepo.CREATE_MONGO_CONDITIONS(params);
|
|
182
182
|
const aggregate = this.accountingReportModel.aggregate([
|
|
183
183
|
// pipelineの順序に注意
|
|
184
184
|
// @see https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
|
|
@@ -204,4 +204,4 @@ class MongoRepository {
|
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
exports.
|
|
207
|
+
exports.AccountingReportRepo = AccountingReportRepo;
|
|
@@ -75,7 +75,7 @@ export type IMinimizedPurchaseNumberAuthResult = Pick<factory.action.check.payme
|
|
|
75
75
|
/**
|
|
76
76
|
* アクションリポジトリ
|
|
77
77
|
*/
|
|
78
|
-
export declare class
|
|
78
|
+
export declare class ActionRepo {
|
|
79
79
|
private readonly actionModel;
|
|
80
80
|
private readonly actionRecipeModel;
|
|
81
81
|
constructor(connection: Connection);
|
|
@@ -20,7 +20,7 @@ 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.ActionRepo = void 0;
|
|
24
24
|
const factory = require("../factory");
|
|
25
25
|
const settings_1 = require("../settings");
|
|
26
26
|
const action_1 = require("./mongoose/schemas/action");
|
|
@@ -28,7 +28,7 @@ const actionRecipe_1 = require("./mongoose/schemas/actionRecipe");
|
|
|
28
28
|
/**
|
|
29
29
|
* アクションリポジトリ
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class ActionRepo {
|
|
32
32
|
constructor(connection) {
|
|
33
33
|
this.actionModel = connection.model(action_1.modelName, (0, action_1.createSchema)());
|
|
34
34
|
this.actionRecipeModel = connection.model(actionRecipe_1.modelName, (0, actionRecipe_1.createSchema)());
|
|
@@ -431,7 +431,7 @@ class MongoRepository {
|
|
|
431
431
|
search(params, inclusion, exclusion) {
|
|
432
432
|
var _a;
|
|
433
433
|
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
-
const conditions =
|
|
434
|
+
const conditions = ActionRepo.CREATE_MONGO_CONDITIONS(params);
|
|
435
435
|
let projection = {};
|
|
436
436
|
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
437
437
|
inclusion.forEach((field) => {
|
|
@@ -1508,4 +1508,4 @@ class MongoRepository {
|
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
exports.
|
|
1511
|
+
exports.ActionRepo = ActionRepo;
|
|
@@ -3,7 +3,7 @@ import * as factory from '../factory';
|
|
|
3
3
|
/**
|
|
4
4
|
* 追加特性リポジトリ
|
|
5
5
|
*/
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class AdditionalPropertyRepo {
|
|
7
7
|
private readonly additionalPropertyModel;
|
|
8
8
|
constructor(connection: Connection);
|
|
9
9
|
static CREATE_MONGO_CONDITIONS(params: factory.additionalProperty.ISearchConditions): any[];
|
|
@@ -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.AdditionalPropertyRepo = void 0;
|
|
24
24
|
const additionalProperty_1 = require("./mongoose/schemas/additionalProperty");
|
|
25
25
|
const factory = require("../factory");
|
|
26
26
|
const settings_1 = require("../settings");
|
|
27
27
|
/**
|
|
28
28
|
* 追加特性リポジトリ
|
|
29
29
|
*/
|
|
30
|
-
class
|
|
30
|
+
class AdditionalPropertyRepo {
|
|
31
31
|
constructor(connection) {
|
|
32
32
|
this.additionalPropertyModel = connection.model(additionalProperty_1.modelName, (0, additionalProperty_1.createSchema)());
|
|
33
33
|
}
|
|
@@ -130,7 +130,7 @@ class MongoRepository {
|
|
|
130
130
|
*/
|
|
131
131
|
search(params) {
|
|
132
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
const conditions =
|
|
133
|
+
const conditions = AdditionalPropertyRepo.CREATE_MONGO_CONDITIONS(params);
|
|
134
134
|
const query = this.additionalPropertyModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
|
|
135
135
|
__v: 0,
|
|
136
136
|
createdAt: 0,
|
|
@@ -203,4 +203,4 @@ class MongoRepository {
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
exports.
|
|
206
|
+
exports.AdditionalPropertyRepo = AdditionalPropertyRepo;
|
|
@@ -15,7 +15,7 @@ type ISearchConditions = factory.unitPriceOffer.ISearchConditions;
|
|
|
15
15
|
/**
|
|
16
16
|
* 集計オファーリポジトリ
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class AggregateOfferRepo {
|
|
19
19
|
private readonly aggregateOfferModel;
|
|
20
20
|
constructor(connection: Connection);
|
|
21
21
|
static CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params: ISearchConditions): IMatchStage[];
|