@zeniai/client-epic-state 4.19.66 → 4.19.67-betaAS2

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 (59) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  3. package/lib/entity/account/accountState.d.ts +1 -1
  4. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  5. package/lib/entity/class/classReducer.d.ts +4 -4
  6. package/lib/entity/class/classState.d.ts +1 -1
  7. package/lib/entity/company/companyPayload.d.ts +11 -11
  8. package/lib/entity/company/companyPayload.js +19 -19
  9. package/lib/entity/company/companyStateTypes.d.ts +11 -11
  10. package/lib/entity/forecast/forecastState.d.ts +1 -1
  11. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  12. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  13. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  14. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  15. package/lib/esm/entity/company/companyPayload.js +19 -19
  16. package/lib/esm/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +3 -0
  17. package/lib/esm/view/companyView/types/companyPassport/companyPassportLocalData.js +12 -0
  18. package/lib/esm/view/companyView/types/companyPassportViewPayload.js +55 -12
  19. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -3
  20. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +17 -3
  21. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
  22. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +2 -1
  23. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +2 -0
  24. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -2
  25. package/lib/esm/view/spendManagement/commonSetup/setupViewState.js +2 -2
  26. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  27. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  28. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  29. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  30. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  31. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  32. package/lib/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +3 -0
  33. package/lib/view/companyView/types/companyPassport/companyDetailsLocalData.d.ts +12 -0
  34. package/lib/view/companyView/types/companyPassport/companyPassportLocalData.js +12 -0
  35. package/lib/view/companyView/types/companyPassportViewPayload.d.ts +1 -1
  36. package/lib/view/companyView/types/companyPassportViewPayload.js +55 -12
  37. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  38. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  39. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  40. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -0
  41. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -2
  42. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  43. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  44. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +2 -1
  45. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +17 -3
  46. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
  47. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +3 -1
  48. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +2 -0
  49. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +2 -1
  50. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +1 -0
  51. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +2 -0
  52. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -2
  53. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
  54. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -1
  55. package/lib/view/spendManagement/commonSetup/setupViewState.js +1 -1
  56. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
  57. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  58. package/lib/view/topEx/topExSelector.d.ts +1 -1
  59. package/package.json +1 -1
@@ -36,6 +36,25 @@ const toCompanyInfo = (payload, companyIdTenantIdMapping, companyInStore) => {
36
36
  phone: payload.phone ?? undefined,
37
37
  firstMonthOfFY: (0, timePeriod_1.getMonthFromMonthName)(payload.first_month_of_fiscal_year) ?? 1,
38
38
  sourceOfFunds: payload.source_of_funds ?? undefined,
39
+ companySourceOfFunds: payload.company_source_of_funds ?? undefined,
40
+ companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
41
+ countriesOfOperations: payload.company_countries_of_operations ?? undefined,
42
+ transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
43
+ transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
44
+ purposeOfAccount: payload.company_purpose_of_account ?? undefined,
45
+ purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
46
+ regulatedStatus: payload.company_regulated_states == null
47
+ ? undefined
48
+ : payload.company_regulated_states
49
+ ? 'yes'
50
+ : 'no',
51
+ regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
52
+ usNexus: payload.company_us_nexus == null
53
+ ? undefined
54
+ : payload.company_us_nexus
55
+ ? 'yes'
56
+ : 'no',
57
+ usNexusTypes: payload.company_us_nexus_desc ?? undefined,
39
58
  };
40
59
  };
