@zeniai/client-epic-state 5.0.64-betaAR2 → 5.0.64-betaML1

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 (81) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  3. package/lib/entity/account/accountSelector.d.ts +10 -20
  4. package/lib/entity/account/accountSelector.js +14 -35
  5. package/lib/entity/account/accountState.d.ts +1 -6
  6. package/lib/entity/account/accountState.js +4 -11
  7. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  8. package/lib/entity/class/classReducer.d.ts +4 -4
  9. package/lib/entity/class/classSelector.d.ts +0 -5
  10. package/lib/entity/class/classSelector.js +0 -8
  11. package/lib/entity/class/classState.d.ts +1 -1
  12. package/lib/entity/forecast/forecastState.d.ts +1 -1
  13. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  14. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  15. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  16. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
  17. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
  18. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  19. package/lib/entity/snackbar/snackbarTypes.js +2 -0
  20. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
  21. package/lib/entity/transaction/payloadTypes/transactionPayload.js +10 -0
  22. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  23. package/lib/epic.d.ts +3 -1
  24. package/lib/epic.js +3 -1
  25. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  26. package/lib/esm/entity/account/accountSelector.js +12 -33
  27. package/lib/esm/entity/account/accountState.js +1 -7
  28. package/lib/esm/entity/class/classSelector.js +0 -7
  29. package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
  30. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +10 -0
  31. package/lib/esm/epic.js +3 -1
  32. package/lib/esm/index.js +6 -12
  33. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +81 -0
  34. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -1
  35. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +30 -0
  36. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +79 -11
  37. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +38 -58
  38. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +5 -0
  39. package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +0 -2
  40. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +10 -0
  41. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +24 -2
  42. package/lib/index.d.ts +7 -9
  43. package/lib/index.js +42 -41
  44. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  45. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  46. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  47. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  48. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  49. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  50. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  51. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  52. package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.d.ts +9 -0
  53. package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +85 -0
  54. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -2
  55. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +7 -0
  56. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.d.ts +8 -0
  57. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +34 -0
  58. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  59. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +22 -7
  60. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +80 -12
  61. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +4 -1
  62. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +3 -4
  63. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +39 -60
  64. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +18 -3
  65. package/lib/view/expenseAutomationView/types/transactionsViewState.js +6 -1
  66. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  67. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  68. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  69. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  70. package/lib/view/spendManagement/spendManagementFilterHelpers.js +0 -2
  71. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  72. package/lib/view/topEx/topExSelector.d.ts +1 -1
  73. package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +2 -1
  74. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +10 -0
  75. package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
  76. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
  77. package/lib/view/transactionDetail/transactionDetailSelector.js +23 -1
  78. package/package.json +1 -1
  79. package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +0 -186
  80. package/lib/view/expenseAutomationView/transactionFilterHelpers.d.ts +0 -65
  81. package/lib/view/expenseAutomationView/transactionFilterHelpers.js +0 -190
@@ -3,8 +3,8 @@ import { FetchStateAndError, ID } from '../common';
3
3
  import { DataAvailable } from '../dataAvailable';
4
4
  import { Status } from '../status';
5
5
  import { Month } from '../timePeriod';
