@zeniai/client-epic-state 5.1.97-betaAK4 → 5.1.98

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.
Files changed (131) hide show
  1. package/lib/entity/invoicing/coupon/couponConstants.d.ts +11 -0
  2. package/lib/entity/invoicing/coupon/couponConstants.js +29 -0
  3. package/lib/entity/invoicing/invoicingCommonPayload.d.ts +0 -12
  4. package/lib/entity/invoicing/invoicingCommonPayload.js +0 -18
  5. package/lib/esm/entity/invoicing/coupon/couponConstants.js +26 -0
  6. package/lib/esm/entity/invoicing/invoicingCommonPayload.js +0 -16
  7. package/lib/esm/index.js +11 -12
  8. package/lib/esm/view/invoicing/auditView/auditViewSelector.js +0 -4
  9. package/lib/esm/view/invoicing/couponView/couponViewSelector.js +3 -10
  10. package/lib/esm/view/invoicing/couponView/couponViewState.js +9 -0
  11. package/lib/esm/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +0 -1
  12. package/lib/esm/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -2
  13. package/lib/esm/view/invoicing/createCreditNote/createCreditNoteSelector.js +2 -4
  14. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +6 -7
  15. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +19 -3
  16. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +5 -10
  17. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +4 -6
  18. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.js +17 -0
  19. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +0 -5
  20. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +1 -2
  21. package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +6 -6
  22. package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +4 -12
  23. package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +9 -13
  24. package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +1 -5
  25. package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +1 -2
  26. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -26
  27. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +0 -9
  28. package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +3 -8
  29. package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.js +9 -0
  30. package/lib/esm/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +2 -2
  31. package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
  32. package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +3 -9
  33. package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +9 -0
  34. package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +3 -8
  35. package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +9 -1
  36. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +3 -11
  37. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +9 -0
  38. package/lib/esm/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +1 -2
  39. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +5 -5
  40. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +4 -9
  41. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +9 -11
  42. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.js +8 -1
  43. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNotePayload.js +1 -3
  44. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +2 -5
  45. package/lib/esm/view/invoicing/recordPayment/recordPaymentFormConfig.js +26 -0
  46. package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +6 -27
  47. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +1 -7
  48. package/lib/index.d.ts +12 -13
  49. package/lib/index.js +24 -9
  50. package/lib/view/invoicing/auditView/auditViewSelector.d.ts +0 -4
  51. package/lib/view/invoicing/auditView/auditViewSelector.js +0 -4
  52. package/lib/view/invoicing/couponView/couponViewSelector.d.ts +1 -5
  53. package/lib/view/invoicing/couponView/couponViewSelector.js +2 -9
  54. package/lib/view/invoicing/couponView/couponViewState.d.ts +7 -0
  55. package/lib/view/invoicing/couponView/couponViewState.js +10 -1
  56. package/lib/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +0 -1
  57. package/lib/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -2
  58. package/lib/view/invoicing/createCreditNote/createCreditNoteSelector.d.ts +1 -3
  59. package/lib/view/invoicing/createCreditNote/createCreditNoteSelector.js +2 -4
  60. package/lib/view/invoicing/createCreditNote/createCreditNoteState.d.ts +0 -6
  61. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +5 -5
  62. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +5 -6
  63. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.d.ts +6 -3
  64. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +20 -4
  65. package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +7 -9
  66. package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +5 -10
  67. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +3 -4
  68. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +3 -5
  69. package/lib/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.d.ts +8 -0
  70. package/lib/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.js +18 -1
  71. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +0 -5
  72. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +0 -5
  73. package/lib/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +1 -2
  74. package/lib/view/invoicing/invoiceList/invoiceListReducer.js +5 -5
  75. package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +1 -3
  76. package/lib/view/invoicing/invoiceList/invoiceListSelector.js +3 -11
  77. package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +9 -13
  78. package/lib/view/invoicing/invoiceList/invoiceListState.js +10 -15
  79. package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +1 -9
  80. package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +1 -5
  81. package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +1 -3
  82. package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +1 -2
  83. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -13
  84. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
  85. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -26
  86. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +1 -19
  87. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +1 -11
  88. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -13
  89. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.d.ts +1 -3
  90. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +2 -7
  91. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +7 -0
  92. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.js +10 -1
  93. package/lib/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +2 -2
  94. package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
  95. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.d.ts +1 -3
  96. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +2 -8
  97. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +7 -0
  98. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +10 -1
  99. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
  100. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.d.ts +1 -3
  101. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +2 -7
  102. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +9 -2
  103. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +10 -2
  104. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +1 -7
  105. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +2 -10
  106. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +7 -0
  107. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +10 -1
  108. package/lib/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +1 -2
  109. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.d.ts +1 -1
  110. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +4 -4
  111. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.d.ts +0 -3
  112. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +3 -8
  113. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.d.ts +10 -10
  114. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +10 -13
  115. package/lib/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.d.ts +2 -0
  116. package/lib/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.js +9 -2
  117. package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +2 -2
  118. package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.js +1 -3
  119. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +1 -3
  120. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +1 -4
  121. package/lib/view/invoicing/issueCreditNote/issueCreditNoteState.d.ts +0 -6
  122. package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.d.ts +6 -0
  123. package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.js +27 -1
  124. package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +2 -3
  125. package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +6 -27
  126. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +1 -11
  127. package/lib/view/invoicing/settingsView/settingsViewSelector.js +1 -7
  128. package/package.json +1 -1
  129. package/lib/esm/view/invoicing/invoicingTabHelper.js +0 -25
  130. package/lib/view/invoicing/invoicingTabHelper.d.ts +0 -27
  131. package/lib/view/invoicing/invoicingTabHelper.js +0 -28