41
60
  const toCompanyLocaleInfo = (payload) => ({
@@ -57,25 +76,6 @@ const toCompanyIncInfo = (payload) => ({
57
76
  companyIncCountryCode: payload.company_inc_country_code ?? undefined,
58
77
  fileIds: payload.file_ids ?? [],
59
78
  companySubIndustry: payload.company_industry_sub_type ?? undefined,
60
- countriesOfOperations: payload.company_countries_of_operations ?? undefined,
61
- companySourceOfFunds: payload.company_source_of_funds ?? undefined,
62
- companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
63
- transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
64
- transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
65
- purposeOfAccount: payload.company_purpose_of_account ?? undefined,
66
- purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
67
- regulatedStatus: payload.company_regulated_states === true
68
- ? 'yes'
69
- : payload.company_regulated_states === false
70
- ? 'no'
71
- : undefined,
72
- regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
73
- usNexus: payload.company_us_nexus === true
74
- ? 'yes'
75
- : payload.company_us_nexus === false
76
- ? 'no'
77
- : undefined,
78
- usNexusTypes: payload.company_us_nexus_desc ?? undefined,
79
79
  });
80
80
  const toCompanyTaxInfo = (payload) => ({
81
81
  taxesFiledDate: payload.taxes_filed_date != null
@@ -27,12 +27,23 @@ export interface CompanyInfo {
27
27
  bookCloseDate?: ZeniDate;
28
28
  companyDescription?: string;
29
29
  companyLegalName?: string;
30
+ companySourceOfFunds?: string;
31
+ companySourceOfFundsDescription?: string;
30
32
  companyUrl?: ZeniUrl;
33
+ countriesOfOperations?: string[];
31
34
  meetingUrl?: ZeniUrl;
32
35
  phone?: string;
36
+ purposeOfAccount?: string;
37
+ purposeOfAccountDescription?: string;
38
+ regulatedStatus?: string;
39
+ regulatedStatusDescription?: string;
33
40
  sourceOfFunds?: string;
34
41
  syncToken?: string;
35
42
  tenantId?: ID;
43
+ transactionVolume?: string;
44
+ transactionVolumeDescription?: string;
45
+ usNexus?: string;
46
+ usNexusTypes?: string[];
36
47
  }
37
48
  export interface CompanyLocaleInfo {
38
49
  companyIncCountryCode: string;
@@ -50,18 +61,7 @@ export interface CompanyIncInfo {
50
61
  companyIncState?: string;
51
62
  companyIncStateCode?: string;
52
63
  companyIncType?: string;
53
- companySourceOfFunds?: string;
54
- companySourceOfFundsDescription?: string;
55
64
  companySubIndustry?: string;
56
- countriesOfOperations?: string[];
57
- purposeOfAccount?: string;
58
- purposeOfAccountDescription?: string;
59
- regulatedStatus?: string;
60
- regulatedStatusDescription?: string;
61
- transactionVolume?: string;
62
- transactionVolumeDescription?: string;
63
- usNexus?: string;
64
- usNexusTypes?: string[];
65
65
  }
66
66
  export interface CompanyTaxInfo {
67
67
  taxesFiledYears: number[];
@@ -3,7 +3,7 @@ import { TimeframeTick } from '../../commonStateTypes/timeframeTick';
3
3
  import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  export type ForecastType = ReportID;
6
- export declare const toForecastType: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
6
+ export declare const toForecastType: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
7
7
  export interface Forecast {
8
8
  createTime: ZeniDate;
9
9
  forecastPeriod: TimeframeTick;
@@ -10,5 +10,5 @@ export interface SectionAccountsView {
10
10
  sectionId: ID;
11
11
  balancesByPeriod?: COABalanceGroupedByPeriod;
12
12
  }
13
- export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${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}-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_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}-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}-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}-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_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}-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}`;
13
+ export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${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}-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_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}-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}-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_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}`;
14
14
  export type SectionAccountKey = ReturnType<typeof getSectionAccountViewKey>;
@@ -8,5 +8,5 @@ export interface SectionClassesView {
8
8
  sectionId: ID;
9
9
  balancesByPeriod?: COABalanceGroupedByPeriod;
10
10
  }
11
- export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${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}-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_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}-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`;
11
+ export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${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}-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_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`;
12
12
  export type SectionClassesKey = ReturnType<typeof getSectionClassesViewKey>;
@@ -4,9 +4,9 @@ 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" | "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, 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" | "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
8
8
  timeframe: "month" | "year" | "quarter";
9
- reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
9
+ reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
10
10
  sectionId: string;
11
11
  sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
12
12
  classesMetadataPayload: ClassMetadataPayload[];
@@ -39,6 +39,7 @@ export const ALL_REPORT_IDS = [
39
39
  'zeni_accounts_promo_card',
40
40
  'zeni_treasury',
41
41
  'charge_cards',
42
+ 'other_connection',
42
43
  'reimbursement_promo_card',
43
44
  'onboarding',
44
45
  'operating_expenses_by_vendor',
@@ -33,6 +33,25 @@ const toCompanyInfo = (payload, companyIdTenantIdMapping, companyInStore) => {
33
33
  phone: payload.phone ?? undefined,
34
34
  firstMonthOfFY: getMonthFromMonthName(payload.first_month_of_fiscal_year) ?? 1,
35
35
  sourceOfFunds: payload.source_of_funds ?? undefined,
36
+ companySourceOfFunds: payload.company_source_of_funds ?? undefined,
37
+ companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
38
+ countriesOfOperations: payload.company_countries_of_operations ?? undefined,
39
+ transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
40
+ transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
41
+ purposeOfAccount: payload.company_purpose_of_account ?? undefined,
42
+ purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
43
+ regulatedStatus: payload.company_regulated_states == null
44
+ ? undefined
45
+ : payload.company_regulated_states
46
+ ? 'yes'
47
+ : 'no',
48
+ regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
49
+ usNexus: payload.company_us_nexus == null
50
+ ? undefined
51
+ : payload.company_us_nexus
52
+ ? 'yes'
53
+ : 'no',
54
+ usNexusTypes: payload.company_us_nexus_desc ?? undefined,
36
55
  };
37
56
  };
38
57
  const toCompanyLocaleInfo = (payload) => ({
@@ -54,25 +73,6 @@ const toCompanyIncInfo = (payload) => ({
54
73
  companyIncCountryCode: payload.company_inc_country_code ?? undefined,
55
74
  fileIds: payload.file_ids ?? [],
56
75
  companySubIndustry: payload.company_industry_sub_type ?? undefined,
57
- countriesOfOperations: payload.company_countries_of_operations ?? undefined,
58
- companySourceOfFunds: payload.company_source_of_funds ?? undefined,
59
- companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
60
- transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
61
- transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
62
- purposeOfAccount: payload.company_purpose_of_account ?? undefined,
63
- purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
64
- regulatedStatus: payload.company_regulated_states === true
65
- ? 'yes'
66
- : payload.company_regulated_states === false
67
- ? 'no'
68
- : undefined,
69
- regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
70
- usNexus: payload.company_us_nexus === true
71
- ? 'yes'
72
- : payload.company_us_nexus === false
73
- ? 'no'
74
- : undefined,
75
- usNexusTypes: payload.company_us_nexus_desc ?? undefined,
76
76
  });
77
77
  const toCompanyTaxInfo = (payload) => ({
78
78
  taxesFiledDate: payload.taxes_filed_date != null
@@ -12,6 +12,9 @@ export const updateCompanyDetailsEpic = (actions$, state$, zeniAPI) => actions$.
12
12
  ...toCompanyIncInfoUpdatableInfoPayload(companyDetails.incInfo),
13
13
  ...toCompanyTaxInfoUpdatableInfoPayload(companyDetails.taxDetails),
14
14
  ...toCompanyFileInfoPayload(companyDetails.incInfo, companyDetails.taxDetails),
15
+ ...(companyDetails.companyInfo.companySubIndustry != null && {
16
+ company_industry_sub_type: companyDetails.companyInfo.companySubIndustry,
17
+ }),
15
18
  };
16
19
  const { newAddressState } = state$.value.addressViewState;
17
20
  const addressToCreate = newAddressState?.company_address?.addressToCreate;
@@ -10,9 +10,21 @@ export function toCompanyPassportLocalData(companyView, companyFiles) {
10
10
  website: companyInfo.companyUrl,
11
11
  meetingLink: companyInfo.meetingUrl,
12
12
  industry: companyQuestionaire.companyIndustry,
13
+ companySubIndustry: incInfo.companySubIndustry,
13
14
  businessModel: companyQuestionaire.companyBusinessModel ?? '',
14
15
  phone: companyInfo.phone ?? '',
15
16
  firstMonthOfFY: companyInfo.firstMonthOfFY,
17
+ companySourceOfFunds: companyInfo.companySourceOfFunds,
18
+ companySourceOfFundsDescription: companyInfo.companySourceOfFundsDescription,
19
+ countriesOfOperations: companyInfo.countriesOfOperations,
20
+ transactionVolume: companyInfo.transactionVolume,
21
+ transactionVolumeDescription: companyInfo.transactionVolumeDescription,
22
+ purposeOfAccount: companyInfo.purposeOfAccount,
23
+ purposeOfAccountDescription: companyInfo.purposeOfAccountDescription,
24
+ regulatedStatus: companyInfo.regulatedStatus,
25
+ regulatedStatusDescription: companyInfo.regulatedStatusDescription,
26
+ usNexus: companyInfo.usNexus,
27
+ usNexusTypes: companyInfo.usNexusTypes,
16
28
  },
17
29
  incInfo: {
18
30
  typeOfInc: incInfo.companyIncType ?? '',
@@ -1,16 +1,59 @@
1
- export const toCompanyUpdatableInfoPayload = (info) => {
2
- const payload = {
3
- name: info.companyName,
4
- company_legal_name: info.legalName,
5
- phone: info.phone,
6
- company_industry: info.industry,
7
- company_business_model: info.businessModel,
8
- company_url: info.website != null ? info.website.toString() : null,
9
- meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
10
- is_new_company_industry_verified: true,
11
- };
12
- return payload;
1
+ /** Maps US nexus display label to API key (for company_us_nexus_desc) */
2
+ const US_NEXUS_LABEL_TO_KEY = {
3
+ Employees: 'employees',
4
+ Customers: 'customers',
5
+ 'Physical office or facility': 'physical_office',
6
+ 'Banking relationships': 'banking_relationships',
13
7
  };
8
+ function toUsNexusTypeKey(value) {
9
+ const key = US_NEXUS_LABEL_TO_KEY[value];
10
+ return key ?? value;
11
+ }
12
+ export const toCompanyUpdatableInfoPayload = (info) => ({
13
+ name: info.companyName,
14
+ company_legal_name: info.legalName,
15
+ phone: info.phone,
16
+ company_industry: info.industry,
17
+ company_business_model: info.businessModel,
18
+ company_url: info.website != null ? info.website.toString() : null,
19
+ meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
20
+ is_new_company_industry_verified: true,
21
+ ...(info.companySourceOfFunds != null && {
22
+ company_source_of_funds: info.companySourceOfFunds,
23
+ }),
24
+ ...(info.companySourceOfFundsDescription != null && {
25
+ company_source_of_funds_desc: info.companySourceOfFundsDescription,
26
+ }),
27
+ ...(info.countriesOfOperations != null &&
28
+ info.countriesOfOperations.length > 0 && {
29
+ company_countries_of_operations: info.countriesOfOperations,
30
+ }),
31
+ ...(info.transactionVolume != null && {
32
+ company_transaction_vol_expectations: info.transactionVolume,
33
+ }),
34
+ ...(info.transactionVolumeDescription != null && {
35
+ company_transaction_vol_expectations_desc: info.transactionVolumeDescription,
36
+ }),
37
+ ...(info.purposeOfAccount != null && {
38
+ company_purpose_of_account: info.purposeOfAccount,
39
+ }),
40
+ ...(info.purposeOfAccountDescription != null && {
41
+ company_purpose_of_account_desc: info.purposeOfAccountDescription,
42
+ }),
43
+ ...(info.regulatedStatus != null && {
44
+ company_regulated_states: info.regulatedStatus === 'yes',
45
+ }),
46
+ ...(info.regulatedStatusDescription != null && {
47
+ company_regulated_states_desc: info.regulatedStatusDescription,
48
+ }),
49
+ ...(info.usNexus != null && {
50
+ company_us_nexus: info.usNexus === 'yes',
51
+ }),
52
+ ...(info.usNexusTypes != null &&
53
+ info.usNexusTypes.length > 0 && {
54
+ company_us_nexus_desc: info.usNexusTypes.map(toUsNexusTypeKey),
55
+ }),
56
+ });
14
57
  export const toCompanyIncInfoUpdatableInfoPayload = (info) => {
15
58
  const payload = {
16
59
  company_inc_type: info.typeOfInc,
@@ -218,13 +218,13 @@ export const onboardingStepsData = (isValidConnection, productSettings, accounti
218
218
  requiredStepsData: requiredStepsData.map((step) => toOnboardingStepType(step)),
219
219
  };
220
220
  };
221
- function isCompanyDetailsSavePending(fileState, company, primaryContact, companyDetailsLocalData) {
221
+ export function isCompanyDetailsSavePending(fileState, company, primaryContact, companyDetailsLocalData) {
222
222
  if (company == null || companyDetailsLocalData == null) {
223
223
  return false;
224
224
  }
225
225
  const { companyInfo, incInfo, taxInfo, questionaire } = company.company.company;
226
- const { companyDescription, companyLegalName, companyUrl, phone } = companyInfo;
227
- const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySourceOfFunds, companySourceOfFundsDescription, companySubIndustry, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
226
+ const { companyDescription, companyLegalName, companyUrl, phone, companySourceOfFunds, companySourceOfFundsDescription, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = companyInfo;
227
+ const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySubIndustry, } = incInfo;
228
228
  const { companyIndustry } = questionaire;
229
229
  const { taxId } = taxInfo;
230
230
  const companyFileIds = getFilesByFileIds(fileState, fileIds).map((file) => file.fileId);
@@ -8,6 +8,8 @@ export const initialState = {
8
8
  attributes: [],
9
9
  fetchStatus: { fetchState: 'Not-Started', error: undefined },
10
10
  },
11
+ affectedEntityIds: undefined,
12
+ approvalRuleIdBeingUpdated: undefined,
11
13
  approvalRuleIds: [],
12
14
  approvalRulesDeleteStatusById: {},
13
15
  billPaySetupApproverViewUpdateData: undefined,
@@ -149,11 +151,16 @@ const billPaySetupApproverView = createSlice({
149
151
  fetchState: 'In-Progress',
150
152
  error: undefined,
151
153
  };
154
+ if (draft.billPaySetupApproverViewUpdateData.type === 'approval_update' &&
155
+ draft.billPaySetupApproverViewUpdateData.data != null) {
156
+ draft.approvalRuleIdBeingUpdated = draft.billPaySetupApproverViewUpdateData
157
+ .data.approvalRuleId;
158
+ }
152
159
  }
153
160
  },
154
161
  saveBillPaySetupApproverViewUpdatesSuccess: {
155
162
  reducer(draft, action) {
156
- const { approvalRuleIds } = action.payload;
163
+ const { approvalRuleIds, affectedEntityIds } = action.payload;
157
164
  if (draft.billPaySetupApproverViewUpdateData != null) {
158
165
  if (draft.billPaySetupApproverViewUpdateData.type ===
159
166
  'approval_update' &&
@@ -167,16 +174,19 @@ const billPaySetupApproverView = createSlice({
167
174
  };
168
175
  }
169
176
  draft.approvalRuleIds = approvalRuleIds;
177
+ draft.affectedEntityIds = affectedEntityIds;
178
+ // Keep approvalRuleIdBeingUpdated set until Pusher fires so the list can show that rule disabled
170
179
  },
171
- prepare(approvalRuleIds) {
180
+ prepare(approvalRuleIds, affectedEntityIds) {
172
181
  return {
173
- payload: { approvalRuleIds },
182
+ payload: { approvalRuleIds, affectedEntityIds },
174
183
  };
175
184
  },
176
185
  },
177
186
  saveBillPaySetupApproverViewUpdatesFailure: {
178
187
  reducer(draft, action) {
179
188
  const { status } = action.payload;
189
+ draft.approvalRuleIdBeingUpdated = undefined;
180
190
  if (draft.billPaySetupApproverViewUpdateData != null) {
181
191
  draft.billPaySetupApproverViewUpdateData.updateStatus = {
182
192
  fetchState: 'Error',
@@ -223,6 +233,10 @@ const billPaySetupApproverView = createSlice({
223
233
  },
224
234
  setListeningToPusherEvent(draft, action) {
225
235
  draft.listeningToPusherEvent = action.payload;
236
+ if (action.payload === false) {
237
+ draft.affectedEntityIds = undefined;
238
+ draft.approvalRuleIdBeingUpdated = undefined;
239
+ }
226
240
  },
227
241
  clearBillPaySetupApproverViewUpdateData(draft) {
228
242
  if (draft.billPaySetupApproverViewUpdateData != null) {
@@ -6,7 +6,7 @@ import { getClassesByIds } from '../../../../entity/class/classSelector';
6
6
  import { getUserByUserId } from '../../../../entity/user/userSelector';
7
7
  import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
8
8
  export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
9
- const { approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
9
+ const { approvalRuleIdBeingUpdated, approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
10
10
  const deleteStateList = Object.values(approvalRulesDeleteStatusById);
11
11
  const approvalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
12
12
  const allApprovalRules = approvalRules.map((approvalRule) => {
@@ -36,6 +36,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
36
36
  };
37
37
  return {
38
38
  allApprovalRules,
39
+ approvalRuleIdBeingUpdated,
39
40
  deleteStatus: reduceAnyFetchState(deleteStateList),
40
41
  approvalRulesStatus,
41
42
  fetchState,
@@ -44,7 +45,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
44
45
  };
45
46
  });
46
47
  export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
47
- const { approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
48
+ const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
48
49
  const { approverIds, attributes } = approverListState;
49
50
  const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
50
51
  const allApprovers = approverIds
@@ -84,6 +85,7 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
84
85
  reportId: 'class_list',
85
86
  });
86
87
  return {
88
+ affectedEntityIds,
87
89
  allApprovalRules,
88
90
  allApprovers,
89
91
  filteredApprovers,
@@ -17,6 +17,7 @@ export const saveBillPaySetupApproverViewUpdatesEpic = (actions$, state$, zeniAP
17
17
  .pipe(mergeMap((response) => {
18
18
  if (isSuccessResponse(response) && response.data != null) {
19
19
  const approvalRuleIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
20
+ const affectedEntityIds = response.data.affected_entity_ids ?? [];
20
21
  const actions = [
21
22
  updateAllUsers({ users: response.data.users }),
22
23
  updateApprovalRules(response.data.approval_rules),
@@ -25,7 +26,7 @@ export const saveBillPaySetupApproverViewUpdatesEpic = (actions$, state$, zeniAP
25
26
  messageText: 'success',
26
27
  type: 'success',
27
28
  }),
28
- saveBillPaySetupApproverViewUpdatesSuccess(approvalRuleIds),
29
+ saveBillPaySetupApproverViewUpdatesSuccess(approvalRuleIds, affectedEntityIds),
29
30
  ];
30
31
  return from(actions);
31
32
  }
@@ -321,6 +321,8 @@ const getBusinessVerificationForFeature = (setupViewType) => {
321
321
  return 'bill_pay';
322
322
  case 'zeni_treasury':
323
323
  return 'treasury_accounts';
324
+ case 'other_connection':
325
+ return 'other_connection';
324
326
  //whenever a new setup view type is added, add the corresponding feature here
325
327
  case 'billing':
326
328
  console.warn(`Invalid type for setup view`);
@@ -43,9 +43,9 @@ export const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.
43
43
  */
44
44
  export function toSetupViewLocalData(company, users, userRoles, primaryContact) {
45
45
  const { companyInfo, incInfo, taxInfo, questionaire, companyBillPayInfo } = company;
46
- const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, } = companyInfo;
46
+ const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, companySourceOfFunds: incCompanySourceOfFunds, companySourceOfFundsDescription, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = companyInfo;
47
47
  const { usersSelectedForVerification: usersSelected } = companyBillPayInfo;
48
- const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, countriesOfOperations, companySourceOfFunds: incCompanySourceOfFunds, companySourceOfFundsDescription, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
48
+ const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, } = incInfo;
49
49
  const { companyIndustry } = questionaire;
50
50
  const { taxId } = taxInfo;
51
51
  const companyDetails = {
@@ -1,9 +1,9 @@
1
1
  import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- import { ALL_ENTITY_TYPES } from '../../../entity/entityApprovalStatus/entityApprovalStatusState';
2
+ import { ALL_ENTITY_TYPES_WITH_OTHER_CONNECTION } from '../../../entity/entityApprovalStatus/entityApprovalStatusState';
3
3
  const SETUP_VIEW_TYPES = ['billing'];
4
4
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
5
  const toSetupViewType = (v) => stringToUnion(v, [
6
- ...ALL_ENTITY_TYPES,
6
+ ...ALL_ENTITY_TYPES_WITH_OTHER_CONNECTION,
7
7
  ...SETUP_VIEW_TYPES,
8
8
  ...CHARGE_CARD_SETUP_VIEW_TYPES,
9
9
  ]);
@@ -5,7 +5,7 @@ import { ZeniDate } from '../../zeniDayJS';
5
5
  import { AuditSummary } from '../reviewCompanyView/reviewCompanyViewState';
6
6
  export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "reports" | "transactions";
7
7
  export type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
8
- declare const toAuditRuleEntityIdType: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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" | "uncategorized-expense" | "uncategorized-income";
8
+ declare const toAuditRuleEntityIdType: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "uncategorized-expense" | "uncategorized-income";
9
9
  export type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
10
10
  export declare const toAuditRuleTypeIdType: (v: string) => "accounting" | "business";
11
11
  type AuditRuleTypeIdType = ReturnType<typeof toAuditRuleTypeIdType>;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getBillPayCardReport: (state: RootState) => {
3
- reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
3
+ reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getCardBalance: (state: RootState) => {
3
- reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
3
+ reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getCashBalance: (state: RootState) => {
3
- reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
3
+ reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
15
15
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
16
16
  dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
17
17
  availableNumberOfPeriods: number | undefined;
18
- reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
18
+ reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
19
19
  reportTitle: string;
20
20
  version: string | number | undefined;
21
21
  status: import("../..").Status | undefined;