@zeniai/client-epic-state 5.2.3 → 5.2.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/entity/invoicing/invoicingCommonPayload.d.ts +27 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +52 -1
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +50 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +7 -4
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +3 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +0 -31
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +5 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +7 -0
- package/lib/esm/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +2 -1
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +2 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +6 -7
- package/lib/view/companyView/types/cockpitTabsID.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/invoicing/auditView/auditViewPayload.d.ts +2 -0
- package/lib/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/view/invoicing/couponView/couponViewState.d.ts +1 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +6 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +6 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +6 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +1 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +0 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.d.ts +0 -13
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -34
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +6 -0
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +2 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +4 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +8 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +9 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +3 -1
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +6 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +1 -0
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +6 -1
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -78,12 +78,12 @@ exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.
|
|
|
78
78
|
exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = void 0;
|
|
79
79
|
exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = void 0;
|
|
80
80
|
exports.getIssueCreditNoteView = exports.initialIssueCreditNoteFormLocalData = exports.localDataToIssueCreditNotePayload = exports.initializeIssueCreditNoteDraftFromInvoice = exports.computeIssueCreditNoteTotal = exports.updateIssueCreditNoteFormDraft = exports.submitIssueCreditNote = exports.resetIssueCreditNote = exports.issueCreditNoteSuccess = exports.issueCreditNoteFailure = exports.initializeIssueCreditNoteDraft = exports.updateRecordPaymentFormDraft = exports.submitRecordPayment = exports.initializeRecordPaymentDraft = exports.resetRecordPayment = exports.initialInvoicingCreateInvoiceFormLocalData = exports.createInvoiceFormLocalDataToRequest = exports.blankInvoicingCreateInvoiceLineItem = exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.fetchCreateInvoiceFormPage = exports.createInvoice = exports.getInvoiceDetail = exports.fetchInvoiceDetail = exports.getInvoiceListView = exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = exports.setInvoiceActiveTab = exports.fetchInvoiceListPage = exports.fetchInvoiceList = exports.fetchInvoiceKPIs = exports.fetchInvoiceCounts = exports.getInvoicesByIds = exports.getInvoiceById = exports.updateInvoices = exports.removeInvoice = exports.mapAuditLogEntry = exports.toAuditLogEntityRouteOption = exports.isInvoicingEntityLinkable = exports.buildInvoicingEntityPath = exports.toInvoicingDiscountLifecycleActionOption = exports.toInvoicingDiscountLifecycleAction = exports.toInvoicingCatalogProductLifecycleActionOption = exports.toInvoicingCatalogItemLifecycleActionOption = exports.toInvoicingCatalogProductLifecycleAction = exports.toInvoicingCatalogItemLifecycleAction = exports.toInvoicingSubscriptionLifecycleActionOption = exports.toInvoicingSubscriptionLifecycleAction = exports.toInvoicingDunningAction = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = void 0;
|
|
81
|
-
exports.saveInvoicingCatalogItem = exports.resetEditInvoicingCatalogItemDetailView = exports.createInvoicingCatalogSubFamily = exports.archiveInvoicingCatalogSubFamily = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.toInvoicingSubscriptionQuantity = exports.invoicingSubscriptionTodayIso = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.
|
|
82
|
-
exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.getInvoicingPaymentActionState = exports.runInvoicingPaymentAction = exports.getInvoicingDunningActionState = exports.runInvoicingDunningAction = exports.getInvoicingSubscriptionActionState = exports.runInvoicingSubscriptionAction = exports.getInvoicingDiscountActionState = exports.runInvoicingDiscountAction = exports.getInvoicingCatalogActionState = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.getInvoicingInvoiceActionState = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getEditInvoicingCatalogItemDetailViewState = exports.isTieredCatalogPricingModel = exports.initialInvoicingCatalogItemFormLocalData = exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.productToCreateSubFamilyFormValues = exports.planToCatalogDetailEditValues = exports.createSubFamilyFormToPayload = exports.catalogDetailEditValuesToSavePayload = exports.updateInvoicingCatalogItemFormDraft =
|
|
83
|
-
exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = exports.getInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.setInvoicingSubscriptionActiveTab = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkTokenFetchState = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.getInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.setInvoicingCustomerActiveTab = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.updateInvoicingCustomers = exports.removeInvoicingCustomer = exports.INVOICING_LIST_PAGE_SIZE = exports.getInvoicingDataImportActionState = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration =
|
|
84
|
-
exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.setInvoicingCouponActiveTab = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.setInvoicingCreditNoteActiveTab = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.setInvoicingTransactionActiveTab = exports.fetchInvoicingTransactionListPage =
|
|
85
|
-
exports.fetchInvoicingQboAccounts = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsHubView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = exports.connectInvoicingStripe = exports.getInvoicingProductById = exports.getInvoicingPlanById = exports.getInvoicingCatalogItemDetail = exports.fetchInvoicingCatalogItemDetail = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.updateInvoicingProducts = exports.removeInvoicingProduct = exports.updateInvoicingPlans = exports.removeInvoicingPlan = exports.mergeInvoicingPlanSubFamily = exports.getInvoicingDunningEmailPreview = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.invalidateInvoicingDunningEmailPreview = exports.fetchInvoicingDunningEmailPreviewPage = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters =
|
|
86
|
-
exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.acceptInvoicingTerms = exports.withInvoicingQboAccountMappingId = exports.toInvoicingQboCustomerMatchingMode = exports.toInvoicingNamedOptionsByKey = exports.getInvoicingQboAccountMappingId = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.getInvoicingQboView = exports.startInvoicingQboBackfill = exports.retryInvoicingQboSyncTask = exports.fetchInvoicingQboSyncHealth = exports.fetchInvoicingQboConnection =
|
|
81
|
+
exports.submitInvoicingCatalogItemForm = exports.saveInvoicingCatalogItem = exports.resetEditInvoicingCatalogItemDetailView = exports.createInvoicingCatalogSubFamily = exports.archiveInvoicingCatalogSubFamily = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.toInvoicingSubscriptionQuantity = exports.invoicingSubscriptionTodayIso = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.updateInvoicingSubscriptionFormDraft = exports.submitInvoicingSubscriptionForm = exports.resetEditInvoicingSubscriptionDetailView = exports.initializeInvoicingSubscriptionAddress = exports.fetchInvoicingSubscriptionFormPage = exports.getInvoicingCustomerFormView = exports.initialInvoicingCustomerFormLocalData = exports.entityToInvoicingCustomerFormLocalData = exports.INVOICING_CUSTOMER_BILLING_ADDRESS_TYPE = exports.updateInvoicingCustomerFormDraft = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerForm = exports.resetEditInvoicingCustomerDetailView = exports.initializeInvoicingCustomerAddress = exports.getRecordPaymentView = exports.getRecordPaymentInvoiceOptions = exports.getRecordPaymentFormView = exports.getCreateInvoiceFormView = exports.getInvoicingAuditView = exports.fetchInvoicingAuditLog = exports.getInvoicingOverview = exports.buildPeriodOptions = exports.fetchInvoicingOverview = exports.clearInvoicingOverview = exports.initialRecordPaymentFormLocalData = exports.localDataToRecordPaymentPayload = exports.localDataToInvoiceRecordPaymentBody = exports.initializeRecordPaymentDraftFromInvoice = exports.getCreateCreditNoteView = exports.getCreateCreditNoteFormView = exports.initialCreateCreditNoteFormLocalData = exports.localDataToCreateCreditNotePayload = exports.updateCreateCreditNoteFormDraft = exports.submitCreateCreditNote = exports.resetCreateCreditNote = exports.createCreditNoteSuccess = exports.createCreditNoteFailure = void 0;
|
|
82
|
+
exports.rollbackInvoicingMigration = exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.getInvoicingPaymentActionState = exports.runInvoicingPaymentAction = exports.getInvoicingDunningActionState = exports.runInvoicingDunningAction = exports.getInvoicingSubscriptionActionState = exports.runInvoicingSubscriptionAction = exports.getInvoicingDiscountActionState = exports.runInvoicingDiscountAction = exports.getInvoicingCatalogActionState = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.getInvoicingInvoiceActionState = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getEditInvoicingCatalogItemDetailViewState = exports.isTieredCatalogPricingModel = exports.initialInvoicingCatalogItemFormLocalData = exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.productToCreateSubFamilyFormValues = exports.planToCatalogDetailEditValues = exports.createSubFamilyFormToPayload = exports.catalogDetailEditValuesToSavePayload = exports.updateInvoicingCatalogItemFormDraft = void 0;
|
|
83
|
+
exports.fetchInvoicingTransactionList = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = exports.getInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.setInvoicingSubscriptionActiveTab = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkTokenFetchState = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.getInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.setInvoicingCustomerActiveTab = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.updateInvoicingCustomers = exports.removeInvoicingCustomer = exports.INVOICING_LIST_PAGE_SIZE = exports.getInvoicingDataImportActionState = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration = void 0;
|
|
84
|
+
exports.setInvoicingDunningCaseActiveTab = exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.setInvoicingCouponActiveTab = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.setInvoicingCreditNoteActiveTab = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.setInvoicingTransactionActiveTab = exports.fetchInvoicingTransactionListPage = void 0;
|
|
85
|
+
exports.fetchInvoicingQboClasses = exports.fetchInvoicingQboAccounts = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsHubView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = exports.connectInvoicingStripe = exports.getInvoicingProductById = exports.getInvoicingPlanById = exports.getInvoicingCatalogItemDetail = exports.fetchInvoicingCatalogItemDetail = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.updateInvoicingProducts = exports.removeInvoicingProduct = exports.updateInvoicingPlans = exports.removeInvoicingPlan = exports.mergeInvoicingPlanSubFamily = exports.getInvoicingDunningEmailPreview = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.invalidateInvoicingDunningEmailPreview = exports.fetchInvoicingDunningEmailPreviewPage = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters = void 0;
|
|
86
|
+
exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.acceptInvoicingTerms = exports.withInvoicingQboAccountMappingId = exports.toInvoicingQboCustomerMatchingMode = exports.toInvoicingNamedOptionsByKey = exports.getInvoicingQboAccountMappingId = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.getInvoicingQboView = exports.startInvoicingQboBackfill = exports.retryInvoicingQboSyncTask = exports.fetchInvoicingQboSyncHealth = exports.fetchInvoicingQboConnection = void 0;
|
|
87
87
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
88
88
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
89
89
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -2790,7 +2790,6 @@ Object.defineProperty(exports, "resetEditInvoicingSubscriptionDetailView", { enu
|
|
|
2790
2790
|
Object.defineProperty(exports, "submitInvoicingSubscriptionForm", { enumerable: true, get: function () { return editInvoicingSubscriptionDetailViewReducer_1.submitInvoicingSubscriptionForm; } });
|
|
2791
2791
|
Object.defineProperty(exports, "updateInvoicingSubscriptionFormDraft", { enumerable: true, get: function () { return editInvoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionFormDraft; } });
|
|
2792
2792
|
var invoicingSubscriptionFormConfig_1 = require("./view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig");
|
|
2793
|
-
Object.defineProperty(exports, "INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES", { enumerable: true, get: function () { return invoicingSubscriptionFormConfig_1.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES; } });
|
|
2794
2793
|
Object.defineProperty(exports, "INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE", { enumerable: true, get: function () { return invoicingSubscriptionFormConfig_1.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE; } });
|
|
2795
2794
|
Object.defineProperty(exports, "entityToInvoicingSubscriptionFormLocalData", { enumerable: true, get: function () { return invoicingSubscriptionFormConfig_1.entityToInvoicingSubscriptionFormLocalData; } });
|
|
2796
2795
|
Object.defineProperty(exports, "initialInvoicingSubscriptionFormLocalData", { enumerable: true, get: function () { return invoicingSubscriptionFormConfig_1.initialInvoicingSubscriptionFormLocalData; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ALL_COCKPIT_TABS_IDS: readonly ["management", "subscription", "portfolio", "onboarding", "audit", "healthMonitor"];
|
|
2
|
-
export declare const toCockpitTabsIDStrict: (v: string) => "onboarding" | "
|
|
2
|
+
export declare const toCockpitTabsIDStrict: (v: string) => "onboarding" | "subscription" | "management" | "portfolio" | "audit" | "healthMonitor" | undefined;
|
|
3
3
|
export type CockpitTabsID = NonNullable<ReturnType<typeof toCockpitTabsIDStrict>>;
|
|
4
4
|
export type CockpitDownloadTabsID = Exclude<CockpitTabsID, 'audit'>;
|
|
5
5
|
export declare const ALL_COCKPIT_TABS_FILE_TYPES: readonly ["excel"];
|
|
@@ -4,9 +4,9 @@ import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscripti
|
|
|
4
4
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
5
5
|
export type FilterCategoryValueType = string | ZeniDate;
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "companyName" | "cashBalance" | "revenues" | "netIncome";
|
|
7
|
-
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "taxStatus" | "companyName" | "plans" | "monthlyRecurringRevenue" | "notes" | "task" | "
|
|
7
|
+
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "taxStatus" | "group" | "companyName" | "plans" | "monthlyRecurringRevenue" | "notes" | "task" | "productVerticals" | "realmId" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "annualRecurringRevenue" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "bankAccountLinked" | "qboLinked" | "identityVerified" | "businessVerified" | "groupCreated" | "customerCreated" | "enroller" | "invite" | "latestCreated";
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "controller" | "
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "controller" | "group" | "runway" | "companyName" | "monthlyRecurringRevenue" | "productVerticals" | "customerSuccessManager" | "issues" | "externalProductServiceExposure" | "companyEngagementMetricsUpdatedAt" | "churnProbability" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "dueDate" | "name" | "taskName" | "priority" | "assignee" | "tags" | "createdBy";
|
|
11
11
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
@@ -35,6 +35,7 @@ export interface InvoicingAuditLogApiEntry {
|
|
|
35
35
|
target: string;
|
|
36
36
|
time: string;
|
|
37
37
|
timestamp: string;
|
|
38
|
+
action_label?: string;
|
|
38
39
|
change_summary?: unknown[];
|
|
39
40
|
changes?: unknown[];
|
|
40
41
|
context?: Record<string, unknown>;
|
|
@@ -69,6 +70,7 @@ export interface InvoicingAuditEntry {
|
|
|
69
70
|
action: string;
|
|
70
71
|
target: string;
|
|
71
72
|
time: string;
|
|
73
|
+
actionLabel?: string;
|
|
72
74
|
actor?: string;
|
|
73
75
|
customerId?: string;
|
|
74
76
|
detailSegments?: AuditLogDisplaySegment[];
|
|
@@ -42,6 +42,16 @@ function formatActor(actor, sourceLabel) {
|
|
|
42
42
|
}
|
|
43
43
|
return name;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* The backend's human-readable action text, or `undefined` when it carries none.
|
|
47
|
+
* Blank copy collapses to `undefined` so the UI's `humanizeToken` fallback runs
|
|
48
|
+
* instead of rendering an empty Action cell, and surrounding whitespace is
|
|
49
|
+
* trimmed so the stored value is what should be displayed verbatim.
|
|
50
|
+
*/
|
|
51
|
+
function invoicingAuditActionLabel(actionLabel) {
|
|
52
|
+
const trimmed = actionLabel?.trim() ?? '';
|
|
53
|
+
return trimmed !== '' ? trimmed : undefined;
|
|
54
|
+
}
|
|
45
55
|
function mapAuditLogEntry(entry) {
|
|
46
56
|
const sourceLabel = entry.source_label ?? '';
|
|
47
57
|
return {
|
|
@@ -52,6 +62,7 @@ function mapAuditLogEntry(entry) {
|
|
|
52
62
|
source: entry.source,
|
|
53
63
|
sourceLabel: sourceLabel || undefined,
|
|
54
64
|
action: entry.action,
|
|
65
|
+
actionLabel: invoicingAuditActionLabel(entry.action_label),
|
|
55
66
|
entityId: entry.entity_id,
|
|
56
67
|
entityType: entry.entity_type,
|
|
57
68
|
customerId: entry.customer_id ?? undefined,
|
|
@@ -5,7 +5,7 @@ export interface InvoicingCouponFilters {
|
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const ALL_INVOICING_COUPON_SORT_KEYS: readonly ["coupon_id", "name", "discount", "duration", "created", "valid_till", "apply_on", "status", "redemptions"];
|
|
8
|
-
export declare const toInvoicingCouponSortKey: (v: string) => "status" | "name" | "
|
|
8
|
+
export declare const toInvoicingCouponSortKey: (v: string) => "status" | "name" | "discount" | "coupon_id" | "duration" | "created" | "valid_till" | "apply_on" | "redemptions";
|
|
9
9
|
export type InvoicingCouponSortKey = ReturnType<typeof toInvoicingCouponSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the discounts-list column set,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { Address } from '../../../entity/address/addressState';
|
|
4
|
-
import { InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingFieldHelpByCode, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
5
|
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
@@ -26,6 +26,11 @@ export interface InvoicingCreateInvoiceCustomerOption {
|
|
|
26
26
|
}
|
|
27
27
|
export interface CreateInvoiceFormView extends SelectorView {
|
|
28
28
|
customers: InvoicingCreateInvoiceCustomerOption[];
|
|
29
|
+
/**
|
|
30
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
31
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
32
|
+
*/
|
|
33
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
29
34
|
localData: InvoicingCreateInvoiceFormLocalData;
|
|
30
35
|
planNames: InvoicingPlanNameOption[];
|
|
31
36
|
products: InvoicingProduct[];
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getCreateInvoiceFormView = void 0;
|
|
4
4
|
const addressSelector_1 = require("../../../entity/address/addressSelector");
|
|
5
5
|
const invoicingCatalogListViewSelector_1 = require("../invoicingCatalogListView/invoicingCatalogListViewSelector");
|
|
6
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
6
7
|
const invoicingCustomerListViewSelector_1 = require("../invoicingCustomerListView/invoicingCustomerListViewSelector");
|
|
7
8
|
const settingsViewSelector_1 = require("../settingsView/settingsViewSelector");
|
|
8
9
|
/**
|
|
@@ -35,6 +36,7 @@ const getCreateInvoiceFormView = (state) => {
|
|
|
35
36
|
const createInvoiceState = state.invoicingCreateInvoiceState;
|
|
36
37
|
const catalogListView = (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogListView)(state);
|
|
37
38
|
return {
|
|
39
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'invoice'),
|
|
38
40
|
customers: (0, invoicingCustomerListViewSelector_1.getInvoicingCustomerListView)(state).customers.map((customer) => ({
|
|
39
41
|
billingAddress: customer.billingAddressId != null
|
|
40
42
|
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, customer.billingAddressId)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { InvoicingCatalogItemKind } from '../invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState';
|
|
@@ -30,6 +30,11 @@ export declare const getInvoicingApplicableCatalogItemOptions: (state: RootState
|
|
|
30
30
|
export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
31
31
|
applicabilityValues: readonly string[];
|
|
32
32
|
applicableItemOptions: ApplicableCatalogItemOption[];
|
|
33
|
+
/**
|
|
34
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
35
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
36
|
+
*/
|
|
37
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
33
38
|
localData: InvoicingCatalogItemFormLocalData;
|
|
34
39
|
mode: 'create' | 'edit';
|
|
35
40
|
periodUnitOptions: InvoicingNamedOption[];
|
|
@@ -56,6 +56,7 @@ const getInvoicingCatalogItemFormView = (state, id) => {
|
|
|
56
56
|
: allApplicableItemOptions;
|
|
57
57
|
const { billingPeriodUnitOptions, catalogItemTypeOptions, catalogTierTypeOptionsByPricingModel, catalogTrialEndActionOptions, catalogTrialUnitOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
58
58
|
return {
|
|
59
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'catalog'),
|
|
59
60
|
applicabilityValues: invoicingCatalogItemFormConfig_1.INVOICING_CATALOG_APPLICABILITY_VALUES,
|
|
60
61
|
applicableItemOptions,
|
|
61
62
|
localData,
|
package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
4
|
-
import { InvoicingDiscountLifecycleActionOption, InvoicingFormOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingDiscountLifecycleActionOption, InvoicingFieldHelpByCode, InvoicingFormOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { InvoicingCouponFormLocalData } from './editInvoicingCouponDetailViewState';
|
|
7
7
|
export interface EditInvoicingCouponDetailView extends SelectorView {
|
|
@@ -21,6 +21,11 @@ export interface InvoicingCouponFormView extends EditInvoicingCouponDetailView {
|
|
|
21
21
|
applyOnOptions: InvoicingFormOption[];
|
|
22
22
|
discountTypeOptions: InvoicingFormOption[];
|
|
23
23
|
durationTypeOptions: InvoicingFormOption[];
|
|
24
|
+
/**
|
|
25
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
26
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
27
|
+
*/
|
|
28
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
24
29
|
localData: InvoicingCouponFormLocalData;
|
|
25
30
|
mode: 'create' | 'edit';
|
|
26
31
|
periodUnitOptions: InvoicingFormOption[];
|
package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js
CHANGED
|
@@ -41,6 +41,7 @@ const getInvoicingCouponFormView = (state, couponId) => {
|
|
|
41
41
|
: newCouponDraft;
|
|
42
42
|
const { billingPeriodUnitOptions, discountApplyOnOptions, discountDurationTypeOptions, discountTypeOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
43
43
|
return {
|
|
44
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'discount'),
|
|
44
45
|
...base,
|
|
45
46
|
applyOnOptions: discountApplyOnOptions.map(invoicingCommonPayload_1.toInvoicingFormOption),
|
|
46
47
|
discountTypeOptions: discountTypeOptions.map(invoicingCommonPayload_1.toInvoicingFormOption),
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingFieldHelpByCode, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { InvoicingCustomerFormLocalData } from './editInvoicingCustomerDetailViewState';
|
|
6
6
|
export interface InvoicingCustomerFormView extends SelectorView {
|
|
7
7
|
customerTypeOptions: InvoicingNamedOption[];
|
|
8
|
+
/**
|
|
9
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
10
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
11
|
+
*/
|
|
12
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
8
13
|
localData: InvoicingCustomerFormLocalData;
|
|
9
14
|
mode: 'create' | 'edit';
|
|
10
15
|
netTermDayOptions: InvoicingNamedOption[];
|
|
@@ -32,6 +32,7 @@ const getInvoicingCustomerFormView = (state, invoicingCustomerID) => {
|
|
|
32
32
|
: undefined;
|
|
33
33
|
const { customerTypeOptions, netTermDayOptions, taxabilityOptions } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
34
34
|
return {
|
|
35
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'customer'),
|
|
35
36
|
customerTypeOptions,
|
|
36
37
|
localData,
|
|
37
38
|
mode,
|
|
@@ -11,5 +11,11 @@ export type SaveInvoicingSubscriptionResponse = ZeniAPIResponse<InvoicingSubscri
|
|
|
11
11
|
* `remaining_billing_cycles` is omitted when the user left the field empty, so
|
|
12
12
|
* the backend applies the plan's own `billing_cycles` (or renews forever when
|
|
13
13
|
* the plan sets no limit) rather than being pinned to a value the form invented.
|
|
14
|
+
*
|
|
15
|
+
* `billing_period` / `billing_period_unit` are deliberately absent. Billing
|
|
16
|
+
* cadence is a property of the selected price point, not of the subscription,
|
|
17
|
+
* and the backend derives it from that price point when the fields are omitted.
|
|
18
|
+
* Sending them made every price point whose cadence the form could not express
|
|
19
|
+
* — a daily plan, for instance — fail with a 422.
|
|
14
20
|
*/
|
|
15
21
|
export declare const localDataToSaveInvoicingSubscriptionPayload: (localData: InvoicingSubscriptionFormLocalData, shippingAddress?: AddressUpdatableInfo) => Record<string, unknown>;
|
|
@@ -11,9 +11,14 @@ const invoicingSubscriptionFormConfig_1 = require("./invoicingSubscriptionFormCo
|
|
|
11
11
|
* `remaining_billing_cycles` is omitted when the user left the field empty, so
|
|
12
12
|
* the backend applies the plan's own `billing_cycles` (or renews forever when
|
|
13
13
|
* the plan sets no limit) rather than being pinned to a value the form invented.
|
|
14
|
+
*
|
|
15
|
+
* `billing_period` / `billing_period_unit` are deliberately absent. Billing
|
|
16
|
+
* cadence is a property of the selected price point, not of the subscription,
|
|
17
|
+
* and the backend derives it from that price point when the fields are omitted.
|
|
18
|
+
* Sending them made every price point whose cadence the form could not express
|
|
19
|
+
* — a daily plan, for instance — fail with a 422.
|
|
14
20
|
*/
|
|
15
21
|
const localDataToSaveInvoicingSubscriptionPayload = (localData, shippingAddress) => {
|
|
16
|
-
const frequency = (0, invoicingSubscriptionFormConfig_1.billingFrequencyToPeriod)(localData.billingFrequency);
|
|
17
22
|
const items = [
|
|
18
23
|
{
|
|
19
24
|
item_price_code: localData.planPriceCode,
|
|
@@ -38,8 +43,6 @@ const localDataToSaveInvoicingSubscriptionPayload = (localData, shippingAddress)
|
|
|
38
43
|
const remainingBillingCycles = (0, invoicingSubscriptionFormConfig_1.toInvoicingSubscriptionBillingCycles)(localData.remainingBillingCycles);
|
|
39
44
|
return {
|
|
40
45
|
auto_collection: localData.autoCollection ? 'on' : 'off',
|
|
41
|
-
billing_period: frequency.period,
|
|
42
|
-
billing_period_unit: frequency.unit,
|
|
43
46
|
currency_code: localData.preferredCurrencyCode,
|
|
44
47
|
customer_id: localData.customerId,
|
|
45
48
|
started_at: startedAt !== '' ? startedAt : (0, invoicingSubscriptionFormConfig_1.invoicingSubscriptionTodayIso)(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
4
|
-
import { InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingFieldHelpByCode, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
5
|
import { InvoicingCustomer } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
6
6
|
import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
7
7
|
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
@@ -30,9 +30,13 @@ export interface EditInvoicingSubscriptionDetailView extends SelectorView {
|
|
|
30
30
|
* to its own option shapes, so this stays free of any web-components dependency.
|
|
31
31
|
*/
|
|
32
32
|
export interface InvoicingSubscriptionFormView extends SelectorView {
|
|
33
|
-
billingFrequencyValues: string[];
|
|
34
33
|
coupons: InvoicingCoupon[];
|
|
35
34
|
customers: InvoicingCustomer[];
|
|
35
|
+
/**
|
|
36
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
37
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
38
|
+
*/
|
|
39
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
36
40
|
localData: InvoicingSubscriptionFormLocalData;
|
|
37
41
|
mode: 'create' | 'edit';
|
|
38
42
|
plans: InvoicingProduct[];
|
|
@@ -46,9 +46,7 @@ const getInvoicingSubscriptionFormView = (state, invoicingSubscriptionID) => {
|
|
|
46
46
|
const planPrices = (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogPrices)(catalogListView.plans);
|
|
47
47
|
const addonAndChargePrices = (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogPrices)(catalogListView.products);
|
|
48
48
|
return {
|
|
49
|
-
|
|
50
|
-
...invoicingSubscriptionFormConfig_1.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES,
|
|
51
|
-
],
|
|
49
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'subscription'),
|
|
52
50
|
coupons: (0, couponViewSelector_1.getInvoicingCouponListItems)(state),
|
|
53
51
|
customers: (0, invoicingCustomerListViewSelector_1.getInvoicingCustomerListView)(state).customers,
|
|
54
52
|
localData,
|
|
@@ -16,7 +16,6 @@ export interface InvoicingSubscriptionFormLocalData {
|
|
|
16
16
|
*/
|
|
17
17
|
addonQuantities: Record<string, number>;
|
|
18
18
|
autoCollection: boolean;
|
|
19
|
-
billingFrequency: string;
|
|
20
19
|
chargePriceCodes: string[];
|
|
21
20
|
/** Per-charge quantity, keyed by item price code. See `addonQuantities`. */
|
|
22
21
|
chargeQuantities: Record<string, number>;
|
package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.d.ts
CHANGED
|
@@ -2,19 +2,6 @@ import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscr
|
|
|
2
2
|
import { InvoicingSubscriptionFormLocalData } from './editInvoicingSubscriptionDetailViewState';
|
|
3
3
|
/** `AddressType` key used when the subscription form opens the shared Address screen. */
|
|
4
4
|
export declare const INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE: "invoicing_subscription_shipping_address";
|
|
5
|
-
/**
|
|
6
|
-
* Canonical billing-frequency value set for the subscription form. CES owns the
|
|
7
|
-
* values (and their period/unit mapping); web-components maps each value to a
|
|
8
|
-
* localized label (same split as the customer form's value sets).
|
|
9
|
-
*/
|
|
10
|
-
export declare const INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES: readonly ["weekly", "monthly", "quarterly", "half_yearly", "yearly"];
|
|
11
|
-
/** Map a billing-frequency value to its API `billing_period` / `billing_period_unit`. */
|
|
12
|
-
export declare const billingFrequencyToPeriod: (value: string) => {
|
|
13
|
-
period: number;
|
|
14
|
-
unit: string;
|
|
15
|
-
};
|
|
16
|
-
/** Map an existing subscription's period/unit back to a billing-frequency value. */
|
|
17
|
-
export declare const periodToBillingFrequency: (period?: number, unit?: string) => string;
|
|
18
5
|
/**
|
|
19
6
|
* Today as `YYYY-MM-DD`, the default subscription start date. Goes through
|
|
20
7
|
* dayjs (not `toISOString`, which is UTC) so a user in a UTC+ timezone late in
|
package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js
CHANGED
|
@@ -1,40 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.entityToInvoicingSubscriptionFormLocalData = exports.initialInvoicingSubscriptionFormLocalData = exports.toInvoicingSubscriptionBillingCycles = exports.toInvoicingSubscriptionQuantity = exports.invoicingSubscriptionTodayIso = exports.
|
|
3
|
+
exports.entityToInvoicingSubscriptionFormLocalData = exports.initialInvoicingSubscriptionFormLocalData = exports.toInvoicingSubscriptionBillingCycles = exports.toInvoicingSubscriptionQuantity = exports.invoicingSubscriptionTodayIso = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
5
5
|
/** `AddressType` key used when the subscription form opens the shared Address screen. */
|
|
6
6
|
exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = 'invoicing_subscription_shipping_address';
|
|
7
|
-
/**
|
|
8
|
-
* Canonical billing-frequency value set for the subscription form. CES owns the
|
|
9
|
-
* values (and their period/unit mapping); web-components maps each value to a
|
|
10
|
-
* localized label (same split as the customer form's value sets).
|
|
11
|
-
*/
|
|
12
|
-
exports.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES = [
|
|
13
|
-
'weekly',
|
|
14
|
-
'monthly',
|
|
15
|
-
'quarterly',
|
|
16
|
-
'half_yearly',
|
|
17
|
-
'yearly',
|
|
18
|
-
];
|
|
19
|
-
const BILLING_FREQUENCY_TO_PERIOD = {
|
|
20
|
-
weekly: { period: 1, unit: 'week' },
|
|
21
|
-
monthly: { period: 1, unit: 'month' },
|
|
22
|
-
quarterly: { period: 3, unit: 'month' },
|
|
23
|
-
half_yearly: { period: 6, unit: 'month' },
|
|
24
|
-
yearly: { period: 1, unit: 'year' },
|
|
25
|
-
};
|
|
26
|
-
/** Map a billing-frequency value to its API `billing_period` / `billing_period_unit`. */
|
|
27
|
-
const billingFrequencyToPeriod = (value) => BILLING_FREQUENCY_TO_PERIOD[value] ?? BILLING_FREQUENCY_TO_PERIOD.monthly;
|
|
28
|
-
exports.billingFrequencyToPeriod = billingFrequencyToPeriod;
|
|
29
|
-
/** Map an existing subscription's period/unit back to a billing-frequency value. */
|
|
30
|
-
const periodToBillingFrequency = (period, unit) => {
|
|
31
|
-
const match = exports.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES.find((value) => {
|
|
32
|
-
const mapped = BILLING_FREQUENCY_TO_PERIOD[value];
|
|
33
|
-
return mapped.period === period && mapped.unit === unit;
|
|
34
|
-
});
|
|
35
|
-
return match ?? 'monthly';
|
|
36
|
-
};
|
|
37
|
-
exports.periodToBillingFrequency = periodToBillingFrequency;
|
|
38
7
|
const subscriptionItemPriceCodes = (subscription, itemType) => subscription?.subscriptionItems
|
|
39
8
|
?.filter((item) => item.itemType === itemType)
|
|
40
9
|
.map((item) => item.itemPriceCode)
|
|
@@ -88,7 +57,6 @@ exports.initialInvoicingSubscriptionFormLocalData = {
|
|
|
88
57
|
addonPriceCodes: [],
|
|
89
58
|
addonQuantities: {},
|
|
90
59
|
autoCollection: true,
|
|
91
|
-
billingFrequency: 'monthly',
|
|
92
60
|
chargePriceCodes: [],
|
|
93
61
|
chargeQuantities: {},
|
|
94
62
|
couponId: '',
|
|
@@ -111,7 +79,6 @@ const entityToInvoicingSubscriptionFormLocalData = (subscription) => {
|
|
|
111
79
|
addonPriceCodes: subscriptionItemPriceCodes(subscription, 'addon'),
|
|
112
80
|
addonQuantities: subscriptionItemQuantities(subscription, 'addon'),
|
|
113
81
|
autoCollection: (subscription.autoCollection ?? 'on') === 'on',
|
|
114
|
-
billingFrequency: (0, exports.periodToBillingFrequency)(subscription.billingPeriod, subscription.billingPeriodUnit),
|
|
115
82
|
chargePriceCodes: subscriptionItemPriceCodes(subscription, 'charge'),
|
|
116
83
|
chargeQuantities: subscriptionItemQuantities(subscription, 'charge'),
|
|
117
84
|
couponId: subscription.coupons?.[0]?.couponCode ??
|
|
@@ -2,6 +2,7 @@ import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { Address } from '../../../entity/address/addressState';
|
|
4
4
|
import { InvoicingInvoice } from '../../../entity/invoicing/invoice/invoiceState';
|
|
5
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
6
|
import { RootState } from '../../../rootStateTypes';
|
|
6
7
|
/**
|
|
7
8
|
* Read-only view for the invoice detail page: the invoice entity + its per-id
|
|
@@ -11,6 +12,11 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
11
12
|
*/
|
|
12
13
|
export interface InvoiceDetailView extends SelectorView {
|
|
13
14
|
actionState: FetchStateAndError;
|
|
15
|
+
/**
|
|
16
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
17
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
18
|
+
*/
|
|
19
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
14
20
|
billingAddress?: Address;
|
|
15
21
|
invoice?: InvoicingInvoice;
|
|
16
22
|
shippingAddress?: Address;
|
|
@@ -8,10 +8,12 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
8
8
|
const addressSelector_1 = require("../../../entity/address/addressSelector");
|
|
9
9
|
const invoiceSelector_1 = require("../../../entity/invoicing/invoice/invoiceSelector");
|
|
10
10
|
const invoiceActionSelector_1 = require("../invoiceAction/invoiceActionSelector");
|
|
11
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
11
12
|
const getInvoiceDetail = (state, invoiceId) => {
|
|
12
13
|
const detail = (0, get_1.default)(state.invoicingInvoiceDetailState.detailById, invoiceId, undefined);
|
|
13
14
|
const invoice = (0, invoiceSelector_1.getInvoiceById)(state.invoicingInvoiceState, invoiceId);
|
|
14
15
|
return {
|
|
16
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'invoice'),
|
|
15
17
|
invoice,
|
|
16
18
|
billingAddress: invoice?.billingAddressId != null
|
|
17
19
|
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, invoice.billingAddressId)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { InvoicingCatalogItemKind } from './invoicingCatalogItemDetailViewState';
|
|
@@ -20,6 +20,11 @@ export interface InvoicingCatalogItemDetailView extends SelectorView {
|
|
|
20
20
|
catalogItemLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogItemLifecycleAction>[];
|
|
21
21
|
catalogProductLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogProductLifecycleAction>[];
|
|
22
22
|
configFetchState: FetchState;
|
|
23
|
+
/**
|
|
24
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
25
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
26
|
+
*/
|
|
27
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
23
28
|
/**
|
|
24
29
|
* Config option lists the detail page's inline pricing editor renders, so the
|
|
25
30
|
* screen reads them off this view instead of `getInvoicingConfigView`.
|
package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js
CHANGED
|
@@ -7,6 +7,7 @@ const getInvoicingCatalogItemDetail = (state, _kind, id) => {
|
|
|
7
7
|
const { error, fetchState } = state.invoicingCatalogItemDetailViewState;
|
|
8
8
|
const { billingPeriodUnitOptions, catalogItemLifecycleActionOptions, catalogItemTypeOptions, catalogProductLifecycleActionOptions, catalogTierTypeOptionsByPricingModel, catalogTrialEndActionOptions, catalogTrialUnitOptions, fetchState: configFetchState, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
9
9
|
return {
|
|
10
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'catalog'),
|
|
10
11
|
catalogItemLifecycleActionOptions,
|
|
11
12
|
catalogProductLifecycleActionOptions,
|
|
12
13
|
catalogTierTypeOptionsByPricingModel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuditLogEntityRouteOptionWire, AuditLogListSortFieldOptionWire, AuditLogSourceLabelOptionWire, InvoicingCatalogLifecycleActionOptionWire, InvoicingDunningActionOption, InvoicingNamedOptionWire, InvoicingNamedOptionsByKeyWire, InvoicingQboAccountMappingKindOptionWire, InvoicingSubscriptionEditFieldOptionWire, InvoicingSubscriptionLifecycleActionOptionWire } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
1
|
+
import { AuditLogEntityRouteOptionWire, AuditLogListSortFieldOptionWire, AuditLogSourceLabelOptionWire, InvoicingCatalogLifecycleActionOptionWire, InvoicingDunningActionOption, InvoicingFieldHelpWire, InvoicingNamedOptionWire, InvoicingNamedOptionsByKeyWire, InvoicingQboAccountMappingKindOptionWire, InvoicingSubscriptionEditFieldOptionWire, InvoicingSubscriptionLifecycleActionOptionWire } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
2
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
3
3
|
/**
|
|
4
4
|
* Wire payload of the invoicing config API (GET/PUT `/1.0/config`). Follows
|
|
@@ -41,6 +41,7 @@ export interface InvoicingConfigPayload {
|
|
|
41
41
|
discount_status_options?: InvoicingNamedOptionWire[];
|
|
42
42
|
discount_type_options?: InvoicingNamedOptionWire[];
|
|
43
43
|
dunning_case_status_options?: InvoicingNamedOptionWire[];
|
|
44
|
+
field_help?: InvoicingFieldHelpWire;
|
|
44
45
|
invoice_status_options?: InvoicingNamedOptionWire[];
|
|
45
46
|
invoicing_tos_acceptance_ip?: string | null;
|
|
46
47
|
invoicing_tos_acceptance_time?: string | null;
|
|
@@ -2,7 +2,7 @@ import { ZeniAPIStatus } from '../../../responsePayload';
|
|
|
2
2
|
import { InvoicingConfigPayload } from './invoicingConfigViewPayload';
|
|
3
3
|
import { InvoicingConfigViewState } from './invoicingConfigViewState';
|
|
4
4
|
export declare const initialState: InvoicingConfigViewState;
|
|
5
|
-
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | 'subscriptionStatusOptions' | 'transactionStatusOptions' | 'transactionTypeOptions' | 'createdAt' | 'updatedAt' | 'dunningScheduleActionOptions' | 'subscriptionLifecycleActionOptions' | 'subscriptionCommercialEditAllowedFromStatuses' | 'subscriptionMetadataEditAllowedFromStatuses' | 'subscriptionEditFieldOptions' | 'subscriptionCancelTimingOptions' | 'subscriptionChangeOptionOptions' | 'catalogItemLifecycleActionOptions' | 'catalogProductLifecycleActionOptions' | 'discountLifecycleActionOptions' | 'qboAccountMappingKindOptions' | 'qboCustomerMatchingOptions' | 'qboSyncStatusOptions' | 'isInvoicingEnabled' | 'isInvoicingTosAccepted' | 'invoicingTosAcceptanceIp' | 'invoicingTosAcceptanceTime' | 'invoicingTosAcceptanceUserAgent' | 'invoicingTosAcceptanceUserId' | 'isInvoicingSettingsSeeded'>;
|
|
5
|
+
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'fieldHelp' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | 'subscriptionStatusOptions' | 'transactionStatusOptions' | 'transactionTypeOptions' | 'createdAt' | 'updatedAt' | 'dunningScheduleActionOptions' | 'subscriptionLifecycleActionOptions' | 'subscriptionCommercialEditAllowedFromStatuses' | 'subscriptionMetadataEditAllowedFromStatuses' | 'subscriptionEditFieldOptions' | 'subscriptionCancelTimingOptions' | 'subscriptionChangeOptionOptions' | 'catalogItemLifecycleActionOptions' | 'catalogProductLifecycleActionOptions' | 'discountLifecycleActionOptions' | 'qboAccountMappingKindOptions' | 'qboCustomerMatchingOptions' | 'qboSyncStatusOptions' | 'isInvoicingEnabled' | 'isInvoicingTosAccepted' | 'invoicingTosAcceptanceIp' | 'invoicingTosAcceptanceTime' | 'invoicingTosAcceptanceUserAgent' | 'invoicingTosAcceptanceUserId' | 'isInvoicingSettingsSeeded'>;
|
|
6
6
|
export declare const fetchInvoicingConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
|
|
7
7
|
cacheOverride?: boolean;
|
|
8
8
|
} | undefined], {
|
|
@@ -20,6 +20,7 @@ exports.initialState = {
|
|
|
20
20
|
catalogTrialUnitOptions: [],
|
|
21
21
|
customerTypeOptions: [],
|
|
22
22
|
dateFormatOptions: [],
|
|
23
|
+
fieldHelp: {},
|
|
23
24
|
discountApplyOnOptions: [],
|
|
24
25
|
discountDurationTypeOptions: [],
|
|
25
26
|
discountTypeOptions: [],
|
|
@@ -80,6 +81,9 @@ function mapInvoicingConfigPayloadToState(payload) {
|
|
|
80
81
|
})),
|
|
81
82
|
autoCollectionOptions: (payload.auto_collection_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
82
83
|
billingPeriodUnitOptions: (payload.billing_period_unit_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
84
|
+
fieldHelp: payload.field_help != null
|
|
85
|
+
? (0, invoicingCommonPayload_1.toInvoicingFieldHelp)(payload.field_help)
|
|
86
|
+
: {},
|
|
83
87
|
catalogTierTypeOptionsByPricingModel: payload.catalog_tier_type_options_by_pricing_model != null
|
|
84
88
|
? (0, invoicingCommonPayload_1.toInvoicingNamedOptionsByKey)(payload.catalog_tier_type_options_by_pricing_model)
|
|
85
89
|
: undefined,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FetchState, FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
|
+
import type { InvoicingFieldHelpByCode, InvoicingFieldHelpGroup } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
3
|
import { RootState } from '../../../rootStateTypes';
|
|
3
4
|
import { InvoicingOnboardingStatus } from './invoicingConfigViewPayload';
|
|
4
5
|
import { InvoicingConfigViewState } from './invoicingConfigViewState';
|
|
@@ -34,3 +35,10 @@ export interface InvoicingOnboardingGateView {
|
|
|
34
35
|
status?: InvoicingOnboardingStatus;
|
|
35
36
|
}
|
|
36
37
|
export declare const getInvoicingOnboardingGateView: (state: RootState) => InvoicingOnboardingGateView;
|
|
38
|
+
/**
|
|
39
|
+
* One group's help copy, keyed by field code. Composed by the page-level view
|
|
40
|
+
* selectors rather than exported to the UI: a screen receives the slice for its
|
|
41
|
+
* own group, so no screen needs the config shape. Empty when the backend has
|
|
42
|
+
* not populated the group, which the UI reads as "render no icon".
|
|
43
|
+
*/
|
|
44
|
+
export declare const invoicingFieldHelpForGroup: (state: RootState, group: InvoicingFieldHelpGroup) => InvoicingFieldHelpByCode;
|