6
- export declare const ALL_REPORT_IDS: readonly ["cash_balance", "card_balance", "expense_automation_card", "operating_expenses", "operating_expenses_by_classes", "revenue", "revenue_by_classes", "net_burn_or_income", "net_burn_or_income_story_card", "net_burn_or_income_by_classes", "cash_position", "top_expenses", "profit_and_loss", "profit_and_loss_by_classes", "profit_and_loss_by_projects", "balance_sheet", "cash_flow", "dashboard", "finance_statement", "transaction_list_of_account", "transaction_list_missing_receipt", "transaction_list_of_account_by_class", "transaction_list_of_account_by_project", "transaction_detail", "cash_in_cash_out", "insights_dashboard", "company_details", "class_list", "account_list", "account_list_by_type", "vendor", "task_card", "bill_pay", "reimbursement", "bill_pay_card", "reimbursement_card", "bill_pay_promo_card", "zeni_accounts", "zeni_accounts_promo_card", "zeni_treasury", "charge_cards", "other_connection", "reimbursement_promo_card", "onboarding", "operating_expenses_by_vendor", "operating_expenses_by_vendor_summary", "vendors_tab", "accounts_payable_aging", "accounts_receivable_aging", "vendor_global_review", "prepaid_expenses", "fixed_assets", "notification", "rewards_card", "billing", "flux_analysis_operating_expense", "account_reconciliation", "zeni_credit_promo_card", "treasury_promo_card", "excluded_account_reconciliation"];
7
- export declare const toReportID: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
6
+ export declare const ALL_REPORT_IDS: readonly ["cash_balance", "card_balance", "expense_automation_card", "operating_expenses", "operating_expenses_by_classes", "revenue", "revenue_by_classes", "net_burn_or_income", "net_burn_or_income_story_card", "net_burn_or_income_by_classes", "cash_position", "top_expenses", "profit_and_loss", "profit_and_loss_by_classes", "profit_and_loss_by_projects", "balance_sheet", "cash_flow", "dashboard", "finance_statement", "transaction_list_of_account", "transaction_list_missing_receipt", "transaction_list_of_account_by_class", "transaction_list_of_account_by_project", "transaction_detail", "cash_in_cash_out", "insights_dashboard", "company_details", "class_list", "account_list", "account_list_by_type", "vendor", "task_card", "bill_pay", "reimbursement", "bill_pay_card", "reimbursement_card", "bill_pay_promo_card", "zeni_accounts", "zeni_accounts_promo_card", "zeni_treasury", "charge_cards", "other_connection", "reimbursement_promo_card", "onboarding", "operating_expenses_by_vendor", "operating_expenses_by_vendor_summary", "vendors_tab", "accounts_payable_aging", "accounts_receivable_aging", "vendor_global_review", "prepaid_expenses", "fixed_assets", "notification", "rewards_card", "billing", "flux_analysis_operating_expense", "account_reconciliation", "zeni_credit_promo_card", "treasury_promo_card", "excluded_account_reconciliation", "transfer_accounts", "credit_card_transfer_accounts"];
7
+ export declare const toReportID: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
8
8
  export type ReportID = ReturnType<typeof toReportID>;
9
9
  export type ReportIDPlusForecastID = ReportID | `${ReportID}+${ID}`;
10
10
  /** Any view state should extend this interface */
@@ -63,6 +63,8 @@ exports.ALL_REPORT_IDS = [
63
63
  'zeni_credit_promo_card',
64
64
  'treasury_promo_card',
65
65
  'excluded_account_reconciliation',
66
+ 'transfer_accounts',
67
+ 'credit_card_transfer_accounts',
66
68
  ];
67
69
  const toReportID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_REPORT_IDS);
68
70
  exports.toReportID = toReportID;
@@ -1,13 +1,22 @@
1
1
  import { AccountsViewParentID } from '../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { ClassesViewParentID } from '../../commonStateTypes/classesView/nestedClassID';
3
+ import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
3
4
  import { AdditionalBalancesOptions } from '../../commonStateTypes/coaBalance/additionalBalances/getAdditionalBalances';
