@zeniai/client-epic-state 5.0.77 → 5.0.78

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 (174) hide show
  1. package/lib/coreEpics.js +1 -1
  2. package/lib/entity/account/accountSelector.d.ts +1 -27
  3. package/lib/entity/account/accountSelector.js +1 -47
  4. package/lib/entity/account/accountState.d.ts +1 -6
  5. package/lib/entity/account/accountState.js +4 -11
  6. package/lib/entity/account/subAccountSelector.d.ts +1 -1
  7. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +3 -1
  8. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
  9. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
  10. package/lib/entity/chargeCard/chargeCardReducer.d.ts +2 -19
  11. package/lib/entity/chargeCard/chargeCardReducer.js +2 -35
  12. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +1 -14
  13. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +2 -36
  14. package/lib/entity/class/classSelector.d.ts +0 -35
  15. package/lib/entity/class/classSelector.js +0 -50
  16. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
  17. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
  18. package/lib/entity/tenant/SessionManager.js +3 -6
  19. package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
  20. package/lib/entity/tenant/clearAllEpic.js +2 -2
  21. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
  22. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
  23. package/lib/entity/tenant/tenantReducer.js +1 -6
  24. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
  25. package/lib/epic.d.ts +10 -11
  26. package/lib/epic.js +11 -12
  27. package/lib/esm/coreEpics.js +1 -1
  28. package/lib/esm/entity/account/accountSelector.js +1 -46
  29. package/lib/esm/entity/account/accountState.js +1 -7
  30. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +3 -1
  31. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
  32. package/lib/esm/entity/chargeCard/chargeCardReducer.js +1 -34
  33. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +1 -35
  34. package/lib/esm/entity/class/classSelector.js +0 -48
  35. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
  36. package/lib/esm/entity/tenant/SessionManager.js +1 -4
  37. package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
  38. package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
  39. package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
  40. package/lib/esm/entity/tenant/tenantReducer.js +1 -6
  41. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
  42. package/lib/esm/epic.js +11 -12
  43. package/lib/esm/index.js +20 -30
  44. package/lib/esm/reducer.js +2 -2
  45. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +5 -2
  46. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
  47. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
  48. package/lib/esm/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
  49. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
  50. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -1
  51. package/lib/esm/view/companyView/helpers/cockpitHelpers.js +1 -1
  52. package/lib/esm/view/companyView/selector/companyManagementViewSelector.js +1 -1
  53. package/lib/esm/view/companyView/selector/companyPortfolioViewSelector.js +1 -1
  54. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
  55. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +1 -2
  56. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
  57. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
  58. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -11
  59. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +1 -21
  60. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +1 -2
  61. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -253
  62. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -147
  63. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +2 -0
  64. package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
  65. package/lib/esm/view/recommendation/recommendationHelper.js +0 -29
  66. package/lib/esm/view/recommendation/recommendationReducer.js +1 -26
  67. package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
  68. package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
  69. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
  70. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
  71. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
  72. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +9 -26
  73. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
  74. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
  75. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
  76. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
  77. package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +2 -4
  78. package/lib/esm/view/subscriptionView/subscriptionViewSelector.js +1 -1
  79. package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +1 -1
  80. package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +1 -1
  81. package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +1 -1
  82. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +1 -1
  83. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +6 -121
  84. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +1 -29
  85. package/lib/index.d.ts +23 -30
  86. package/lib/index.js +58 -84
  87. package/lib/reducer.d.ts +2 -2
  88. package/lib/reducer.js +2 -2
  89. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +2 -2
  90. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +1 -1
  91. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +5 -2
  92. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
  93. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
  94. package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
  95. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -1
  96. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
  97. package/lib/view/companyView/helpers/cockpitHelpers.js +1 -1
  98. package/lib/view/companyView/selector/companyManagementViewSelector.js +1 -1
  99. package/lib/view/companyView/selector/companyPortfolioViewSelector.js +1 -1
  100. package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
  101. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
  102. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +1 -2
  103. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
  104. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
  105. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
  106. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +0 -10
  107. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -2
  108. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -23
  109. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +0 -21
  110. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -2
  111. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +1 -2
  112. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -28
  113. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -253
  114. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -2
  115. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -16
  116. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -7
  117. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -150
  118. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +2 -1
  119. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +4 -1
  120. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -44
  121. package/lib/view/financeStatement/financeStatementSelector.js +1 -1
  122. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +1 -1
  123. package/lib/view/recommendation/recommendationHelper.d.ts +0 -9
  124. package/lib/view/recommendation/recommendationHelper.js +1 -31
  125. package/lib/view/recommendation/recommendationReducer.d.ts +1 -20
  126. package/lib/view/recommendation/recommendationReducer.js +2 -27
  127. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  128. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +1 -3
  129. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
  130. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +1 -3
  131. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
  132. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
  133. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
  134. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
  135. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -18
  136. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +10 -27
  137. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
  138. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.d.ts +1 -1
  139. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +1 -3
  140. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
  141. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
  142. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +1 -3
  143. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
  144. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  145. package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +3 -12
  146. package/lib/view/spendManagement/spendManagementFilterHelpers.js +2 -4
  147. package/lib/view/subscriptionView/subscriptionViewSelector.js +1 -1
  148. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
  149. package/lib/view/taskManager/taskListView/taskListReducer.js +1 -1
  150. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +1 -11
  151. package/lib/view/transactionDetail/transactionDetailReducer.js +7 -122
  152. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -2
  153. package/lib/view/transactionDetail/transactionDetailSelector.js +2 -31
  154. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -1
  155. package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
  156. package/package.json +4 -9
  157. package/lib/commonStateTypes/cacheOverrideFetchReducer.d.ts +0 -17
  158. package/lib/commonStateTypes/cacheOverrideFetchReducer.js +0 -20
  159. package/lib/commonStateTypes/filterPrimitives.d.ts +0 -23
  160. package/lib/commonStateTypes/filterPrimitives.js +0 -21
  161. package/lib/commonStateTypes/pusherActions.d.ts +0 -11
  162. package/lib/commonStateTypes/pusherActions.js +0 -6
  163. package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +0 -16
  164. package/lib/esm/commonStateTypes/filterPrimitives.js +0 -20
  165. package/lib/esm/commonStateTypes/pusherActions.js +0 -3
  166. package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +0 -258
  167. package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +0 -17
  168. package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -87
  169. package/lib/view/expenseAutomationView/transactionFilterHelpers.d.ts +0 -66
  170. package/lib/view/expenseAutomationView/transactionFilterHelpers.js +0 -262
  171. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +0 -10
  172. package/lib/view/expenseAutomationView/types/completedSubTab.js +0 -21
  173. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +0 -9
  174. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -91
