@aptos-scp/scp-component-store-selling-features-domain-model 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -0
- package/README.md +96 -0
- package/lib/config/DiTypes.d.ts +6 -0
- package/lib/config/DiTypes.js +10 -0
- package/lib/config/ErrorCodes.d.ts +10 -0
- package/lib/config/ErrorCodes.js +14 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.js +9 -0
- package/lib/config/inversify/binding-helpers.d.ts +3 -0
- package/lib/config/inversify/binding-helpers.js +7 -0
- package/lib/config/inversify/index.d.ts +3 -0
- package/lib/config/inversify/index.js +9 -0
- package/lib/config/inversify/inversify.app.config.d.ts +19 -0
- package/lib/config/inversify/inversify.app.config.js +45 -0
- package/lib/config/inversify/inversify.terminal.config/index.d.ts +1 -0
- package/lib/config/inversify/inversify.terminal.config/index.js +7 -0
- package/lib/config/inversify/inversify.terminal.config/transaction-services.config.d.ts +11 -0
- package/lib/config/inversify/inversify.terminal.config/transaction-services.config.js +30 -0
- package/lib/domain/UIBusinessEventTypes.d.ts +305 -0
- package/lib/domain/UIBusinessEventTypes.js +313 -0
- package/lib/domain/index.d.ts +5 -0
- package/lib/domain/index.js +10 -0
- package/lib/domain/model/AddressVerification.d.ts +21 -0
- package/lib/domain/model/AddressVerification.js +3 -0
- package/lib/domain/model/ApplicationControlTransaction.d.ts +13 -0
- package/lib/domain/model/ApplicationControlTransaction.js +47 -0
- package/lib/domain/model/AtcudCodePrefixData.d.ts +19 -0
- package/lib/domain/model/AtcudCodePrefixData.js +3 -0
- package/lib/domain/model/BaseLineDecorator.d.ts +83 -0
- package/lib/domain/model/BaseLineDecorator.js +216 -0
- package/lib/domain/model/BaseTransactionLine.d.ts +71 -0
- package/lib/domain/model/BaseTransactionLine.js +183 -0
- package/lib/domain/model/CashDrawerDetail.d.ts +21 -0
- package/lib/domain/model/CashDrawerDetail.js +3 -0
- package/lib/domain/model/Constants.d.ts +977 -0
- package/lib/domain/model/Constants.js +985 -0
- package/lib/domain/model/CorruptedTransaction.d.ts +16 -0
- package/lib/domain/model/CorruptedTransaction.js +58 -0
- package/lib/domain/model/Coupon.d.ts +8 -0
- package/lib/domain/model/Coupon.js +3 -0
- package/lib/domain/model/CreateEinvoiceLine.d.ts +32 -0
- package/lib/domain/model/CreateEinvoiceLine.js +71 -0
- package/lib/domain/model/Customer.d.ts +387 -0
- package/lib/domain/model/Customer.js +320 -0
- package/lib/domain/model/CustomerServiceTransaction.d.ts +12 -0
- package/lib/domain/model/CustomerServiceTransaction.js +39 -0
- package/lib/domain/model/Department.d.ts +15 -0
- package/lib/domain/model/Department.js +3 -0
- package/lib/domain/model/EmailVerification.d.ts +24 -0
- package/lib/domain/model/EmailVerification.js +35 -0
- package/lib/domain/model/Employee.d.ts +80 -0
- package/lib/domain/model/Employee.js +73 -0
- package/lib/domain/model/EndOfTransactionTenderingSession.d.ts +39 -0
- package/lib/domain/model/EndOfTransactionTenderingSession.js +89 -0
- package/lib/domain/model/ExchangeRates.d.ts +13 -0
- package/lib/domain/model/ExchangeRates.js +8 -0
- package/lib/domain/model/FiscalControlTransaction.d.ts +12 -0
- package/lib/domain/model/FiscalControlTransaction.js +43 -0
- package/lib/domain/model/FulfillmentGroup.d.ts +35 -0
- package/lib/domain/model/FulfillmentGroup.js +137 -0
- package/lib/domain/model/IAppLocalFeaturesStorage.d.ts +78 -0
- package/lib/domain/model/IAppLocalFeaturesStorage.js +3 -0
- package/lib/domain/model/ICreateEinvoiceLine.d.ts +9 -0
- package/lib/domain/model/ICreateEinvoiceLine.js +3 -0
- package/lib/domain/model/IEmployeeDiscount.d.ts +15 -0
- package/lib/domain/model/IEmployeeDiscount.js +3 -0
- package/lib/domain/model/IFiscalTransactionNumberMaintainer.d.ts +10 -0
- package/lib/domain/model/IFiscalTransactionNumberMaintainer.js +8 -0
- package/lib/domain/model/IInvoiceOperation.d.ts +10 -0
- package/lib/domain/model/IInvoiceOperation.js +8 -0
- package/lib/domain/model/ILastRetailTransactionInfo.d.ts +13 -0
- package/lib/domain/model/ILastRetailTransactionInfo.js +3 -0
- package/lib/domain/model/ILastTransactionStatus.d.ts +5 -0
- package/lib/domain/model/ILastTransactionStatus.js +3 -0
- package/lib/domain/model/ILoyaltyVoucher.d.ts +28 -0
- package/lib/domain/model/ILoyaltyVoucher.js +9 -0
- package/lib/domain/model/IPrinterInfo.d.ts +6 -0
- package/lib/domain/model/IPrinterInfo.js +3 -0
- package/lib/domain/model/ISequence.d.ts +8 -0
- package/lib/domain/model/ISequence.js +3 -0
- package/lib/domain/model/IServiceResultLine.d.ts +4 -0
- package/lib/domain/model/IServiceResultLine.js +3 -0
- package/lib/domain/model/ISingleUseCoupon.d.ts +22 -0
- package/lib/domain/model/ISingleUseCoupon.js +38 -0
- package/lib/domain/model/ITransactionMetadataPersistanceObject.d.ts +12 -0
- package/lib/domain/model/ITransactionMetadataPersistanceObject.js +3 -0
- package/lib/domain/model/Inventory.d.ts +156 -0
- package/lib/domain/model/Inventory.js +78 -0
- package/lib/domain/model/ItemHandlingSession.d.ts +40 -0
- package/lib/domain/model/ItemHandlingSession.js +131 -0
- package/lib/domain/model/LoyaltyMembership.d.ts +153 -0
- package/lib/domain/model/LoyaltyMembership.js +23 -0
- package/lib/domain/model/MerchandiseTransaction.d.ts +310 -0
- package/lib/domain/model/MerchandiseTransaction.js +1299 -0
- package/lib/domain/model/MetricsLogs.d.ts +41 -0
- package/lib/domain/model/MetricsLogs.js +3 -0
- package/lib/domain/model/MunicipalFiscalCode.d.ts +25 -0
- package/lib/domain/model/MunicipalFiscalCode.js +3 -0
- package/lib/domain/model/NoSaleTransaction.d.ts +13 -0
- package/lib/domain/model/NoSaleTransaction.js +49 -0
- package/lib/domain/model/Order.d.ts +67 -0
- package/lib/domain/model/Order.js +190 -0
- package/lib/domain/model/OrderTotals.d.ts +44 -0
- package/lib/domain/model/OrderTotals.js +76 -0
- package/lib/domain/model/Organization.d.ts +99 -0
- package/lib/domain/model/Organization.js +3 -0
- package/lib/domain/model/PrepaidTender.d.ts +14 -0
- package/lib/domain/model/PrepaidTender.js +3 -0
- package/lib/domain/model/ReceiptSession.d.ts +87 -0
- package/lib/domain/model/ReceiptSession.js +206 -0
- package/lib/domain/model/ReprintReceiptTransaction.d.ts +49 -0
- package/lib/domain/model/ReprintReceiptTransaction.js +179 -0
- package/lib/domain/model/ResumeTransactionSession.d.ts +22 -0
- package/lib/domain/model/ResumeTransactionSession.js +56 -0
- package/lib/domain/model/RetailTransaction.d.ts +127 -0
- package/lib/domain/model/RetailTransaction.js +556 -0
- package/lib/domain/model/Sendsale.d.ts +4 -0
- package/lib/domain/model/Sendsale.js +3 -0
- package/lib/domain/model/StoreItem.d.ts +175 -0
- package/lib/domain/model/StoreItem.js +750 -0
- package/lib/domain/model/StoredValueCardSession.d.ts +29 -0
- package/lib/domain/model/StoredValueCardSession.js +65 -0
- package/lib/domain/model/StoredValueCertificateSession.d.ts +47 -0
- package/lib/domain/model/StoredValueCertificateSession.js +153 -0
- package/lib/domain/model/SubscriptionTokenSession.d.ts +22 -0
- package/lib/domain/model/SubscriptionTokenSession.js +60 -0
- package/lib/domain/model/Subscriptions.d.ts +12 -0
- package/lib/domain/model/Subscriptions.js +3 -0
- package/lib/domain/model/TaxRefundControlTransaction.d.ts +13 -0
- package/lib/domain/model/TaxRefundControlTransaction.js +50 -0
- package/lib/domain/model/TenderAuthorizationSession.d.ts +102 -0
- package/lib/domain/model/TenderAuthorizationSession.js +337 -0
- package/lib/domain/model/TenderControlTransaction.d.ts +30 -0
- package/lib/domain/model/TenderControlTransaction.js +138 -0
- package/lib/domain/model/TenderHandlingSession.d.ts +100 -0
- package/lib/domain/model/TenderHandlingSession.js +379 -0
- package/lib/domain/model/TenderType.d.ts +161 -0
- package/lib/domain/model/TenderType.js +1317 -0
- package/lib/domain/model/TerminalControlTransaction.d.ts +14 -0
- package/lib/domain/model/TerminalControlTransaction.js +55 -0
- package/lib/domain/model/TerminalSession.d.ts +49 -0
- package/lib/domain/model/TerminalSession.js +122 -0
- package/lib/domain/model/TillControlTransaction.d.ts +20 -0
- package/lib/domain/model/TillControlTransaction.js +79 -0
- package/lib/domain/model/TillSession.d.ts +67 -0
- package/lib/domain/model/TillSession.js +222 -0
- package/lib/domain/model/TransactionFlowState.d.ts +26 -0
- package/lib/domain/model/TransactionFlowState.js +72 -0
- package/lib/domain/model/TransactionReferenceLine.d.ts +112 -0
- package/lib/domain/model/TransactionReferenceLine.js +323 -0
- package/lib/domain/model/User.d.ts +115 -0
- package/lib/domain/model/User.js +210 -0
- package/lib/domain/model/UserSession.d.ts +36 -0
- package/lib/domain/model/UserSession.js +186 -0
- package/lib/domain/model/UserTransaction.d.ts +12 -0
- package/lib/domain/model/UserTransaction.js +38 -0
- package/lib/domain/model/VoidInterfaces.d.ts +15 -0
- package/lib/domain/model/VoidInterfaces.js +23 -0
- package/lib/domain/model/cashDrawer/CashDrawerRequestLine.d.ts +17 -0
- package/lib/domain/model/cashDrawer/CashDrawerRequestLine.js +50 -0
- package/lib/domain/model/cashDrawer/CashDrawerSession.d.ts +67 -0
- package/lib/domain/model/cashDrawer/CashDrawerSession.js +211 -0
- package/lib/domain/model/cashDrawer/CashDrawerStatusChangeLine.d.ts +30 -0
- package/lib/domain/model/cashDrawer/CashDrawerStatusChangeLine.js +86 -0
- package/lib/domain/model/cashDrawer/ICashDrawerRequestLine.d.ts +6 -0
- package/lib/domain/model/cashDrawer/ICashDrawerRequestLine.js +3 -0
- package/lib/domain/model/cashDrawer/ICashDrawerStatusChangeLine.d.ts +13 -0
- package/lib/domain/model/cashDrawer/ICashDrawerStatusChangeLine.js +3 -0
- package/lib/domain/model/cashDrawer/index.d.ts +5 -0
- package/lib/domain/model/cashDrawer/index.js +9 -0
- package/lib/domain/model/configuration/ConfigurationUtils.d.ts +3 -0
- package/lib/domain/model/configuration/ConfigurationUtils.js +8 -0
- package/lib/domain/model/configuration/DataEntryRule.d.ts +31 -0
- package/lib/domain/model/configuration/DataEntryRule.js +303 -0
- package/lib/domain/model/configuration/I18nReceiptFormattingInterface.d.ts +38 -0
- package/lib/domain/model/configuration/I18nReceiptFormattingInterface.js +3 -0
- package/lib/domain/model/configuration/I18nTaxFreeConfig.d.ts +11 -0
- package/lib/domain/model/configuration/I18nTaxFreeConfig.js +3 -0
- package/lib/domain/model/configuration/IAccessPolicyConfig.d.ts +5 -0
- package/lib/domain/model/configuration/IAccessPolicyConfig.js +3 -0
- package/lib/domain/model/configuration/IAdapterPoliciesConfig.d.ts +24 -0
- package/lib/domain/model/configuration/IAdapterPoliciesConfig.js +13 -0
- package/lib/domain/model/configuration/IConditionalAttributeBehaviorRuleConfig.d.ts +32 -0
- package/lib/domain/model/configuration/IConditionalAttributeBehaviorRuleConfig.js +8 -0
- package/lib/domain/model/configuration/ICustomerConfig.d.ts +31 -0
- package/lib/domain/model/configuration/ICustomerConfig.js +15 -0
- package/lib/domain/model/configuration/IDataEntryRuleConfig.d.ts +66 -0
- package/lib/domain/model/configuration/IDataEntryRuleConfig.js +22 -0
- package/lib/domain/model/configuration/IDiscountAttributesConfig .d.ts +26 -0
- package/lib/domain/model/configuration/IDiscountAttributesConfig .js +8 -0
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.d.ts +27 -0
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.js +21 -0
- package/lib/domain/model/configuration/IDonationBehaviorsConfig.d.ts +9 -0
- package/lib/domain/model/configuration/IDonationBehaviorsConfig.js +3 -0
- package/lib/domain/model/configuration/IFeatureAccessConfig.d.ts +186 -0
- package/lib/domain/model/configuration/IFeatureAccessConfig.js +51 -0
- package/lib/domain/model/configuration/IFeesConfig.d.ts +109 -0
- package/lib/domain/model/configuration/IFeesConfig.js +86 -0
- package/lib/domain/model/configuration/IPrinterTypeConfig.d.ts +25 -0
- package/lib/domain/model/configuration/IPrinterTypeConfig.js +3 -0
- package/lib/domain/model/configuration/IProductInquiryBehaviorsConfig.d.ts +8 -0
- package/lib/domain/model/configuration/IProductInquiryBehaviorsConfig.js +8 -0
- package/lib/domain/model/configuration/IReasonCodesConfig.d.ts +16 -0
- package/lib/domain/model/configuration/IReasonCodesConfig.js +3 -0
- package/lib/domain/model/configuration/IReceiptConfig.d.ts +64 -0
- package/lib/domain/model/configuration/IReceiptConfig.js +24 -0
- package/lib/domain/model/configuration/IReceiptFormattingConfig.d.ts +155 -0
- package/lib/domain/model/configuration/IReceiptFormattingConfig.js +27 -0
- package/lib/domain/model/configuration/IReceiptStylingConfig.d.ts +52 -0
- package/lib/domain/model/configuration/IReceiptStylingConfig.js +18 -0
- package/lib/domain/model/configuration/IReserveInventoryConfig.d.ts +4 -0
- package/lib/domain/model/configuration/IReserveInventoryConfig.js +8 -0
- package/lib/domain/model/configuration/ISelfCheckoutModeBehaviorsConfig.d.ts +14 -0
- package/lib/domain/model/configuration/ISelfCheckoutModeBehaviorsConfig.js +3 -0
- package/lib/domain/model/configuration/ISequenceConfig.d.ts +44 -0
- package/lib/domain/model/configuration/ISequenceConfig.js +26 -0
- package/lib/domain/model/configuration/IStoreOperationsBehavior.d.ts +7 -0
- package/lib/domain/model/configuration/IStoreOperationsBehavior.js +8 -0
- package/lib/domain/model/configuration/IStoreShippingMethodConfig.d.ts +21 -0
- package/lib/domain/model/configuration/IStoreShippingMethodConfig.js +3 -0
- package/lib/domain/model/configuration/ITaxBehaviorConfig.d.ts +14 -0
- package/lib/domain/model/configuration/ITaxBehaviorConfig.js +3 -0
- package/lib/domain/model/configuration/ITaxRefundConfig.d.ts +8 -0
- package/lib/domain/model/configuration/ITaxRefundConfig.js +3 -0
- package/lib/domain/model/configuration/ITendersConfig.d.ts +88 -0
- package/lib/domain/model/configuration/ITendersConfig.js +22 -0
- package/lib/domain/model/configuration/Ii18n.d.ts +4 -0
- package/lib/domain/model/configuration/Ii18n.js +3 -0
- package/lib/domain/model/configuration/TaxLottery.d.ts +4 -0
- package/lib/domain/model/configuration/TaxLottery.js +8 -0
- package/lib/domain/model/configuration/index.d.ts +30 -0
- package/lib/domain/model/configuration/index.js +25 -0
- package/lib/domain/model/customer/CreateCustomerLine.d.ts +151 -0
- package/lib/domain/model/customer/CreateCustomerLine.js +312 -0
- package/lib/domain/model/customer/CustomerLine.d.ts +43 -0
- package/lib/domain/model/customer/CustomerLine.js +109 -0
- package/lib/domain/model/customer/ICreateCustomerLine.d.ts +16 -0
- package/lib/domain/model/customer/ICreateCustomerLine.js +3 -0
- package/lib/domain/model/customer/ICustomerI18nFormats.d.ts +126 -0
- package/lib/domain/model/customer/ICustomerI18nFormats.js +67 -0
- package/lib/domain/model/customer/ICustomerLine.d.ts +8 -0
- package/lib/domain/model/customer/ICustomerLine.js +3 -0
- package/lib/domain/model/customer/ITaxCustomerLine.d.ts +46 -0
- package/lib/domain/model/customer/ITaxCustomerLine.js +3 -0
- package/lib/domain/model/customer/IUpdateCustomerLine.d.ts +30 -0
- package/lib/domain/model/customer/IUpdateCustomerLine.js +3 -0
- package/lib/domain/model/customer/TaxCustomerLine.d.ts +105 -0
- package/lib/domain/model/customer/TaxCustomerLine.js +252 -0
- package/lib/domain/model/customer/UpdateCustomerLine.d.ts +148 -0
- package/lib/domain/model/customer/UpdateCustomerLine.js +296 -0
- package/lib/domain/model/customer/index.d.ts +9 -0
- package/lib/domain/model/customer/index.js +11 -0
- package/lib/domain/model/digitalSignature/DigitalSignatureFailureLine.d.ts +11 -0
- package/lib/domain/model/digitalSignature/DigitalSignatureFailureLine.js +33 -0
- package/lib/domain/model/digitalSignature/index.d.ts +1 -0
- package/lib/domain/model/digitalSignature/index.js +7 -0
- package/lib/domain/model/discounts/BaseManualDiscountLine.d.ts +119 -0
- package/lib/domain/model/discounts/BaseManualDiscountLine.js +435 -0
- package/lib/domain/model/discounts/BaseManualDiscountLineDecorator.d.ts +42 -0
- package/lib/domain/model/discounts/BaseManualDiscountLineDecorator.js +107 -0
- package/lib/domain/model/discounts/BasePromotionCouponLine.d.ts +22 -0
- package/lib/domain/model/discounts/BasePromotionCouponLine.js +45 -0
- package/lib/domain/model/discounts/BasePromotionCouponLineDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/BasePromotionCouponLineDecorator.js +38 -0
- package/lib/domain/model/discounts/ExpiredCouponOverrideLine.d.ts +27 -0
- package/lib/domain/model/discounts/ExpiredCouponOverrideLine.js +54 -0
- package/lib/domain/model/discounts/IManualDiscountLine.d.ts +33 -0
- package/lib/domain/model/discounts/IManualDiscountLine.js +3 -0
- package/lib/domain/model/discounts/IPromotionCouponLine.d.ts +10 -0
- package/lib/domain/model/discounts/IPromotionCouponLine.js +3 -0
- package/lib/domain/model/discounts/LoyaltyActivityDiscountLineTotalDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/LoyaltyActivityDiscountLineTotalDecorator.js +32 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLine.d.ts +52 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLine.js +131 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLineTotalDecorator.d.ts +26 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLineTotalDecorator.js +66 -0
- package/lib/domain/model/discounts/ManualDiscountLineModificationDecorator.d.ts +49 -0
- package/lib/domain/model/discounts/ManualDiscountLineModificationDecorator.js +143 -0
- package/lib/domain/model/discounts/ManualDiscountLineTotalDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/ManualDiscountLineTotalDecorator.js +32 -0
- package/lib/domain/model/discounts/ManualItemDiscountLine.d.ts +27 -0
- package/lib/domain/model/discounts/ManualItemDiscountLine.js +53 -0
- package/lib/domain/model/discounts/ManualTransactionDiscountLine.d.ts +22 -0
- package/lib/domain/model/discounts/ManualTransactionDiscountLine.js +40 -0
- package/lib/domain/model/discounts/ModifyManualDiscountLine.d.ts +29 -0
- package/lib/domain/model/discounts/ModifyManualDiscountLine.js +62 -0
- package/lib/domain/model/discounts/PromotionCouponLine.d.ts +22 -0
- package/lib/domain/model/discounts/PromotionCouponLine.js +59 -0
- package/lib/domain/model/discounts/VoidedDiscountLineDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/VoidedDiscountLineDecorator.js +38 -0
- package/lib/domain/model/discounts/VoidedLoyaltyDiscountLineDecorator.d.ts +18 -0
- package/lib/domain/model/discounts/VoidedLoyaltyDiscountLineDecorator.js +46 -0
- package/lib/domain/model/discounts/VoidedPromotionCouponLineDecorator.d.ts +13 -0
- package/lib/domain/model/discounts/VoidedPromotionCouponLineDecorator.js +32 -0
- package/lib/domain/model/discounts/employee/EmployeeDiscountLine.d.ts +17 -0
- package/lib/domain/model/discounts/employee/EmployeeDiscountLine.js +43 -0
- package/lib/domain/model/discounts/employee/index.d.ts +1 -0
- package/lib/domain/model/discounts/employee/index.js +7 -0
- package/lib/domain/model/discounts/index.d.ts +19 -0
- package/lib/domain/model/discounts/index.js +23 -0
- package/lib/domain/model/discounts/lineTypes.d.ts +12 -0
- package/lib/domain/model/discounts/lineTypes.js +30 -0
- package/lib/domain/model/donation/BaseDonationLineDecorator.d.ts +16 -0
- package/lib/domain/model/donation/BaseDonationLineDecorator.js +38 -0
- package/lib/domain/model/donation/DonationLine.d.ts +43 -0
- package/lib/domain/model/donation/DonationLine.js +102 -0
- package/lib/domain/model/donation/IDonationLine.d.ts +9 -0
- package/lib/domain/model/donation/IDonationLine.js +3 -0
- package/lib/domain/model/donation/VoidedDonationLineDecorator.d.ts +17 -0
- package/lib/domain/model/donation/VoidedDonationLineDecorator.js +43 -0
- package/lib/domain/model/donation/index.d.ts +4 -0
- package/lib/domain/model/donation/index.js +9 -0
- package/lib/domain/model/employeeCustomer/BaseEmployeeCustomerLineDecorator.d.ts +13 -0
- package/lib/domain/model/employeeCustomer/BaseEmployeeCustomerLineDecorator.js +32 -0
- package/lib/domain/model/employeeCustomer/EmployeeCustomerLine.d.ts +39 -0
- package/lib/domain/model/employeeCustomer/EmployeeCustomerLine.js +98 -0
- package/lib/domain/model/employeeCustomer/IEmployeeCustomerLine.d.ts +8 -0
- package/lib/domain/model/employeeCustomer/IEmployeeCustomerLine.js +3 -0
- package/lib/domain/model/employeeCustomer/VoidedEmployeeCustomerLineDecorator.d.ts +15 -0
- package/lib/domain/model/employeeCustomer/VoidedEmployeeCustomerLineDecorator.js +38 -0
- package/lib/domain/model/employeeCustomer/index.d.ts +4 -0
- package/lib/domain/model/employeeCustomer/index.js +9 -0
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.d.ts +26 -0
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.js +74 -0
- package/lib/domain/model/extensibilityForm/IExtensibilityForm.d.ts +8 -0
- package/lib/domain/model/extensibilityForm/IExtensibilityForm.js +3 -0
- package/lib/domain/model/extensibilityForm/index.d.ts +2 -0
- package/lib/domain/model/extensibilityForm/index.js +7 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.d.ts +68 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.js +194 -0
- package/lib/domain/model/fee/FeeLine.d.ts +179 -0
- package/lib/domain/model/fee/FeeLine.js +660 -0
- package/lib/domain/model/fee/FeeLineBaseTaxAdjustmentDecorator.d.ts +18 -0
- package/lib/domain/model/fee/FeeLineBaseTaxAdjustmentDecorator.js +52 -0
- package/lib/domain/model/fee/FeeLineChangeQuantityDecorator.d.ts +14 -0
- package/lib/domain/model/fee/FeeLineChangeQuantityDecorator.js +35 -0
- package/lib/domain/model/fee/FeeLineExtendedAmountDecorator.d.ts +38 -0
- package/lib/domain/model/fee/FeeLineExtendedAmountDecorator.js +134 -0
- package/lib/domain/model/fee/FeeLineOriginalPricingAdjustmentDecorator.d.ts +22 -0
- package/lib/domain/model/fee/FeeLineOriginalPricingAdjustmentDecorator.js +82 -0
- package/lib/domain/model/fee/FeeLinePricingExtendedAmountDecorator.d.ts +22 -0
- package/lib/domain/model/fee/FeeLinePricingExtendedAmountDecorator.js +82 -0
- package/lib/domain/model/fee/FeeLineTaxExemptDecorator.d.ts +24 -0
- package/lib/domain/model/fee/FeeLineTaxExemptDecorator.js +67 -0
- package/lib/domain/model/fee/FeeLineTaxOverrideDecorator.d.ts +21 -0
- package/lib/domain/model/fee/FeeLineTaxOverrideDecorator.js +63 -0
- package/lib/domain/model/fee/FeeQuantityChangeLine.d.ts +19 -0
- package/lib/domain/model/fee/FeeQuantityChangeLine.js +52 -0
- package/lib/domain/model/fee/IFeeLine.d.ts +104 -0
- package/lib/domain/model/fee/IFeeLine.js +3 -0
- package/lib/domain/model/fee/VoidedFeeLineDecorator.d.ts +15 -0
- package/lib/domain/model/fee/VoidedFeeLineDecorator.js +38 -0
- package/lib/domain/model/fee/index.d.ts +12 -0
- package/lib/domain/model/fee/index.js +17 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementLine.d.ts +34 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementLine.js +69 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementRetryLine.d.ts +15 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementRetryLine.js +45 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.d.ts +35 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +87 -0
- package/lib/domain/model/fiscalDevice/index.d.ts +3 -0
- package/lib/domain/model/fiscalDevice/index.js +9 -0
- package/lib/domain/model/foreignCurrency/ExchangeRateManualEntryLine.d.ts +29 -0
- package/lib/domain/model/foreignCurrency/ExchangeRateManualEntryLine.js +67 -0
- package/lib/domain/model/foreignCurrency/index.d.ts +1 -0
- package/lib/domain/model/foreignCurrency/index.js +7 -0
- package/lib/domain/model/geoLocation.d.ts +23 -0
- package/lib/domain/model/geoLocation.js +3 -0
- package/lib/domain/model/giftCard/BalanceInquiryLine.d.ts +34 -0
- package/lib/domain/model/giftCard/BalanceInquiryLine.js +86 -0
- package/lib/domain/model/giftCard/index.d.ts +1 -0
- package/lib/domain/model/giftCard/index.js +7 -0
- package/lib/domain/model/index.d.ts +108 -0
- package/lib/domain/model/index.js +95 -0
- package/lib/domain/model/inventory/ReserveInventoryLine.d.ts +32 -0
- package/lib/domain/model/inventory/ReserveInventoryLine.js +76 -0
- package/lib/domain/model/inventory/index.d.ts +1 -0
- package/lib/domain/model/inventory/index.js +7 -0
- package/lib/domain/model/item/BaseItemLineDecorator.d.ts +148 -0
- package/lib/domain/model/item/BaseItemLineDecorator.js +400 -0
- package/lib/domain/model/item/BasePriceChangeLineDecorator.d.ts +20 -0
- package/lib/domain/model/item/BasePriceChangeLineDecorator.js +50 -0
- package/lib/domain/model/item/IAllLinePricingAdjustments.d.ts +32 -0
- package/lib/domain/model/item/IAllLinePricingAdjustments.js +66 -0
- package/lib/domain/model/item/IHardSoftStopItemInfo.d.ts +11 -0
- package/lib/domain/model/item/IHardSoftStopItemInfo.js +3 -0
- package/lib/domain/model/item/IItemLine.d.ts +313 -0
- package/lib/domain/model/item/IItemLine.js +7 -0
- package/lib/domain/model/item/ISerializedPriceCalculationResultsWithSource.d.ts +45 -0
- package/lib/domain/model/item/ISerializedPriceCalculationResultsWithSource.js +3 -0
- package/lib/domain/model/item/ItemLine.d.ts +303 -0
- package/lib/domain/model/item/ItemLine.js +1169 -0
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.d.ts +75 -0
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.js +178 -0
- package/lib/domain/model/item/ItemLineBaseTaxAdjustmentDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineBaseTaxAdjustmentDecorator.js +51 -0
- package/lib/domain/model/item/ItemLineCommentReceiptDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineCommentReceiptDecorator.js +40 -0
- package/lib/domain/model/item/ItemLineExtendedAmountDecorator.d.ts +30 -0
- package/lib/domain/model/item/ItemLineExtendedAmountDecorator.js +124 -0
- package/lib/domain/model/item/ItemLineExtensibilityFormDataDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLineExtensibilityFormDataDecorator.js +43 -0
- package/lib/domain/model/item/ItemLineGiftIssueDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineGiftIssueDecorator.js +53 -0
- package/lib/domain/model/item/ItemLineGiftReceiptDecorator.d.ts +15 -0
- package/lib/domain/model/item/ItemLineGiftReceiptDecorator.js +37 -0
- package/lib/domain/model/item/ItemLineManualDiscountDecorator.d.ts +57 -0
- package/lib/domain/model/item/ItemLineManualDiscountDecorator.js +198 -0
- package/lib/domain/model/item/ItemLineNonFinancialRewardDecorator.d.ts +40 -0
- package/lib/domain/model/item/ItemLineNonFinancialRewardDecorator.js +116 -0
- package/lib/domain/model/item/ItemLineOriginalAdjustmentDecorator.d.ts +13 -0
- package/lib/domain/model/item/ItemLineOriginalAdjustmentDecorator.js +54 -0
- package/lib/domain/model/item/ItemLinePriceChangeDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLinePriceChangeDecorator.js +47 -0
- package/lib/domain/model/item/ItemLinePromotionDecorator.d.ts +45 -0
- package/lib/domain/model/item/ItemLinePromotionDecorator.js +142 -0
- package/lib/domain/model/item/ItemLineQuantityChangeDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLineQuantityChangeDecorator.js +57 -0
- package/lib/domain/model/item/ItemLineReasonCodeChangeDecorator.d.ts +16 -0
- package/lib/domain/model/item/ItemLineReasonCodeChangeDecorator.js +49 -0
- package/lib/domain/model/item/ItemLineRegularPriceDecorator.d.ts +21 -0
- package/lib/domain/model/item/ItemLineRegularPriceDecorator.js +58 -0
- package/lib/domain/model/item/ItemLineReserveInventoryDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineReserveInventoryDecorator.js +42 -0
- package/lib/domain/model/item/ItemLineRewardDecorator.d.ts +39 -0
- package/lib/domain/model/item/ItemLineRewardDecorator.js +115 -0
- package/lib/domain/model/item/ItemLineSalePriceDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineSalePriceDecorator.js +51 -0
- package/lib/domain/model/item/ItemLineSalespersonDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineSalespersonDecorator.js +44 -0
- package/lib/domain/model/item/ItemLineSendSaleDecorator.d.ts +16 -0
- package/lib/domain/model/item/ItemLineSendSaleDecorator.js +39 -0
- package/lib/domain/model/item/ItemLineSubscriptionDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineSubscriptionDecorator.js +40 -0
- package/lib/domain/model/item/ItemLineTaxExemptDecorator.d.ts +21 -0
- package/lib/domain/model/item/ItemLineTaxExemptDecorator.js +64 -0
- package/lib/domain/model/item/ItemLineTaxOverrideDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineTaxOverrideDecorator.js +59 -0
- package/lib/domain/model/item/ItemOrderCancellationLine.d.ts +27 -0
- package/lib/domain/model/item/ItemOrderCancellationLine.js +65 -0
- package/lib/domain/model/item/ItemPriceChangeLine.d.ts +44 -0
- package/lib/domain/model/item/ItemPriceChangeLine.js +131 -0
- package/lib/domain/model/item/ItemQuantityChangeLine.d.ts +31 -0
- package/lib/domain/model/item/ItemQuantityChangeLine.js +93 -0
- package/lib/domain/model/item/ReasonCodeChangeLine.d.ts +32 -0
- package/lib/domain/model/item/ReasonCodeChangeLine.js +83 -0
- package/lib/domain/model/item/ReservedOrderItemLineCancellationDecorator.d.ts +19 -0
- package/lib/domain/model/item/ReservedOrderItemLineCancellationDecorator.js +52 -0
- package/lib/domain/model/item/VoidedItemLineDecorator.d.ts +28 -0
- package/lib/domain/model/item/VoidedItemLineDecorator.js +65 -0
- package/lib/domain/model/item/VoidedPriceChangeLineDecorator.d.ts +15 -0
- package/lib/domain/model/item/VoidedPriceChangeLineDecorator.js +38 -0
- package/lib/domain/model/item/index.d.ts +37 -0
- package/lib/domain/model/item/index.js +41 -0
- package/lib/domain/model/lottery/TaxLotteryAddLine.d.ts +24 -0
- package/lib/domain/model/lottery/TaxLotteryAddLine.js +54 -0
- package/lib/domain/model/lottery/TaxLotteryModificationLine.d.ts +26 -0
- package/lib/domain/model/lottery/TaxLotteryModificationLine.js +61 -0
- package/lib/domain/model/lottery/TaxLotteryVoidLine.d.ts +28 -0
- package/lib/domain/model/lottery/TaxLotteryVoidLine.js +66 -0
- package/lib/domain/model/lottery/index.d.ts +3 -0
- package/lib/domain/model/lottery/index.js +9 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyEnrollmentLine.d.ts +46 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyEnrollmentLine.js +105 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyMembershipLine.d.ts +34 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyMembershipLine.js +117 -0
- package/lib/domain/model/loyaltyMembership/index.d.ts +2 -0
- package/lib/domain/model/loyaltyMembership/index.js +8 -0
- package/lib/domain/model/mixedBasket/IMixedBasket.d.ts +4 -0
- package/lib/domain/model/mixedBasket/IMixedBasket.js +3 -0
- package/lib/domain/model/mixedBasket/MixedBasketSession.d.ts +21 -0
- package/lib/domain/model/mixedBasket/MixedBasketSession.js +55 -0
- package/lib/domain/model/mixedBasket/index.d.ts +2 -0
- package/lib/domain/model/mixedBasket/index.js +7 -0
- package/lib/domain/model/noSale/NoSaleLine.d.ts +32 -0
- package/lib/domain/model/noSale/NoSaleLine.js +75 -0
- package/lib/domain/model/noSale/StartNoSaleLine.d.ts +33 -0
- package/lib/domain/model/noSale/StartNoSaleLine.js +75 -0
- package/lib/domain/model/noSale/index.d.ts +2 -0
- package/lib/domain/model/noSale/index.js +8 -0
- package/lib/domain/model/order/IOrderTotalsAccumulator.d.ts +23 -0
- package/lib/domain/model/order/IOrderTotalsAccumulator.js +3 -0
- package/lib/domain/model/order/OrderDeliveryAssignmentLine.d.ts +20 -0
- package/lib/domain/model/order/OrderDeliveryAssignmentLine.js +64 -0
- package/lib/domain/model/order/OrderItemReference.d.ts +5 -0
- package/lib/domain/model/order/OrderItemReference.js +3 -0
- package/lib/domain/model/order/OrderTotalsAccumulator.d.ts +39 -0
- package/lib/domain/model/order/OrderTotalsAccumulator.js +48 -0
- package/lib/domain/model/order/index.d.ts +4 -0
- package/lib/domain/model/order/index.js +8 -0
- package/lib/domain/model/paidOperation/PaidOperationLine.d.ts +23 -0
- package/lib/domain/model/paidOperation/PaidOperationLine.js +65 -0
- package/lib/domain/model/paidOperation/PaidOperationSignatureLine.d.ts +27 -0
- package/lib/domain/model/paidOperation/PaidOperationSignatureLine.js +58 -0
- package/lib/domain/model/paidOperation/StartPaidOperationLine.d.ts +34 -0
- package/lib/domain/model/paidOperation/StartPaidOperationLine.js +75 -0
- package/lib/domain/model/paidOperation/index.d.ts +3 -0
- package/lib/domain/model/paidOperation/index.js +9 -0
- package/lib/domain/model/paymentDevice/IUploadDeviceLogsLine.d.ts +6 -0
- package/lib/domain/model/paymentDevice/IUploadDeviceLogsLine.js +3 -0
- package/lib/domain/model/paymentDevice/UploadDeviceLogLine.d.ts +28 -0
- package/lib/domain/model/paymentDevice/UploadDeviceLogLine.js +57 -0
- package/lib/domain/model/paymentDevice/index.d.ts +1 -0
- package/lib/domain/model/paymentDevice/index.js +7 -0
- package/lib/domain/model/print/PrintStatusLine.d.ts +27 -0
- package/lib/domain/model/print/PrintStatusLine.js +55 -0
- package/lib/domain/model/print/index.d.ts +1 -0
- package/lib/domain/model/print/index.js +7 -0
- package/lib/domain/model/receipt/BaseReceiptLineDecorator.d.ts +49 -0
- package/lib/domain/model/receipt/BaseReceiptLineDecorator.js +115 -0
- package/lib/domain/model/receipt/FiscalReceiptLine.d.ts +63 -0
- package/lib/domain/model/receipt/FiscalReceiptLine.js +170 -0
- package/lib/domain/model/receipt/GiftReceiptLine.d.ts +17 -0
- package/lib/domain/model/receipt/GiftReceiptLine.js +51 -0
- package/lib/domain/model/receipt/IPrintRetryLine.d.ts +4 -0
- package/lib/domain/model/receipt/IPrintRetryLine.js +3 -0
- package/lib/domain/model/receipt/IReceiptLine.d.ts +37 -0
- package/lib/domain/model/receipt/IReceiptLine.js +3 -0
- package/lib/domain/model/receipt/IReceiptRefundMessage.d.ts +4 -0
- package/lib/domain/model/receipt/IReceiptRefundMessage.js +3 -0
- package/lib/domain/model/receipt/ItemCommentLine.d.ts +16 -0
- package/lib/domain/model/receipt/ItemCommentLine.js +50 -0
- package/lib/domain/model/receipt/PrintRetryLine.d.ts +14 -0
- package/lib/domain/model/receipt/PrintRetryLine.js +43 -0
- package/lib/domain/model/receipt/PrintRetryLineDecorator.d.ts +12 -0
- package/lib/domain/model/receipt/PrintRetryLineDecorator.js +28 -0
- package/lib/domain/model/receipt/PrinterStatusReceiptLineDecorator.d.ts +12 -0
- package/lib/domain/model/receipt/PrinterStatusReceiptLineDecorator.js +38 -0
- package/lib/domain/model/receipt/ReceiptDestinationReceiptLineDecorator.d.ts +18 -0
- package/lib/domain/model/receipt/ReceiptDestinationReceiptLineDecorator.js +44 -0
- package/lib/domain/model/receipt/ReceiptLine.d.ts +88 -0
- package/lib/domain/model/receipt/ReceiptLine.js +236 -0
- package/lib/domain/model/receipt/ReceiptOptionLine.d.ts +44 -0
- package/lib/domain/model/receipt/ReceiptOptionLine.js +107 -0
- package/lib/domain/model/receipt/index.d.ts +12 -0
- package/lib/domain/model/receipt/index.js +15 -0
- package/lib/domain/model/reprint/ReprintTransactionLine.d.ts +30 -0
- package/lib/domain/model/reprint/ReprintTransactionLine.js +64 -0
- package/lib/domain/model/reprint/index.d.ts +1 -0
- package/lib/domain/model/reprint/index.js +7 -0
- package/lib/domain/model/salesperson/SalespersonLine.d.ts +27 -0
- package/lib/domain/model/salesperson/SalespersonLine.js +60 -0
- package/lib/domain/model/salesperson/index.d.ts +1 -0
- package/lib/domain/model/salesperson/index.js +7 -0
- package/lib/domain/model/sendsale/SendSaleConversionLine.d.ts +25 -0
- package/lib/domain/model/sendsale/SendSaleConversionLine.js +50 -0
- package/lib/domain/model/sendsale/index.d.ts +1 -0
- package/lib/domain/model/sendsale/index.js +7 -0
- package/lib/domain/model/shipping/ShippingFeeChangeLine.d.ts +39 -0
- package/lib/domain/model/shipping/ShippingFeeChangeLine.js +95 -0
- package/lib/domain/model/shipping/ShippingFeeLineChangeDecorator.d.ts +26 -0
- package/lib/domain/model/shipping/ShippingFeeLineChangeDecorator.js +81 -0
- package/lib/domain/model/shipping/index.d.ts +2 -0
- package/lib/domain/model/shipping/index.js +8 -0
- package/lib/domain/model/subscription/AddSubscriptionLine.d.ts +31 -0
- package/lib/domain/model/subscription/AddSubscriptionLine.js +69 -0
- package/lib/domain/model/subscription/ModifySubscriptionLine.d.ts +31 -0
- package/lib/domain/model/subscription/ModifySubscriptionLine.js +69 -0
- package/lib/domain/model/subscription/RemoveSubscriptionLine.d.ts +25 -0
- package/lib/domain/model/subscription/RemoveSubscriptionLine.js +50 -0
- package/lib/domain/model/subscription/index.d.ts +3 -0
- package/lib/domain/model/subscription/index.js +9 -0
- package/lib/domain/model/supervisorOverride/ISupervisorCredentials.d.ts +4 -0
- package/lib/domain/model/supervisorOverride/ISupervisorCredentials.js +3 -0
- package/lib/domain/model/supervisorOverride/SupervisorOverrideLine.d.ts +24 -0
- package/lib/domain/model/supervisorOverride/SupervisorOverrideLine.js +51 -0
- package/lib/domain/model/supervisorOverride/index.d.ts +2 -0
- package/lib/domain/model/supervisorOverride/index.js +7 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.d.ts +53 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.js +187 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.d.ts +27 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.js +74 -0
- package/lib/domain/model/taxExempt/ITaxExemptLine.d.ts +22 -0
- package/lib/domain/model/taxExempt/ITaxExemptLine.js +3 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.d.ts +23 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.js +47 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.d.ts +32 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.js +91 -0
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.d.ts +28 -0
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.js +62 -0
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.d.ts +28 -0
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.js +62 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.d.ts +23 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.js +47 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.d.ts +32 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.js +93 -0
- package/lib/domain/model/taxExempt/VoidedItemTaxExemptLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxExempt/VoidedItemTaxExemptLineDecorator.js +38 -0
- package/lib/domain/model/taxExempt/VoidedTransactionTaxExemptLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxExempt/VoidedTransactionTaxExemptLineDecorator.js +38 -0
- package/lib/domain/model/taxExempt/index.d.ts +11 -0
- package/lib/domain/model/taxExempt/index.js +16 -0
- package/lib/domain/model/taxLottery/TaxLotteryLine.d.ts +24 -0
- package/lib/domain/model/taxLottery/TaxLotteryLine.js +49 -0
- package/lib/domain/model/taxLottery/index.d.ts +1 -0
- package/lib/domain/model/taxLottery/index.js +7 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLine.d.ts +40 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLine.js +153 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLineDecorator.d.ts +21 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLineDecorator.js +54 -0
- package/lib/domain/model/taxOverride/ITaxOverrideLine.d.ts +19 -0
- package/lib/domain/model/taxOverride/ITaxOverrideLine.js +3 -0
- package/lib/domain/model/taxOverride/ModifyTaxOverrideLine.d.ts +31 -0
- package/lib/domain/model/taxOverride/ModifyTaxOverrideLine.js +70 -0
- package/lib/domain/model/taxOverride/TaxOverrideLine.d.ts +15 -0
- package/lib/domain/model/taxOverride/TaxOverrideLine.js +49 -0
- package/lib/domain/model/taxOverride/TaxOverrideLineModificationDecorator.d.ts +14 -0
- package/lib/domain/model/taxOverride/TaxOverrideLineModificationDecorator.js +39 -0
- package/lib/domain/model/taxOverride/VoidedTaxOverrideLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxOverride/VoidedTaxOverrideLineDecorator.js +38 -0
- package/lib/domain/model/taxOverride/index.d.ts +7 -0
- package/lib/domain/model/taxOverride/index.js +12 -0
- package/lib/domain/model/taxRecord/ITaxRecordLine.d.ts +90 -0
- package/lib/domain/model/taxRecord/ITaxRecordLine.js +3 -0
- package/lib/domain/model/taxRecord/TaxRecordLine.d.ts +67 -0
- package/lib/domain/model/taxRecord/TaxRecordLine.js +175 -0
- package/lib/domain/model/taxRecord/index.d.ts +2 -0
- package/lib/domain/model/taxRecord/index.js +7 -0
- package/lib/domain/model/taxRefund/ReprintTaxRefundLine.d.ts +30 -0
- package/lib/domain/model/taxRefund/ReprintTaxRefundLine.js +64 -0
- package/lib/domain/model/taxRefund/StartTaxRefundLine.d.ts +29 -0
- package/lib/domain/model/taxRefund/StartTaxRefundLine.js +62 -0
- package/lib/domain/model/taxRefund/TaxRefundInterfaces.d.ts +229 -0
- package/lib/domain/model/taxRefund/TaxRefundInterfaces.js +36 -0
- package/lib/domain/model/taxRefund/TaxRefundLine.d.ts +34 -0
- package/lib/domain/model/taxRefund/TaxRefundLine.js +73 -0
- package/lib/domain/model/taxRefund/TaxRefundSession.d.ts +84 -0
- package/lib/domain/model/taxRefund/TaxRefundSession.js +214 -0
- package/lib/domain/model/taxRefund/VoidTaxRefundLine.d.ts +30 -0
- package/lib/domain/model/taxRefund/VoidTaxRefundLine.js +71 -0
- package/lib/domain/model/taxRefund/index.d.ts +6 -0
- package/lib/domain/model/taxRefund/index.js +12 -0
- package/lib/domain/model/tender/BaseTenderLineDecorator.d.ts +47 -0
- package/lib/domain/model/tender/BaseTenderLineDecorator.js +110 -0
- package/lib/domain/model/tender/CancelSubscriptionTokenLine.d.ts +11 -0
- package/lib/domain/model/tender/CancelSubscriptionTokenLine.js +32 -0
- package/lib/domain/model/tender/ITenderLine.d.ts +45 -0
- package/lib/domain/model/tender/ITenderLine.js +3 -0
- package/lib/domain/model/tender/OfflineAuthorization.d.ts +17 -0
- package/lib/domain/model/tender/OfflineAuthorization.js +47 -0
- package/lib/domain/model/tender/RefundedTenderLineDecorator.d.ts +12 -0
- package/lib/domain/model/tender/RefundedTenderLineDecorator.js +42 -0
- package/lib/domain/model/tender/TenderAuthorizationStatusLine.d.ts +65 -0
- package/lib/domain/model/tender/TenderAuthorizationStatusLine.js +220 -0
- package/lib/domain/model/tender/TenderChangeCancelLine.d.ts +25 -0
- package/lib/domain/model/tender/TenderChangeCancelLine.js +51 -0
- package/lib/domain/model/tender/TenderLine.d.ts +113 -0
- package/lib/domain/model/tender/TenderLine.js +385 -0
- package/lib/domain/model/tender/TenderSignatureLine.d.ts +29 -0
- package/lib/domain/model/tender/TenderSignatureLine.js +66 -0
- package/lib/domain/model/tender/TenderTaxLineDecorator.d.ts +12 -0
- package/lib/domain/model/tender/TenderTaxLineDecorator.js +29 -0
- package/lib/domain/model/tender/TenderUtils.d.ts +9 -0
- package/lib/domain/model/tender/TenderUtils.js +43 -0
- package/lib/domain/model/tender/VoidedTenderLineDecorator.d.ts +13 -0
- package/lib/domain/model/tender/VoidedTenderLineDecorator.js +43 -0
- package/lib/domain/model/tender/exchange/StartTenderExchangeLine.d.ts +28 -0
- package/lib/domain/model/tender/exchange/StartTenderExchangeLine.js +56 -0
- package/lib/domain/model/tender/exchange/index.d.ts +1 -0
- package/lib/domain/model/tender/exchange/index.js +7 -0
- package/lib/domain/model/tender/index.d.ts +16 -0
- package/lib/domain/model/tender/index.js +21 -0
- package/lib/domain/model/tender/reversals/Interfaces.d.ts +25 -0
- package/lib/domain/model/tender/reversals/Interfaces.js +10 -0
- package/lib/domain/model/tender/reversals/index.d.ts +1 -0
- package/lib/domain/model/tender/reversals/index.js +7 -0
- package/lib/domain/model/tender/valueCard/Interfaces.d.ts +84 -0
- package/lib/domain/model/tender/valueCard/Interfaces.js +104 -0
- package/lib/domain/model/tender/valueCard/index.d.ts +1 -0
- package/lib/domain/model/tender/valueCard/index.js +7 -0
- package/lib/domain/model/tender/valueCertificate/Interfaces.d.ts +228 -0
- package/lib/domain/model/tender/valueCertificate/Interfaces.js +78 -0
- package/lib/domain/model/tender/valueCertificate/index.d.ts +1 -0
- package/lib/domain/model/tender/valueCertificate/index.js +7 -0
- package/lib/domain/model/terminal/FiscalPrinterAbortLineType.d.ts +21 -0
- package/lib/domain/model/terminal/FiscalPrinterAbortLineType.js +45 -0
- package/lib/domain/model/terminal/FiscalPrinterReportLineType.d.ts +34 -0
- package/lib/domain/model/terminal/FiscalPrinterReportLineType.js +85 -0
- package/lib/domain/model/terminal/FiscalPrinterStatusLineType.d.ts +24 -0
- package/lib/domain/model/terminal/FiscalPrinterStatusLineType.js +55 -0
- package/lib/domain/model/terminal/FiscalPrinterSyncLineType.d.ts +28 -0
- package/lib/domain/model/terminal/FiscalPrinterSyncLineType.js +67 -0
- package/lib/domain/model/terminal/TerminalStateChangeLine.d.ts +27 -0
- package/lib/domain/model/terminal/TerminalStateChangeLine.js +61 -0
- package/lib/domain/model/terminal/index.d.ts +5 -0
- package/lib/domain/model/terminal/index.js +11 -0
- package/lib/domain/model/till/StartTillLine.d.ts +58 -0
- package/lib/domain/model/till/StartTillLine.js +119 -0
- package/lib/domain/model/till/TenderTransferLine.d.ts +33 -0
- package/lib/domain/model/till/TenderTransferLine.js +140 -0
- package/lib/domain/model/till/TillAdjustmentLine.d.ts +21 -0
- package/lib/domain/model/till/TillAdjustmentLine.js +64 -0
- package/lib/domain/model/till/TillCountLine.d.ts +27 -0
- package/lib/domain/model/till/TillCountLine.js +96 -0
- package/lib/domain/model/till/TillFloatLine.d.ts +29 -0
- package/lib/domain/model/till/TillFloatLine.js +90 -0
- package/lib/domain/model/till/TillStateChangeLine.d.ts +26 -0
- package/lib/domain/model/till/TillStateChangeLine.js +78 -0
- package/lib/domain/model/till/index.d.ts +6 -0
- package/lib/domain/model/till/index.js +12 -0
- package/lib/domain/model/transaction/AttachmentLine.d.ts +17 -0
- package/lib/domain/model/transaction/AttachmentLine.js +45 -0
- package/lib/domain/model/transaction/CloseTransactionLine.d.ts +22 -0
- package/lib/domain/model/transaction/CloseTransactionLine.js +44 -0
- package/lib/domain/model/transaction/IPostVoidSearchResult.d.ts +7 -0
- package/lib/domain/model/transaction/IPostVoidSearchResult.js +4 -0
- package/lib/domain/model/transaction/RecordTransactionLine.d.ts +29 -0
- package/lib/domain/model/transaction/RecordTransactionLine.js +60 -0
- package/lib/domain/model/transaction/SignatureLine.d.ts +30 -0
- package/lib/domain/model/transaction/SignatureLine.js +67 -0
- package/lib/domain/model/transaction/SuspendTransactionLine.d.ts +24 -0
- package/lib/domain/model/transaction/SuspendTransactionLine.js +52 -0
- package/lib/domain/model/transaction/TotalTransactionLine.d.ts +26 -0
- package/lib/domain/model/transaction/TotalTransactionLine.js +55 -0
- package/lib/domain/model/transaction/TransactionResumeCompleteLine.d.ts +22 -0
- package/lib/domain/model/transaction/TransactionResumeCompleteLine.js +44 -0
- package/lib/domain/model/transaction/TransactionResumeStartLine.d.ts +25 -0
- package/lib/domain/model/transaction/TransactionResumeStartLine.js +55 -0
- package/lib/domain/model/transaction/TransactionReturnModeLine.d.ts +23 -0
- package/lib/domain/model/transaction/TransactionReturnModeLine.js +45 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.d.ts +27 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.js +61 -0
- package/lib/domain/model/transaction/fiscal/index.d.ts +1 -0
- package/lib/domain/model/transaction/fiscal/index.js +7 -0
- package/lib/domain/model/transaction/index.d.ts +12 -0
- package/lib/domain/model/transaction/index.js +18 -0
- package/lib/domain/model/transaction/order/ItemFulfillmentReferenceLine.d.ts +25 -0
- package/lib/domain/model/transaction/order/ItemFulfillmentReferenceLine.js +51 -0
- package/lib/domain/model/transaction/order/ItemPickupSignatureLine.d.ts +28 -0
- package/lib/domain/model/transaction/order/ItemPickupSignatureLine.js +63 -0
- package/lib/domain/model/transaction/order/OrderReferenceLine.d.ts +25 -0
- package/lib/domain/model/transaction/order/OrderReferenceLine.js +50 -0
- package/lib/domain/model/transaction/order/index.d.ts +3 -0
- package/lib/domain/model/transaction/order/index.js +9 -0
- package/lib/domain/model/user/AuthenticationFailedLine.d.ts +16 -0
- package/lib/domain/model/user/AuthenticationFailedLine.js +45 -0
- package/lib/domain/model/user/IPasswordExpiration.d.ts +4 -0
- package/lib/domain/model/user/IPasswordExpiration.js +3 -0
- package/lib/domain/model/user/PasswordExpiration.d.ts +10 -0
- package/lib/domain/model/user/PasswordExpiration.js +38 -0
- package/lib/domain/model/user/UserLine.d.ts +33 -0
- package/lib/domain/model/user/UserLine.js +84 -0
- package/lib/domain/model/user/index.d.ts +4 -0
- package/lib/domain/model/user/index.js +9 -0
- package/lib/domain/model/void/LineVoidLine.d.ts +50 -0
- package/lib/domain/model/void/LineVoidLine.js +158 -0
- package/lib/domain/model/void/TransactionVoidLine.d.ts +34 -0
- package/lib/domain/model/void/TransactionVoidLine.js +86 -0
- package/lib/domain/model/void/VoidedLineDecorator.d.ts +10 -0
- package/lib/domain/model/void/VoidedLineDecorator.js +40 -0
- package/lib/domain/model/void/index.d.ts +3 -0
- package/lib/domain/model/void/index.js +9 -0
- package/lib/domain/processing/PosBusinessAction.d.ts +9 -0
- package/lib/domain/processing/PosBusinessAction.js +55 -0
- package/lib/domain/processing/index.d.ts +1 -0
- package/lib/domain/processing/index.js +7 -0
- package/lib/domain/service/IReceiptFormattingService.d.ts +48 -0
- package/lib/domain/service/IReceiptFormattingService.js +3 -0
- package/lib/domain/service/ITransactionAccountingService.d.ts +6 -0
- package/lib/domain/service/ITransactionAccountingService.js +3 -0
- package/lib/domain/service/ITransactionReferenceFormatter.d.ts +4 -0
- package/lib/domain/service/ITransactionReferenceFormatter.js +3 -0
- package/lib/domain/service/index.d.ts +3 -0
- package/lib/domain/service/index.js +3 -0
- package/lib/domain/utility/index.d.ts +3 -0
- package/lib/domain/utility/index.js +9 -0
- package/lib/domain/utility/orderUtils.d.ts +6 -0
- package/lib/domain/utility/orderUtils.js +47 -0
- package/lib/domain/utility/supervisorOverride.d.ts +28 -0
- package/lib/domain/utility/supervisorOverride.js +298 -0
- package/lib/domain/utility/utils.d.ts +12 -0
- package/lib/domain/utility/utils.js +128 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/package.json +194 -0
- package/types/es-symbol/index.d.ts +4 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Container } from "inversify";
|
|
2
|
+
import { IActionContext, IDomainNotificationService, ITransaction, ITransactionLineFactory, ITransactionNumberProvider, PosBusinessAction as CorePosBusinessAction } from "@aptos-scp/scp-component-store-selling-core";
|
|
3
|
+
import { ITransactionAccountingService } from "../service";
|
|
4
|
+
export declare class PosBusinessAction extends CorePosBusinessAction {
|
|
5
|
+
private _transactionAccountingService;
|
|
6
|
+
constructor(transactionNumberProvider: ITransactionNumberProvider, transactionAccountingService: ITransactionAccountingService, transactionLineFactory: ITransactionLineFactory, domainNotificationService: IDomainNotificationService, diContainer: Container);
|
|
7
|
+
protected updateTransactionAccounting(context: IActionContext): Promise<ITransaction>;
|
|
8
|
+
protected transactionShouldClose(transaction: ITransaction): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
const inversify_1 = require("inversify");
|
|
25
|
+
const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
|
|
26
|
+
const DiTypes_1 = require("../../config/DiTypes");
|
|
27
|
+
const model_1 = require("../model");
|
|
28
|
+
let PosBusinessAction = class PosBusinessAction extends scp_component_store_selling_core_1.PosBusinessAction {
|
|
29
|
+
constructor(transactionNumberProvider, transactionAccountingService, transactionLineFactory, domainNotificationService, diContainer) {
|
|
30
|
+
super(transactionNumberProvider, transactionLineFactory, domainNotificationService, diContainer);
|
|
31
|
+
this._transactionAccountingService = transactionAccountingService;
|
|
32
|
+
}
|
|
33
|
+
updateTransactionAccounting(context) {
|
|
34
|
+
var _a;
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const transactionFlowStateObject = context.getState(model_1.TRANSACTION_FLOW_STATE);
|
|
37
|
+
const transactionFlowState = (_a = transactionFlowStateObject) === null || _a === void 0 ? void 0 : _a.state;
|
|
38
|
+
return this._transactionAccountingService.updateTransaction(context.transaction, transactionFlowState);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
transactionShouldClose(transaction) {
|
|
42
|
+
return this._transactionAccountingService.transactionShouldClose(transaction);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
PosBusinessAction = __decorate([
|
|
46
|
+
inversify_1.injectable(),
|
|
47
|
+
__param(0, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.ITransactionNumberProvider)),
|
|
48
|
+
__param(1, inversify_1.inject(DiTypes_1.DI_TYPES.ITransactionAccountingService)),
|
|
49
|
+
__param(2, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.ITransactionFactory)),
|
|
50
|
+
__param(3, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.IDomainNotificationService)),
|
|
51
|
+
__param(4, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.DependencyInjectionContainer)),
|
|
52
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object, inversify_1.Container])
|
|
53
|
+
], PosBusinessAction);
|
|
54
|
+
exports.PosBusinessAction = PosBusinessAction;
|
|
55
|
+
//# sourceMappingURL=PosBusinessAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PosBusinessAction";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DeviceIdentity, IReceiptFormattingService as ICoreReceiptFormattingService, ITransaction, Receipt as CoreReceipt } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { IPrinterInfo, IReceiptRequiredData, ItemLine, ReceiptCategory } from "../../";
|
|
3
|
+
export interface IReceiptFormattingService extends ICoreReceiptFormattingService {
|
|
4
|
+
formatBalanceInquiryReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
5
|
+
formatReceiptByCategory(transaction: ITransaction, locale: string, receiptCategory: ReceiptCategory, lineNumbers?: number[], printer?: IPrinterInfo, receiptRequiredData?: IReceiptRequiredData[]): Promise<Receipt>;
|
|
6
|
+
formatReprintReceipt(lines: string[], deviceIdentity: DeviceIdentity, locale?: string, originalReceiptCategory?: ReceiptCategory, printer?: IPrinterInfo): Promise<Receipt>;
|
|
7
|
+
formatGiftReceipt(transaction: ITransaction, giftitems: Array<ItemLine>, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
8
|
+
formatCouponReceipt(transaction: ITransaction, locale: string, receiptRequiredData: IReceiptRequiredData[], printer?: IPrinterInfo): Promise<Receipt>;
|
|
9
|
+
formatPostVoidReceipts(transaction: ITransaction, locale?: string, printer?: IPrinterInfo): Promise<Receipt[]>;
|
|
10
|
+
formatReceiptTemplate(transaction: ITransaction, locale?: string, printer?: IPrinterInfo, selectedReceiptCategory?: string): Promise<ReceiptTemplate[]>;
|
|
11
|
+
formatReceiptTemplateValue(transaction: ITransaction, lines: string[], locale?: string, additionalInfo?: AdditionalReprintInfo, printer?: IPrinterInfo, reprintCount?: number): Promise<Receipt>;
|
|
12
|
+
formatTillReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
13
|
+
formatNoSaleReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
14
|
+
formatPaidOperationReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
15
|
+
removeReceiptTemplateValue(receiptLines: string[]): string[];
|
|
16
|
+
formatPostVoidReceiptTemplate(transaction: ITransaction, locale?: string, printer?: IPrinterInfo): Promise<ReceiptTemplate[]>;
|
|
17
|
+
formatSendSaleReceipt(transaction: ITransaction, sendsaleitems: Array<ItemLine>, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
|
|
18
|
+
}
|
|
19
|
+
export interface AdditionalReprintInfo {
|
|
20
|
+
originalTransactionEndDateTime?: Date;
|
|
21
|
+
originalTransactionDeviceId: string;
|
|
22
|
+
originalTransactionNumber: number;
|
|
23
|
+
currentReceiptCategory: ReceiptCategory;
|
|
24
|
+
duplicateCopy: boolean;
|
|
25
|
+
taxInvoiceNumber?: string;
|
|
26
|
+
taxInvoicePrintDate?: Date;
|
|
27
|
+
invoiceTransactionNumber?: number;
|
|
28
|
+
invoiceFiscalTransactionNumber?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ReceiptTypeCount {
|
|
31
|
+
print: ReceiptCount;
|
|
32
|
+
email: ReceiptCount;
|
|
33
|
+
}
|
|
34
|
+
export interface ReceiptCount {
|
|
35
|
+
sale?: number;
|
|
36
|
+
invoice?: number;
|
|
37
|
+
vatReceipt?: number;
|
|
38
|
+
fullPageInvoice?: number;
|
|
39
|
+
japanRSS?: number;
|
|
40
|
+
postVoid?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface Receipt extends CoreReceipt {
|
|
43
|
+
isTemplate?: boolean;
|
|
44
|
+
htmlDocument?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ReceiptTemplate extends Receipt {
|
|
47
|
+
receiptCategory: ReceiptCategory;
|
|
48
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransaction } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { TransactionFlowSessionState } from "../model";
|
|
3
|
+
export interface ITransactionAccountingService {
|
|
4
|
+
updateTransaction(transaction: ITransaction, transactionFlowState?: TransactionFlowSessionState): Promise<ITransaction>;
|
|
5
|
+
transactionShouldClose(transaction: ITransaction): boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function __export(m) {
|
|
3
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
+
}
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
__export(require("./orderUtils"));
|
|
7
|
+
__export(require("./supervisorOverride"));
|
|
8
|
+
__export(require("./utils"));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransaction, ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { OrderReferenceLine } from "../model";
|
|
3
|
+
import { FulfillmentType, ITransactionLineReferenceType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
+
export declare function getOrderFulfillmentTypeFromOrderReferenceLine(line: OrderReferenceLine): FulfillmentType;
|
|
5
|
+
export declare function getOrderFulfillmentType(transaction: ITransaction, fulfillmentGroupId: number, orderLineReferenceLine?: ITransactionLineReferenceType): string;
|
|
6
|
+
export declare function hasPickupItemFulfillment(transactionLine: ITransactionLine): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const model_1 = require("../model");
|
|
4
|
+
function getOrderFulfillmentTypeFromOrderReferenceLine(line) {
|
|
5
|
+
if (line && line.orderReference && line.orderReference.order) {
|
|
6
|
+
const order = line.orderReference.order;
|
|
7
|
+
if (order && order.fulfillmentGroups && order.fulfillmentGroups.length > 1) {
|
|
8
|
+
return order.fulfillmentGroups[0].fulfillmentType;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
exports.getOrderFulfillmentTypeFromOrderReferenceLine = getOrderFulfillmentTypeFromOrderReferenceLine;
|
|
14
|
+
function getOrderFulfillmentType(transaction, fulfillmentGroupId, orderLineReferenceLine) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
let fulfillmentType = undefined;
|
|
17
|
+
if (model_1.isMerchandiseTransaction(transaction)) {
|
|
18
|
+
if (fulfillmentGroupId > 0) {
|
|
19
|
+
if (transaction.order) {
|
|
20
|
+
const fulfillmentGroup = (_a = transaction.order.fulfillmentGroups) === null || _a === void 0 ? void 0 : _a.find((group) => group.fulfillmentGroupId === fulfillmentGroupId);
|
|
21
|
+
if (fulfillmentGroup) {
|
|
22
|
+
fulfillmentType = fulfillmentGroup.fulfillmentType.toString();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else if (orderLineReferenceLine) {
|
|
26
|
+
const orderReferenceLine = ((_b = orderLineReferenceLine) === null || _b === void 0 ? void 0 : _b.lineNumber) &&
|
|
27
|
+
transaction.findLineByLineNumber(orderLineReferenceLine.lineNumber);
|
|
28
|
+
fulfillmentType = getOrderFulfillmentTypeFromOrderReferenceLine(orderReferenceLine);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return fulfillmentType;
|
|
33
|
+
}
|
|
34
|
+
exports.getOrderFulfillmentType = getOrderFulfillmentType;
|
|
35
|
+
function hasPickupItemFulfillment(transactionLine) {
|
|
36
|
+
if (!(model_1.isVoidableLine(transactionLine) && transactionLine.voided) && !model_1.isVoidingLine(transactionLine)) {
|
|
37
|
+
if (model_1.isSaleLine(transactionLine) &&
|
|
38
|
+
transactionLine.fulfillmentGroupId > 0 &&
|
|
39
|
+
!transactionLine.subscribed &&
|
|
40
|
+
!transactionLine.sendSale) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
exports.hasPickupItemFulfillment = hasPickupItemFulfillment;
|
|
47
|
+
//# sourceMappingURL=orderUtils.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IQualificationContext, ITransaction, IUser, QualificationResult, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { ManualDiscountType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
import { Container } from "inversify";
|
|
4
|
+
import { AllowedDiscountTypes, IAccessPolicyConfig, IAmountLevelThreshold, IFeatureAccessConfig, IPercentLevelThreshold, ISupervisorCredentials } from "../model";
|
|
5
|
+
export declare function eventToConfigKeyMap(): Map<string, string>;
|
|
6
|
+
export declare function getStandardPoliciesPermissionConfigs(diContainer: Container, securityPolicyId: string): IAccessPolicyConfig;
|
|
7
|
+
export declare function getEventConfigs(diContainer: Container, eventType: string): IAccessPolicyConfig;
|
|
8
|
+
export declare function isUserValid(user: IUser): boolean;
|
|
9
|
+
export declare function checkUserSecurityLevel(user: IUser, requiredSecurityLevel: number): boolean;
|
|
10
|
+
export declare function skipSecurityCheck(transaction: ITransaction, eventType: string, supervisor: ISupervisorCredentials, qualificationResult: QualificationResult): boolean;
|
|
11
|
+
export declare function convertDateTimeToDateOnly(date: Date): Date;
|
|
12
|
+
export declare function getOverridableThresholdPercentConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, discountType: ManualDiscountType, uiBusinessEventType: string): IPercentLevelThreshold;
|
|
13
|
+
export declare function getOverridableThresholdAmountConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, discountType: ManualDiscountType, uiBusinessEventType: string): IAmountLevelThreshold;
|
|
14
|
+
export declare function getSecurityPolicyByDiscountTypeConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, uiBusinessEventType: string): string;
|
|
15
|
+
export declare function getMaximumPercentConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, discountType: ManualDiscountType, uiBusinessEventType: string): number;
|
|
16
|
+
export declare function getMaximumAmountConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, discountType: ManualDiscountType, uiBusinessEventType: string): string;
|
|
17
|
+
export declare function getSameDiscountAllowedConfig(diContainer: Container, allowedDiscountType: AllowedDiscountTypes, discountType: ManualDiscountType, uiBusinessEventType: string): number;
|
|
18
|
+
export declare function getDiscountTypeModifier(discountType: ManualDiscountType): string;
|
|
19
|
+
export declare function getPreconfiguredEmployeeOverride(diContainer: Container, discountType: string): string;
|
|
20
|
+
export declare function getFeatureConfig(diContainer: Container, eventType: string): IFeatureAccessConfig;
|
|
21
|
+
/**
|
|
22
|
+
* UserValidationQualifier is not included in the UiBusinessEvent associated with tax override and tax exempt
|
|
23
|
+
* (both at item and transaction level) when transaction is resumed. Supervisor override security check is not needed
|
|
24
|
+
* on resume since it was already performed on the original suspended transaction,
|
|
25
|
+
* hence adding this function to set collected data to add supervisor override line on resumed transaction.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setRestoredSupervisor(uiBusinessEvent: UiBusinessEvent, qualificationResult: QualificationResult): void;
|
|
28
|
+
export declare function bypassConfiguredEmployeeDiscountValueCheck(uiBusinessEvent: UiBusinessEvent, context: IQualificationContext): boolean;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
|
|
4
|
+
const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-transaction");
|
|
5
|
+
const model_1 = require("../model");
|
|
6
|
+
const UIBusinessEventTypes_1 = require("../UIBusinessEventTypes");
|
|
7
|
+
function eventToConfigKeyMap() {
|
|
8
|
+
return new Map([
|
|
9
|
+
[UIBusinessEventTypes_1.VOID_ITEM_LINE_EVENT, "itemVoid"],
|
|
10
|
+
[UIBusinessEventTypes_1.VOID_TRANSACTION_EVENT, "transactionVoid"],
|
|
11
|
+
[UIBusinessEventTypes_1.MANUAL_ITEM_DISCOUNT_EVENT, "itemDiscounts"],
|
|
12
|
+
[UIBusinessEventTypes_1.MANUAL_TRANSACTION_DISCOUNT_EVENT, "transactionDiscounts"],
|
|
13
|
+
[UIBusinessEventTypes_1.FAST_DISCOUNT_EVENT, "fastDiscount"],
|
|
14
|
+
[UIBusinessEventTypes_1.APPLY_DISCOUNT_EVENT, "applyDiscount"],
|
|
15
|
+
[UIBusinessEventTypes_1.PRICE_CHANGE_EVENT, "priceOverride"],
|
|
16
|
+
[UIBusinessEventTypes_1.APPLY_EMPLOYEE_DISCOUNT_EVENT, "associateDiscounts"],
|
|
17
|
+
[UIBusinessEventTypes_1.APPLY_EMPLOYEE_TRANSACTION_DISCOUNT_EVENT, "associateDiscounts"],
|
|
18
|
+
[UIBusinessEventTypes_1.ADD_EMPLOYEE_CUSTOMER_EVENT, "addEmployeeCustomer"],
|
|
19
|
+
[UIBusinessEventTypes_1.MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT, "associateDiscounts"],
|
|
20
|
+
[UIBusinessEventTypes_1.MODIFY_ITEM_MANUAL_DISCOUNT_EVENT, "itemDiscounts"],
|
|
21
|
+
[UIBusinessEventTypes_1.MODIFY_TRANSACTION_MANUAL_DISCOUNT_EVENT, "transactionDiscounts"],
|
|
22
|
+
[UIBusinessEventTypes_1.POST_VOID_TRANSACTION_EVENT, "postVoid"],
|
|
23
|
+
[UIBusinessEventTypes_1.POST_VOID_RESTORED_TRANSACTION_EVENT, "postVoid"],
|
|
24
|
+
[UIBusinessEventTypes_1.CLOSE_TERMINAL_EVENT, "openCloseTerminal"],
|
|
25
|
+
[UIBusinessEventTypes_1.OPEN_TERMINAL_EVENT, "openCloseTerminal"],
|
|
26
|
+
[UIBusinessEventTypes_1.RETURN_TOTAL_EVENT, "returnItemsWithoutReceipt"],
|
|
27
|
+
[UIBusinessEventTypes_1.EXIT_RETURN_MODE_EVENT, "returnItemsWithoutReceipt"],
|
|
28
|
+
[UIBusinessEventTypes_1.QUANTITY_CHANGE_EVENT, "changeQuantity"],
|
|
29
|
+
[UIBusinessEventTypes_1.APPLY_SINGLE_USE_COUPON_EVENT, "expiredValidatedCoupons"],
|
|
30
|
+
[UIBusinessEventTypes_1.LOG_ON_EVENT, "login"],
|
|
31
|
+
[UIBusinessEventTypes_1.ENTER_ATTENDANT_MODE_EVENT, "login"],
|
|
32
|
+
[UIBusinessEventTypes_1.TRANSACTION_TAX_EXEMPT_EVENT, "transactionTaxExempt"],
|
|
33
|
+
[UIBusinessEventTypes_1.ITEM_TAX_EXEMPT_EVENT, "itemTaxExempt"],
|
|
34
|
+
[UIBusinessEventTypes_1.START_TILL_OUT_EVENT, "tillOut"],
|
|
35
|
+
[UIBusinessEventTypes_1.START_TILL_IN_EVENT, "tillIn"],
|
|
36
|
+
[UIBusinessEventTypes_1.START_NO_SALE_EVENT, "noSale"],
|
|
37
|
+
[UIBusinessEventTypes_1.START_PAID_OUT_EVENT, "paidOut"],
|
|
38
|
+
[UIBusinessEventTypes_1.START_PAID_IN_EVENT, "paidIn"],
|
|
39
|
+
[UIBusinessEventTypes_1.START_TILL_AUDIT_EVENT, "tillAudit"],
|
|
40
|
+
[UIBusinessEventTypes_1.START_TILL_COUNT_EVENT, "tillCount"],
|
|
41
|
+
[UIBusinessEventTypes_1.START_TILL_TO_BANK_EVENT, "tillToBank"],
|
|
42
|
+
[UIBusinessEventTypes_1.START_SAFE_TO_TILL_EVENT, "safeToTill"],
|
|
43
|
+
[UIBusinessEventTypes_1.START_TILL_TO_SAFE_EVENT, "tillToSafe"],
|
|
44
|
+
[UIBusinessEventTypes_1.APPLY_RETURN_WITH_TRANSACTION_EVENT, "returnWithTransaction"],
|
|
45
|
+
[UIBusinessEventTypes_1.START_TILL_RECONCILIATION_EVENT, "tillReconciliation"],
|
|
46
|
+
[UIBusinessEventTypes_1.TRANSACTION_TAX_OVERRIDE_EVENT, "transactionTaxOverride"],
|
|
47
|
+
[UIBusinessEventTypes_1.ITEM_TAX_OVERRIDE_EVENT, "itemTaxOverride"],
|
|
48
|
+
[UIBusinessEventTypes_1.TENDER_EXCHANGE_EVENT, "tenderExchange"],
|
|
49
|
+
[UIBusinessEventTypes_1.START_EXCHANGE_RATE_ENTRY_EVENT, "exchangeRateEntry"],
|
|
50
|
+
[UIBusinessEventTypes_1.UPLOAD_DEVICE_LOGS_EVENT, "uploadPaymentLogs"],
|
|
51
|
+
[UIBusinessEventTypes_1.BYPASS_REFUNDED_TAX_FREE_WARNING_EVENT, "bypassRefundedTaxFreeWarning"],
|
|
52
|
+
[UIBusinessEventTypes_1.REPRINT_LAST_TRANSACTION_RECEIPTS_EVENT, "reprintReceipt"],
|
|
53
|
+
[UIBusinessEventTypes_1.REPRINT_TRANSACTION_RECEIPTS_EVENT, "reprintReceipt"],
|
|
54
|
+
[UIBusinessEventTypes_1.REPLACE_FISCAL_DEVICE_EVENT, "swapFiscalDevice"],
|
|
55
|
+
[UIBusinessEventTypes_1.REPLACE_FISCAL_DEVICE_HOST_EVENT, "swapFiscalDeviceHost"],
|
|
56
|
+
[UIBusinessEventTypes_1.SETUP_FISCAL_DEVICE_EVENT, "setUpFiscalDevice"],
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
exports.eventToConfigKeyMap = eventToConfigKeyMap;
|
|
60
|
+
function getStandardPoliciesPermissionConfigs(diContainer, securityPolicyId) {
|
|
61
|
+
return diContainer
|
|
62
|
+
.get(scp_component_store_selling_core_1.DI_TYPES.IConfigurationManager)
|
|
63
|
+
.getFunctionalBehaviorValues().securityPolicies.standardPolicies[securityPolicyId];
|
|
64
|
+
}
|
|
65
|
+
exports.getStandardPoliciesPermissionConfigs = getStandardPoliciesPermissionConfigs;
|
|
66
|
+
function getEventConfigs(diContainer, eventType) {
|
|
67
|
+
const configKey = eventToConfigKeyMap().get(eventType);
|
|
68
|
+
return diContainer
|
|
69
|
+
.get(scp_component_store_selling_core_1.DI_TYPES.IConfigurationManager)
|
|
70
|
+
.getFunctionalBehaviorValues().securityPolicies.accessPolicies[configKey];
|
|
71
|
+
}
|
|
72
|
+
exports.getEventConfigs = getEventConfigs;
|
|
73
|
+
function isUserValid(user) {
|
|
74
|
+
if (!user) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
let mergedUser = mergeGlobalUserAndLocationUser(user);
|
|
78
|
+
return !!(mergedUser && isMergedUserValid(mergedUser));
|
|
79
|
+
}
|
|
80
|
+
exports.isUserValid = isUserValid;
|
|
81
|
+
function checkUserSecurityLevel(user, requiredSecurityLevel) {
|
|
82
|
+
if (!user) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
let mergedUser = mergeGlobalUserAndLocationUser(user);
|
|
86
|
+
return !!(mergedUser &&
|
|
87
|
+
isMergedUserValid(mergedUser) &&
|
|
88
|
+
mergedUser.securityRole &&
|
|
89
|
+
parseInt(mergedUser.securityRole.securityLevel, 10) >= requiredSecurityLevel);
|
|
90
|
+
}
|
|
91
|
+
exports.checkUserSecurityLevel = checkUserSecurityLevel;
|
|
92
|
+
function skipSecurityCheck(transaction, eventType, supervisor, qualificationResult) {
|
|
93
|
+
/**
|
|
94
|
+
* Security check can be skip when the transaction is resuming for either a transaction resume or transaction
|
|
95
|
+
* post void
|
|
96
|
+
* Don't skip security requirements when a supervisor is provided for POST_VOID_RESTORED_TRANSACTION_EVENT
|
|
97
|
+
*/
|
|
98
|
+
const transactionResumeOrPostVoid = transaction &&
|
|
99
|
+
transaction.isResuming() &&
|
|
100
|
+
!(supervisor && eventType === UIBusinessEventTypes_1.POST_VOID_RESTORED_TRANSACTION_EVENT);
|
|
101
|
+
/**
|
|
102
|
+
* The security check was disabled by a previous qualifier
|
|
103
|
+
*/
|
|
104
|
+
const directlyDisabled = qualificationResult.collectedData.get(model_1.CollectedDataKey.DisableSupervisorOverride);
|
|
105
|
+
return transactionResumeOrPostVoid || directlyDisabled;
|
|
106
|
+
}
|
|
107
|
+
exports.skipSecurityCheck = skipSecurityCheck;
|
|
108
|
+
function convertDateTimeToDateOnly(date) {
|
|
109
|
+
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
|
|
110
|
+
}
|
|
111
|
+
exports.convertDateTimeToDateOnly = convertDateTimeToDateOnly;
|
|
112
|
+
function mergeGlobalUserAndLocationUser(user) {
|
|
113
|
+
var _a, _b, _c, _d;
|
|
114
|
+
return {
|
|
115
|
+
id: user.id,
|
|
116
|
+
username: user.username,
|
|
117
|
+
displayName: user.displayName,
|
|
118
|
+
firstName: user.firstName,
|
|
119
|
+
lastName: user.lastName,
|
|
120
|
+
middleName: user.middleName,
|
|
121
|
+
preferredLanguage: user.preferredLanguage,
|
|
122
|
+
securityRole: ((_a = user.retailLocationRole) === null || _a === void 0 ? void 0 : _a.securityRole) ? user.retailLocationRole.securityRole
|
|
123
|
+
: user.securityRole,
|
|
124
|
+
accountStatus: ((_b = user.retailLocationRole) === null || _b === void 0 ? void 0 : _b.assignmentStatus) ? convertAssignmentStatusToAccountStatus(user.retailLocationRole.assignmentStatus)
|
|
125
|
+
: user.accountStatus,
|
|
126
|
+
effectiveDate: ((_c = user.retailLocationRole) === null || _c === void 0 ? void 0 : _c.effectiveDate) ? user.retailLocationRole.effectiveDate
|
|
127
|
+
: user.effectiveDate,
|
|
128
|
+
expirationDate: ((_d = user.retailLocationRole) === null || _d === void 0 ? void 0 : _d.expirationDate) ? user.retailLocationRole.expirationDate
|
|
129
|
+
: user.expirationDate,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function convertAssignmentStatusToAccountStatus(assignmentStatus) {
|
|
133
|
+
switch (assignmentStatus) {
|
|
134
|
+
case "Active":
|
|
135
|
+
case "Inactive":
|
|
136
|
+
case "Deleted":
|
|
137
|
+
case "Locked":
|
|
138
|
+
return assignmentStatus;
|
|
139
|
+
default:
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function isMergedUserValid(user) {
|
|
144
|
+
const accountStatus = user.accountStatus;
|
|
145
|
+
if (!accountStatus || accountStatus !== "Active") {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
const nowAsUTC = convertDateTimeToDateOnly(new Date());
|
|
149
|
+
const expirationDate = user.expirationDate && convertDateTimeToDateOnly(new Date(user.expirationDate));
|
|
150
|
+
if (expirationDate && expirationDate < nowAsUTC) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
const effectiveDate = user.effectiveDate && convertDateTimeToDateOnly(new Date(user.effectiveDate));
|
|
154
|
+
if (effectiveDate && effectiveDate > nowAsUTC) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
function getFeatureAccessConfig(diContainer, uiBusinessEventType) {
|
|
160
|
+
const configurationManager = diContainer.get(scp_component_store_selling_core_1.DI_TYPES.IConfigurationManager);
|
|
161
|
+
const configuredFeatures = configurationManager.getFeaturesValues();
|
|
162
|
+
const event = configuredFeatures.find((item) => item.uiBusinessEventType === uiBusinessEventType);
|
|
163
|
+
return event;
|
|
164
|
+
}
|
|
165
|
+
function getPriceChangeInputLimitsConfig(diContainer, uiBusinessEventType) {
|
|
166
|
+
const event = getFeatureAccessConfig(diContainer, uiBusinessEventType);
|
|
167
|
+
const priceChangeInputLimits = event && event.limits;
|
|
168
|
+
return priceChangeInputLimits;
|
|
169
|
+
}
|
|
170
|
+
function getDiscountTypeInputLimitsConfig(diContainer, allowedDiscountType, uiBusinessEventType) {
|
|
171
|
+
const event = getFeatureAccessConfig(diContainer, uiBusinessEventType);
|
|
172
|
+
const allowedDiscountTypeInputLimits = event && event.limits && event.limits[allowedDiscountType];
|
|
173
|
+
return allowedDiscountTypeInputLimits;
|
|
174
|
+
}
|
|
175
|
+
function getDiscountInputLimitsConfig(diContainer, allowedDiscountType, discountTypeLevel, uiBusinessEventType) {
|
|
176
|
+
const allowedDiscountTypeInputLimits = getDiscountTypeInputLimitsConfig(diContainer, allowedDiscountType, uiBusinessEventType);
|
|
177
|
+
const inputLimitsConfig = allowedDiscountTypeInputLimits && discountTypeLevel && allowedDiscountTypeInputLimits[discountTypeLevel];
|
|
178
|
+
return inputLimitsConfig;
|
|
179
|
+
}
|
|
180
|
+
function getOverridableThresholdsConfig(diContainer, allowedDiscountType, discountTypeLevel, uiBusinessEventType) {
|
|
181
|
+
let inputLimitsConfig;
|
|
182
|
+
if (uiBusinessEventType === UIBusinessEventTypes_1.PRICE_CHANGE_EVENT) {
|
|
183
|
+
inputLimitsConfig = getPriceChangeInputLimitsConfig(diContainer, uiBusinessEventType);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
inputLimitsConfig = getDiscountInputLimitsConfig(diContainer, allowedDiscountType, discountTypeLevel, uiBusinessEventType);
|
|
187
|
+
}
|
|
188
|
+
const overridableThresholds = inputLimitsConfig && inputLimitsConfig.overridableThresholds;
|
|
189
|
+
return overridableThresholds;
|
|
190
|
+
}
|
|
191
|
+
function getOverridableThresholdPercentConfig(diContainer, allowedDiscountType, discountType, uiBusinessEventType) {
|
|
192
|
+
const discountTypeModifierLevel = discountType && getDiscountTypeModifier(discountType);
|
|
193
|
+
const overridableThresholds = getOverridableThresholdsConfig(diContainer, allowedDiscountType, discountTypeModifierLevel, uiBusinessEventType);
|
|
194
|
+
const overridablePercentThresholds = overridableThresholds && overridableThresholds.percent;
|
|
195
|
+
return overridablePercentThresholds;
|
|
196
|
+
}
|
|
197
|
+
exports.getOverridableThresholdPercentConfig = getOverridableThresholdPercentConfig;
|
|
198
|
+
function getOverridableThresholdAmountConfig(diContainer, allowedDiscountType, discountType, uiBusinessEventType) {
|
|
199
|
+
const discountTypeModifierLevel = discountType && getDiscountTypeModifier(discountType);
|
|
200
|
+
const overridableThresholds = getOverridableThresholdsConfig(diContainer, allowedDiscountType, discountTypeModifierLevel, uiBusinessEventType);
|
|
201
|
+
const overridableAmountThresholds = overridableThresholds && overridableThresholds.amount;
|
|
202
|
+
return overridableAmountThresholds;
|
|
203
|
+
}
|
|
204
|
+
exports.getOverridableThresholdAmountConfig = getOverridableThresholdAmountConfig;
|
|
205
|
+
function getSecurityPolicyByDiscountTypeConfig(diContainer, allowedDiscountType, uiBusinessEventType) {
|
|
206
|
+
const event = getFeatureAccessConfig(diContainer, uiBusinessEventType);
|
|
207
|
+
const securityPolicy = event && event.securityPolicyByDiscountType && event.securityPolicyByDiscountType[allowedDiscountType];
|
|
208
|
+
return securityPolicy;
|
|
209
|
+
}
|
|
210
|
+
exports.getSecurityPolicyByDiscountTypeConfig = getSecurityPolicyByDiscountTypeConfig;
|
|
211
|
+
function getMaximumPercentConfig(diContainer, allowedDiscountType, discountType, uiBusinessEventType) {
|
|
212
|
+
const discountTypeModifierLevel = discountType && getDiscountTypeModifier(discountType);
|
|
213
|
+
const inputLimitsConfig = getDiscountInputLimitsConfig(diContainer, allowedDiscountType, discountTypeModifierLevel, uiBusinessEventType);
|
|
214
|
+
const overridablePercentThreshold = inputLimitsConfig && inputLimitsConfig.maxPercent;
|
|
215
|
+
return overridablePercentThreshold;
|
|
216
|
+
}
|
|
217
|
+
exports.getMaximumPercentConfig = getMaximumPercentConfig;
|
|
218
|
+
function getMaximumAmountConfig(diContainer, allowedDiscountType, discountType, uiBusinessEventType) {
|
|
219
|
+
const discountTypeModifierLevel = discountType && getDiscountTypeModifier(discountType);
|
|
220
|
+
const inputLimitsConfig = getDiscountInputLimitsConfig(diContainer, allowedDiscountType, discountTypeModifierLevel, uiBusinessEventType);
|
|
221
|
+
const maximumAmount = inputLimitsConfig && inputLimitsConfig.maxAmount ? inputLimitsConfig.maxAmount : "0";
|
|
222
|
+
return maximumAmount;
|
|
223
|
+
}
|
|
224
|
+
exports.getMaximumAmountConfig = getMaximumAmountConfig;
|
|
225
|
+
function getSameDiscountAllowedConfig(diContainer, allowedDiscountType, discountType, uiBusinessEventType) {
|
|
226
|
+
const discountTypeModifierLevel = discountType && getDiscountTypeModifier(discountType);
|
|
227
|
+
const inputLimitsConfig = getDiscountInputLimitsConfig(diContainer, allowedDiscountType, discountTypeModifierLevel, uiBusinessEventType);
|
|
228
|
+
const sameDiscountAllowedConfig = inputLimitsConfig && inputLimitsConfig.maximumNumberOfSameDiscountAllowed
|
|
229
|
+
? inputLimitsConfig.maximumNumberOfSameDiscountAllowed
|
|
230
|
+
: 0;
|
|
231
|
+
return sameDiscountAllowedConfig;
|
|
232
|
+
}
|
|
233
|
+
exports.getSameDiscountAllowedConfig = getSameDiscountAllowedConfig;
|
|
234
|
+
function getDiscountTypeModifier(discountType) {
|
|
235
|
+
switch (discountType) {
|
|
236
|
+
case scp_types_commerce_transaction_1.ManualDiscountType.PercentOff:
|
|
237
|
+
return "percent";
|
|
238
|
+
case scp_types_commerce_transaction_1.ManualDiscountType.ReplacementUnitPrice:
|
|
239
|
+
case scp_types_commerce_transaction_1.ManualDiscountType.AmountOff:
|
|
240
|
+
return "amount";
|
|
241
|
+
default:
|
|
242
|
+
return undefined;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
exports.getDiscountTypeModifier = getDiscountTypeModifier;
|
|
246
|
+
function getPreconfiguredEmployeeOverride(diContainer, discountType) {
|
|
247
|
+
const event = getFeatureAccessConfig(diContainer, discountType);
|
|
248
|
+
return (event &&
|
|
249
|
+
event.preconfiguredOverrides &&
|
|
250
|
+
event.preconfiguredOverrides.employee &&
|
|
251
|
+
event.preconfiguredOverrides.employee.valueOverrideSecurityPolicy);
|
|
252
|
+
}
|
|
253
|
+
exports.getPreconfiguredEmployeeOverride = getPreconfiguredEmployeeOverride;
|
|
254
|
+
function getFeatureConfig(diContainer, eventType) {
|
|
255
|
+
return getFeatureAccessConfig(diContainer, eventType);
|
|
256
|
+
}
|
|
257
|
+
exports.getFeatureConfig = getFeatureConfig;
|
|
258
|
+
/**
|
|
259
|
+
* UserValidationQualifier is not included in the UiBusinessEvent associated with tax override and tax exempt
|
|
260
|
+
* (both at item and transaction level) when transaction is resumed. Supervisor override security check is not needed
|
|
261
|
+
* on resume since it was already performed on the original suspended transaction,
|
|
262
|
+
* hence adding this function to set collected data to add supervisor override line on resumed transaction.
|
|
263
|
+
*/
|
|
264
|
+
function setRestoredSupervisor(uiBusinessEvent, qualificationResult) {
|
|
265
|
+
const supervisorOverideRestoreInput = uiBusinessEvent.findInput("restoredSupervisorUser");
|
|
266
|
+
const restoredSupervisor = supervisorOverideRestoreInput && supervisorOverideRestoreInput.inputValue;
|
|
267
|
+
if (restoredSupervisor) {
|
|
268
|
+
qualificationResult.setCollectedData(model_1.CollectedDataKey.QualifiedUserRestriction, restoredSupervisor);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.setRestoredSupervisor = setRestoredSupervisor;
|
|
272
|
+
function bypassConfiguredEmployeeDiscountValueCheck(uiBusinessEvent, context) {
|
|
273
|
+
const employeeDiscountInput = uiBusinessEvent.findInput(model_1.UiInputKey.EMPLOYEE_DISCOUNT_OVERRIDE);
|
|
274
|
+
const employeeDiscountOverride = employeeDiscountInput && employeeDiscountInput.inputValue;
|
|
275
|
+
const isRestoredTransaction = context.transaction.isResuming();
|
|
276
|
+
const validatedEmployeeDiscountInput = uiBusinessEvent.findInput(model_1.UiInputKey.EMPLOYEE_DISCOUNT_VALIDATED);
|
|
277
|
+
const validatedEmployeeDiscount = validatedEmployeeDiscountInput && validatedEmployeeDiscountInput.inputValue;
|
|
278
|
+
if (validatedEmployeeDiscount) {
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
if (uiBusinessEvent.type === UIBusinessEventTypes_1.APPLY_EMPLOYEE_DISCOUNT_EVENT) {
|
|
282
|
+
return employeeDiscountOverride || isRestoredTransaction;
|
|
283
|
+
}
|
|
284
|
+
else if (uiBusinessEvent.type === UIBusinessEventTypes_1.APPLY_EMPLOYEE_TRANSACTION_DISCOUNT_EVENT) {
|
|
285
|
+
return employeeDiscountOverride || isRestoredTransaction;
|
|
286
|
+
}
|
|
287
|
+
else if (uiBusinessEvent.type === UIBusinessEventTypes_1.MANUAL_TRANSACTION_DISCOUNT_EVENT) {
|
|
288
|
+
return isRestoredTransaction;
|
|
289
|
+
}
|
|
290
|
+
else if (uiBusinessEvent.type === UIBusinessEventTypes_1.MANUAL_ITEM_DISCOUNT_EVENT) {
|
|
291
|
+
return employeeDiscountOverride || isRestoredTransaction;
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.bypassConfiguredEmployeeDiscountValueCheck = bypassConfiguredEmployeeDiscountValueCheck;
|
|
298
|
+
//# sourceMappingURL=supervisorOverride.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IConfigurationManager, ITransaction, PosError } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { IServiceResult, MerchandiseTransactionTradeType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
import { CountryAddressFormat } from "../model";
|
|
4
|
+
export declare function getAddressFormatorDefault(configurationManager: IConfigurationManager, countryCode: string, i18nLocation: string): CountryAddressFormat;
|
|
5
|
+
export declare function getLocaleCodeForTranslationSet<T>(translationSet: {
|
|
6
|
+
[key: string]: T;
|
|
7
|
+
}, locale: string): string;
|
|
8
|
+
export declare const getTradeType: (transaction: ITransaction) => MerchandiseTransactionTradeType;
|
|
9
|
+
export declare const isTimeOutError: (error: PosError) => boolean;
|
|
10
|
+
export declare const getServiceResult: (isSuccess: boolean, error?: Error, statusCode?: number) => IServiceResult;
|
|
11
|
+
export declare function mapStartTillEventTypeToLineType(): Map<string, string>;
|
|
12
|
+
export declare function mapEventTypeToTransferType(): Map<string, string>;
|