@zeniai/client-epic-state 5.2.34 → 5.2.36

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 (51) hide show
  1. package/lib/commonPayloadTypes/classesView/reportByClassPayloadV2.d.ts +1 -13
  2. package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +7 -10
  3. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +3 -3
  4. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +2 -6
  5. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +3 -3
  6. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +3 -4
  7. package/lib/epic.js +0 -12
  8. package/lib/esm/entity/class/classReducer.js +1 -1
  9. package/lib/esm/entity/sectionClassesViewV2/sectionClassesViewEpic.js +7 -10
  10. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +2 -6
  11. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +4 -5
  12. package/lib/esm/epic.js +0 -12
  13. package/lib/esm/index.js +2 -2
  14. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -266
  15. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -50
  16. package/lib/index.d.ts +3 -3
  17. package/lib/index.js +40 -55
  18. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -90
  19. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +123 -164
  20. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -268
  21. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -13
  22. package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -55
  23. package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -157
  24. package/lib/view/cashFlowClassesView/cashFlowClassesViewPayload.d.ts +4 -4
  25. package/lib/view/cashFlowProjectView/cashFlowProjectViewPayload.d.ts +4 -4
  26. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +0 -12
  27. package/package.json +1 -1
  28. package/lib/esm/view/aiCfoView/epics/deleteRoutineEpic.js +0 -35
  29. package/lib/esm/view/aiCfoView/epics/fetchRoutineRunsEpic.js +0 -35
  30. package/lib/esm/view/aiCfoView/epics/fetchRoutinesEpic.js +0 -37
  31. package/lib/esm/view/aiCfoView/epics/runRoutineEpic.js +0 -34
  32. package/lib/esm/view/aiCfoView/epics/saveRoutineEpic.js +0 -65
  33. package/lib/esm/view/aiCfoView/epics/setRoutineEnabledEpic.js +0 -28
  34. package/lib/esm/view/aiCfoView/epics/toRoutine.js +0 -64
  35. package/lib/esm/view/aiCfoView/epics/toRoutineRun.js +0 -42
  36. package/lib/view/aiCfoView/epics/deleteRoutineEpic.d.ts +0 -18
  37. package/lib/view/aiCfoView/epics/deleteRoutineEpic.js +0 -39
  38. package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.d.ts +0 -13
  39. package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.js +0 -39
  40. package/lib/view/aiCfoView/epics/fetchRoutinesEpic.d.ts +0 -7
  41. package/lib/view/aiCfoView/epics/fetchRoutinesEpic.js +0 -41
  42. package/lib/view/aiCfoView/epics/runRoutineEpic.d.ts +0 -14
  43. package/lib/view/aiCfoView/epics/runRoutineEpic.js +0 -38
  44. package/lib/view/aiCfoView/epics/saveRoutineEpic.d.ts +0 -13
  45. package/lib/view/aiCfoView/epics/saveRoutineEpic.js +0 -69
  46. package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.d.ts +0 -15
  47. package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.js +0 -32
  48. package/lib/view/aiCfoView/epics/toRoutine.d.ts +0 -17
  49. package/lib/view/aiCfoView/epics/toRoutine.js +0 -69
  50. package/lib/view/aiCfoView/epics/toRoutineRun.d.ts +0 -12
  51. package/lib/view/aiCfoView/epics/toRoutineRun.js +0 -47
@@ -18,20 +18,8 @@ interface ClassCOABalanceGroupedPayloadByClassIdV2 {
18
18
  export interface SectionByClassCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
19
19
  classes: ClassCOABalanceGroupedPayloadByClassIdV2;
20
20
  }