package/lib/reducer.d.ts CHANGED
@@ -3,6 +3,7 @@ import { AccountGroupState } from './entity/accountGroup/accountGroupState';
3
3
  import { AccountReconState } from './entity/accountRecon/accountReconState';
4
4
  import { AddressState } from './entity/address/addressState';
5
5
  import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
6
+ import { CreditAgentEntityState } from './entity/creditAgent/creditAgentState';
6
7
  import { AiCfoState } from './entity/aiCfo/aiCfoState';
7
8
  import { ApprovalRuleState } from './entity/approvalRule/approvalRuleState';
8
9
  import { BankAccountState } from './entity/bankAccount/bankAccount';
@@ -18,7 +19,6 @@ import { CompanyState } from './entity/company/companyState';
18
19
  import { CompanyHealthState } from './entity/companyHealthMetric/companyHealthMetricState';
19
20
  import { ConnectedAccountState } from './entity/connectedAccount/connectedAccount';
20
21
  import { CountryListState } from './entity/countryList/countryListState';
21
- import { CreditAgentEntityState } from './entity/creditAgent/creditAgentState';
22
22
  import { CurrencyState } from './entity/currency/currency';
23
23
  import { CustomerState } from './entity/customer/customerState';
24
24
  import { CustomerIncomeState } from './entity/customerIncome/customerIncomeTrendState';
@@ -106,8 +106,8 @@ import { JESchedulesViewState as ExpenseAutomationJESchedulesViewState } from '.
106
106
  import { MissingReceiptsViewState as ExpenseAutomationMissingReceiptsViewState } from './view/expenseAutomationView/types/missingReceiptsViewState';
107
107
  import { ReconciliationViewState as ExpenseAutomationReconciliationViewState } from './view/expenseAutomationView/types/reconciliationViewState';
108
108
  import { TransactionsViewState as ExpenseAutomationTransactionsViewState } from './view/expenseAutomationView/types/transactionsViewState';
109
- import { FeatureNotificationViewState } from './view/featureNotificationView/featureNotificationViewState';
110
109
  import { FileViewState } from './view/fileView/fileViewState';
110
+ import { FeatureNotificationViewState } from './view/featureNotificationView/featureNotificationViewState';
111
111
  import { FinanceStatementState } from './view/financeStatement/financeStatementState';
112
112
  import { ForecastListState } from './view/forecastList/forecastListState';
113
113
  import { GlobalMerchantAutoCompleteState } from './view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewState';