@@ -19,8 +19,7 @@ exports.getInvoicingCatalogPrices = getInvoicingCatalogPrices;
19
19
  * denormalized arrays keep referential identity. The base `fetchState`/`error`
20
20
  * track the plan list; the product list has its own `productFetchState`.
21
21
  */
22
- exports.getInvoicingCatalogListView = (0, toolkit_1.createSelector)((state) => state.invoicingPlanState, (state) => state.invoicingCatalogListViewState, (state) => state.invoicingConfigViewState.catalogItemLifecycleActionOptions, (planState, listViewState, catalogItemLifecycleActionOptions) => ({
23
- catalogItemLifecycleActionOptions,
22
+ exports.getInvoicingCatalogListView = (0, toolkit_1.createSelector)((state) => state.invoicingPlanState, (state) => state.invoicingCatalogListViewState, (planState, listViewState) => ({
24
23
  plans: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.planIds),
25
24
  productColumns: invoicingCatalogListViewState_1.INVOICING_PRODUCT_COLUMNS,
26
25
  products: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.productIds),
@@ -23,25 +23,15 @@ export interface InvoicingConfigPayload {
23
23
  subscription_metadata_edit_allowed_from_statuses: string[];
24
24
  auto_collection_options?: InvoicingNamedOptionWire[];
25
25
  billing_period_unit_options?: InvoicingNamedOptionWire[];
26
- card_status_options?: InvoicingNamedOptionWire[];
27
- catalog_item_status_options?: InvoicingNamedOptionWire[];
28
- catalog_item_type_options?: InvoicingNamedOptionWire[];
29
26
  catalog_tier_type_options_by_pricing_model?: InvoicingNamedOptionsByKeyWire;
30
27
  catalog_trial_end_action_options?: InvoicingNamedOptionWire[];
31
28
  catalog_trial_unit_options?: InvoicingNamedOptionWire[];
32
29
  created_at?: string | null;
33
- credit_note_reason_code_options?: InvoicingNamedOptionWire[];
34
- credit_note_status_options?: InvoicingNamedOptionWire[];
35
- credit_note_type_options?: InvoicingNamedOptionWire[];
36
- customer_status_options?: InvoicingNamedOptionWire[];
37
30
  customer_type_options?: InvoicingNamedOptionWire[];
38
31
  date_format_options?: InvoicingNamedOptionWire[];
39
32
  discount_apply_on_options?: InvoicingNamedOptionWire[];
40
33
  discount_duration_type_options?: InvoicingNamedOptionWire[];
41
- discount_status_options?: InvoicingNamedOptionWire[];
42
34
  discount_type_options?: InvoicingNamedOptionWire[];
43
- dunning_case_status_options?: InvoicingNamedOptionWire[];
44
- invoice_status_options?: InvoicingNamedOptionWire[];
45
35
  invoicing_tos_acceptance_ip?: string | null;
46
36
  invoicing_tos_acceptance_time?: string | null;
47
37
  invoicing_tos_acceptance_user_agent?: string | null;
@@ -53,10 +43,7 @@ export interface InvoicingConfigPayload {
53
43
  qbo_account_mapping_kind_options?: InvoicingQboAccountMappingKindOptionWire[];
54
44
  qbo_customer_matching_options?: InvoicingNamedOptionWire[];
55
45
  qbo_sync_status_options?: InvoicingNamedOptionWire[];
56
- subscription_status_options?: InvoicingNamedOptionWire[];
57
46
  taxability_options?: InvoicingNamedOptionWire[];
58
- transaction_status_options?: InvoicingNamedOptionWire[];
59
- transaction_type_options?: InvoicingNamedOptionWire[];
60
47
  updated_at?: string | null;
61
48
  }
62
49
  export type InvoicingConfigResponse = ZeniAPIResponse<InvoicingConfigPayload>;
@@ -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' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | '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], {
@@ -28,19 +28,6 @@ exports.initialState = {
28
28
  netTermDayOptions: [],
29
29
  paymentGatewayOptions: [],
30
30
  taxabilityOptions: [],
31
- cardStatusOptions: [],
32
- catalogItemStatusOptions: [],
33
- catalogItemTypeOptions: [],
34
- creditNoteReasonCodeOptions: [],
35
- creditNoteStatusOptions: [],
36
- creditNoteTypeOptions: [],
37
- customerStatusOptions: [],
38
- discountStatusOptions: [],
39
- dunningCaseStatusOptions: [],
40
- invoiceStatusOptions: [],
41
- subscriptionStatusOptions: [],
42
- transactionStatusOptions: [],
43
- transactionTypeOptions: [],
44
31
  enableFetchState: { fetchState: 'Not-Started', error: undefined },
45
32
  subscriptionLifecycleActionOptions: [],
46
33
  subscriptionCommercialEditAllowedFromStatuses: [],
@@ -94,19 +81,6 @@ function mapInvoicingConfigPayloadToState(payload) {
94
81
  netTermDayOptions: (payload.net_term_day_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
95
82
  paymentGatewayOptions: (payload.payment_gateway_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
96
83
  taxabilityOptions: (payload.taxability_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
97
- cardStatusOptions: (payload.card_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
98
- catalogItemStatusOptions: (payload.catalog_item_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
99
- catalogItemTypeOptions: (payload.catalog_item_type_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
100
- creditNoteReasonCodeOptions: (payload.credit_note_reason_code_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
101
- creditNoteStatusOptions: (payload.credit_note_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
102
- creditNoteTypeOptions: (payload.credit_note_type_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
103
- customerStatusOptions: (payload.customer_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
104
- discountStatusOptions: (payload.discount_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
105
- dunningCaseStatusOptions: (payload.dunning_case_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
106
- invoiceStatusOptions: (payload.invoice_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
107
- subscriptionStatusOptions: (payload.subscription_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
108
- transactionStatusOptions: (payload.transaction_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
109
- transactionTypeOptions: (payload.transaction_type_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
110
84
  createdAt: payload.created_at ?? undefined,
111
85
  updatedAt: payload.updated_at ?? undefined,
112
86
  dunningScheduleActionOptions: payload.dunning_schedule_action_options.map((option) => ({
@@ -1,4 +1,4 @@
1
- import { FetchState, FetchStateAndError } from '../../../commonStateTypes/common';
1
+ import { FetchStateAndError } from '../../../commonStateTypes/common';
2
2
  import { RootState } from '../../../reducer';
3
3
  import { InvoicingOnboardingStatus } from './invoicingConfigViewPayload';
4
4
  import { InvoicingConfigViewState } from './invoicingConfigViewState';
@@ -16,21 +16,3 @@ export interface InvoicingConfigView extends Omit<InvoicingConfigViewState, 'acc
16
16
  status?: InvoicingOnboardingStatus;
17
17
  }
18
18
  export declare const getInvoicingConfigView: (state: RootState) => InvoicingConfigView;
19
- /**
20
- * The onboarding/route gate's slice of the config: whether invoicing is routed to
21
- * the promo, the settings step or the live module, plus the two action fetch
22
- * states those surfaces render against.
23
- *
24
- * Exists so the drawers, the invoicing route gate and the promo screen have a
25
- * concern-scoped view to read instead of reaching into
26
- * {@link getInvoicingConfigView} — they are nav and routing, not pages, so there
27
- * is no page-level view for them to use. The whole config shape stays out of
28
- * their props either way.
29
- */
30
- export interface InvoicingOnboardingGateView {
31
- acceptTermsState: FetchStateAndError;
32
- enableState: FetchStateAndError;
33
- fetchState: FetchState;
34
- status?: InvoicingOnboardingStatus;
35
- }
36
- export declare const getInvoicingOnboardingGateView: (state: RootState) => InvoicingOnboardingGateView;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = void 0;
3
+ exports.getInvoicingConfigView = void 0;
4
4
  const invoicingConfigViewPayload_1 = require("./invoicingConfigViewPayload");
5
5
  const getInvoicingConfigView = (state) => {
6
6
  const { acceptTermsFetchState, enableFetchState, ...configState } = state.invoicingConfigViewState;
@@ -12,13 +12,3 @@ const getInvoicingConfigView = (state) => {
12
12
  };
13
13
  };
14
14
  exports.getInvoicingConfigView = getInvoicingConfigView;
15
- const getInvoicingOnboardingGateView = (state) => {
16
- const { acceptTermsFetchState, enableFetchState, fetchState } = state.invoicingConfigViewState;
17
- return {
18
- acceptTermsState: acceptTermsFetchState,
19
- enableState: enableFetchState,
20
- fetchState,
21
- status: (0, invoicingConfigViewPayload_1.deriveInvoicingOnboardingStatus)(state.invoicingConfigViewState.isInvoicingTosAccepted, state.invoicingConfigViewState.isInvoicingEnabled),
22
- };
23
- };
24
- exports.getInvoicingOnboardingGateView = getInvoicingOnboardingGateView;
@@ -8,28 +8,18 @@ export interface InvoicingConfigViewState extends FetchedState {
8
8
  auditLogSourceLabels: AuditLogSourceLabelOption[];
9
9
  autoCollectionOptions: InvoicingNamedOption[];
10
10
  billingPeriodUnitOptions: InvoicingNamedOption[];
11
- cardStatusOptions: InvoicingNamedOption[];
12
11
  catalogItemLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogItemLifecycleAction>[];
13
- catalogItemStatusOptions: InvoicingNamedOption[];
14
- catalogItemTypeOptions: InvoicingNamedOption[];
15
12
  catalogProductLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogProductLifecycleAction>[];
16
13
  catalogTrialEndActionOptions: InvoicingNamedOption[];
17
14
  catalogTrialUnitOptions: InvoicingNamedOption[];
18
- creditNoteReasonCodeOptions: InvoicingNamedOption[];
19
- creditNoteStatusOptions: InvoicingNamedOption[];
20
- creditNoteTypeOptions: InvoicingNamedOption[];
21
- customerStatusOptions: InvoicingNamedOption[];
22
15
  customerTypeOptions: InvoicingNamedOption[];
23
16
  dateFormatOptions: InvoicingNamedOption[];
24
17
  discountApplyOnOptions: InvoicingNamedOption[];
25
18
  discountDurationTypeOptions: InvoicingNamedOption[];
26
19
  discountLifecycleActionOptions: InvoicingDiscountLifecycleActionOption[];
27
- discountStatusOptions: InvoicingNamedOption[];
28
20
  discountTypeOptions: InvoicingNamedOption[];
29
- dunningCaseStatusOptions: InvoicingNamedOption[];
30
21
  dunningScheduleActionOptions: InvoicingDunningActionOption[];
31
22
  enableFetchState: FetchStateAndError;
32
- invoiceStatusOptions: InvoicingNamedOption[];
33
23
  manualPaymentMethodOptions: InvoicingNamedOption[];
34
24
  netTermDayOptions: InvoicingNamedOption[];
35
25
  paymentGatewayOptions: InvoicingNamedOption[];
@@ -42,10 +32,7 @@ export interface InvoicingConfigViewState extends FetchedState {
42
32
  subscriptionEditFieldOptions: InvoicingSubscriptionEditFieldOption[];
43
33
  subscriptionLifecycleActionOptions: InvoicingSubscriptionLifecycleActionOption[];
44
34
  subscriptionMetadataEditAllowedFromStatuses: string[];
45
- subscriptionStatusOptions: InvoicingNamedOption[];
46
35
  taxabilityOptions: InvoicingNamedOption[];
47
- transactionStatusOptions: InvoicingNamedOption[];
48
- transactionTypeOptions: InvoicingNamedOption[];
49
36
  /**
50
37
  * Allowed tier `Type` options per pricing model. `undefined` means the config
51
38
  * has not been loaded yet — consumers disable the tier editor rather than
@@ -1,7 +1,7 @@
1
1
  import { FetchStateAndError } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { InvoicingCreditNote } from '../../../entity/invoicing/creditNote/creditNoteState';
4
- import { InvoicingListCounts, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
4
+ import { InvoicingListCounts } from '../../../entity/invoicing/invoicingCommonPayload';
5
5
  import { RootState } from '../../../reducer';
6
6
  import { InvoicingListSort } from '../invoicingApiHelper';
7
7
  import { InvoicingCreditNoteColumnConfig, InvoicingCreditNoteFilters, InvoicingCreditNoteTabId } from './invoicingCreditNoteListViewState';
@@ -12,8 +12,6 @@ export interface InvoicingCreditNoteListView extends SelectorView {
12
12
  countsFetchState: FetchStateAndError;
13
13
  creditNotes: InvoicingCreditNote[];
14
14
  filters: InvoicingCreditNoteFilters;
15
- /** Config status/type list; the page labels tabs and badges from it. */
16
- statusOptions: InvoicingNamedOption[];
17
15
  tabIds: InvoicingCreditNoteTabId[];
18
16
  sort?: InvoicingListSort;
19
17
  }
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInvoicingCreditNoteListView = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const creditNoteSelector_1 = require("../../../entity/invoicing/creditNote/creditNoteSelector");
6
- const invoicingTabHelper_1 = require("../invoicingTabHelper");
7
6
  const invoicingCreditNoteListViewState_1 = require("./invoicingCreditNoteListViewState");
8
7
  /**
9
8
  * Memoized so the denormalized `creditNotes` array (and the wrapping view
10
9
  * object) keep referential identity until the credit-note entity slice or the
11
10
  * list-view slice actually change.
12
11
  */
13
- exports.getInvoicingCreditNoteListView = (0, toolkit_1.createSelector)((state) => state.invoicingCreditNoteState, (state) => state.invoicingCreditNoteListViewState, (state) => state.invoicingConfigViewState.creditNoteStatusOptions, (creditNoteState, listViewState, statusOptions) => {
12
+ exports.getInvoicingCreditNoteListView = (0, toolkit_1.createSelector)((state) => state.invoicingCreditNoteState, (state) => state.invoicingCreditNoteListViewState, (creditNoteState, listViewState) => {
14
13
  const { activeTab } = listViewState;
15
14
  const allCreditNotes = (0, creditNoteSelector_1.getInvoicingCreditNotesByIds)(creditNoteState, listViewState.ids);
16
15
  // The list API ignores `status`, so it returns every status; filter to the
@@ -26,11 +25,7 @@ exports.getInvoicingCreditNoteListView = (0, toolkit_1.createSelector)((state) =
26
25
  countsFetchState: listViewState.countsFetchState,
27
26
  filters: listViewState.filters,
28
27
  nextCursor: listViewState.nextCursor,
29
- statusOptions,
30
- tabIds: (0, invoicingTabHelper_1.invoicingTabIdsFromConfig)({
31
- allTabIds: invoicingCreditNoteListViewState_1.ALL_INVOICING_CREDIT_NOTE_TAB_IDS,
32
- statusOptions,
33
- }),
28
+ tabIds: invoicingCreditNoteListViewState_1.INVOICING_CREDIT_NOTE_TABS,
34
29
  fetchState: listViewState.fetchState,
35
30
  error: listViewState.error,
36
31
  sort: listViewState.sort,
@@ -23,6 +23,13 @@ export declare const INVOICING_CREDIT_NOTE_COLUMNS: InvoicingCreditNoteColumnCon
23
23
  export declare const ALL_INVOICING_CREDIT_NOTE_TAB_IDS: readonly ["all", "refund_due", "adjusted", "refunded", "voided"];
24
24
  export declare const toInvoicingCreditNoteTabId: (v: string) => "adjusted" | "refunded" | "refund_due" | "voided" | "all";
25
25
  export type InvoicingCreditNoteTabId = ReturnType<typeof toInvoicingCreditNoteTabId>;
26
+ /**
27
+ * Ordered filter-tab id set owned by CES so the credit-notes-list tabs live next
28
+ * to the model rather than being hardcoded in web-components. Tab labels and the
29
+ * per-tab count lookup stay in the view layer; this only carries the id set and
30
+ * display order.
31
+ */
32
+ export declare const INVOICING_CREDIT_NOTE_TABS: InvoicingCreditNoteTabId[];
26
33
  export interface InvoicingCreditNoteListViewState extends FetchedState {
27
34
  /** Selected status tab (CES-owned so it persists across page revisits). */
28
35
  activeTab: InvoicingCreditNoteTabId;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toInvoicingCreditNoteTabId = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.toInvoicingCreditNoteSortKey = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = void 0;
3
+ exports.INVOICING_CREDIT_NOTE_TABS = exports.toInvoicingCreditNoteTabId = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.toInvoicingCreditNoteSortKey = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = [
6
6
  'credit_note',
@@ -33,3 +33,12 @@ exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = [
33
33
  ];
34
34
  const toInvoicingCreditNoteTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS);
35
35
  exports.toInvoicingCreditNoteTabId = toInvoicingCreditNoteTabId;
36
+ /**
37
+ * Ordered filter-tab id set owned by CES so the credit-notes-list tabs live next
38
+ * to the model rather than being hardcoded in web-components. Tab labels and the
39
+ * per-tab count lookup stay in the view layer; this only carries the id set and
40
+ * display order.
41
+ */
42
+ exports.INVOICING_CREDIT_NOTE_TABS = [
43
+ ...exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS,
44
+ ];
@@ -37,8 +37,8 @@ const fetchInvoicingCustomerDetailPageEpic = (actions$, state$) => actions$.pipe
37
37
  const invoiceListIsForCustomer = invoiceListState.filters.customerId === id;
38
38
  if (!invoiceListIsForCustomer ||
39
39
  shouldFetch({
40
- fetchState: invoiceListTabState?.fetchState ?? 'Not-Started',
41
- error: invoiceListTabState?.error,
40
+ fetchState: invoiceListTabState.fetchState,
41
+ error: invoiceListTabState.error,
42
42
  }, cacheOverride)) {
43
43
  pageActions.push((0, invoiceListReducer_1.fetchInvoiceList)({ filters: { customerId: id } }));
44
44
  }
@@ -16,7 +16,7 @@ const getInvoicingCustomerDetail = (state, invoicingCustomerID) => {
16
16
  const settings = (0, settingsViewSelector_1.getInvoicingSettings)(state);
17
17
  return {
18
18
  invoicingCustomer: (0, invoicingCustomerSelector_1.getInvoicingCustomerById)(invoicingCustomerState, invoicingCustomerID),
19
- invoices: (0, invoiceSelector_1.getInvoicesByIds)(state.invoicingInvoiceState, state.invoicingInvoiceListState.invoiceByTab[state.invoicingInvoiceListState.activeTab]?.invoiceIds ?? []),
19
+ invoices: (0, invoiceSelector_1.getInvoicesByIds)(state.invoicingInvoiceState, state.invoicingInvoiceListState.invoiceByTab[state.invoicingInvoiceListState.activeTab].invoiceIds),
20
20
  setupIntent: (0, customerPaymentMethodSelector_1.getInvoicingSetupIntent)(state),
21
21
  setupIntentFetchState: (0, customerPaymentMethodSelector_1.getInvoicingSetupIntentFetchState)(state),
22
22
  plaidLinkToken: (0, customerPaymentMethodSelector_1.getInvoicingPlaidLinkToken)(state),
@@ -1,6 +1,6 @@
1
1
  import { FetchStateAndError } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
- import { InvoicingListCounts, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
3
+ import { InvoicingListCounts } from '../../../entity/invoicing/invoicingCommonPayload';
4
4
  import { InvoicingCustomer } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerState';
5
5
  import { RootState } from '../../../reducer';
6
6
  import { InvoicingListSort } from '../invoicingApiHelper';
@@ -13,8 +13,6 @@ export interface InvoicingCustomerListView extends SelectorView {
13
13
  customers: InvoicingCustomer[];
14
14
  filters: InvoicingCustomerFilters;
15
15
  nextCursor: string | null;
16
- /** Config status/type list; the page labels tabs and badges from it. */
17
- statusOptions: InvoicingNamedOption[];
18
16
  tabIds: InvoicingCustomerTabId[];
19
17
  sort?: InvoicingListSort;
20
18
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInvoicingCustomerListView = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const invoicingCustomerSelector_1 = require("../../../entity/invoicing/invoicingCustomer/invoicingCustomerSelector");
6
- const invoicingTabHelper_1 = require("../invoicingTabHelper");
7
6
  const invoicingCustomerListViewState_1 = require("./invoicingCustomerListViewState");
8
7
  /**
9
8
  * Memoized so the denormalized `customers` array (and the wrapping view object)
@@ -11,7 +10,7 @@ const invoicingCustomerListViewState_1 = require("./invoicingCustomerListViewSta
11
10
  * slice actually change. Without this, the connected list page re-rendered on
12
11
  * every unrelated redux action because a fresh array was built each call.
13
12
  */
14
- exports.getInvoicingCustomerListView = (0, toolkit_1.createSelector)((state) => state.invoicingCustomerState, (state) => state.invoicingCustomerListViewState, (state) => state.invoicingConfigViewState.customerStatusOptions, (customerState, listViewState, statusOptions) => {
13
+ exports.getInvoicingCustomerListView = (0, toolkit_1.createSelector)((state) => state.invoicingCustomerState, (state) => state.invoicingCustomerListViewState, (customerState, listViewState) => {
15
14
  const { activeTab } = listViewState;
16
15
  const allCustomers = (0, invoicingCustomerSelector_1.getInvoicingCustomersByIds)(customerState, listViewState.ids);
17
16
  // The list API ignores `status`, so it returns every status; filter to the
@@ -32,12 +31,7 @@ exports.getInvoicingCustomerListView = (0, toolkit_1.createSelector)((state) =>
32
31
  filters: listViewState.filters,
33
32
  count: listViewState.counts,
34
33
  countsFetchState: listViewState.countsFetchState,
35
- statusOptions,
36
- tabIds: (0, invoicingTabHelper_1.invoicingTabIdsFromConfig)({
37
- allTabIds: invoicingCustomerListViewState_1.ALL_INVOICING_CUSTOMER_TAB_IDS,
38
- localTabIds: ['trial', 'at_risk'],
39
- statusOptions,
40
- }),
34
+ tabIds: invoicingCustomerListViewState_1.INVOICING_CUSTOMER_TABS,
41
35
  sort: listViewState.sort,
42
36
  };
43
37
  });
@@ -22,6 +22,13 @@ export declare const INVOICING_CUSTOMER_COLUMNS: InvoicingCustomerColumnConfig[]
22
22
  export declare const ALL_INVOICING_CUSTOMER_TAB_IDS: readonly ["all", "active", "trial", "at_risk"];
23
23
  export declare const toInvoicingCustomerTabId: (v: string) => "active" | "at_risk" | "trial" | "all";
24
24
  export type InvoicingCustomerTabId = ReturnType<typeof toInvoicingCustomerTabId>;
25
+ /**
26
+ * Ordered filter-tab id set owned by CES so the customer-list tabs live next to
27
+ * the model rather than being hardcoded in web-components. Tab labels and the
28
+ * per-tab count lookup stay in the view layer; this only carries the id set and
29
+ * display order.
30
+ */
31
+ export declare const INVOICING_CUSTOMER_TABS: InvoicingCustomerTabId[];
25
32
  export interface InvoicingCustomerListViewState extends FetchedState {
26
33
  /** Selected status tab (CES-owned so it persists across page revisits). */
27
34
  activeTab: InvoicingCustomerTabId;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toInvoicingCustomerTabId = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.INVOICING_CUSTOMER_COLUMNS = exports.toInvoicingCustomerSortKey = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = void 0;
3
+ exports.INVOICING_CUSTOMER_TABS = exports.toInvoicingCustomerTabId = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.INVOICING_CUSTOMER_COLUMNS = exports.toInvoicingCustomerSortKey = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = [
6
6
  'name',
@@ -28,3 +28,12 @@ exports.ALL_INVOICING_CUSTOMER_TAB_IDS = [
28
28
  ];
29
29
  const toInvoicingCustomerTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_CUSTOMER_TAB_IDS);
30
30
  exports.toInvoicingCustomerTabId = toInvoicingCustomerTabId;
31
+ /**
32
+ * Ordered filter-tab id set owned by CES so the customer-list tabs live next to
33
+ * the model rather than being hardcoded in web-components. Tab labels and the
34
+ * per-tab count lookup stay in the view layer; this only carries the id set and
35
+ * display order.
36
+ */
37
+ exports.INVOICING_CUSTOMER_TABS = [
38
+ ...exports.ALL_INVOICING_CUSTOMER_TAB_IDS,
39
+ ];
@@ -26,6 +26,6 @@ export declare const fetchInvoicingDunningCaseList: import("@reduxjs/toolkit").A
26
26
  ids: ID[];
27
27
  keepExistingListItems: boolean;
28
28
  nextCursor: string | null;
29
- }, "invoicingDunningCaseListView/updateInvoicingDunningCaseList">, updateInvoicingDunningCaseListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseListFailure">, fetchInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/fetchInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingDunningCaseListView/updateInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseCountsFailure">, updateInvoicingDunningCaseFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingDunningCaseFilters, "invoicingDunningCaseListView/updateInvoicingDunningCaseFilters">, setInvoicingDunningCaseActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"Retrying" | "Scheduled" | "Manual Review" | "Resolved" | "Cancelled" | "Paused" | "all", "invoicingDunningCaseListView/setInvoicingDunningCaseActiveTab">, clearInvoicingDunningCaseListView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/clearInvoicingDunningCaseListView">;
29
+ }, "invoicingDunningCaseListView/updateInvoicingDunningCaseList">, updateInvoicingDunningCaseListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseListFailure">, fetchInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/fetchInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingDunningCaseListView/updateInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseCountsFailure">, updateInvoicingDunningCaseFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingDunningCaseFilters, "invoicingDunningCaseListView/updateInvoicingDunningCaseFilters">, setInvoicingDunningCaseActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"Retrying" | "Scheduled" | "Manual Review" | "Resolved" | "Cancelled" | "all", "invoicingDunningCaseListView/setInvoicingDunningCaseActiveTab">, clearInvoicingDunningCaseListView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/clearInvoicingDunningCaseListView">;
30
30
  declare const _default: import("redux").Reducer<InvoicingDunningCaseListViewState>;
31
31
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { FetchStateAndError } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { InvoicingDunningCase } from '../../../entity/invoicing/dunningCase/dunningCaseState';
4
- import { InvoicingListCounts, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
4
+ import { InvoicingListCounts } from '../../../entity/invoicing/invoicingCommonPayload';
5
5
  import { RootState } from '../../../reducer';
6
6
  import { InvoicingListSort } from '../invoicingApiHelper';
7
7
  import { InvoicingDunningCaseColumnConfig, InvoicingDunningCaseFilters, InvoicingDunningCaseTabId } from './invoicingDunningCaseListViewState';
@@ -12,8 +12,6 @@ export interface InvoicingDunningCaseListView extends SelectorView {
12
12
  countsFetchState: FetchStateAndError;
13
13
  dunningCases: InvoicingDunningCase[];
14
14
  filters: InvoicingDunningCaseFilters;
15
- /** Config status/type list; the page labels tabs and badges from it. */
16
- statusOptions: InvoicingNamedOption[];
17
15
  tabIds: InvoicingDunningCaseTabId[];
18
16
  sort?: InvoicingListSort;
19
17
  }
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInvoicingDunningCaseListView = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const dunningCaseSelector_1 = require("../../../entity/invoicing/dunningCase/dunningCaseSelector");
6
- const invoicingTabHelper_1 = require("../invoicingTabHelper");
7
6
  const invoicingDunningCaseListViewState_1 = require("./invoicingDunningCaseListViewState");
8
7
  /**
9
8
  * Memoized so the denormalized `dunningCases` array (and the wrapping view
10
9
  * object) keep referential identity until the dunning-case entity slice or the
11
10
  * list-view slice actually change.
12
11
  */
13
- exports.getInvoicingDunningCaseListView = (0, toolkit_1.createSelector)((state) => state.invoicingDunningCaseState, (state) => state.invoicingDunningCaseListViewState, (state) => state.invoicingConfigViewState.dunningCaseStatusOptions, (dunningCaseState, listViewState, statusOptions) => {
12
+ exports.getInvoicingDunningCaseListView = (0, toolkit_1.createSelector)((state) => state.invoicingDunningCaseState, (state) => state.invoicingDunningCaseListViewState, (dunningCaseState, listViewState) => {
14
13
  const { activeTab } = listViewState;
15
14
  const allDunningCases = (0, dunningCaseSelector_1.getInvoicingDunningCasesByIds)(dunningCaseState, listViewState.ids);
16
15
  // The list API ignores `status`, so it returns every status; filter to the
@@ -28,11 +27,7 @@ exports.getInvoicingDunningCaseListView = (0, toolkit_1.createSelector)((state)
28
27
  nextCursor: listViewState.nextCursor,
29
28
  fetchState: listViewState.fetchState,
30
29
  error: listViewState.error,
31
- statusOptions,
32
- tabIds: (0, invoicingTabHelper_1.invoicingTabIdsFromConfig)({
33
- allTabIds: invoicingDunningCaseListViewState_1.ALL_INVOICING_DUNNING_CASE_TAB_IDS,
34
- statusOptions,
35
- }),
30
+ tabIds: invoicingDunningCaseListViewState_1.INVOICING_DUNNING_CASE_TABS,
36
31
  sort: listViewState.sort,
37
32
  version: 1.0,
38
33
  };
@@ -19,9 +19,16 @@ export interface InvoicingDunningCaseColumnConfig {
19
19
  sortable: boolean;
20
20
  }
21
21
  export declare const INVOICING_DUNNING_CASE_COLUMNS: InvoicingDunningCaseColumnConfig[];
22
- export declare const ALL_INVOICING_DUNNING_CASE_TAB_IDS: readonly ["all", "Retrying", "Scheduled", "Manual Review", "Paused", "Resolved", "Cancelled"];
23
- export declare const toInvoicingDunningCaseTabId: (v: string) => "Retrying" | "Scheduled" | "Manual Review" | "Resolved" | "Cancelled" | "Paused" | "all";
22
+ export declare const ALL_INVOICING_DUNNING_CASE_TAB_IDS: readonly ["all", "Retrying", "Scheduled", "Manual Review", "Resolved", "Cancelled"];
23
+ export declare const toInvoicingDunningCaseTabId: (v: string) => "Retrying" | "Scheduled" | "Manual Review" | "Resolved" | "Cancelled" | "all";
24
24
  export type InvoicingDunningCaseTabId = ReturnType<typeof toInvoicingDunningCaseTabId>;
25
+ /**
26
+ * Ordered filter-tab id set owned by CES so the dunning-cases-list tabs live
27
+ * next to the model rather than being hardcoded in web-components. Tab labels
28
+ * and the per-tab count lookup stay in the view layer; this only carries the id
29
+ * set and display order.
30
+ */
31
+ export declare const INVOICING_DUNNING_CASE_TABS: InvoicingDunningCaseTabId[];
25
32
  export interface InvoicingDunningCaseListViewState extends FetchedState {
26
33
  /** Selected status tab (CES-owned so it persists across page revisits). */
27
34
  activeTab: InvoicingDunningCaseTabId;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toInvoicingDunningCaseTabId = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.toInvoicingDunningCaseSortKey = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = void 0;
3
+ exports.INVOICING_DUNNING_CASE_TABS = exports.toInvoicingDunningCaseTabId = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.toInvoicingDunningCaseSortKey = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
6
6
  'customer',
@@ -29,9 +29,17 @@ exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = [
29
29
  'Retrying',
30
30
  'Scheduled',
31
31
  'Manual Review',
32
- 'Paused',
33
32
  'Resolved',
34
33
  'Cancelled',
35
34
  ];
36
35
  const toInvoicingDunningCaseTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS);
37
36
  exports.toInvoicingDunningCaseTabId = toInvoicingDunningCaseTabId;
37
+ /**
38
+ * Ordered filter-tab id set owned by CES so the dunning-cases-list tabs live
39
+ * next to the model rather than being hardcoded in web-components. Tab labels
40
+ * and the per-tab count lookup stay in the view layer; this only carries the id
41
+ * set and display order.
42
+ */
43
+ exports.INVOICING_DUNNING_CASE_TABS = [
44
+ ...exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS,
45
+ ];
@@ -1,6 +1,6 @@
1
1
  import { FetchStateAndError } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
- import { InvoicingListCounts, InvoicingNamedOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
3
+ import { InvoicingListCounts } from '../../../entity/invoicing/invoicingCommonPayload';
4
4
  import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
5
5
  import { RootState } from '../../../reducer';
6
6
  import { InvoicingListSort } from '../invoicingApiHelper';
@@ -12,12 +12,6 @@ export interface InvoicingSubscriptionListView extends SelectorView {
12
12
  countsFetchState: FetchStateAndError;
13
13
  filters: InvoicingSubscriptionFilters;
14
14
  nextCursor: string | null;
15
- /** Config status/type list; the page labels tabs and badges from it. */
16
- statusOptions: InvoicingNamedOption[];
17
- /** Config-owned; folded in so the screen reads one selector. */
18
- subscriptionCommercialEditAllowedFromStatuses: string[];
19
- subscriptionLifecycleActionOptions: InvoicingSubscriptionLifecycleActionOption[];
20
- subscriptionMetadataEditAllowedFromStatuses: string[];
21
15
  subscriptions: InvoicingSubscription[];
22
16
  tabIds: InvoicingSubscriptionTabId[];
23
17
  sort?: InvoicingListSort;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInvoicingSubscriptionListView = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const invoicingSubscriptionSelector_1 = require("../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionSelector");
6
- const invoicingTabHelper_1 = require("../invoicingTabHelper");
7
6
  const invoicingSubscriptionListViewState_1 = require("./invoicingSubscriptionListViewState");
8
7
  /**
9
8
  * Memoized so the denormalized `subscriptions` array (and the wrapping view
@@ -12,7 +11,7 @@ const invoicingSubscriptionListViewState_1 = require("./invoicingSubscriptionLis
12
11
  * re-rendered on every unrelated redux action because a fresh array was built
13
12
  * each call.
14
13
  */
15
- exports.getInvoicingSubscriptionListView = (0, toolkit_1.createSelector)((state) => state.invoicingSubscriptionState, (state) => state.invoicingSubscriptionListViewState, (state) => state.invoicingConfigViewState.subscriptionStatusOptions, (state) => state.invoicingConfigViewState, (subscriptionState, listViewState, statusOptions, configState) => {
14
+ exports.getInvoicingSubscriptionListView = (0, toolkit_1.createSelector)((state) => state.invoicingSubscriptionState, (state) => state.invoicingSubscriptionListViewState, (subscriptionState, listViewState) => {
16
15
  const { activeTab } = listViewState;
17
16
  const allSubscriptions = (0, invoicingSubscriptionSelector_1.getInvoicingSubscriptionsByIds)(subscriptionState, listViewState.ids);
18
17
  // The list API ignores `status`, so it returns every status; filter to the
@@ -30,14 +29,7 @@ exports.getInvoicingSubscriptionListView = (0, toolkit_1.createSelector)((state)
30
29
  filters: listViewState.filters,
31
30
  count: listViewState.counts,
32
31
  countsFetchState: listViewState.countsFetchState,
33
- subscriptionCommercialEditAllowedFromStatuses: configState.subscriptionCommercialEditAllowedFromStatuses,
34
- subscriptionLifecycleActionOptions: configState.subscriptionLifecycleActionOptions,
35
- subscriptionMetadataEditAllowedFromStatuses: configState.subscriptionMetadataEditAllowedFromStatuses,
36
- statusOptions,
37
- tabIds: (0, invoicingTabHelper_1.invoicingTabIdsFromConfig)({
38
- allTabIds: invoicingSubscriptionListViewState_1.ALL_INVOICING_SUBSCRIPTION_TAB_IDS,
39
- statusOptions,
40
- }),
32
+ tabIds: invoicingSubscriptionListViewState_1.INVOICING_SUBSCRIPTION_TABS,
41
33
  sort: listViewState.sort,
42
34
  };
43
35
  });
@@ -25,6 +25,13 @@ export declare const INVOICING_SUBSCRIPTION_COLUMNS: InvoicingSubscriptionColumn
25
25
  export declare const ALL_INVOICING_SUBSCRIPTION_TAB_IDS: readonly ["all", "active", "in_trial", "future", "non_renewing", "paused", "cancelled"];
26
26
  export declare const toInvoicingSubscriptionTabId: (v: string) => "cancelled" | "active" | "future" | "in_trial" | "non_renewing" | "paused" | "all";
27
27
  export type InvoicingSubscriptionTabId = ReturnType<typeof toInvoicingSubscriptionTabId>;
28
+ /**
29
+ * Ordered filter-tab id set owned by CES so the subscription-list tabs live next
30
+ * to the model rather than being hardcoded in web-components. Tab labels and the
31
+ * per-tab count lookup stay in the view layer; this only carries the id set and
32
+ * display order.
33
+ */
34
+ export declare const INVOICING_SUBSCRIPTION_TABS: InvoicingSubscriptionTabId[];
28
35
  export interface InvoicingSubscriptionListViewState extends FetchedState {
29
36
  /** Selected status tab (CES-owned so it persists across page revisits). */
30
37
  activeTab: InvoicingSubscriptionTabId;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toInvoicingSubscriptionTabId = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.toInvoicingSubscriptionSortKey = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = void 0;
3
+ exports.INVOICING_SUBSCRIPTION_TABS = exports.toInvoicingSubscriptionTabId = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.toInvoicingSubscriptionSortKey = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = [
6
6
  'subscription',
@@ -37,3 +37,12 @@ exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = [
37
37
  ];
38
38
  const toInvoicingSubscriptionTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS);
39
39
  exports.toInvoicingSubscriptionTabId = toInvoicingSubscriptionTabId;
40
+ /**
41
+ * Ordered filter-tab id set owned by CES so the subscription-list tabs live next
42
+ * to the model rather than being hardcoded in web-components. Tab labels and the
43
+ * per-tab count lookup stay in the view layer; this only carries the id set and
44
+ * display order.
45
+ */
46
+ exports.INVOICING_SUBSCRIPTION_TABS = [
47
+ ...exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS,
48
+ ];
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchInvoicingTransactionListPageEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
- const invoicingTransactionListViewState_1 = require("../invoicingTransactionListViewState");
7
6
  const invoicingTransactionListViewReducer_1 = require("../invoicingTransactionListViewReducer");
8
7
  /**
9
8
  * Fetch unless the endpoint is already loaded or in flight — or always when the
@@ -20,7 +19,7 @@ const shouldFetch = (fetchStateAndError, cacheOverride) => cacheOverride ||
20
19
  const fetchInvoicingTransactionListPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(invoicingTransactionListViewReducer_1.fetchInvoicingTransactionListPage.match), (0, operators_1.mergeMap)((action) => {
21
20
  const { cacheOverride, filters, sort } = action.payload;
22
21
  const state = state$.value.invoicingTransactionListViewState;
23
- const activeTabState = state.byTab[state.activeTab] ?? (0, invoicingTransactionListViewState_1.makeInvoicingTransactionTabState)();
22
+ const activeTabState = state.byTab[state.activeTab];
24
23
  const pageActions = [];
25
24
  if (shouldFetch({ fetchState: activeTabState.fetchState, error: activeTabState.error }, cacheOverride)) {
26
25
  pageActions.push((0, invoicingTransactionListViewReducer_1.fetchInvoicingTransactionList)({ filters, sort }));