21
- interface CalculatedClassCOABalanceGroupedPayloadByClassIdV2 {
22
- [class_Id: string]: COABalanceGroupedPayloadV2;
23
- }
24
- /**
25
- * A section whose per-class entries carry a time series and nothing else: the
26
- * backend fills the account-wise map only for the account sections, so the
27
- * calculated sections (net income, the operating total, change in cash) are
28
- * grouped by class with no accounts underneath.
29
- */
30
- export interface CalculatedSectionByClassCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
31
- classes: CalculatedClassCOABalanceGroupedPayloadByClassIdV2;
32
- }
33
21
  export interface ClassMetadataWithBalancesPayloadV2 {
34
- classBalances: COABalanceGroupedPayloadV2;
22
+ classBalances: ClassCOABalanceGroupedPayloadV2;
35
23
  classMetadata: ClassMetadataPayload;
36
24
  nestedAccountIds: NestedAccountIDHierarchy[];
37
25
  nestedClassId: NestedClassID;
@@ -29,20 +29,17 @@ const updateSectionClassesViewEpic = (actions$) => actions$.pipe((0, operators_1
29
29
  Object.keys(sectionPayload.classes).forEach((eachClassId) => {
30
30
  const classId = classMetadataRecordsByID[eachClassId].nestedClassId;
31
31
  const classMetadataPayload = classMetadataRecordsByID[eachClassId].classMetadataPayload;
32
- const classPayload = sectionPayload.classes[eachClassId];
33
- // A calculated section is grouped by class with no accounts under it.
34
- const classAccounts = 'accounts' in classPayload ? classPayload.accounts : undefined;
35
- if (classAccounts != null) {
36
- accountMetadataWithBalancesPayloads.push(...(0, subAccountPayloadHelper_1.getSubAccountsMetadataForAccountList)(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId }));
37
- }
38
- const nestedAccountIds = classAccounts != null
39
- ? (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(Object.keys(classAccounts), accountsMetadata)
40
- : [];
32
+ const classAccounts = sectionPayload.classes[eachClassId].accounts;
33
+ const classSubAccounts = (0, subAccountPayloadHelper_1.getSubAccountsMetadataForAccountList)(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId });
34
+ accountMetadataWithBalancesPayloads.push(...classSubAccounts);
35
+ // The grouped cash flow aggregates carry no accounts under a class.
36
+ const classAccountIds = Object.keys(classAccounts ?? {});
37
+ const nestedAccountIds = (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(classAccountIds, accountsMetadata);
41
38
  if (classMetadataPayload != null) {
42
39
  classMetadataWithBalancesPayloads.push({
43
40
  nestedClassId: classId,
44
41
  classMetadata: classMetadataPayload,
45
- classBalances: classPayload,
42
+ classBalances: sectionPayload.classes[eachClassId],
46
43
  nestedAccountIds,
47
44
  });
48
45
  }
@@ -1,14 +1,14 @@
1
- import { CalculatedSectionByClassCOABalanceGroupedPayloadV2, SectionByClassCOABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/classesView/reportByClassPayloadV2';
1
+ import { SectionByClassCOABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/classesView/reportByClassPayloadV2';
2
2
  import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
3
3
  import { AccountMetadataPayload } from '../account/accountPayload';
4
4
  import { ClassMetadataPayload } from '../class/classPayload';
5
5
  import { SectionClassesViewStateV2 } from './sectionClassesViewState';
6
6
  export declare const initialState: SectionClassesViewStateV2;
7
- export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2 | CalculatedSectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
7
+ export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
8
8
  timeframe: "month" | "year" | "quarter";
9
9
  reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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";
10
10
  sectionId: string;
11
- sectionPayload: SectionByClassCOABalanceGroupedPayloadV2 | CalculatedSectionByClassCOABalanceGroupedPayloadV2;
11
+ sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
12
12
  classesMetadataPayload: ClassMetadataPayload[];
13
13
  accountsMetadataPayload: AccountMetadataPayload[];
14
14
  currencyPayload: CurrencyPayload;
@@ -18,16 +18,12 @@ const updateSectionProjectViewEpic = (actions$) => actions$.pipe((0, operators_1
18
18
  const accountMetadataWithBalancesPayloads = [];
19
19
  if (sectionPayload.projects != null) {
20
20
  Object.keys(sectionPayload.projects).forEach((projectId) => {
21
- const projectPayload = sectionPayload.projects[projectId];
22
- // A calculated section is grouped by project with no accounts under it.
23
- const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
21
+ const projectAccounts = sectionPayload.projects[projectId].accounts;
24
22
  const projectsViewParentID = {
25
23
  projectId,
26
24
  sectionId,
27
25
  };
28
- if (projectAccounts != null) {
29
- getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
30
- }
26
+ getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
31
27
  });
32
28
  }
33
29
  if (accountMetadataWithBalancesPayloads.length > 0) {
@@ -1,13 +1,13 @@
1
1
  import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
2
- import { CalculatedSectionByProjectCOABalanceGroupedPayloadV2, SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
2
+ import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
3
3
  import { AccountMetadataPayload } from '../account/accountPayload';
4
4
  import { SectionProjectViewState } from './sectionProjectViewState';
5
5
  export declare const initialState: SectionProjectViewState;
6
- export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2 | CalculatedSectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
6
+ export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
7
7
  timeframe: "month" | "year" | "quarter";
8
8
  reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "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";
9
9
  sectionId: string;
10
- sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2 | CalculatedSectionByProjectCOABalanceGroupedPayloadV2;
10
+ sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2;
11
11
  accountsMetadataPayload: AccountMetadataPayload[];
12
12
  currencyPayload: CurrencyPayload;
13
13
  }, "sectionProjectView/updateSectionProjectView", never, never>;
@@ -34,11 +34,10 @@ const sectionProjectView = (0, toolkit_1.createSlice)({
34
34
  const accountsMetadata = accountsMetadataPayload.map((eachAccount) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(eachAccount));
35
35
  Object.keys(sectionPayload.projects).forEach((projectId) => {
36
36
  const projectPayload = sectionPayload.projects[projectId];
37
- // A calculated section is grouped by project with no accounts under it.
38
- const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
39
- const nestedAccountIds = projectAccounts != null
40
- ? (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(Object.keys(projectAccounts), accountsMetadata)
37
+ const projectAccountIds = projectPayload.accounts != null
38
+ ? Object.keys(projectPayload.accounts)
41
39
  : [];
40
+ const nestedAccountIds = (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(projectAccountIds, accountsMetadata);
42
41
  updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
43
42
  });
44
43
  }
package/lib/epic.js CHANGED
@@ -61,12 +61,6 @@ const fetchSkillVersionBodyEpic_1 = require("./view/aiCfoView/epics/fetchSkillVe
61
61
  const fetchSkillVersionsEpic_1 = require("./view/aiCfoView/epics/fetchSkillVersionsEpic");
62
62
  const fetchSkillsEpic_1 = require("./view/aiCfoView/epics/fetchSkillsEpic");
63
63
  const fetchSuggestedQuestionsEpic_1 = require("./view/aiCfoView/epics/fetchSuggestedQuestionsEpic");
64
- const deleteRoutineEpic_1 = require("./view/aiCfoView/epics/deleteRoutineEpic");
65
- const fetchRoutineRunsEpic_1 = require("./view/aiCfoView/epics/fetchRoutineRunsEpic");
66
- const fetchRoutinesEpic_1 = require("./view/aiCfoView/epics/fetchRoutinesEpic");
67
- const runRoutineEpic_1 = require("./view/aiCfoView/epics/runRoutineEpic");
68
- const saveRoutineEpic_1 = require("./view/aiCfoView/epics/saveRoutineEpic");
69
- const setRoutineEnabledEpic_1 = require("./view/aiCfoView/epics/setRoutineEnabledEpic");
70
64
  const saveSkillEpic_1 = require("./view/aiCfoView/epics/saveSkillEpic");
71
65
  const setSkillVisibilityEpic_1 = require("./view/aiCfoView/epics/setSkillVisibilityEpic");
72
66
  const stopSubmitEpic_1 = require("./view/aiCfoView/epics/stopSubmitEpic");
@@ -851,7 +845,6 @@ const ALL_EPICS = [
851
845
  deletePersonEpic_1.deletePersonEpic,
852
846
  deleteRemiApprovalRuleEpic_1.deleteRemiApprovalRuleEpic,
853
847
  deleteRemiEpic_1.deleteRemiEpic,
854
- deleteRoutineEpic_1.deleteRoutineEpic,
855
848
  deleteScheduleAccruedDetailEpic_1.deleteScheduleAccruedDetailEpic,
856
849
  deleteScheduleDetailEpic_1.deleteScheduleDetailEpic,
857
850
  deleteSkillEpic_1.deleteSkillEpic,
@@ -1176,8 +1169,6 @@ const ALL_EPICS = [
1176
1169
  fetchReviewCompanyViewEpic_1.fetchReviewCompanyViewEpic,
1177
1170
  fetchReviewTransferDetailEpic_1.fetchReviewTransferDetailEpic,
1178
1171
  fetchRewardsPlanEpic_1.fetchRewardsPlanEpic,
1179
- fetchRoutineRunsEpic_1.fetchRoutineRunsEpic,
1180
- fetchRoutinesEpic_1.fetchRoutinesEpic,
1181
1172
  fetchScheduleAccruedDetailsEpic_1.fetchScheduleAccruedDetailsEpic,
1182
1173
  fetchScheduleAccruedDetailsPageEpic_1.fetchScheduleAccruedDetailsPageEpic,
1183
1174
  fetchScheduleDetailsEpic_1.fetchScheduleDetailsEpic,
@@ -1356,7 +1347,6 @@ const ALL_EPICS = [
1356
1347
  runInvoicingInvoiceActionEpic_1.runInvoicingInvoiceActionEpic,
1357
1348
  runInvoicingPaymentActionEpic_1.runInvoicingPaymentActionEpic,
1358
1349
  runInvoicingSubscriptionActionEpic_1.runInvoicingSubscriptionActionEpic,
1359
- runRoutineEpic_1.runRoutineEpic,
1360
1350
  saveAccountMappingViewEpic_1.saveAccountMappingViewEpic,
1361
1351
  saveAccountSettingsViewEpic_1.saveAccountSettingsViewEpic,
1362
1352
  saveAPIKeyConnectionEpic_1.saveAPIKeyConnectionEpic,
@@ -1392,7 +1382,6 @@ const ALL_EPICS = [
1392
1382
  saveReasonForAuditRuleEpic_1.saveReasonForAuditRuleEpic,
1393
1383
  saveRemiDetailEpic_1.saveRemiDetailEpic,
1394
1384
  saveRemiSetupApproverViewUpdatesEpic_1.saveRemiSetupApproverViewUpdatesEpic,
1395
- saveRoutineEpic_1.saveRoutineEpic,
1396
1385
  saveScheduleAccruedDetailsEpic_1.saveScheduleAccruedDetailsEpic,
1397
1386
  saveScheduleDetailsEpic_1.saveScheduleDetailsEpic,
1398
1387
  saveSkillEpic_1.saveSkillEpic,
@@ -1421,7 +1410,6 @@ const ALL_EPICS = [
1421
1410
  sendOtpEpic_1.sendOtpEpic,
1422
1411
  sendReferralInviteEpic_1.sendReferralInviteEpic,
1423
1412
  sessionHeartbeatEpic_1.sessionHeartbeatEpic,
1424
- setRoutineEnabledEpic_1.setRoutineEnabledEpic,
1425
1413
  setSkillVisibilityEpic_1.setSkillVisibilityEpic,
1426
1414
  snoozeTaskEpic_1.snoozeTaskEpic,
1427
1415
  startInvoicingQboBackfillEpic_1.startInvoicingQboBackfillEpic,
@@ -1,7 +1,7 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
2
  import assignWith from 'lodash/assignWith';
3
3
  import recordGet from 'lodash/get';
4
- import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
4
+ import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
5
5
  import { getParentClassId } from '../../commonStateTypes/classesView/getNestedClassIDHierarchyForReport';
6
6
  import { clearAll } from '../../rootActions';
7
7
  import { mapClassBasePayloadToClass, } from './classPayload';
@@ -26,20 +26,17 @@ export const updateSectionClassesViewEpic = (actions$) => actions$.pipe(filter(u
26
26
  Object.keys(sectionPayload.classes).forEach((eachClassId) => {
27
27
  const classId = classMetadataRecordsByID[eachClassId].nestedClassId;
28
28
  const classMetadataPayload = classMetadataRecordsByID[eachClassId].classMetadataPayload;
29
- const classPayload = sectionPayload.classes[eachClassId];
30
- // A calculated section is grouped by class with no accounts under it.
31
- const classAccounts = 'accounts' in classPayload ? classPayload.accounts : undefined;
32
- if (classAccounts != null) {
33
- accountMetadataWithBalancesPayloads.push(...getSubAccountsMetadataForAccountList(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId }));
34
- }
35
- const nestedAccountIds = classAccounts != null
36
- ? getNestedAccountIDHierarchyForAccounts(Object.keys(classAccounts), accountsMetadata)
37
- : [];
29
+ const classAccounts = sectionPayload.classes[eachClassId].accounts;
30
+ const classSubAccounts = getSubAccountsMetadataForAccountList(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId });
31
+ accountMetadataWithBalancesPayloads.push(...classSubAccounts);
32
+ // The grouped cash flow aggregates carry no accounts under a class.
33
+ const classAccountIds = Object.keys(classAccounts ?? {});
34
+ const nestedAccountIds = getNestedAccountIDHierarchyForAccounts(classAccountIds, accountsMetadata);
38
35
  if (classMetadataPayload != null) {
39
36
  classMetadataWithBalancesPayloads.push({
40
37
  nestedClassId: classId,
41
38
  classMetadata: classMetadataPayload,
42
- classBalances: classPayload,
39
+ classBalances: sectionPayload.classes[eachClassId],
43
40
  nestedAccountIds,
44
41
  });
45
42
  }
@@ -15,16 +15,12 @@ export const updateSectionProjectViewEpic = (actions$) => actions$.pipe(filter(u
15
15
  const accountMetadataWithBalancesPayloads = [];
16
16
  if (sectionPayload.projects != null) {
17
17
  Object.keys(sectionPayload.projects).forEach((projectId) => {
18
- const projectPayload = sectionPayload.projects[projectId];
19
- // A calculated section is grouped by project with no accounts under it.
20
- const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
18
+ const projectAccounts = sectionPayload.projects[projectId].accounts;
21
19
  const projectsViewParentID = {
22
20
  projectId,
23
21
  sectionId,
24
22
  };
25
- if (projectAccounts != null) {
26
- getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
27
- }
23
+ getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
28
24
  });
29
25
  }
30
26
  if (accountMetadataWithBalancesPayloads.length > 0) {
@@ -1,5 +1,5 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
2
+ import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
3
3
  import { clearAll } from '../../rootActions';
4
4
  import { mapAccountMetadataPayloadToAccountMetadata, } from '../account/accountPayload';
5
5
  import { getNestedAccountIDHierarchyForAccounts } from '../sectionAccountsView/getNestedAccountIDHierarchyForSection';
@@ -31,11 +31,10 @@ const sectionProjectView = createSlice({
31
31
  const accountsMetadata = accountsMetadataPayload.map((eachAccount) => mapAccountMetadataPayloadToAccountMetadata(eachAccount));
32
32
  Object.keys(sectionPayload.projects).forEach((projectId) => {
33
33
  const projectPayload = sectionPayload.projects[projectId];
34
- // A calculated section is grouped by project with no accounts under it.
35
- const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
36
- const nestedAccountIds = projectAccounts != null
37
- ? getNestedAccountIDHierarchyForAccounts(Object.keys(projectAccounts), accountsMetadata)
34
+ const projectAccountIds = projectPayload.accounts != null
35
+ ? Object.keys(projectPayload.accounts)
38
36
  : [];
37
+ const nestedAccountIds = getNestedAccountIDHierarchyForAccounts(projectAccountIds, accountsMetadata);
39
38
  updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
40
39
  });
41
40
  }
package/lib/esm/epic.js CHANGED
@@ -58,12 +58,6 @@ import { fetchSkillVersionBodyEpic } from './view/aiCfoView/epics/fetchSkillVers
58
58
  import { fetchSkillVersionsEpic } from './view/aiCfoView/epics/fetchSkillVersionsEpic';
59
59
  import { fetchSkillsEpic, } from './view/aiCfoView/epics/fetchSkillsEpic';
60
60
  import { fetchSuggestedQuestionsEpic, } from './view/aiCfoView/epics/fetchSuggestedQuestionsEpic';
61
- import { deleteRoutineEpic } from './view/aiCfoView/epics/deleteRoutineEpic';
62
- import { fetchRoutineRunsEpic } from './view/aiCfoView/epics/fetchRoutineRunsEpic';
63
- import { fetchRoutinesEpic } from './view/aiCfoView/epics/fetchRoutinesEpic';
64
- import { runRoutineEpic } from './view/aiCfoView/epics/runRoutineEpic';
65
- import { saveRoutineEpic } from './view/aiCfoView/epics/saveRoutineEpic';
66
- import { setRoutineEnabledEpic } from './view/aiCfoView/epics/setRoutineEnabledEpic';
67
61
  import { saveSkillEpic } from './view/aiCfoView/epics/saveSkillEpic';
68
62
  import { setSkillVisibilityEpic } from './view/aiCfoView/epics/setSkillVisibilityEpic';
69
63
  import { stopSubmitEpic, } from './view/aiCfoView/epics/stopSubmitEpic';
@@ -848,7 +842,6 @@ const ALL_EPICS = [
848
842
  deletePersonEpic,
849
843
  deleteRemiApprovalRuleEpic,
850
844
  deleteRemiEpic,
851
- deleteRoutineEpic,
852
845
  deleteScheduleAccruedDetailEpic,
853
846
  deleteScheduleDetailEpic,
854
847
  deleteSkillEpic,
@@ -1173,8 +1166,6 @@ const ALL_EPICS = [
1173
1166
  fetchReviewCompanyViewEpic,
1174
1167
  fetchReviewTransferDetailEpic,
1175
1168
  fetchRewardsPlanEpic,
1176
- fetchRoutineRunsEpic,
1177
- fetchRoutinesEpic,
1178
1169
  fetchScheduleAccruedDetailsEpic,
1179
1170
  fetchScheduleAccruedDetailsPageEpic,
1180
1171
  fetchScheduleDetailsEpic,
@@ -1353,7 +1344,6 @@ const ALL_EPICS = [
1353
1344
  runInvoicingInvoiceActionEpic,
1354
1345
  runInvoicingPaymentActionEpic,
1355
1346
  runInvoicingSubscriptionActionEpic,
1356
- runRoutineEpic,
1357
1347
  saveAccountMappingViewEpic,
1358
1348
  saveAccountSettingsViewEpic,
1359
1349
  saveAPIKeyConnectionEpic,
@@ -1389,7 +1379,6 @@ const ALL_EPICS = [
1389
1379
  saveReasonForAuditRuleEpic,
1390
1380
  saveRemiDetailEpic,
1391
1381
  saveRemiSetupApproverViewUpdatesEpic,
1392
- saveRoutineEpic,
1393
1382
  saveScheduleAccruedDetailsEpic,
1394
1383
  saveScheduleDetailsEpic,
1395
1384
  saveSkillEpic,
@@ -1418,7 +1407,6 @@ const ALL_EPICS = [
1418
1407
  sendOtpEpic,
1419
1408
  sendReferralInviteEpic,
1420
1409
  sessionHeartbeatEpic,
1421
- setRoutineEnabledEpic,
1422
1410
  setSkillVisibilityEpic,
1423
1411
  snoozeTaskEpic,
1424
1412
  startInvoicingQboBackfillEpic,
package/lib/esm/index.js CHANGED
@@ -691,8 +691,8 @@ export { updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccoun
691
691
  export { getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
692
692
  export { cancelAiAccountantOnboarding, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
693
693
  export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
694
- export { acceptMasterTOS, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, clearSkillDetail, clearSkillMutation, closeRoutineRuns, closeRoutinesBrowser, closeSkillsBrowser, createSession, createSessionAndSubmit, deleteChatSession, deleteRoutine, deleteSkill, fetchChatHistory, fetchChatSessionsForUser, fetchRoutineRuns, fetchRoutines, fetchSkillDetail, fetchSkills, fetchSkillsFailure, fetchSkillsSuccess, fetchSkillVersionBody, fetchSkillVersions, fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, openRoutinesBrowser, openSkillsBrowser, runRoutine, saveRoutine, saveSkill, setRoutineEnabled, setSession, setSkillVisibility, stopSubmit, stopSubmitQuestion, submitFeedback, submitQuestion, updateAiCfoViewScrollPosition, updateCotCollapsedState, updateCurrentInput, updateResponseState, } from './view/aiCfoView/aiCfoViewReducer';
695
- export { canCreateRoutine, getAiCfoView, getRoutineMutation, getRoutineRuns, getRoutines, getRoutinesEnabled, getSkillDetail, getSkillMutation, getSkills, getSkillsEnabled, getSkillVersionBody, getSkillVersions, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
694
+ export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, setSession, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, submitFeedback, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, fetchSkillDetail, clearSkillDetail, clearSkillMutation, deleteSkill, fetchSkillVersionBody, fetchSkillVersions, saveSkill, setSkillVisibility, openSkillsBrowser, closeSkillsBrowser, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
695
+ export { getAiCfoView, getSuggestedQuestionsForPageContext, getSkills, getSkillDetail, getSkillMutation, getSkillVersionBody, getSkillVersions, getSkillsEnabled, } from './view/aiCfoView/aiCfoViewSelector';
696
696
  export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
697
697
  export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, } from './entity/aiCfo/aiCfoSelector';
698
698
  export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';