package/lib/reducer.js CHANGED
@@ -43,6 +43,7 @@ const accountGroupReducer_1 = __importStar(require("./entity/accountGroup/accoun
43
43
  const accountReconReducer_1 = __importStar(require("./entity/accountRecon/accountReconReducer"));
44
44
  const addressReducer_1 = __importStar(require("./entity/address/addressReducer"));
45
45
  const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
46
+ const creditAgentReducer_1 = __importStar(require("./entity/creditAgent/creditAgentReducer"));
46
47
  const aiCfoReducer_1 = __importStar(require("./entity/aiCfo/aiCfoReducer"));
47
48
  const approvalRuleReducer_1 = __importStar(require("./entity/approvalRule/approvalRuleReducer"));
48
49
  const bankAccountReducer_1 = __importStar(require("./entity/bankAccount/bankAccountReducer"));
@@ -58,7 +59,6 @@ const companyReducer_1 = __importStar(require("./entity/company/companyReducer")
58
59
  const companyHealthMetricReducer_1 = __importStar(require("./entity/companyHealthMetric/companyHealthMetricReducer"));
59
60
  const connectedAccountReducer_1 = __importStar(require("./entity/connectedAccount/connectedAccountReducer"));
60
61
  const countryListReducer_1 = __importStar(require("./entity/countryList/countryListReducer"));
61
- const creditAgentReducer_1 = __importStar(require("./entity/creditAgent/creditAgentReducer"));
62
62
  const currencyReducer_1 = __importStar(require("./entity/currency/currencyReducer"));
63
63
  const customerReducer_1 = __importStar(require("./entity/customer/customerReducer"));
64
64
  const customerIncomeTrendReducer_1 = __importStar(require("./entity/customerIncome/customerIncomeTrendReducer"));
@@ -146,9 +146,9 @@ const jeSchedulesViewReducer_1 = __importStar(require("./view/expenseAutomationV
146
146
  const missingReceiptsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/missingReceiptsViewReducer"));
147
147
  const reconciliationViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/reconciliationViewReducer"));
148
148
  const transactionsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/transactionsViewReducer"));
149
- const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
150
149
  const fileViewReducer_1 = __importDefault(require("./view/fileView/fileViewReducer"));
151
150
  const fileViewState_1 = require("./view/fileView/fileViewState");
151
+ const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
152
152
  const financeStatementReducer_1 = __importStar(require("./view/financeStatement/financeStatementReducer"));
153
153
  const forecastListReducer_1 = __importStar(require("./view/forecastList/forecastListReducer"));
154
154
  const globalMerchantAutoCompleteViewReducer_1 = __importStar(require("./view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewReducer"));
@@ -1,7 +1,7 @@
1
- import type { AiAccountantCustomerPayload, AiAccountantJobPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
2
- import { UserPayload } from '../../entity/user/userPayload';
3
1
  import { ZeniAPIResponse } from '../../responsePayload';
4
2
  export { AiAccountantCustomerPayload, AiAccountantEnrollmentPayload, AiAccountantJobPayload, toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
3
+ import type { AiAccountantCustomerPayload, AiAccountantJobPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
4
+ import { UserPayload } from '../../entity/user/userPayload';
5
5
  export interface AiAccountantCustomersResponseData {
6
6
  customers: AiAccountantCustomerPayload[];
7
7
  users: UserPayload[];
@@ -1,5 +1,5 @@
1
- import { ID } from '../../commonStateTypes/common';
2
1
  import { AiAccountantCustomerPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
2
+ import { ID } from '../../commonStateTypes/common';
3
3
  import { ZeniAPIStatus } from '../../responsePayload';
4
4
  import { AiAccountantUIState, AiAccountantViewState } from './aiAccountantViewState';
5
5
  export declare const initialAiAccountantViewState: AiAccountantViewState;
@@ -10,7 +10,9 @@ const aiAccountantViewReducer_1 = require("../aiAccountantViewReducer");
10
10
  const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiAccountantViewReducer_1.fetchAiAccountantCustomers.match), (0, operators_1.switchMap)(() => {
11
11
  const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
12
12
  const url = `${base}/ai-accountant/customers`;
13
- return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
13
+ return zeniAPI
14
+ .getJSON(url)
15
+ .pipe((0, operators_1.mergeMap)((response) => {
14
16
  if ((0, responsePayload_1.isSuccessResponse)(response)) {
15
17
  const customers = response.data?.customers ?? [];
16
18
  const users = response.data?.users ?? [];
@@ -23,6 +25,7 @@ const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe((
23
25
  else {
24
26
  return (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)(response.status));
25
27
  }
26
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant customers fetch failed: ' + JSON.stringify(error))))));
28
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant customers fetch failed: ' +
29
+ JSON.stringify(error))))));
27
30
  }));
28
31
  exports.fetchAiAccountantCustomersEpic = fetchAiAccountantCustomersEpic;
@@ -23,7 +23,9 @@ const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$.pipe((
23
23
  }
24
24
  const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
25
25
  const url = `${base}/ai-accountant/jobs?${params.toString()}`;
26
- return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
26
+ return zeniAPI
27
+ .getJSON(url)
28
+ .pipe((0, operators_1.mergeMap)((response) => {
27
29
  if ((0, responsePayload_1.isSuccessResponse)(response)) {
28
30
  const jobs = response.data?.jobs ?? [];
29
31
  const users = response.data?.users ?? [];
@@ -42,7 +44,8 @@ const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$.pipe((
42
44
  }
43
45
  }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantJobsFailure)({
44
46
  tenantId,
45
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant jobs fetch failed: ' + JSON.stringify(error)),
47
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant jobs fetch failed: ' +
48
+ JSON.stringify(error)),
46
49
  }))));
47
50
  }));
48
51
  exports.fetchAiAccountantJobsEpic = fetchAiAccountantJobsEpic;
@@ -54,10 +54,7 @@ const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe(
54
54
  messageText: 'failed',
55
55
  type: 'error',
56
56
  variables: [
57
- {
58
- variableName: '__reason__',
59
- variableValue: 'Unexpected error',
60
- },
57
+ { variableName: '__reason__', variableValue: 'Unexpected error' },
61
58
  ],
62
59
  }),
63
60
  ])));
@@ -299,7 +299,7 @@ const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredComp
299
299
  const key = currentFilter.field;
300
300
  const categoryValue = getCategoryValueForCompany(key, company);
