@aptos-scp/scp-component-store-selling-features-domain-model 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config/DiTypes.js +1 -0
- package/lib/config/ErrorCodes.js +1 -0
- package/lib/config/index.js +17 -6
- package/lib/config/inversify/binding-helpers.d.ts +1 -1
- package/lib/config/inversify/binding-helpers.js +1 -0
- package/lib/config/inversify/index.js +17 -6
- package/lib/config/inversify/inversify.app.config.js +3 -2
- package/lib/config/inversify/inversify.terminal.config/index.js +15 -4
- package/lib/config/inversify/inversify.terminal.config/transaction-services.config.js +2 -1
- package/lib/domain/UIBusinessEventTypes.js +7 -0
- package/lib/domain/index.js +19 -7
- package/lib/domain/model/ApplicationControlTransaction.js +4 -2
- package/lib/domain/model/BaseLineDecorator.js +21 -19
- package/lib/domain/model/BaseTransactionLine.js +12 -11
- package/lib/domain/model/Constants.js +1 -0
- package/lib/domain/model/CorruptedTransaction.js +7 -5
- package/lib/domain/model/CreateEinvoiceLine.js +5 -4
- package/lib/domain/model/Customer.js +9 -7
- package/lib/domain/model/CustomerServiceTransaction.js +3 -1
- package/lib/domain/model/EmailVerification.js +7 -6
- package/lib/domain/model/Employee.js +10 -9
- package/lib/domain/model/EndOfTransactionTenderingSession.js +12 -12
- package/lib/domain/model/ExchangeRates.js +1 -0
- package/lib/domain/model/FiscalControlTransaction.js +4 -2
- package/lib/domain/model/FulfillmentGroup.js +36 -34
- package/lib/domain/model/IFiscalTransactionNumberMaintainer.js +1 -0
- package/lib/domain/model/IInvoiceOperation.js +1 -0
- package/lib/domain/model/ILoyaltyVoucher.js +1 -0
- package/lib/domain/model/ISingleUseCoupon.js +4 -4
- package/lib/domain/model/Inventory.js +4 -3
- package/lib/domain/model/ItemHandlingSession.js +13 -12
- package/lib/domain/model/LoyaltyMembership.js +1 -0
- package/lib/domain/model/MerchandiseTransaction.js +48 -46
- package/lib/domain/model/MetricsLogs.d.ts +1 -1
- package/lib/domain/model/NoSaleTransaction.js +4 -2
- package/lib/domain/model/Order.js +25 -24
- package/lib/domain/model/OrderTotals.js +29 -28
- package/lib/domain/model/Organization.d.ts +37 -27
- package/lib/domain/model/ReceiptSession.js +17 -16
- package/lib/domain/model/ReprintReceiptTransaction.js +13 -11
- package/lib/domain/model/ResumeTransactionSession.js +5 -4
- package/lib/domain/model/RetailTransaction.js +19 -18
- package/lib/domain/model/StoreItem.js +32 -31
- package/lib/domain/model/StoredValueCardSession.js +6 -5
- package/lib/domain/model/StoredValueCertificateSession.js +14 -15
- package/lib/domain/model/SubscriptionTokenSession.js +7 -6
- package/lib/domain/model/TaxRefundControlTransaction.js +4 -2
- package/lib/domain/model/TenderAuthorizationSession.js +14 -13
- package/lib/domain/model/TenderControlTransaction.js +14 -14
- package/lib/domain/model/TenderHandlingSession.js +31 -36
- package/lib/domain/model/TenderType.js +106 -126
- package/lib/domain/model/TerminalControlTransaction.js +8 -6
- package/lib/domain/model/TerminalSession.js +11 -10
- package/lib/domain/model/TillControlTransaction.js +11 -10
- package/lib/domain/model/TillSession.js +14 -16
- package/lib/domain/model/TransactionFlowState.js +5 -4
- package/lib/domain/model/TransactionReferenceLine.js +50 -46
- package/lib/domain/model/User.js +47 -46
- package/lib/domain/model/UserSession.js +11 -10
- package/lib/domain/model/UserTransaction.js +3 -1
- package/lib/domain/model/VoidInterfaces.js +1 -0
- package/lib/domain/model/cashDrawer/CashDrawerRequestLine.js +6 -5
- package/lib/domain/model/cashDrawer/CashDrawerSession.js +20 -19
- package/lib/domain/model/cashDrawer/CashDrawerStatusChangeLine.js +12 -11
- package/lib/domain/model/cashDrawer/index.js +19 -6
- package/lib/domain/model/configuration/ConfigurationUtils.js +1 -0
- package/lib/domain/model/configuration/DataEntryRule.js +1 -0
- package/lib/domain/model/configuration/IAdapterPoliciesConfig.js +1 -0
- package/lib/domain/model/configuration/IConditionalAttributeBehaviorRuleConfig.js +1 -0
- package/lib/domain/model/configuration/ICustomerConfig.js +1 -0
- package/lib/domain/model/configuration/IDataEntryRuleConfig.js +1 -0
- package/lib/domain/model/configuration/IDiscountAttributesConfig .js +2 -1
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.d.ts +3 -3
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.js +1 -0
- package/lib/domain/model/configuration/IFeatureAccessConfig.d.ts +5 -5
- package/lib/domain/model/configuration/IFeatureAccessConfig.js +1 -0
- package/lib/domain/model/configuration/IFeesConfig.js +1 -0
- package/lib/domain/model/configuration/IProductInquiryBehaviorsConfig.js +1 -0
- package/lib/domain/model/configuration/IReceiptConfig.js +1 -0
- package/lib/domain/model/configuration/IReceiptFormattingConfig.js +1 -0
- package/lib/domain/model/configuration/IReceiptStylingConfig.d.ts +1 -1
- package/lib/domain/model/configuration/IReceiptStylingConfig.js +1 -0
- package/lib/domain/model/configuration/IReserveInventoryConfig.js +1 -0
- package/lib/domain/model/configuration/ISequenceConfig.js +1 -0
- package/lib/domain/model/configuration/IStoreOperationsBehavior.js +1 -0
- package/lib/domain/model/configuration/ITendersConfig.d.ts +1 -1
- package/lib/domain/model/configuration/ITendersConfig.js +1 -0
- package/lib/domain/model/configuration/TaxLottery.js +1 -0
- package/lib/domain/model/configuration/index.js +44 -22
- package/lib/domain/model/customer/CreateCustomerLine.js +5 -4
- package/lib/domain/model/customer/CustomerLine.js +13 -12
- package/lib/domain/model/customer/ICustomerI18nFormats.js +1 -0
- package/lib/domain/model/customer/TaxCustomerLine.js +5 -4
- package/lib/domain/model/customer/UpdateCustomerLine.js +5 -4
- package/lib/domain/model/customer/index.js +23 -8
- package/lib/domain/model/digitalSignature/DigitalSignatureFailureLine.js +1 -0
- package/lib/domain/model/digitalSignature/index.js +15 -4
- package/lib/domain/model/discounts/BaseManualDiscountLine.js +32 -31
- package/lib/domain/model/discounts/BaseManualDiscountLineDecorator.js +3 -2
- package/lib/domain/model/discounts/BasePromotionCouponLine.js +1 -0
- package/lib/domain/model/discounts/BasePromotionCouponLineDecorator.js +1 -0
- package/lib/domain/model/discounts/ExpiredCouponOverrideLine.js +8 -6
- package/lib/domain/model/discounts/LoyaltyActivityDiscountLineTotalDecorator.js +6 -5
- package/lib/domain/model/discounts/LoyaltyDiscountLine.js +20 -19
- package/lib/domain/model/discounts/LoyaltyDiscountLineTotalDecorator.js +1 -0
- package/lib/domain/model/discounts/ManualDiscountLineModificationDecorator.js +22 -21
- package/lib/domain/model/discounts/ManualDiscountLineTotalDecorator.js +5 -4
- package/lib/domain/model/discounts/ManualItemDiscountLine.js +7 -6
- package/lib/domain/model/discounts/ManualTransactionDiscountLine.js +1 -0
- package/lib/domain/model/discounts/ModifyManualDiscountLine.js +6 -5
- package/lib/domain/model/discounts/PromotionCouponLine.js +13 -6
- package/lib/domain/model/discounts/VoidedDiscountLineDecorator.js +5 -4
- package/lib/domain/model/discounts/VoidedLoyaltyDiscountLineDecorator.js +1 -0
- package/lib/domain/model/discounts/VoidedPromotionCouponLineDecorator.js +5 -4
- package/lib/domain/model/discounts/employee/EmployeeDiscountLine.js +7 -5
- package/lib/domain/model/discounts/employee/index.js +15 -4
- package/lib/domain/model/discounts/index.js +33 -20
- package/lib/domain/model/discounts/lineTypes.js +1 -0
- package/lib/domain/model/donation/BaseDonationLineDecorator.js +1 -0
- package/lib/domain/model/donation/DonationLine.js +8 -7
- package/lib/domain/model/donation/VoidedDonationLineDecorator.js +6 -5
- package/lib/domain/model/donation/index.js +18 -6
- package/lib/domain/model/employeeCustomer/BaseEmployeeCustomerLineDecorator.js +1 -0
- package/lib/domain/model/employeeCustomer/EmployeeCustomerLine.js +7 -6
- package/lib/domain/model/employeeCustomer/VoidedEmployeeCustomerLineDecorator.js +5 -4
- package/lib/domain/model/employeeCustomer/index.js +18 -6
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.js +9 -8
- package/lib/domain/model/extensibilityForm/index.js +16 -4
- package/lib/domain/model/fee/BaseFeeLineDecorator.js +1 -0
- package/lib/domain/model/fee/FeeLine.js +29 -29
- package/lib/domain/model/fee/FeeLineBaseTaxAdjustmentDecorator.js +7 -6
- package/lib/domain/model/fee/FeeLineChangeQuantityDecorator.js +5 -4
- package/lib/domain/model/fee/FeeLineExtendedAmountDecorator.js +13 -12
- package/lib/domain/model/fee/FeeLineOriginalPricingAdjustmentDecorator.js +10 -9
- package/lib/domain/model/fee/FeeLinePricingExtendedAmountDecorator.js +10 -9
- package/lib/domain/model/fee/FeeLineTaxExemptDecorator.js +8 -7
- package/lib/domain/model/fee/FeeLineTaxOverrideDecorator.js +7 -6
- package/lib/domain/model/fee/FeeQuantityChangeLine.js +7 -6
- package/lib/domain/model/fee/VoidedFeeLineDecorator.js +5 -4
- package/lib/domain/model/fee/index.js +26 -14
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementLine.js +7 -6
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementRetryLine.js +5 -4
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +12 -10
- package/lib/domain/model/fiscalDevice/index.js +17 -6
- package/lib/domain/model/foreignCurrency/ExchangeRateManualEntryLine.js +6 -5
- package/lib/domain/model/foreignCurrency/index.js +15 -4
- package/lib/domain/model/geoLocation.d.ts +12 -10
- package/lib/domain/model/giftCard/BalanceInquiryLine.js +8 -7
- package/lib/domain/model/giftCard/index.js +15 -4
- package/lib/domain/model/index.js +122 -91
- package/lib/domain/model/inventory/ReserveInventoryLine.js +9 -8
- package/lib/domain/model/inventory/index.js +15 -4
- package/lib/domain/model/item/BaseItemLineDecorator.js +6 -5
- package/lib/domain/model/item/BasePriceChangeLineDecorator.js +1 -0
- package/lib/domain/model/item/IAllLinePricingAdjustments.js +4 -3
- package/lib/domain/model/item/IItemLine.js +1 -0
- package/lib/domain/model/item/ItemLine.js +29 -23
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.d.ts +1 -1
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.js +2 -1
- package/lib/domain/model/item/ItemLineBaseTaxAdjustmentDecorator.js +7 -6
- package/lib/domain/model/item/ItemLineCommentReceiptDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineExtendedAmountDecorator.js +13 -12
- package/lib/domain/model/item/ItemLineExtensibilityFormDataDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineGiftIssueDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineGiftReceiptDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineManualDiscountDecorator.js +26 -25
- package/lib/domain/model/item/ItemLineNonFinancialRewardDecorator.js +19 -18
- package/lib/domain/model/item/ItemLineOriginalAdjustmentDecorator.js +6 -5
- package/lib/domain/model/item/ItemLinePriceChangeDecorator.js +5 -4
- package/lib/domain/model/item/ItemLinePromotionDecorator.js +16 -15
- package/lib/domain/model/item/ItemLineQuantityChangeDecorator.js +13 -12
- package/lib/domain/model/item/ItemLineReasonCodeChangeDecorator.js +9 -8
- package/lib/domain/model/item/ItemLineRegularPriceDecorator.js +6 -5
- package/lib/domain/model/item/ItemLineReserveInventoryDecorator.js +7 -6
- package/lib/domain/model/item/ItemLineRewardDecorator.js +18 -17
- package/lib/domain/model/item/ItemLineSalePriceDecorator.js +6 -5
- package/lib/domain/model/item/ItemLineSalespersonDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineSendSaleDecorator.js +5 -4
- package/lib/domain/model/item/ItemLineSubscriptionDecorator.js +6 -5
- package/lib/domain/model/item/ItemLineTaxExemptDecorator.js +8 -7
- package/lib/domain/model/item/ItemLineTaxOverrideDecorator.js +7 -6
- package/lib/domain/model/item/ItemOrderCancellationLine.js +7 -6
- package/lib/domain/model/item/ItemPriceChangeLine.js +15 -15
- package/lib/domain/model/item/ItemQuantityChangeLine.js +9 -8
- package/lib/domain/model/item/ReasonCodeChangeLine.js +10 -9
- package/lib/domain/model/item/ReservedOrderItemLineCancellationDecorator.js +5 -4
- package/lib/domain/model/item/VoidedItemLineDecorator.js +5 -4
- package/lib/domain/model/item/VoidedPriceChangeLineDecorator.js +5 -4
- package/lib/domain/model/item/index.js +51 -38
- package/lib/domain/model/lottery/TaxLotteryAddLine.js +5 -4
- package/lib/domain/model/lottery/TaxLotteryModificationLine.js +6 -5
- package/lib/domain/model/lottery/TaxLotteryVoidLine.js +7 -6
- package/lib/domain/model/lottery/index.js +17 -6
- package/lib/domain/model/loyaltyMembership/LoyaltyEnrollmentLine.js +15 -14
- package/lib/domain/model/loyaltyMembership/LoyaltyMembershipLine.js +8 -7
- package/lib/domain/model/loyaltyMembership/index.js +16 -5
- package/lib/domain/model/mixedBasket/MixedBasketSession.js +6 -5
- package/lib/domain/model/mixedBasket/index.js +16 -4
- package/lib/domain/model/noSale/NoSaleLine.js +10 -9
- package/lib/domain/model/noSale/StartNoSaleLine.js +10 -9
- package/lib/domain/model/noSale/index.js +16 -5
- package/lib/domain/model/order/OrderDeliveryAssignmentLine.js +7 -6
- package/lib/domain/model/order/OrderTotalsAccumulator.js +1 -0
- package/lib/domain/model/order/index.js +18 -5
- package/lib/domain/model/paidOperation/PaidOperationLine.js +8 -7
- package/lib/domain/model/paidOperation/PaidOperationSignatureLine.js +6 -5
- package/lib/domain/model/paidOperation/StartPaidOperationLine.js +10 -9
- package/lib/domain/model/paidOperation/index.js +17 -6
- package/lib/domain/model/paymentDevice/UploadDeviceLogLine.js +7 -7
- package/lib/domain/model/paymentDevice/index.js +15 -4
- package/lib/domain/model/print/PrintStatusLine.js +6 -5
- package/lib/domain/model/print/index.js +15 -4
- package/lib/domain/model/receipt/BaseReceiptLineDecorator.js +1 -0
- package/lib/domain/model/receipt/FiscalReceiptLine.js +22 -21
- package/lib/domain/model/receipt/GiftReceiptLine.js +6 -5
- package/lib/domain/model/receipt/ItemCommentLine.js +6 -5
- package/lib/domain/model/receipt/PrintRetryLine.js +5 -4
- package/lib/domain/model/receipt/PrintRetryLineDecorator.js +5 -4
- package/lib/domain/model/receipt/PrinterStatusReceiptLineDecorator.js +5 -4
- package/lib/domain/model/receipt/ReceiptDestinationReceiptLineDecorator.js +8 -7
- package/lib/domain/model/receipt/ReceiptLine.js +30 -29
- package/lib/domain/model/receipt/ReceiptOptionLine.js +12 -11
- package/lib/domain/model/receipt/index.js +26 -12
- package/lib/domain/model/reprint/ReprintTransactionLine.js +8 -7
- package/lib/domain/model/reprint/index.js +15 -4
- package/lib/domain/model/salesperson/SalespersonLine.js +7 -6
- package/lib/domain/model/salesperson/index.js +15 -4
- package/lib/domain/model/sendsale/SendSaleConversionLine.js +5 -4
- package/lib/domain/model/sendsale/index.js +15 -4
- package/lib/domain/model/shipping/ShippingFeeChangeLine.js +11 -10
- package/lib/domain/model/shipping/ShippingFeeLineChangeDecorator.js +10 -9
- package/lib/domain/model/shipping/index.js +16 -5
- package/lib/domain/model/subscription/AddSubscriptionLine.js +8 -7
- package/lib/domain/model/subscription/ModifySubscriptionLine.js +8 -7
- package/lib/domain/model/subscription/RemoveSubscriptionLine.js +5 -4
- package/lib/domain/model/subscription/index.js +17 -6
- package/lib/domain/model/supervisorOverride/SupervisorOverrideLine.js +5 -4
- package/lib/domain/model/supervisorOverride/index.js +16 -4
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.js +21 -20
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.js +1 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.js +1 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.js +14 -13
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.js +5 -4
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.js +5 -4
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.js +1 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.js +14 -13
- package/lib/domain/model/taxExempt/VoidedItemTaxExemptLineDecorator.js +5 -4
- package/lib/domain/model/taxExempt/VoidedTransactionTaxExemptLineDecorator.js +5 -4
- package/lib/domain/model/taxExempt/index.js +25 -13
- package/lib/domain/model/taxLottery/TaxLotteryLine.js +5 -4
- package/lib/domain/model/taxLottery/index.js +15 -4
- package/lib/domain/model/taxOverride/BaseTaxOverrideLine.js +13 -12
- package/lib/domain/model/taxOverride/BaseTaxOverrideLineDecorator.js +1 -0
- package/lib/domain/model/taxOverride/ModifyTaxOverrideLine.js +6 -5
- package/lib/domain/model/taxOverride/TaxOverrideLine.js +5 -4
- package/lib/domain/model/taxOverride/TaxOverrideLineModificationDecorator.js +5 -4
- package/lib/domain/model/taxOverride/VoidedTaxOverrideLineDecorator.js +5 -4
- package/lib/domain/model/taxOverride/index.js +21 -9
- package/lib/domain/model/taxRecord/TaxRecordLine.js +24 -23
- package/lib/domain/model/taxRecord/index.js +16 -4
- package/lib/domain/model/taxRefund/ReprintTaxRefundLine.js +8 -7
- package/lib/domain/model/taxRefund/StartTaxRefundLine.js +7 -6
- package/lib/domain/model/taxRefund/TaxRefundInterfaces.js +1 -0
- package/lib/domain/model/taxRefund/TaxRefundLine.js +9 -8
- package/lib/domain/model/taxRefund/TaxRefundSession.js +22 -21
- package/lib/domain/model/taxRefund/VoidTaxRefundLine.js +8 -7
- package/lib/domain/model/taxRefund/index.js +20 -9
- package/lib/domain/model/tender/BaseTenderLineDecorator.js +1 -0
- package/lib/domain/model/tender/CancelSubscriptionTokenLine.js +1 -0
- package/lib/domain/model/tender/OfflineAuthorization.js +1 -0
- package/lib/domain/model/tender/RefundedTenderLineDecorator.js +1 -0
- package/lib/domain/model/tender/TenderAuthorizationStatusLine.js +28 -28
- package/lib/domain/model/tender/TenderChangeCancelLine.js +6 -5
- package/lib/domain/model/tender/TenderLine.js +25 -24
- package/lib/domain/model/tender/TenderSignatureLine.js +7 -6
- package/lib/domain/model/tender/TenderTaxLineDecorator.js +5 -4
- package/lib/domain/model/tender/TenderUtils.js +1 -0
- package/lib/domain/model/tender/VoidedTenderLineDecorator.js +7 -6
- package/lib/domain/model/tender/exchange/StartTenderExchangeLine.js +7 -6
- package/lib/domain/model/tender/exchange/index.js +15 -4
- package/lib/domain/model/tender/index.js +30 -18
- package/lib/domain/model/tender/reversals/Interfaces.js +1 -0
- package/lib/domain/model/tender/reversals/index.js +15 -4
- package/lib/domain/model/tender/valueCard/Interfaces.js +1 -0
- package/lib/domain/model/tender/valueCard/index.js +15 -4
- package/lib/domain/model/tender/valueCertificate/Interfaces.js +1 -0
- package/lib/domain/model/tender/valueCertificate/index.js +15 -4
- package/lib/domain/model/terminal/FiscalPrinterAbortLineType.js +1 -0
- package/lib/domain/model/terminal/FiscalPrinterReportLineType.js +10 -9
- package/lib/domain/model/terminal/FiscalPrinterStatusLineType.js +5 -4
- package/lib/domain/model/terminal/FiscalPrinterSyncLineType.js +7 -6
- package/lib/domain/model/terminal/TerminalStateChangeLine.js +6 -5
- package/lib/domain/model/terminal/index.js +19 -8
- package/lib/domain/model/till/StartTillLine.js +14 -13
- package/lib/domain/model/till/TenderTransferLine.js +13 -12
- package/lib/domain/model/till/TillAdjustmentLine.js +8 -7
- package/lib/domain/model/till/TillCountLine.js +11 -10
- package/lib/domain/model/till/TillFloatLine.js +12 -11
- package/lib/domain/model/till/TillStateChangeLine.js +10 -9
- package/lib/domain/model/till/index.js +20 -9
- package/lib/domain/model/transaction/AttachmentLine.js +6 -5
- package/lib/domain/model/transaction/CloseTransactionLine.js +1 -0
- package/lib/domain/model/transaction/IPostVoidSearchResult.js +1 -0
- package/lib/domain/model/transaction/RecordTransactionLine.js +7 -6
- package/lib/domain/model/transaction/SignatureLine.js +7 -6
- package/lib/domain/model/transaction/SuspendTransactionLine.js +6 -5
- package/lib/domain/model/transaction/TotalTransactionLine.js +6 -5
- package/lib/domain/model/transaction/TransactionResumeCompleteLine.js +1 -0
- package/lib/domain/model/transaction/TransactionResumeStartLine.js +6 -5
- package/lib/domain/model/transaction/TransactionReturnModeLine.js +1 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.js +10 -7
- package/lib/domain/model/transaction/fiscal/index.js +15 -4
- package/lib/domain/model/transaction/index.js +26 -15
- package/lib/domain/model/transaction/order/ItemFulfillmentReferenceLine.js +6 -5
- package/lib/domain/model/transaction/order/ItemPickupSignatureLine.js +6 -5
- package/lib/domain/model/transaction/order/OrderReferenceLine.js +6 -5
- package/lib/domain/model/transaction/order/index.js +17 -6
- package/lib/domain/model/user/AuthenticationFailedLine.js +6 -5
- package/lib/domain/model/user/PasswordExpiration.js +5 -4
- package/lib/domain/model/user/UserLine.js +8 -7
- package/lib/domain/model/user/index.js +18 -6
- package/lib/domain/model/void/LineVoidLine.js +13 -12
- package/lib/domain/model/void/TransactionVoidLine.js +11 -10
- package/lib/domain/model/void/VoidedLineDecorator.js +1 -0
- package/lib/domain/model/void/index.js +17 -6
- package/lib/domain/processing/PosBusinessAction.js +8 -8
- package/lib/domain/processing/index.js +15 -4
- package/lib/domain/service/index.js +17 -0
- package/lib/domain/utility/index.js +17 -6
- package/lib/domain/utility/orderUtils.js +6 -5
- package/lib/domain/utility/supervisorOverride.js +9 -4
- package/lib/domain/utility/utils.js +11 -7
- package/lib/index.js +16 -5
- package/package.json +11 -7
package/lib/config/DiTypes.js
CHANGED
package/lib/config/ErrorCodes.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SSF_CURRENCY_MISMATCH_I18N_CODE = exports.SSF_PRICE_NOT_FOUND_I18N_CODE = exports.SSF_PRICING_API_ERROR_I18N_CODE = exports.SSF_ORDER_ERROR_CODE = exports.SSF_ERROR_POPULATING_STORE_ITEM_ERROR_CODE = exports.SSF_PRICING_API_ERROR_CODE = exports.SSF_DATA_ERROR_CODE = exports.SSF_LINE_TYPE_ERROR_CODE = exports.SSF_DECORATOR_ERROR_CODE = exports.SSF_TRANSACTION_ERROR_CODE = void 0;
|
|
3
4
|
// Error codes
|
|
4
5
|
exports.SSF_TRANSACTION_ERROR_CODE = "SSF_TRANSACTION_ERROR_CODE";
|
|
5
6
|
exports.SSF_DECORATOR_ERROR_CODE = "SSF_DECORATOR_ERROR_CODE";
|
package/lib/config/index.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
__exportStar(require("./DiTypes"), exports);
|
|
18
|
+
__exportStar(require("./ErrorCodes"), exports);
|
|
19
|
+
__exportStar(require("./inversify"), exports);
|
|
9
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { interfaces } from "inversify";
|
|
2
|
-
export
|
|
2
|
+
export type BindToCallback<T> = (bind: interfaces.BindingToSyntax<T>) => void;
|
|
3
3
|
export declare function bindExternal<T>(bind: interfaces.Bind, serviceIdentifier: interfaces.ServiceIdentifier<T>, bindToCallback: BindToCallback<T>): void;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
__exportStar(require("./binding-helpers"), exports);
|
|
18
|
+
__exportStar(require("./inversify.terminal.config"), exports);
|
|
19
|
+
__exportStar(require("./inversify.app.config"), exports);
|
|
9
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,6 +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.createDomainAfterCreateAuthContainerModule = exports.createAppDomainContainerModule = exports.loadAppDomainAfterCreateAuth = exports.loadAppDomain = void 0;
|
|
12
13
|
const inversify_1 = require("inversify");
|
|
13
14
|
const binding_helpers_1 = require("./binding-helpers");
|
|
14
15
|
const DiTypes_1 = require("../DiTypes");
|
|
@@ -32,13 +33,13 @@ function loadAppDomainAfterCreateAuth(container, external) {
|
|
|
32
33
|
exports.loadAppDomainAfterCreateAuth = loadAppDomainAfterCreateAuth;
|
|
33
34
|
function createAppDomainContainerModule(external) {
|
|
34
35
|
return new inversify_1.ContainerModule((bind) => {
|
|
35
|
-
binding_helpers_1.bindExternal(bind, DiTypes_1.default.IAppLocalFeaturesStorage, external.IAppLocalFeaturesStorage);
|
|
36
|
+
(0, binding_helpers_1.bindExternal)(bind, DiTypes_1.default.IAppLocalFeaturesStorage, external.IAppLocalFeaturesStorage);
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
exports.createAppDomainContainerModule = createAppDomainContainerModule;
|
|
39
40
|
function createDomainAfterCreateAuthContainerModule(external) {
|
|
40
41
|
return new inversify_1.ContainerModule((bind) => {
|
|
41
|
-
binding_helpers_1.bindExternal(bind, DiTypes_1.default.ITransactionReferenceFormatter, external.ITransactionReferenceFormatter);
|
|
42
|
+
(0, binding_helpers_1.bindExternal)(bind, DiTypes_1.default.ITransactionReferenceFormatter, external.ITransactionReferenceFormatter);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
exports.createDomainAfterCreateAuthContainerModule = createDomainAfterCreateAuthContainerModule;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
17
|
+
__exportStar(require("./transaction-services.config"), exports);
|
|
7
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,6 +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.createTransactionServicesDomainContainerModule = exports.loadTransactionServicesDomain = void 0;
|
|
12
13
|
const inversify_1 = require("inversify");
|
|
13
14
|
const binding_helpers_1 = require("../binding-helpers");
|
|
14
15
|
const DiTypes_1 = require("../../DiTypes");
|
|
@@ -23,7 +24,7 @@ function loadTransactionServicesDomain(container, external) {
|
|
|
23
24
|
exports.loadTransactionServicesDomain = loadTransactionServicesDomain;
|
|
24
25
|
function createTransactionServicesDomainContainerModule(external) {
|
|
25
26
|
return new inversify_1.ContainerModule((bind) => {
|
|
26
|
-
binding_helpers_1.bindExternal(bind, DiTypes_1.default.ITransactionAccountingService, external.ITransactionAccountingService);
|
|
27
|
+
(0, binding_helpers_1.bindExternal)(bind, DiTypes_1.default.ITransactionAccountingService, external.ITransactionAccountingService);
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
exports.createTransactionServicesDomainContainerModule = createTransactionServicesDomainContainerModule;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SELL_ITEM_NOT_ON_FILE_EVENT = exports.ITEM_TAX_OVERRIDE_EVENT = exports.ITEM_NOT_ON_FILE_EVENT = exports.ISSUE_GIFT_CERTIFICATE_EVENT = exports.ISSUE_GIFT_CARD_EVENT = exports.COMMENT_ITEM_EVENT = exports.GIFT_RECEIPT_TRANSACTION_EVENT = exports.GIFT_RECEIPT_ITEM_EVENT = exports.FIND_LOYALTY_VOUCHERS_EVENT = exports.FIND_CUSTOMERS_EVENT = exports.RESTORE_LOYALTY_DISCOUNT_EVENT = exports.ENROLL_CUSTOMER_EVENT = exports.LOYALTY_ENROLLMENT_EVENT = exports.LOYALTY_DISCOUNT_EVENT = exports.CUSTOM_LOYALTY_DISCOUNT_EVENT = exports.FAST_DISCOUNT_EVENT = exports.EXIT_ATTENDANT_MODE_EVENT = exports.ENTER_ATTENDANT_MODE_EVENT = exports.EMPLOYEE_DISCOUNT_OVERRIDE_EVENT = exports.CREATE_CUSTOMER_EVENT = exports.CORRUPTED_TRANSACTION_EVENT = exports.USER_CONTINUE_CASH_DRAWER_OPEN_EVENT = exports.CLOSE_TRANSACTION_EVENT = exports.CLOSE_TERMINAL_EVENT = exports.CHANGE_PASSWORD_EVENT = exports.CANCEL_PARTIAL_AUTHORIZATION_EVENT = exports.CANCEL_TENDER_SESSION_EVENT = exports.BALANCE_INQUIRY_RECEIPT_EVENT = exports.BALANCE_INQUIRY_EVENT = exports.BAG_FEE_EVENT = exports.ASSIGN_ORDER_CUSTOMER_EVENT = exports.ASSIGN_CUSTOMER_EVENT = exports.ADD_CUSTOMER_EVENT = exports.APP_STARTUP_EVENT = exports.APPLY_TAX_OVERRIDE_EVENT = exports.APPLY_TENDER_REFUND_EVENT = exports.APPLY_TENDER_PAYMENT_EVENT = exports.APPLY_TENDER_EVENT = exports.APPLY_EMPLOYEE_TRANSACTION_DISCOUNT_EVENT = exports.APPLY_EMPLOYEE_DISCOUNT_EVENT = exports.APPLY_SINGLE_USE_COUPON_EVENT = exports.ADD_CUSTOMER_ALTERNATE_KEY_EVENT = exports.ASSIGN_CUSTOMER_BY_ALTERNATE_KEY_EVENT = exports.APPLY_ALTERNATE_KEY_EVENT = exports.APPLY_COUPON_EVENT = exports.ADD_TAX_CUSTOMER_EVENT = exports.ADD_TRANSACTION_TAX_EXEMPT_EVENT = exports.ADD_ITEM_FEE_EVENT = exports.ADD_TRANSACTION_FEE_EVENT = exports.ADD_RECEIPT_EVENT = void 0;
|
|
4
|
+
exports.RECORD_CASH_DRAWER_STATUS_EVENT = exports.RECEIPT_STATUS_EVENT = exports.QUANTITY_CHANGE_EVENT = exports.PRINT_FISCAL_PRINTER_CHANGE_RETRY_EVENT = exports.PRINT_FISCAL_RETRY_EVENT = exports.FISCAL_POST_VOID_NO_RECEIPT = exports.PRINT_FISCAL_RECEIPT_EVENT = exports.PRINT_PENDING_RECEIPT_LINES = exports.PRINT_RECEIPT_EVENT = exports.CREATE_EINVOICE_EVENT = exports.PRICE_CHANGE_EVENT = exports.POST_VOID_TRANSACTION_EVENT = exports.POST_VOID_RESTORED_TRANSACTION_EVENT = exports.VALIDATE_VAT_NUMBER_EVENT = exports.FISCAL_DOCUMENT_NUMBER_APP_RELOAD_EVENT = exports.FISCAL_DOCUMENT_NO_EVENT = exports.POST_VOID_FAILED_EVENT = exports.OPEN_TERMINAL_EVENT = exports.SEARCH_NON_MERCH_ITEMS_EVENT = exports.MULTI_LINE_EVENT = exports.MODIFY_TRANSACTION_TAX_EXEMPT_EVENT = exports.MODIFY_TRANSACTION_MANUAL_DISCOUNT_EVENT = exports.MODIFY_MANUAL_DISCOUNT_EVENT = exports.MODIFY_ITEM_MANUAL_DISCOUNT_EVENT = exports.MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT = exports.APPLY_EMPLOYEE_CUSTOMER_DISCOUNT_EVENT = exports.ADD_EMPLOYEE_CUSTOMER_EVENT = exports.PERMANENT_MEMBERSHIP_DISCOUNT_EVENT = exports.MANUAL_TRANSACTION_DISCOUNT_EVENT = exports.MANUAL_ITEM_DISCOUNT_EVENT = exports.MANUAL_DISCOUNT_VALIDATION_EVENT = exports.LOOKUP_CUSTOMER_EVENT = exports.LOG_ON_UNATTENDED_USER_EVENT = exports.LOG_ON_EVENT = exports.LOG_OFF_EVENT = exports.SEARCH_ORDERS_EVENT = exports.RESERVE_INVENTORY_EVENT = exports.INVENTORY_EVENT = exports.RETURN_ITEM_NOT_ON_FILE_EVENT = exports.RECORD_TRANSACTION_REFERENCE_FOR_ORDER_EVENT = exports.ORDER_DISCOUNT_ROUNDING_ADJUSTMENT_EVENT = exports.ORDER_ITEM_FULFILLMENT_REFERENCE_EVENT = exports.PREPAID_TENDERS_TO_APPLY_EVENT = exports.ORDER_REFERENCE_EVENT = exports.ORDER_ITEM_MULTI_LINE_EVENT = exports.ORDER_ITEM_PICKUP_EVENT = exports.RESERVED_ORDER_ITEM_CANCELLATION_EVENT = exports.ORDER_ITEM_RESTORE_EVENT = exports.ORDER_ITEM_CANCELLATION_EVENT = exports.ORDER_ITEM_NOT_ON_FILE_EVENT = void 0;
|
|
5
|
+
exports.TENDER_CHANGE_FALLBACK_EVENT = exports.TENDER_CASHOUT_EVENT = exports.TENDER_CHANGE_EVENT = exports.TENDER_AUTH_STATUS_EVENT = exports.TENDER_AUTH_REVERSAL_EVENT = exports.GET_REFUNDABLE_TENDERS_EVENT = exports.SYNC_STATE_EVENT = exports.COMPLETE_SUSPEND_TRANSACTION_EVENT = exports.SUSPEND_TRANSACTION_EVENT = exports.EXIT_RETURN_MODE_EVENT = exports.ENTER_RETURN_MODE_EVENT = exports.ORDER_ITEM_EVENT = exports.ITEM_FEE_REFUND_EVENT = exports.RETURN_ITEM_EVENT = exports.SHIPPING_FEE_REFUND_EVENT = exports.ADD_SHIPPING_FEE_EVENT = exports.SHIPPING_FEE_CHANGE_EVENT = exports.SHIPPING_FEE_EVENT = exports.SELL_ITEM_EVENT = exports.APPLY_ITEM_EVENT = exports.SEARCH_POST_VOIDABLE_TRANSACTION_EVENT = exports.SEARCH_ITEM_VARIANTS_EVENT = exports.SEARCH_ITEM_EVENT = exports.QUERY_MERCHANDISE_HIERARCHY_NODES_EVENT = exports.SALESPERSON_TRANSACTION_ASSOCIATION_EVENT = exports.SALESPERSON_SEARCH_EVENT = exports.SALESPERSON_ITEM_ASSOCIATION_EVENT = exports.SALESPERSON_ASSOCIATION_EVENT = exports.SALESPERSON_VALIDATION_EVENT = exports.TENDER_AUTH_MANUAL_REVERSAL_EVENT = exports.RETURN_COUPON_EVENT = exports.RETRY_AUTHORIZATION_EVENT = exports.RESET_SUBSCRIPTION_AUTHORIZATION_TOKEN_EVENT = exports.APPLY_SUBSCRIPTION_AUTHORIZATION_TOKEN_EVENT = exports.RETRIEVE_SUBSCRIPTION_AUTHORIZATION_TOKEN_EVENT = exports.RESTORE_TRANSACTION_EVENT = exports.RESET_AUTHORIZATION_TIMER_EVENT = exports.RESET_CASH_DRAWER_EVENT = exports.CONFIRM_CASH_DRAWER_CLOSED_EVENT = exports.REPRINT_TRANSACTION_RECEIPTS_EVENT = exports.REPRINT_NON_FISCAL_RECEIPT_EVENT = exports.REPRINT_NON_FISCAL_LAST_RECEIPT_EVENT = exports.REPRINT_RECEIPT_EVENT = exports.REPRINT_LAST_TRANSACTION_RECEIPTS_EVENT = exports.REPRINT_LAST_RECEIPT_EVENT = exports.REMOVE_LOYALTY_DISCOUNTS_EVENT = exports.REMOVE_CUSTOMER_ALTERNATE_KEY_EVENT = exports.REMOVE_CUSTOMER_EVENT = exports.REMOVE_ASSOCIATED_MANUAL_DISCOUNTS_EVENT = exports.FISCAL_RECEIPT_STATUS_EVENT = void 0;
|
|
6
|
+
exports.ITEM_TAX_EXEMPT_EVENT = exports.VOID_ITEM_LINE_EVENT = exports.VOID_PRICE_CHANGE_LINE_EVENT = exports.VOID_COUPON_LINE_EVENT = exports.VOID_CASH_DRAWER_TENDER_EVENT = exports.VOID_DISCOUNT_LINE_EVENT = exports.SETUP_FISCAL_DEVICE_STATUS_EVENT = exports.RETRY_SETUP_FISCAL_DEVICE_EVENT = exports.SETUP_FISCAL_DEVICE_EVENT = exports.REPLACE_FISCAL_DEVICE_HOST_STATUS_EVENT = exports.RETRY_REPLACE_FISCAL_DEVICE_HOST_EVENT = exports.REPLACE_FISCAL_DEVICE_HOST_EVENT = exports.REPLACE_FISCAL_DEVICE_STATUS_EVENT = exports.RETRY_REPLACE_FISCAL_DEVICE_EVENT = exports.REPLACE_FISCAL_DEVICE_EVENT = exports.GET_FISCAL_DEVICE_INFORMATION_EVENT = exports.FISCAL_DEVICE_ACTIVITY_RESULT_EVENT = exports.FISCAL_SYNC_DATA_STATUS = exports.FISCAL_SYNC_ROUNDING_STATUS = exports.FISCAL_SYNC_DATE_STATUS = exports.FISCAL_SYNC_RECEIPT_FOOTER_STATUS = exports.FISCAL_SYNC_RECEIPT_HEADER_STATUS = exports.FISCAL_SYNC_LOGO_STATUS = exports.FISCAL_SYNC_DEPT_STATUS = exports.FISCAL_SYNC_VAT_STATUS = exports.SYNC_FISCAL_PRINTER_DATA_EVENT = exports.FISCAL_PRINTER_QUERY_STATUS = exports.FISCAL_PRINTER_STATUS_OFFLINE = exports.FISCAL_PRINTER_STATUS_EVENT = exports.SYNC_FISCAL_PRINTER_ABORT_EVENT = exports.FISCAL_REPORT_STATUS = exports.PRINT_X_REPORT = exports.PRINT_Z_REPORT = exports.UPDATE_USER_PREFERENCES_EVENT = exports.UPDATE_USER_PREFERRED_LANGUAGE_EVENT = exports.UPDATE_RECEIPT_DESTINATIONS_EVENT = exports.UPDATE_CONTACT_EVENT = exports.UPDATE_CUSTOMER_ENROLLMENT_EVENT = exports.UPDATE_CUSTOMER_EVENT = exports.TRANSACTION_TAX_OVERRIDE_EVENT = exports.TRANSACTION_TAX_EXEMPT_EVENT = exports.TRANSACTION_RECEIPTS_EVENT = exports.MAKE_DONATION_EVENT = exports.TRANSACTION_FEE_EVENT = exports.TRANSACTION_FEE_CHANGE_QUANTITY_EVENT = exports.TERMINAL_STATE_SYNC_EVENT = exports.ITEM_PICKUP_SIGNATURE_EVENT = exports.SIGNATURE_EVENT = exports.TENDER_SIGNATURE_EVENT = exports.TENDER_CHANGE_CANCEL_EVENT = void 0;
|
|
7
|
+
exports.ADD_ITEM_TAX_EXEMPT_EVENT = exports.START_TILL_TO_BANK_EVENT = exports.TILL_TO_BANK_EVENT = exports.RECORD_TRANSACTION_FOR_OFFLINE_RETURN_REFERENCE_EVENT = exports.RECORD_TRANSACTION_FOR_RETURN_REFERENCE_EVENT = exports.MODIFY_RETURN_ITEM_REASON_CODE_EVENT = exports.APPLY_RETURN_WITH_TRANSACTION_EVENT = exports.START_TILL_AUDIT_EVENT = exports.TILL_AUDIT_EVENT = exports.START_TILL_COUNT_EVENT = exports.TILL_COUNT_EVENT = exports.PRINT_PAID_OPERATION_RECEIPT_EVENT = exports.START_TILL_TO_SAFE_EVENT = exports.START_SAFE_TO_TILL_EVENT = exports.TILL_TO_SAFE_EVENT = exports.SAFE_TO_TILL_EVENT = exports.PAID_SIGNATURE_EVENT = exports.START_PAID_OUT_EVENT = exports.START_PAID_IN_EVENT = exports.PAID_OUT_EVENT = exports.PAID_IN_EVENT = exports.VOID_NO_SALE_TRANSACTION_EVENT = exports.PRINT_NO_SALE_RECEIPT_EVENT = exports.NO_SALE_EVENT = exports.START_NO_SALE_EVENT = exports.RECORD_TOTAL_TRANSACTION_EVENT = exports.CALCULATE_LINE_LOYALTY_MEMBERSHIP_EVENT = exports.APPLY_LOYALTY_MEMBERSHIP_EVENT = exports.CALCULATE_LOYALTY_MEMBERSHIP_EVENT = exports.PRINT_TILL_RECEIPT_EVENT = exports.START_TILL_OUT_EVENT = exports.START_TILL_IN_EVENT = exports.TILL_OUT_MODIFIED_FLOAT_AMOUNT_AUTHORIZATION_EVENT = exports.TILL_OUT_EVENT = exports.TILL_IN_EVENT = exports.OPEN_CASH_DRAWER_EVENT = exports.TOTAL_TRANSACTION_EVENT = exports.RESTORE_SUPERVISOR_OVERRIDE_RETURN_ITEM_EVENT = exports.RETURN_TOTAL_EVENT = exports.TRANSACTION_RESUME_COMPLETE_EVENT = exports.TRANSACTION_RESUME_EVENT = exports.VOID_TENDER_CONTROL_TRANSACTION_EVENT = exports.VOID_TAX_OVERRIDE_EVENT = exports.VOID_TRANSACTION_TAX_EXEMPT_EVENT = exports.VOID_DONATION_EVENT = exports.VOID_FEE_EVENT = exports.VOID_TRANSACTION_EVENT = exports.VOID_TILL_CONTROL_TRANSACTION_EVENT = exports.VOID_TENDER_LINE_EVENT = exports.VOID_LINE_EVENT = void 0;
|
|
8
|
+
exports.UPLOAD_DEVICE_LOGS_EVENT = exports.FIND_VALUE_CERTIFICATES_EVENT = exports.FIND_TAX_CUSTOMER_FROM_HISTORICAL_EVENT = exports.START_EXCHANGE_RATE_ENTRY_EVENT = exports.LOOKUP_EXCHANGE_RATES_EVENT = exports.INIT_CACHED_DATA_EVENT = exports.FIND_TAX_LOTTERY_CUSTOMER_CODE_FROM_HISTORICAL_EVENT = exports.APPLY_DISCOUNT_EVENT = exports.FISCAL_SIGNATURE_EVENT = exports.FINISH_FISCAL_TRANSACTION_STATUS_EVENT = exports.FINISH_FISCAL_TRANSACTION_EVENT = exports.START_FISCAL_TRANSACTION_STATUS_EVENT = exports.START_FISCAL_TRANSACTION_EVENT = exports.TENDER_TRANSFER_FROM_ACCOUNT_EVENT = exports.TENDER_EXCHANGE_OUT_EVENT = exports.TENDER_EXCHANGE_IN_EVENT = exports.TENDER_EXCHANGE_EVENT = exports.MODIFY_ITEM_SUBSCRIPTION_EVENT = exports.REMOVE_TRANSACTION_SUBSCRIPTIONS_EVENT = exports.REMOVE_ITEM_SUBSCRIPTION_EVENT = exports.ADD_ITEM_SUBSCRIPTION_EVENT = exports.APPLY_ITEM_SUBSCRIPTION_EVENT = exports.CAPTURE_LOTTERY_CODE_EVENT = exports.START_OPEN_CASH_DRAWER_EVENT = exports.TAX_REFUND_DEFERRED_EVENT = exports.START_TAX_REFUND_DEFERRED_EVENT = exports.TAX_REFUND_VOID_EVENT = exports.START_TAX_REFUND_VOID_EVENT = exports.TAX_REFUND_REPRINT_EVENT = exports.START_TAX_REFUND_REPRINT_EVENT = exports.COMPLETE_RETURN_WITH_TRANSACTION_EVENT = exports.DOMAIN_NOTIFICATION_EVENT = exports.MODIFY_ITEM_TAX_OVERRIDE_EVENT = exports.SEARCH_HISTORICAL_TRANSACTIONS_EVENT = exports.DISCONNECT_TAX_REFUND_EVENT = exports.SKIP_TAX_REFUND_EVENT = exports.TAX_REFUND_PRINT_STATUS_EVENT = exports.TAX_REFUND_STATUS_EVENT = exports.OPEN_TAX_REFUND_UI_EVENT = exports.TAX_REFUND_EVENT = exports.START_TAX_REFUND_EVENT = exports.TILL_RECONCILIATION_EVENT = exports.START_TILL_RECONCILIATION_EVENT = exports.RECORD_TRANSACTION_FOR_ORDER_EVENT = exports.SELECT_TRANSACTION_FOR_RETURN_EVENT = exports.RECORD_TRANSACTION_FOR_RETURN_EVENT = exports.EXIT_RETURN_WITH_TRANSACTION_EVENT = exports.ENTER_RETURN_WITH_TRANSACTION_EVENT = exports.VOID_ITEM_TAX_EXEMPT_EVENT = exports.MODIFY_ITEM_TAX_EXEMPT_EVENT = void 0;
|
|
9
|
+
exports.UPDATE_LINE_DISPLAY_EVENT = exports.APPLY_ITEM_SEND_SALE_EVENT = exports.APPLY_ITEM_EXTENSIBILITY_FORM_DATA_EVENT = exports.CLEAR_VALUE_CERTIFICATE_INQUIRY_RESULTS_EVENT = exports.BYPASS_REFUNDED_TAX_FREE_WARNING_EVENT = void 0;
|
|
3
10
|
// State Events
|
|
4
11
|
exports.ADD_RECEIPT_EVENT = "AddReceipt";
|
|
5
12
|
exports.ADD_TRANSACTION_FEE_EVENT = "AddTransactionFee";
|
package/lib/domain/index.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
__exportStar(require("./model/"), exports);
|
|
18
|
+
__exportStar(require("./processing/"), exports);
|
|
19
|
+
__exportStar(require("./service/"), exports);
|
|
20
|
+
__exportStar(require("./utility/"), exports);
|
|
21
|
+
__exportStar(require("./UIBusinessEventTypes"), exports);
|
|
10
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isApplicationControlTransaction = exports.ApplicationControlTransaction = exports.APPLICATION_CONTROL_TRANSACTION_TYPE = void 0;
|
|
3
4
|
const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
|
|
4
5
|
const config_1 = require("../../config");
|
|
5
6
|
const RetailTransaction_1 = require("./RetailTransaction");
|
|
@@ -20,7 +21,7 @@ class ApplicationControlTransaction extends RetailTransaction_1.RetailTransactio
|
|
|
20
21
|
}
|
|
21
22
|
clone() {
|
|
22
23
|
const transaction = super.clone();
|
|
23
|
-
if (!exports.isApplicationControlTransaction(transaction)) {
|
|
24
|
+
if (!(0, exports.isApplicationControlTransaction)(transaction)) {
|
|
24
25
|
throw new scp_component_store_selling_core_1.PosError("Cannot clone ApplicationControlTransaction, because new " +
|
|
25
26
|
"instance is not a ApplicationControlTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
|
|
26
27
|
}
|
|
@@ -40,8 +41,9 @@ class ApplicationControlTransaction extends RetailTransaction_1.RetailTransactio
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
exports.ApplicationControlTransaction = ApplicationControlTransaction;
|
|
43
|
-
|
|
44
|
+
const isApplicationControlTransaction = (transaction) => {
|
|
44
45
|
return (transaction instanceof ApplicationControlTransaction ||
|
|
45
46
|
transaction.transactionType === exports.APPLICATION_CONTROL_TRANSACTION_TYPE);
|
|
46
47
|
};
|
|
48
|
+
exports.isApplicationControlTransaction = isApplicationControlTransaction;
|
|
47
49
|
//# sourceMappingURL=ApplicationControlTransaction.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseLineDecorator = exports.isDecoratorOfType = exports.getDecoratedTransactionLines = exports.getBaseTransactionLine = exports.getDecoratedTransactionLine = exports.isDecorator = void 0;
|
|
3
4
|
const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
|
|
4
5
|
const ErrorCodes_1 = require("../../config/ErrorCodes");
|
|
5
6
|
const VoidInterfaces_1 = require("./VoidInterfaces");
|
|
6
7
|
const BaseTransactionLine_1 = require("./BaseTransactionLine");
|
|
7
|
-
|
|
8
|
+
const isDecorator = (transactionLine) => {
|
|
8
9
|
// tslint:disable-next-line:no-use-before-declare
|
|
9
10
|
return transactionLine instanceof BaseLineDecorator;
|
|
10
11
|
};
|
|
12
|
+
exports.isDecorator = isDecorator;
|
|
11
13
|
/**
|
|
12
14
|
* Get the first decorated transaction line of the specified decorator type found while ascending the
|
|
13
15
|
* decoratedTransactionLine tree.
|
|
@@ -17,7 +19,7 @@ exports.isDecorator = (transactionLine) => {
|
|
|
17
19
|
*/
|
|
18
20
|
function getDecoratedTransactionLine(transactionLine, decoratorType) {
|
|
19
21
|
let line = transactionLine;
|
|
20
|
-
while (exports.isDecorator(line)) {
|
|
22
|
+
while ((0, exports.isDecorator)(line)) {
|
|
21
23
|
if (line.lineDecoratorType === decoratorType) {
|
|
22
24
|
return line;
|
|
23
25
|
}
|
|
@@ -33,7 +35,7 @@ exports.getDecoratedTransactionLine = getDecoratedTransactionLine;
|
|
|
33
35
|
*/
|
|
34
36
|
function getBaseTransactionLine(transactionLine) {
|
|
35
37
|
let line = transactionLine;
|
|
36
|
-
while (exports.isDecorator(line)) {
|
|
38
|
+
while ((0, exports.isDecorator)(line)) {
|
|
37
39
|
line = line.decoratedTransactionLine;
|
|
38
40
|
}
|
|
39
41
|
return line;
|
|
@@ -50,7 +52,7 @@ exports.getBaseTransactionLine = getBaseTransactionLine;
|
|
|
50
52
|
function getDecoratedTransactionLines(transactionLine, decoratorTypes) {
|
|
51
53
|
const result = [];
|
|
52
54
|
let line = transactionLine;
|
|
53
|
-
while (exports.isDecorator(line)) {
|
|
55
|
+
while ((0, exports.isDecorator)(line)) {
|
|
54
56
|
// check if the line decorator type matches any of the decorator types being looked for
|
|
55
57
|
if (decoratorTypes.indexOf(line.lineDecoratorType) >= 0) {
|
|
56
58
|
result.push(line);
|
|
@@ -79,18 +81,6 @@ exports.isDecoratorOfType = isDecoratorOfType;
|
|
|
79
81
|
* T is the class or interface of line that is decorated by the subclass.
|
|
80
82
|
*/
|
|
81
83
|
class BaseLineDecorator extends BaseTransactionLine_1.BaseTransactionLine {
|
|
82
|
-
// End of BaseTransactionLine API --------------------------------------------------------------
|
|
83
|
-
// Since this class is abstract, only subclasses need access to the constructor.
|
|
84
|
-
constructor(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber, couldDecoratorAffectPricing, couldDecoratorAffectTaxation) {
|
|
85
|
-
super(decoratedTransactionLine.lineNumber, decoratedTransactionLine.lineType);
|
|
86
|
-
this._lineDecoratorType = lineDecoratorType;
|
|
87
|
-
this._decoratedTransactionLine = decoratedTransactionLine;
|
|
88
|
-
this._annotationDescription = annotationDescription;
|
|
89
|
-
this._annotationSourceType = annotationSourceType;
|
|
90
|
-
this._annotationSourceLineNumber = annotationSourceLineNumber;
|
|
91
|
-
this._couldDecoratorAffectPricing = couldDecoratorAffectPricing;
|
|
92
|
-
this._couldDecoratorAffectTaxation = couldDecoratorAffectTaxation;
|
|
93
|
-
}
|
|
94
84
|
static getLineDecoratorTypeFromJsonObject(transactionLineJsonObject) {
|
|
95
85
|
return transactionLineJsonObject._lineDecoratorType;
|
|
96
86
|
}
|
|
@@ -144,7 +134,7 @@ class BaseLineDecorator extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
144
134
|
}
|
|
145
135
|
hasDecorator(lineDecoratorType) {
|
|
146
136
|
let transactionLine = this;
|
|
147
|
-
while (transactionLine && exports.isDecorator(transactionLine)) {
|
|
137
|
+
while (transactionLine && (0, exports.isDecorator)(transactionLine)) {
|
|
148
138
|
if (transactionLine.lineDecoratorType === lineDecoratorType) {
|
|
149
139
|
return true;
|
|
150
140
|
}
|
|
@@ -188,14 +178,26 @@ class BaseLineDecorator extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
188
178
|
}
|
|
189
179
|
get voided() {
|
|
190
180
|
// We don't want the decorator to make it look like all decorated lines are voidable, so we check that, first.
|
|
191
|
-
return VoidInterfaces_1.isVoidableLine(this._decoratedTransactionLine) ? this._decoratedTransactionLine.voided : undefined;
|
|
181
|
+
return (0, VoidInterfaces_1.isVoidableLine)(this._decoratedTransactionLine) ? this._decoratedTransactionLine.voided : undefined;
|
|
192
182
|
}
|
|
193
183
|
get voidSource() {
|
|
194
184
|
// We don't want the decorator to make it look like all decorated lines are voidable, so we check that, first.
|
|
195
|
-
return VoidInterfaces_1.isVoidableLine(this._decoratedTransactionLine)
|
|
185
|
+
return (0, VoidInterfaces_1.isVoidableLine)(this._decoratedTransactionLine)
|
|
196
186
|
? this._decoratedTransactionLine.voidSource
|
|
197
187
|
: undefined;
|
|
198
188
|
}
|
|
189
|
+
// End of BaseTransactionLine API --------------------------------------------------------------
|
|
190
|
+
// Since this class is abstract, only subclasses need access to the constructor.
|
|
191
|
+
constructor(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber, couldDecoratorAffectPricing, couldDecoratorAffectTaxation) {
|
|
192
|
+
super(decoratedTransactionLine.lineNumber, decoratedTransactionLine.lineType);
|
|
193
|
+
this._lineDecoratorType = lineDecoratorType;
|
|
194
|
+
this._decoratedTransactionLine = decoratedTransactionLine;
|
|
195
|
+
this._annotationDescription = annotationDescription;
|
|
196
|
+
this._annotationSourceType = annotationSourceType;
|
|
197
|
+
this._annotationSourceLineNumber = annotationSourceLineNumber;
|
|
198
|
+
this._couldDecoratorAffectPricing = couldDecoratorAffectPricing;
|
|
199
|
+
this._couldDecoratorAffectTaxation = couldDecoratorAffectTaxation;
|
|
200
|
+
}
|
|
199
201
|
clone() {
|
|
200
202
|
const newBaseLineDecorator = super.clone();
|
|
201
203
|
newBaseLineDecorator._lineDecoratorType = this._lineDecoratorType;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseTransactionLine = void 0;
|
|
3
4
|
const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
|
|
4
5
|
const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
|
|
5
6
|
const User_1 = require("./User");
|
|
6
7
|
const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.storesellingfeatures.domain.model.BaseTransactionLine");
|
|
7
8
|
class BaseTransactionLine {
|
|
8
|
-
// Since this is an abstract class, only subclasses need access to the constructor
|
|
9
|
-
constructor(lineNumber, lineType, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax, endDateTime, performingUser, originalLineNumber) {
|
|
10
|
-
this._lineNumber = lineNumber;
|
|
11
|
-
this._lineType = lineType;
|
|
12
|
-
this._extendedAmount = extendedAmount;
|
|
13
|
-
this._extendedAmountExcludingTax = extendedAmountExcludingTax;
|
|
14
|
-
this._extendedAmountIncludingTax = extendedAmountIncludingTax;
|
|
15
|
-
this._endDateTime = endDateTime;
|
|
16
|
-
this._performingUser = performingUser;
|
|
17
|
-
this._originalLineNumber = originalLineNumber;
|
|
18
|
-
}
|
|
19
9
|
static lineNumberFromJsonObject(transactionLineJsonObj) {
|
|
20
10
|
return transactionLineJsonObj._lineNumber;
|
|
21
11
|
}
|
|
@@ -115,6 +105,17 @@ class BaseTransactionLine {
|
|
|
115
105
|
newLine._originalLineNumber = lineNumber;
|
|
116
106
|
return logger.traceExit(entryMessage, newLine);
|
|
117
107
|
}
|
|
108
|
+
// Since this is an abstract class, only subclasses need access to the constructor
|
|
109
|
+
constructor(lineNumber, lineType, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax, endDateTime, performingUser, originalLineNumber) {
|
|
110
|
+
this._lineNumber = lineNumber;
|
|
111
|
+
this._lineType = lineType;
|
|
112
|
+
this._extendedAmount = extendedAmount;
|
|
113
|
+
this._extendedAmountExcludingTax = extendedAmountExcludingTax;
|
|
114
|
+
this._extendedAmountIncludingTax = extendedAmountIncludingTax;
|
|
115
|
+
this._endDateTime = endDateTime;
|
|
116
|
+
this._performingUser = performingUser;
|
|
117
|
+
this._originalLineNumber = originalLineNumber;
|
|
118
|
+
}
|
|
118
119
|
/**
|
|
119
120
|
* In general, line numbers should not be changed as they are part
|
|
120
121
|
* of the business key for a transaction line. The updateLineNumber
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELIVERY_CONTACT_UPDATED_EVENT = exports.AssignCustomerForReturnAction = exports.LinePropertyOverrides = exports.SendSaleTaxEnum = exports.ATCUDDataEnum = exports.EmployeeValidation = exports.OrderTypeCode = exports.DigitalSignatureCategory = exports.CalculationProfileTypesEnum = exports.CheckThresholdAgainst = exports.ItemDiscountBehavior = exports.USER_NOTIFICATION_ERROR_EVENT_TYPE = exports.RETURN_WITH_TRANSACTION_ITEM_EVENT = exports.ITEM_QUANTITY_CHANGE_EVENT = exports.CASH_DRAWER_OPEN_REQUESTED_EVENT = exports.TENDER_CHANGE_CANCEL_EVENT_TYPE = exports.STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE = exports.STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE = exports.TRANSACTION_RESUMING_ON_STARTUP_EVENT = exports.TRANSACTION_WAITING_ON_STARTUP_EVENT = exports.APPLICATION_STARTUP_EVENT = exports.PRODUCT_ATTRIBUTE_TYPE_STYLE = exports.APPLICATION_CONTEXT = exports.SourceForOrderHistory = exports.TillAccountabilityMode = exports.TillState = exports.ItemLookupType = exports.CollectedDataKey = exports.UiInputKey = exports.LotteryVoidDescription = exports.LotteryVoidReason = exports.SecurityAuthorizationStatusType = exports.TenderAdjustmentType = exports.OverTenderRule = exports.TenderAuthCategory = exports.VoidSource = exports.GiftReceiptMode = exports.ReprintTransactionType = exports.ReceiptStatus = exports.ReceiptType = exports.Usage = void 0;
|
|
3
4
|
var Usage;
|
|
4
5
|
(function (Usage) {
|
|
5
6
|
Usage["Required"] = "Required";
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCorruptedTransaction = exports.CorruptedTransaction = exports.CORRUPTED_TRANSACTION_TYPE = void 0;
|
|
3
4
|
const _1 = require("./");
|
|
4
5
|
exports.CORRUPTED_TRANSACTION_TYPE = "CorruptedTransaction";
|
|
5
6
|
class CorruptedTransaction extends _1.RetailTransaction {
|
|
6
|
-
constructor(deviceIdentity, businessDayDate, transactionNumber, user, transactionId) {
|
|
7
|
-
super(deviceIdentity, businessDayDate, transactionNumber, exports.CORRUPTED_TRANSACTION_TYPE, user, transactionId);
|
|
8
|
-
}
|
|
9
7
|
static createFromJsonObj(transactionJsonObj, transactionLineFactory) {
|
|
10
8
|
const transactionId = _1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
|
|
11
9
|
const deviceIdentity = _1.RetailTransaction.getDeviceIdentityFromJsonObject(transactionJsonObj);
|
|
@@ -20,9 +18,12 @@ class CorruptedTransaction extends _1.RetailTransaction {
|
|
|
20
18
|
corruptedTransaction.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
|
|
21
19
|
return corruptedTransaction;
|
|
22
20
|
}
|
|
21
|
+
constructor(deviceIdentity, businessDayDate, transactionNumber, user, transactionId) {
|
|
22
|
+
super(deviceIdentity, businessDayDate, transactionNumber, exports.CORRUPTED_TRANSACTION_TYPE, user, transactionId);
|
|
23
|
+
}
|
|
23
24
|
clone() {
|
|
24
25
|
const transaction = super.clone();
|
|
25
|
-
if (exports.isCorruptedTransaction(transaction)) {
|
|
26
|
+
if ((0, exports.isCorruptedTransaction)(transaction)) {
|
|
26
27
|
transaction._rawTransactionJSON = this._rawTransactionJSON;
|
|
27
28
|
transaction._conversionError = this._conversionError;
|
|
28
29
|
}
|
|
@@ -51,8 +52,9 @@ class CorruptedTransaction extends _1.RetailTransaction {
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
exports.CorruptedTransaction = CorruptedTransaction;
|
|
54
|
-
|
|
55
|
+
const isCorruptedTransaction = (transaction) => {
|
|
55
56
|
return (transaction instanceof CorruptedTransaction ||
|
|
56
57
|
transaction.transactionType === exports.CORRUPTED_TRANSACTION_TYPE);
|
|
57
58
|
};
|
|
59
|
+
exports.isCorruptedTransaction = isCorruptedTransaction;
|
|
58
60
|
//# sourceMappingURL=CorruptedTransaction.js.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCreateEinvoiceLine = exports.CreateEinvoiceLine = exports.EINVOICE_CREATION_RESULT = exports.CREATE_EINVOICE_LINE_TYPE = void 0;
|
|
3
4
|
const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
|
|
4
5
|
const BaseTransactionLine_1 = require("./BaseTransactionLine");
|
|
5
6
|
const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.storesellingfeatures.domain.model.CreateEinvoiceLine");
|
|
6
7
|
exports.CREATE_EINVOICE_LINE_TYPE = "CreateEinvoice";
|
|
7
8
|
exports.EINVOICE_CREATION_RESULT = "EinvoiceCreationResult";
|
|
8
9
|
class CreateEinvoiceLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
9
|
-
// Since the constructor is only called from the create methods it is made protected to prevent use by others.
|
|
10
|
-
constructor(lineNumber, lineType) {
|
|
11
|
-
super(lineNumber, lineType);
|
|
12
|
-
}
|
|
13
10
|
/**
|
|
14
11
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
15
12
|
* data collected during the qualification process.
|
|
@@ -46,6 +43,10 @@ class CreateEinvoiceLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
46
43
|
get serviceResult() {
|
|
47
44
|
return this._serviceResult;
|
|
48
45
|
}
|
|
46
|
+
// Since the constructor is only called from the create methods it is made protected to prevent use by others.
|
|
47
|
+
constructor(lineNumber, lineType) {
|
|
48
|
+
super(lineNumber, lineType);
|
|
49
|
+
}
|
|
49
50
|
clone() {
|
|
50
51
|
const logEntryMessage = logger.traceEntry("clone", arguments);
|
|
51
52
|
const newCreateEinvoiceLine = super.clone();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertTag = exports.convertAttribute = exports.convertLoyaltyMembership = exports.TaxCustomer = exports.Customer = exports.CustomerAttributes = exports.TriggeredMessageType = exports.CUSTOMER_DATE_FORMAT = exports.CUSTOMER_LOOKUP_RESULT = exports.CUSTOMER_UPDATE_RESULT = exports.CUSTOMER_CREATION_RESULT = exports.CUSTOMER_CREATE_PROPERTIES = exports.CUSTOMER_LIST = exports.TAX_CUSTOMER = exports.CUSTOMER = void 0;
|
|
3
4
|
const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-transaction");
|
|
4
5
|
//
|
|
5
6
|
// Keys for use in relaying customers in collectedData (qualification) and nonContextualData (action).
|
|
@@ -243,13 +244,14 @@ class Customer {
|
|
|
243
244
|
var _a;
|
|
244
245
|
//filter out already joined plans and make sure default plan is first.
|
|
245
246
|
this.availableLoyaltyPlans =
|
|
246
|
-
storeLoyaltyPlans &&
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
this.loyaltyMemberships
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
storeLoyaltyPlans &&
|
|
248
|
+
((_a = storeLoyaltyPlans.loyaltyPlans
|
|
249
|
+
.filter((plan) => {
|
|
250
|
+
return (!(this.loyaltyMemberships &&
|
|
251
|
+
this.loyaltyMemberships.find((custMembership) => custMembership.loyaltyPlanKey === plan.loyaltyPlanKey)) &&
|
|
252
|
+
plan.membershipTypes &&
|
|
253
|
+
plan.membershipTypes.find((memType) => memType.assignAtPos));
|
|
254
|
+
})) === null || _a === void 0 ? void 0 : _a.sort((l1, l2) => (l1.loyaltyPlanKey === storeLoyaltyPlans.defaultLoyaltyPlanKey ? -1 : 1)));
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
exports.Customer = Customer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCustomerServiceTransaction = exports.CustomerServiceTransaction = exports.CUSTOMER_TRANSACTION_TYPE = void 0;
|
|
3
4
|
const RetailTransaction_1 = require("./RetailTransaction");
|
|
4
5
|
exports.CUSTOMER_TRANSACTION_TYPE = "CustomerServiceTransaction";
|
|
5
6
|
class CustomerServiceTransaction extends RetailTransaction_1.RetailTransaction {
|
|
@@ -31,9 +32,10 @@ class CustomerServiceTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
exports.CustomerServiceTransaction = CustomerServiceTransaction;
|
|
34
|
-
|
|
35
|
+
const isCustomerServiceTransaction = (transaction) => {
|
|
35
36
|
return (transaction &&
|
|
36
37
|
(transaction instanceof CustomerServiceTransaction ||
|
|
37
38
|
transaction.transactionType === exports.CUSTOMER_TRANSACTION_TYPE));
|
|
38
39
|
};
|
|
40
|
+
exports.isCustomerServiceTransaction = isCustomerServiceTransaction;
|
|
39
41
|
//# sourceMappingURL=CustomerServiceTransaction.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailVerification = exports.VERIFIED_DATA_LIST = exports.EMAILVERIFICATION = exports.EmailStatus = void 0;
|
|
3
4
|
var EmailStatus;
|
|
4
5
|
(function (EmailStatus) {
|
|
5
6
|
EmailStatus["Valid"] = "Valid";
|
|
@@ -9,6 +10,12 @@ var EmailStatus;
|
|
|
9
10
|
exports.EMAILVERIFICATION = "EmailVerification";
|
|
10
11
|
exports.VERIFIED_DATA_LIST = "VERIFIED_DATA_LIST";
|
|
11
12
|
class EmailVerification {
|
|
13
|
+
static createFromJsonObject(emailFromJson) {
|
|
14
|
+
if (!emailFromJson) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
return new EmailVerification(emailFromJson._emailAddress);
|
|
18
|
+
}
|
|
12
19
|
/**
|
|
13
20
|
* Construct email verify status object to be used to exchange the verification message with the server.
|
|
14
21
|
*
|
|
@@ -18,12 +25,6 @@ class EmailVerification {
|
|
|
18
25
|
constructor(emailAddress) {
|
|
19
26
|
this._emailAddress = emailAddress;
|
|
20
27
|
}
|
|
21
|
-
static createFromJsonObject(emailFromJson) {
|
|
22
|
-
if (!emailFromJson) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
return new EmailVerification(emailFromJson._emailAddress);
|
|
26
|
-
}
|
|
27
28
|
get emailAddress() {
|
|
28
29
|
return this._emailAddress;
|
|
29
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Employee = exports.AccountStatus = void 0;
|
|
3
4
|
var AccountStatus;
|
|
4
5
|
(function (AccountStatus) {
|
|
5
6
|
AccountStatus["Active"] = "Active";
|
|
@@ -8,6 +9,15 @@ var AccountStatus;
|
|
|
8
9
|
AccountStatus["Locked"] = "Locked";
|
|
9
10
|
})(AccountStatus = exports.AccountStatus || (exports.AccountStatus = {}));
|
|
10
11
|
class Employee {
|
|
12
|
+
static createFromIEmployee(employee) {
|
|
13
|
+
return new Employee(employee.employeeNumber, employee.firstName, employee.lastName, employee.employeeIdNumber, employee.middleName, employee.displayName, employee.accountStatus, employee.associatedUsername, employee.isDefault);
|
|
14
|
+
}
|
|
15
|
+
static createFromJsonObject(employeeFromJson) {
|
|
16
|
+
if (!employeeFromJson) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return new Employee(employeeFromJson._employeeNumber, employeeFromJson._firstName, employeeFromJson._lastName, employeeFromJson._employeeIdNumber, employeeFromJson._middleName, employeeFromJson._displayName, employeeFromJson._accountStatus, employeeFromJson._associatedUsername, employeeFromJson._isDefault);
|
|
20
|
+
}
|
|
11
21
|
/**
|
|
12
22
|
* Construct a new employee object to be used to exchange the information with the server.
|
|
13
23
|
*
|
|
@@ -32,15 +42,6 @@ class Employee {
|
|
|
32
42
|
this._associatedUsername = associatedUsername;
|
|
33
43
|
this._isDefault = isDefault;
|
|
34
44
|
}
|
|
35
|
-
static createFromIEmployee(employee) {
|
|
36
|
-
return new Employee(employee.employeeNumber, employee.firstName, employee.lastName, employee.employeeIdNumber, employee.middleName, employee.displayName, employee.accountStatus, employee.associatedUsername, employee.isDefault);
|
|
37
|
-
}
|
|
38
|
-
static createFromJsonObject(employeeFromJson) {
|
|
39
|
-
if (!employeeFromJson) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
return new Employee(employeeFromJson._employeeNumber, employeeFromJson._firstName, employeeFromJson._lastName, employeeFromJson._employeeIdNumber, employeeFromJson._middleName, employeeFromJson._displayName, employeeFromJson._accountStatus, employeeFromJson._associatedUsername, employeeFromJson._isDefault);
|
|
43
|
-
}
|
|
44
45
|
get employeeNumber() {
|
|
45
46
|
return this._employeeNumber;
|
|
46
47
|
}
|