4
5
  import { COABalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
5
6
  import { ID } from '../../commonStateTypes/common';
6
- import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
7
7
  import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
8
8
  import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
9
9
  import { Account, AccountBase, AccountState, AccountType } from './accountState';
10
10
  export declare const getAccountBase: (accountState: AccountState, accountId: ID, reportId: ReportIDPlusForecastID) => AccountBase | undefined;
11
+ /**
12
+ * Transfer-account IDs from the API are resolved under `transfer_accounts`; if that
13
+ * slice is not hydrated yet, fall back to `account_list` so dropdowns still populate.
14
+ */
15
+ export declare const getAccountBaseForTransferAccounts: (accountState: AccountState, accountId: ID) => AccountBase | undefined;
16
+ /**
17
+ * Credit-card-only pool from the transfer-flow accounts API; falls back to `account_list`.
18
+ */
19
+ export declare const getAccountBaseForCreditCardTransferAccounts: (accountState: AccountState, accountId: ID) => AccountBase | undefined;
11
20
  export declare function getAccount(accountState: AccountState, id: {
12
21
  accountId: ID;
13
22
  reportId: ReportIDPlusForecastID;
@@ -123,22 +132,3 @@ export declare const getAccountsOrdered: (filter: COABalancesFilter, accountStat
123
132
  export declare const getAccountsByType: (accountState: AccountState, accountTypes: AccountType[]) => Partial<Record<AccountType, Account[]>>;
124
133
  export declare const getAccountIdsForTypes: (accountState: AccountState, accountTypes: AccountType[]) => ID[];
125
134
  export declare const getAccountIdsForLabels: (accountState: AccountState, labels: string[]) => ID[];
126
- /**
127
- * Returns all accounts currently in state (single pass over accountsByKey).
128
- * Use for dropdowns that need account names and types; map to
129
- * { accountId, accountName, accountType } as needed.
130
- */
131
- export declare const getAllAccounts: (accountState: AccountState) => Account[];
132
- export interface AccountFilterOption {
133
- accountId: ID;
134
- accountName: string;
135
- accountType: AccountType;
136
- }
137
- /**
138
- * Partitions accounts for transaction filter dropdowns: bank/credit_card → paymentAccountNames,
139
- * all other account types → categoryOptions. Use for payment_account_name and category filter options.
140
- */
141
- export declare const getTransactionFilterAccountOptions: (accountState: AccountState) => {
142
- categoryOptions: AccountFilterOption[];
143
- paymentAccountNames: AccountFilterOption[];
144
- };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTransactionFilterAccountOptions = exports.getAllAccounts = exports.getAccountIdsForLabels = exports.getAccountIdsForTypes = exports.getAccountsByType = exports.getAccountsOrdered = exports.getAccountBase = void 0;
6
+ exports.getAccountIdsForLabels = exports.getAccountIdsForTypes = exports.getAccountsByType = exports.getAccountsOrdered = exports.getAccountBaseForCreditCardTransferAccounts = exports.getAccountBaseForTransferAccounts = exports.getAccountBase = void 0;
7
7
  exports.getAccount = getAccount;
8
8
  exports.getAccountWithBalance = getAccountWithBalance;
9
9
  const flatMap_1 = __importDefault(require("lodash/flatMap"));
@@ -59,6 +59,19 @@ const getAccountBase = (accountState, accountId, reportId) => {
59
59
  };
60
60
  };
61
61
  exports.getAccountBase = getAccountBase;
62
+ /**
63
+ * Transfer-account IDs from the API are resolved under `transfer_accounts`; if that
64
+ * slice is not hydrated yet, fall back to `account_list` so dropdowns still populate.
65
+ */
66
+ const getAccountBaseForTransferAccounts = (accountState, accountId) => (0, exports.getAccountBase)(accountState, accountId, 'transfer_accounts') ??
67
+ (0, exports.getAccountBase)(accountState, accountId, 'account_list');
68
+ exports.getAccountBaseForTransferAccounts = getAccountBaseForTransferAccounts;
69
+ /**
70
+ * Credit-card-only pool from the transfer-flow accounts API; falls back to `account_list`.
71
+ */
72
+ const getAccountBaseForCreditCardTransferAccounts = (accountState, accountId) => (0, exports.getAccountBase)(accountState, accountId, 'credit_card_transfer_accounts') ??
73
+ (0, exports.getAccountBase)(accountState, accountId, 'account_list');
74
+ exports.getAccountBaseForCreditCardTransferAccounts = getAccountBaseForCreditCardTransferAccounts;
62
75
  function getAccount(accountState, id, filter, additionalBalancesOptions) {
63
76
  const key = (0, accountState_1.getAccountKey)(id.reportId, id.accountId, id.classesViewParentId, id.accountsViewParentId, id.projectsViewParentId);
64
77
  const account = accountState.accountsByKey[key];
@@ -192,37 +205,3 @@ const getAccountIdsForLabels = (accountState, labels) => {
192
205
  return allAccountIdsForLabels;
193
206
  };
194
207
  exports.getAccountIdsForLabels = getAccountIdsForLabels;
195
- /**
196
- * Returns all accounts currently in state (single pass over accountsByKey).
197
- * Use for dropdowns that need account names and types; map to
198
- * { accountId, accountName, accountType } as needed.
199
- */
200
- const getAllAccounts = (accountState) => Object.values(accountState.accountsByKey);
201
- exports.getAllAccounts = getAllAccounts;
202
- /**
203
- * Partitions accounts for transaction filter dropdowns: bank/credit_card → paymentAccountNames,
204
- * all other account types → categoryOptions. Use for payment_account_name and category filter options.
205
- */
206
- const getTransactionFilterAccountOptions = (accountState) => {
207
- const accounts = (0, exports.getAllAccounts)(accountState);
208
- const paymentAccountNames = [];
209
- const categoryOptions = [];
210
- for (const account of accounts) {
211
- if (account.accountType == null) {
212
- continue;
213
- }
214
- const option = {
215
- accountId: account.accountId,
216
- accountName: account.accountName,
217
- accountType: account.accountType,
218
- };
219
- if ((0, accountState_1.isPaymentAccountType)(account.accountType)) {
220
- paymentAccountNames.push(option);
221
- }
222
- else {
223
- categoryOptions.push(option);
224
- }
225
- }
226
- return { categoryOptions, paymentAccountNames };
227
- };
228
- exports.getTransactionFilterAccountOptions = getTransactionFilterAccountOptions;
@@ -8,19 +8,14 @@ import { RecommendationBase } from '../../commonStateTypes/recommendationBase';
8
8
  import { Status } from '../../commonStateTypes/status';
9
9
  import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
10
10
  import { ZeniUrl } from '../../zeniUrl';
11
- export declare const ALL_ACCOUNT_TYPES: readonly ["bank", "credit_card", "expenses", "cogs", "income", "cash_in", "cash_out", "cash_position", "other_income", "other_expense", "accounts_receivable", "other_current_assets", "fixed_assets", "other_assets", "accounts_payable", "other_current_liabilities", "long_term_liabilities", "equity", "current_liabilities", "current_assets"];
12
11
  export declare const toAccountType: (v: string) => "cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets";
13
12
  export type AccountType = ReturnType<typeof toAccountType>;
14
13
  export declare const toAccountTypeStrict: (v: string | null | undefined) => AccountType | undefined;
15
- /** Account types used for payment-account filters (e.g. transaction filter "payment account name"). */
16
- export declare const PAYMENT_ACCOUNT_TYPES: readonly ["bank", "credit_card"];
17
- export type PaymentAccountType = (typeof PAYMENT_ACCOUNT_TYPES)[number];
18
- export declare function isPaymentAccountType(accountType: AccountType | undefined): accountType is PaymentAccountType;
19
14
  export type UncategorizedAccountTypes = 'expense' | 'income';
20
15
  declare const toAccountLabel: (v: string) => "prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses";
21
16
  export type AccountLabel = ReturnType<typeof toAccountLabel>;
22
17
  export declare const toAccountLabelStrict: (v: string | null | undefined) => AccountLabel | undefined;
23
- export declare function getAccountKey(reportIdUniqueKey: ReportIDPlusForecastID, accountId: ID, classesViewParentId?: ClassesViewParentID, accountsViewParentId?: AccountsViewParentID, projectsViewParentId?: ProjectsViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_list_of_account_by_project` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-profit_and_loss_by_projects+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_list_of_account_by_project+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
18
+ export declare function getAccountKey(reportIdUniqueKey: ReportIDPlusForecastID, accountId: ID, classesViewParentId?: ClassesViewParentID, accountsViewParentId?: AccountsViewParentID, projectsViewParentId?: ProjectsViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_list_of_account_by_project` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-transfer_accounts` | `${string}-credit_card_transfer_accounts` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-profit_and_loss_by_projects+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_list_of_account_by_project+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}` | `${string}-transfer_accounts+${string}` | `${string}-credit_card_transfer_accounts+${string}`;
24
19
  export type AccountKey = ReturnType<typeof getAccountKey>;
25
20
  export declare const toReconciliationAccountSource: (v: string) => "plaid" | "bank_statement";
26
21
  export type ReconciliationAccountSourceType = ReturnType<typeof toReconciliationAccountSource>;
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toReconciliationAccountSourceStrict = exports.toReconciliationAccountSource = exports.toAccountLabelStrict = exports.PAYMENT_ACCOUNT_TYPES = exports.toAccountTypeStrict = exports.toAccountType = exports.ALL_ACCOUNT_TYPES = void 0;
4
- exports.isPaymentAccountType = isPaymentAccountType;
3
+ exports.toReconciliationAccountSourceStrict = exports.toReconciliationAccountSource = exports.toAccountLabelStrict = exports.toAccountTypeStrict = exports.toAccountType = void 0;
5
4
  exports.getAccountKey = getAccountKey;
6
5
  const nestedAccountID_1 = require("../../commonStateTypes/accountView/nestedAccountID");
7
6
  const nestedClassID_1 = require("../../commonStateTypes/classesView/nestedClassID");
8
7
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
9
- exports.ALL_ACCOUNT_TYPES = [
8
+ const ALL_ACCOUNT_TYPES = [
10
9
  'bank',
11
10
  'credit_card',
12
11
  'expenses',
@@ -28,16 +27,10 @@ exports.ALL_ACCOUNT_TYPES = [
28
27
  'current_liabilities',
29
28
  'current_assets',
30
29
  ];
31
- const toAccountType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_TYPES);
30
+ const toAccountType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_ACCOUNT_TYPES);
32
31
  exports.toAccountType = toAccountType;
33
- const toAccountTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', exports.ALL_ACCOUNT_TYPES);
32
+ const toAccountTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', ALL_ACCOUNT_TYPES);
34
33
  exports.toAccountTypeStrict = toAccountTypeStrict;
35
- /** Account types used for payment-account filters (e.g. transaction filter "payment account name"). */
36
- exports.PAYMENT_ACCOUNT_TYPES = ['bank', 'credit_card'];
37
- function isPaymentAccountType(accountType) {
38
- return (accountType != null &&
39
- exports.PAYMENT_ACCOUNT_TYPES.includes(accountType));
40
- }
41
34
  const ALL_ACCOUNT_LABELS = [
42
35
  'uncategorized_income',
43
36
  'uncategorized_expense',