301
301
  if (categoryValue == null) {
302
- if (currentFilter.matchingOperator === 'not_equal') {
302
+ if (currentFilter.matchingOperator === 'not-equal') {
303
303
  return true;
304
304
  }
305
305
  return false;
@@ -1,4 +1,3 @@
1
- import { FetchState } from '../../commonStateTypes/common';
2
1
  import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
3
2
  import { Company } from '../../entity/company/companyStateTypes';
4
3
  import { Tag } from '../../entity/tag/tagState';
@@ -6,6 +5,7 @@ import { Task } from '../../entity/task/taskState';
6
5
  import { User } from '../../entity/user/userState';
7
6
  import { RootState } from '../../reducer';
8
7
  import { CompanyTaskManagerViewUIState, TaskManagerMetrics } from './companyTaskManagerViewState';
8
+ import { FetchState } from '../../commonStateTypes/common';
9
9
  export interface TaskWithCompanyDetail {
10
10
  assignees: User[];
11
11
  company: Company;
@@ -7,7 +7,7 @@ const tagSelector_1 = require("../../entity/tag/tagSelector");
7
7
  const taskSelector_1 = require("../../entity/task/taskSelector");
8
8
  const userSelector_1 = require("../../entity/user/userSelector");
9
9
  exports.getCompanyTaskManagerView = (0, toolkit_1.createSelector)((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
10
- const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState, } = companyTaskManagerViewState;
10
+ const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
11
11
  const tasksList = [];
12
12
  taskIds.forEach((taskId) => {
13
13
  const task = (0, taskSelector_1.getTaskById)(taskState, taskId);
@@ -51,7 +51,7 @@ const filterCompanyOnCategoriesWithSingleValue = (categoryValue, currentFilter,
51
51
  return filterCompanyOnRangeCategoryType(categoryValue, currentFilter);
52
52
  }
53
53
  // if filter category is not annualRecurringRevenue OR monthlyRecurringRevenue
54
- if (currentFilter.matchingOperator === 'not_equal') {
54
+ if (currentFilter.matchingOperator === 'not-equal') {
55
55
  return currentFilter.values.indexOf(categoryValue) === -1;
56
56
  }
57
57
  return currentFilter.values.indexOf(categoryValue) > -1;
@@ -159,7 +159,7 @@ const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredComp
159
159
  const key = currentFilter.field;
160
160
  const categoryValue = getCategoryValueForCompany(key, company);
161
161
  if (categoryValue == null) {
162
- if (currentFilter.matchingOperator === 'not_equal') {
162
+ if (currentFilter.matchingOperator === 'not-equal') {
163
163
  return true;
164
164
  }
165
165
  return false;
@@ -122,7 +122,7 @@ const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredComp
122
122
  const key = currentFilter.field;
123
123
  const categoryValue = getCategoryValueForCompany(key, company);
124
124
  if (categoryValue == null) {
125
- if (currentFilter.matchingOperator === 'not_equal') {
125
+ if (currentFilter.matchingOperator === 'not-equal') {
126
126
  return true;
127
127
  }
128
128
  return false;
@@ -19,7 +19,7 @@ export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusC
19
19
  export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
20
20
  export type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'customerSatisfactionScore' | 'churnProbabilityPercentage' | 'controller' | 'customerSuccessManager' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate' | 'externalProductServiceExposure' | 'companyEngagementMetricsUpdatedAt' | 'companyGroupId' | 'monthlyRecurringRevenue';
21
21
  export interface CockpitFilterCategory {
22
- matchingOperator: 'equal' | 'not_equal';
22
+ matchingOperator: 'equal' | 'not-equal';
23
23
  values: FilterCategoryValueType[];
24
24
  valuesCombinationOperator: 'ANY' | 'ALL';
25
25
  field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
@@ -6,10 +6,10 @@ const operators_1 = require("rxjs/operators");
6
6
  const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
7
  const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
8
  const responsePayload_1 = require("../../../../responsePayload");
9
- const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
10
- const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
11
9
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
12
10
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
11
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
12
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
13
13
  const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatches.match), (0, operators_1.switchMap)((action) => {
14
14
  const { cacheOverride } = action.payload;
15
15
  const state = state$.value;
@@ -8,7 +8,6 @@ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
8
  const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
9
9
  const responsePayload_1 = require("../../../../responsePayload");
10
10
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
11
- const completedSubTab_1 = require("../../types/completedSubTab");
12
11
  const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchCompletedTransactions.match), (0, operators_1.switchMap)((action) => {
13
12
  const state = state$.value;
14
13
  const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
@@ -43,7 +42,7 @@ const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.p
43
42
  if (sortOrder != null) {
44
43
  queryPayload.sort_order = sortOrder === 'ascending' ? 'asc' : 'desc';
45
44
  }
46
- if (completedSubTab !== completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB) {
45
+ if (completedSubTab !== 'all') {
47
46
  queryPayload.match_type = completedSubTab;
48
47
  }
49
48
  const encodedQuery = encodeURIComponent(JSON.stringify(queryPayload));
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.restoreBulkUploadAutomatchingOnMountEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
6
  const responsePayload_1 = require("../../../../responsePayload");
9
- const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
10
- const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
11
7
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
12
8
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
9
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
10
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
11
+ const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
12
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
13
13
  /**
14
14
  * On missing-receipts entry / period switch, hydrate the automatching banner for the logged-in
15
15
  * user without relying on UI-driven list fetches (the Missing tab does not fetch the batch list
@@ -52,12 +52,10 @@ const restoreBulkUploadAutomatchingOnMountEpic = (actions$, state$, zeniAPI) =>
52
52
  bulkUpload.batchListFetchState.fetchState === 'Completed';
53
53
  const listSource = alreadyCached
54
54
  ? (0, rxjs_1.of)(null)
55
- : zeniAPI
56
- .getJSON(listUrl)
57
- .pipe((0, operators_1.catchError)(() => (0, rxjs_1.of)(null)));
55
+ : zeniAPI.getJSON(listUrl).pipe((0, operators_1.catchError)(() => (0, rxjs_1.of)(null)));
58
56
  return listSource.pipe((0, operators_1.mergeMap)((listResponse) => {
59
57
  const batchList = alreadyCached
60
- ? (bulkUpload.batchListByPeriod[periodId] ?? [])
58
+ ? bulkUpload.batchListByPeriod[periodId] ?? []
61
59
  : listResponse != null &&
62
60
  (0, responsePayload_1.isSuccessResponse)(listResponse) &&
63
61
  listResponse.data != null
@@ -5,11 +5,10 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
7
7
  const responsePayload_1 = require("../../../../responsePayload");
8
- const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
9
8
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
10
9
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
11
- const completedSubTab_1 = require("../../types/completedSubTab");
12
10
  const transactionsViewState_1 = require("../../types/transactionsViewState");
11
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
13
12
  /**
14
13
  * `auto_categorized` for manual transaction search (Unmatched).
15
14
  * Backend contract TBD — align with `fetchTransactionCategorizationEpic` (`selectedTab === 'autoCategorized'`)
@@ -50,11 +49,6 @@ const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
50
49
  page_token: pageToken ?? null,
51
50
  page_size: manualSearch.pageSize,
52
51
  search_text: query,
53
- // Manual search ignores the Completed sub-tab axis — always span the
54
- // default sentinel so the receipt-matching UX returns results
55
- // regardless of where the transaction would otherwise be bucketed on
56
- // the Completed tab.
57
- sub_tab: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
58
52
  };
59
53
  return zeniAPI
60
54
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
4
4
  import { RootState } from '../../../../reducer';
5
5
  import { ZeniAPI } from '../../../../zeniAPI';
6
- import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateParentTotalCountForTab, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState } from '../../reducers/transactionsViewReducer';
7
- export type ActionType = ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof updateTransactions> | ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof fetchTransactionCategorizationFailure> | ReturnType<typeof updateTransactionCategorizationUIState> | ReturnType<typeof updateTotalCountForTransactionCategorization> | ReturnType<typeof updateParentTotalCountForTab> | ReturnType<typeof fetchTransactionCategorizationSuccess> | ReturnType<typeof resetOtherTabsFetchState>;
6
+ import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState } from '../../reducers/transactionsViewReducer';
7
+ export type ActionType = ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof updateTransactions> | ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof fetchTransactionCategorizationFailure> | ReturnType<typeof updateTransactionCategorizationUIState> | ReturnType<typeof updateTotalCountForTransactionCategorization> | ReturnType<typeof fetchTransactionCategorizationSuccess> | ReturnType<typeof resetOtherTabsFetchState>;
8
8
  export declare const fetchTransactionCategorizationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -9,7 +9,6 @@ const transactionReducer_1 = require("../../../../entity/transaction/transaction
9
9
  const responsePayload_1 = require("../../../../responsePayload");
10
10
  const transactionCategorizationLocalDataHelper_1 = require("../../helpers/transactionCategorizationLocalDataHelper");
11
11
  const transactionsViewReducer_1 = require("../../reducers/transactionsViewReducer");
12
- const completedSubTab_1 = require("../../types/completedSubTab");
13
12
  const transactionsViewState_1 = require("../../types/transactionsViewState");
14
13
  const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionsViewReducer_1.fetchTransactionCategorization.match), (0, operators_1.switchMap)((action) => {
15
14
  const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationTransactionsViewState, } = state$.value;
@@ -27,9 +26,6 @@ const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => action
27
26
  page_token: pageToken,
28
27
  page_size: 25,
29
28
  search_text: uiState.searchString,
30
- sub_tab: selectedTab === 'autoCategorized'
31
- ? expenseAutomationTransactionsViewState.selectedTransactionCategorizationCompletedSubTab
32
- : completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
33
29
  };
34
30
  return zeniAPI
35
31
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -52,12 +48,6 @@ const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => action
52
48
  selectedTab,
53
49
  totalCount: response.data.total_count,
54
50
  }));
55
- updateActions.push((0, transactionsViewReducer_1.updateParentTotalCountForTab)({
56
- selectedPeriod,
57
- selectedTab,
58
- parentTotalCount: response.data.parent_tab_total_count ??
59
- response.data.total_count,
60
- }));
61
51
  updateActions.push((0, transactionsViewReducer_1.resetOtherTabsFetchState)({
62
52
  refreshViewInBackground,
63
53
  tabs: transactionsViewState_1.TRANSACTIONS_TABS.filter((tab) => selectedTab !== tab),
@@ -2,8 +2,8 @@ import { ID } from '../../../commonStateTypes/common';
2
2
  import { AccountBase } from '../../../entity/account/accountState';
3
3
  import { UncategorizedAccountTypes } from '../../../entity/account/accountState';
4
4
  import { ClassBase } from '../../../entity/class/classState';
5
- import { Entity } from '../../../entity/genericEntity/entity';
6
5
  import { ProjectBase } from '../../../entity/project/projectState';
6
+ import { Entity } from '../../../entity/genericEntity/entity';
7
7
  import { RecommendationWithCOTByLineId } from '../../../entity/transaction/stateTypes/transaction';
8
8
  import { SupportedTransactionPayload, SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
9
9
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
@@ -27,7 +27,6 @@ export declare const removeTransactionFromTabView: (tabView: TransactionsTabView
27
27
  */
28
28
  export declare const filterAutoTabLineItems: (tabView: TransactionsTabViewState, transactionId: ID, updatedTransaction: SupportedTransactionWithCOT) => void;
29
29
  export declare const MAX_SELECTION_LIMIT = 5;
30
- export declare const shouldAutoSelectAndAdd: (transaction: SupportedTransactionWithCOT, localData: TransactionReviewLocalData, selectedCheckBoxTransactionIds: ID[], uncategorizedAccounts: UncategorizedAccounts, isUncategorizedExpenseCategoryEnabled?: boolean, isAccountingClassesEnabled?: boolean) => boolean;
31
30
  export declare const toTransactionDetailLocalData: (transaction: SupportedTransactionWithCOT, selectedTab: TransactionsTab, lineItemsByTransactionIds: string[], uncategorizedIncomeExpense: UncategorizedAccounts, isUncategorizedExpenseCategoryEnabled?: boolean) => TransactionReviewLocalData;
32
31
  export declare const toSetAllLineItemsToCategoryClass: (draft: TransactionsTabViewState, transaction: SupportedTransactionWithCOT, transactionId: ID, transactionLineId: ID, transactionDetailLocalData: TransactionReviewLocalData, updatedItem: "category" | "class" | "project", uncategorizedAccounts: UncategorizedAccounts, selectedTab: TransactionsTab, vendorId?: ID, customerId?: ID, selectedAccount?: AccountBase, selectedClassBase?: ClassBase, selectedProjectBase?: ProjectBase, isUncategorizedExpenseCategoryEnabled?: boolean, isAccountingClassesEnabled?: boolean) => {
33
32
  localData: TransactionReviewLocalData;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasTransactionLocalDataChanges = exports.isAnyItemWithUncategorizedExpenseAccount = exports.getSnackbarMessageForTransactionReview = exports.mergeTabSpecificLineItems = exports.getLineItemsByTransactionIdsFromLocalData = exports.getLineItemsByTransactionsIdsFromResponse = exports.checkIfAllLineItemsAreCategoryClassFilled = exports.setEntityRecommendationForLineIdInLocalData = exports.toSetAllLineItemsToCategoryClass = exports.toTransactionDetailLocalData = exports.shouldAutoSelectAndAdd = exports.MAX_SELECTION_LIMIT = exports.filterAutoTabLineItems = exports.removeTransactionFromTabView = exports.getPendingReviewLineIdsFromTransaction = void 0;
3
+ exports.hasTransactionLocalDataChanges = exports.isAnyItemWithUncategorizedExpenseAccount = exports.getSnackbarMessageForTransactionReview = exports.mergeTabSpecificLineItems = exports.getLineItemsByTransactionIdsFromLocalData = exports.getLineItemsByTransactionsIdsFromResponse = exports.checkIfAllLineItemsAreCategoryClassFilled = exports.setEntityRecommendationForLineIdInLocalData = exports.toSetAllLineItemsToCategoryClass = exports.toTransactionDetailLocalData = exports.MAX_SELECTION_LIMIT = exports.filterAutoTabLineItems = exports.removeTransactionFromTabView = exports.getPendingReviewLineIdsFromTransaction = void 0;
4
4
  const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
5
5
  const transactionDetailLocalDataHelper_1 = require("../../transactionDetail/transactionDetailLocalDataHelper");
6
6
  const transactionDetailLocalDataHelper_2 = require("../../transactionDetail/transactionDetailLocalDataHelper");
@@ -65,23 +65,6 @@ const filterAutoTabLineItems = (tabView, transactionId, updatedTransaction) => {
65
65
  };
66
66
  exports.filterAutoTabLineItems = filterAutoTabLineItems;
67
67
  exports.MAX_SELECTION_LIMIT = 5;
68
- // Returns true when the transaction should be auto-added to the
69
- // selectedCheckBoxTransactionIds list after a categorization-related
70
- // state mutation: all line items are filled, the selection limit has
71
- // not been hit, and the id isn't already in the list. Consolidates the
72
- // triplet that was inlined at four sites (updateSelectedCustomer/Vendor,
73
- // setAllItemsToCategoryClassInLocalDataForCategorization, and
74
- // setEntityRecommendationForLineIdInLocalData below).
75
- const shouldAutoSelectAndAdd = (transaction, localData, selectedCheckBoxTransactionIds, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) => {
76
- if (selectedCheckBoxTransactionIds.includes(transaction.id)) {
77
- return false;
78
- }
79
- if (selectedCheckBoxTransactionIds.length >= exports.MAX_SELECTION_LIMIT) {
80
- return false;
81
- }
82
- return (0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, localData, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
83
- };
84
- exports.shouldAutoSelectAndAdd = shouldAutoSelectAndAdd;
85
68
  const toTransactionDetailLocalData = (transaction, selectedTab, lineItemsByTransactionIds, uncategorizedIncomeExpense, isUncategorizedExpenseCategoryEnabled) => {
86
69
  const transactionLocal = {
87
70
  ...transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData,
@@ -569,14 +552,10 @@ const setEntityRecommendationForLineIdInLocalData = (draft, transaction, transac
569
552
  selectedEntity: transactionDetailLocalData.selectedEntity,
570
553
  tabSpecificLineItems: transactionDetailLocalData.tabSpecificLineItems,
571
554
  };
572
- // Auto-uncheck if not all line items are filled (the row's
573
- // category/class became stale after the entity update). Otherwise
574
- // route through shouldAutoSelectAndAdd so the MAX_SELECTION_LIMIT
575
- // gate is consistently applied across all auto-add sites.
576
555
  if (!(0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, newLocalData, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled)) {
577
556
  selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds.filter((id) => id !== transaction.id);
578
557
  }
579
- else if ((0, exports.shouldAutoSelectAndAdd)(transaction, newLocalData, selectedCheckBoxTransactionIds, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled)) {
558
+ else if (selectedCheckBoxTransactionIds.includes(transaction.id) === false) {
580
559
  selectedCheckBoxTransactionIds.push(transaction.id);
581
560
  }
582
561
  draft.selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds;
@@ -2,7 +2,6 @@ import { EntityRecommendationPayload } from '../../../commonPayloadTypes/recomme
2
2
  import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
3
3
  import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
4
4
  import { ZeniAPIResponse } from '../../../responsePayload';
5
- import { CompletedSubTab } from '../types/completedSubTab';
6
5
  export interface TransactionCategorizationQueryPayload {
7
6
  auto_categorized: boolean;
8
7
  end_date: string | null;
@@ -12,32 +11,12 @@ export interface TransactionCategorizationQueryPayload {
12
11
  sort_by: string;
13
12
  sort_order: string;
14
13
  start_date: string | null;
15
- /**
16
- * Required. For the Completed (`auto_categorized=true`) listing, scopes the
17
- * returned page + `total_count` to one of the Completed sub-tabs. For the
18
- * Review listing it is forced to `'all'` to preserve parent-tab semantics
19
- * on the backend.
20
- */
21
- sub_tab: CompletedSubTab;
22
14
  }
23
15
  export interface TransactionCategorizationPayload {
24
16
  next_page_token: string | null;
25
17
  query: TransactionCategorizationQueryPayload;
26
18
  total_count: number;
27
19
  transactions: SupportedTransactionPayload[];
28
- /**
29
- * Count of transactions for the entire parent tab (Review or Completed),
30
- * regardless of which sub-tab the listing was scoped to. Used solely to
31
- * drive the parent tab badge counts on the UI; pagination, list-level
32
- * counts, and sub-tab chips continue to consume {@link total_count}.
33
- *
34
- * Optional at the wire boundary so that any version-skew scenario
35
- * (delayed BE rollout, cached SW response, hotfix without the BE change)
36
- * deserializes cleanly. Consumers are expected to fall back to
37
- * {@link total_count} when this is absent — see
38
- * `fetchTransactionCategorizationEpic` for the canonical fallback.
39
- */
40
- parent_tab_total_count?: number;
41
20
  }
42
21
  export type TransactionCategorizationResponse = ZeniAPIResponse<TransactionCategorizationPayload>;
43
22
  export interface EntityRelatedUpdatesPayload {
@@ -6,8 +6,7 @@ import type { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
6
6
  import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
7
7
  import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
8
8
  import { ZeniAPIStatus } from '../../../responsePayload';
9
- import { type CompletedSubTab } from '../types/completedSubTab';
10
- import { type BatchDetails, type BatchListItem, type BatchStatus, type BulkUploadResultsTab, type BulkUploadSortKey, type BulkUploadState, type ManualSearchResult, type MissingReceiptsViewState, type MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
9
+ import { type BatchDetails, type BatchListItem, type BatchStatus, type BulkUploadResultsTab, type BulkUploadSortKey, type BulkUploadState, type CompletedSubTab, type ManualSearchResult, type MissingReceiptsViewState, type MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
11
10
  export declare const getCompletedTransactionsCacheKey: (periodId: MonthYearPeriodId, sortKey: BulkUploadSortKey | undefined, sortOrder: SortOrder | undefined, subTab: CompletedSubTab) => string;
12
11
  export declare const initialBulkUploadState: BulkUploadState;
13
12
  export declare const initialState: MissingReceiptsViewState;
@@ -5,7 +5,6 @@ exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchCo
5
5
  exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = void 0;
6
6
  const toolkit_1 = require("@reduxjs/toolkit");
7
7
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
8
- const completedSubTab_1 = require("../types/completedSubTab");
9
8
  const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
10
9
  const getCompletedTransactionsCacheKey = (periodId, sortKey, sortOrder, subTab) => {
11
10
  const sortKeyPart = sortKey ?? 'none';
@@ -20,7 +19,7 @@ exports.initialBulkUploadState = {
20
19
  batchListByPeriod: {},
21
20
  batchListFetchState: { fetchState: 'Not-Started', error: undefined },
22
21
  batchStatusById: {},
23
- completedSubTab: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
22
+ completedSubTab: 'all',
24
23
  completedTransactionsByPeriod: {},
25
24
  confirmMatchStatus: { fetchState: 'Not-Started', error: undefined },
26
25
  currentBatchId: undefined,
@@ -4,9 +4,9 @@ import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePerio
4
4
  import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
5
5
  import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
+ import { ProjectBase } from '../../../entity/project/projectState';
7
8
  import { CustomerBase } from '../../../entity/customer/customerState';
8
9
  import { Entity } from '../../../entity/genericEntity/entity';
9
- import { ProjectBase } from '../../../entity/project/projectState';
10
10
  import { RecommendationWithCOTByLineId, TransactionID } from '../../../entity/transaction/stateTypes/transaction';
11
11
  import { SupportedTransaction, SupportedTransactionPayload, SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
12
12
  import { VendorBase } from '../../../entity/vendor/vendorState';
@@ -14,7 +14,6 @@ import { ZeniAPIStatus } from '../../../responsePayload';
14
14
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
15
15
  import { UpdateTransactionCategorizationResponsePayload } from '../payload/transactionCategorizationPayload';
16
16
  import { SupportedTransactionCategorization, TransactionSaveUpdates, TransactionsTab, TransactionsTabViewState, TransactionsViewState, TransactionsViewUIState } from '../types/transactionsViewState';
17
- import { TransactionFilters } from '../transactionFilterHelpers';
18
17
  export declare const initialTransactionTabViewState: TransactionsTabViewState;
19
18
  export declare const initialState: TransactionsViewState;
20
19
  export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", period: TimePeriod, cacheOverride?: any, keepExistingListItems?: any, searchString?: string | undefined, pageToken?: PageToken | undefined, refreshViewInBackground?: any, resetListItems?: boolean | undefined, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
@@ -30,10 +29,7 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
30
29
  }, "expenseAutomationTransactionsView/fetchTransactionCategorization", never, never>, updateTransactionCategorizationUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
31
30
  selectedTab: TransactionsTab;
32
31
  uiState: Partial<TransactionsViewUIState>;
33
- }, "expenseAutomationTransactionsView/updateTransactionCategorizationUIState">, updateTransactionFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
34
- filters: TransactionFilters;
35
- selectedTab: TransactionsTab;
36
- }, "expenseAutomationTransactionsView/updateTransactionFilters">, initializeTransactionCategorizationViewLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], selectedPeriod: MonthYearPeriod, keepExistingListItems: any, pageToken: PageToken, totalCount: number, lineItemsByTransactionIds: Record<string, string[]>, refreshViewInBackground?: any, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
32
+ }, "expenseAutomationTransactionsView/updateTransactionCategorizationUIState">, initializeTransactionCategorizationViewLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], selectedPeriod: MonthYearPeriod, keepExistingListItems: any, pageToken: PageToken, totalCount: number, lineItemsByTransactionIds: Record<string, string[]>, refreshViewInBackground?: any, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
37
33
  selectedTab: "review" | "autoCategorized";
38
34
  transactionIds: string[];
39
35
  selectedPeriod: MonthYearPeriod;
@@ -69,9 +65,7 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
69
65
  isUncategorizedExpenseCategoryEnabled: boolean | undefined;
70
66
  }, "expenseAutomationTransactionsView/updateTransactionCategorization", never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
71
67
  newSelectedTab: "review" | "autoCategorized";
72
- }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "all" | "manual" | "ai_accountant"], {
73
- newSubTab: "all" | "manual" | "ai_accountant";
74
- }, "expenseAutomationTransactionsView/updateTransactionCategorizationCompletedSubTab", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
68
+ }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
75
69
  selectedTab: "review" | "autoCategorized";
76
70
  fetchState: FetchState;
77
71
  error: ZeniAPIStatus<Record<string, unknown>> | undefined;
@@ -126,11 +120,7 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
126
120
  selectedPeriod: MonthYearPeriod;
127
121
  selectedTab: TransactionsTab;
128
122
  totalCount: number;
129
- }, "expenseAutomationTransactionsView/updateTotalCountForTransactionCategorization">, updateParentTotalCountForTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
130
- parentTotalCount: number;
131
- selectedPeriod: MonthYearPeriod;
132
- selectedTab: TransactionsTab;
133
- }, "expenseAutomationTransactionsView/updateParentTotalCountForTab">, fetchTransactionCategorizationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
123
+ }, "expenseAutomationTransactionsView/updateTotalCountForTransactionCategorization">, fetchTransactionCategorizationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
134
124
  selectedTab: TransactionsTab;
135
125
  status: ZeniAPIStatus;
136
126
  refreshViewInBackground?: boolean;
@@ -161,20 +151,7 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
161
151
  uncategorizedAccounts: UncategorizedAccounts;
162
152
  isAccountingClassesEnabled: boolean | undefined;
163
153
  isUncategorizedExpenseCategoryEnabled: boolean | undefined;
164
- }, "expenseAutomationTransactionsView/setEntityRecommendationForLineIdsForCategorization", never, never>, markCategoryClassRecommendationsInProgressForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: TransactionID, lineIds: string[]], {
165
- selectedTab: "review" | "autoCategorized";
166
- transactionId: TransactionID;
167
- lineIds: string[];
168
- }, "expenseAutomationTransactionsView/markCategoryClassRecommendationsInProgressForCategorization", never, never>, markCategoryClassRecommendationsCompletedForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: TransactionID, lineIds: string[]], {
169
- selectedTab: "review" | "autoCategorized";
170
- transactionId: TransactionID;
171
- lineIds: string[];
172
- }, "expenseAutomationTransactionsView/markCategoryClassRecommendationsCompletedForCategorization", never, never>, markCategoryClassRecommendationsFailureForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: TransactionID, lineIds: string[], error: ZeniAPIStatus<Record<string, unknown>>], {
173
- selectedTab: "review" | "autoCategorized";
174
- transactionId: TransactionID;
175
- lineIds: string[];
176
- error: ZeniAPIStatus<Record<string, unknown>>;
177
- }, "expenseAutomationTransactionsView/markCategoryClassRecommendationsFailureForCategorization", never, never>, updateSelectedTransactionId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
154
+ }, "expenseAutomationTransactionsView/setEntityRecommendationForLineIdsForCategorization", never, never>, updateSelectedTransactionId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
178
155
  lineId: ID;
179
156
  selectedTab: TransactionsTab;
180
157
  transactionId: ID;