@zeniai/client-epic-state 4.11.48 → 4.11.50

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 (69) hide show
  1. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  2. package/lib/entity/company/companyPayload.d.ts +12 -0
  3. package/lib/entity/company/companyPayload.js +21 -0
  4. package/lib/entity/company/companyReducer.d.ts +7 -0
  5. package/lib/entity/company/companyReducer.js +22 -2
  6. package/lib/entity/company/companyStateTypes.d.ts +12 -0
  7. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  8. package/lib/entity/paymentAccount/paymentAccountPayload.d.ts +2 -0
  9. package/lib/entity/paymentAccount/paymentAccountPayload.js +2 -0
  10. package/lib/entity/paymentAccount/paymentAccountState.d.ts +2 -0
  11. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  12. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +1 -2
  13. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +3 -11
  14. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  15. package/lib/index.d.ts +6 -6
  16. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  17. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  18. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  19. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  20. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  21. package/lib/view/onboardingView/customerView/epic/plaidConnection/establishOnboardingPlaidConnectionEpic.js +2 -0
  22. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  23. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  24. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  25. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  26. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  27. package/lib/view/referralView/referralState.d.ts +1 -1
  28. package/lib/view/reviewCompanyView/reviewCompanyViewSelector.js +45 -41
  29. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  30. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.d.ts +6 -4
  31. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.js +29 -6
  32. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  33. package/lib/view/settingsView/settingsViewReducer.d.ts +3 -1
  34. package/lib/view/settingsView/settingsViewReducer.js +11 -2
  35. package/lib/view/settingsView/settingsViewSelector.d.ts +1 -1
  36. package/lib/view/settingsView/settingsViewSelector.js +56 -7
  37. package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +10 -2
  38. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -3
  39. package/lib/view/spendManagement/billPay/billPaySetupView/billPaySetupViewSelector.js +1 -1
  40. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.d.ts +4 -1
  41. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.js +16 -4
  42. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +15 -12
  43. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts +2 -2
  44. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +6 -6
  45. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.d.ts +1 -2
  46. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +1 -1
  47. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.d.ts +4 -1
  48. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.js +16 -4
  49. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -0
  50. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +47 -31
  51. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updateMappedCashAccountEpic.js +4 -5
  52. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountEpic.js +1 -2
  53. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +1 -2
  54. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePrimaryFundingAccountEpic.js +34 -12
  55. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +2 -1
  56. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +52 -16
  57. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/getPlaidLinkTokenEpic.js +1 -1
  58. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +21 -27
  59. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +47 -74
  60. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +3 -8
  61. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.js +6 -3
  62. package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/fetchRemiSetupViewEpic.js +6 -19
  63. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +2 -2
  64. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.d.ts +4 -1
  65. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.js +20 -9
  66. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/zeniAccountSetupViewSelector.js +1 -1
  67. package/lib/view/tagView/epics/createTagEpic.d.ts +6 -6
  68. package/lib/view/tagView/epics/deleteTagEpic.d.ts +6 -6
  69. package/package.json +1 -1
@@ -18,7 +18,7 @@ export declare const deletePersonEpic: (actions$: ActionsObservable<ActionType>,
18
18
  type: string;
19
19
  } | {
20
20
  payload: {
21
- messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
21
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
22
22
  messageText: "failed" | "success" | "notification";
23
23
  type: import("../..").SnackbarMessageType;
24
24
  showStatusIcon?: boolean | undefined;
@@ -35,7 +35,7 @@ export declare const invitePeopleEpic: (actions$: ActionsObservable<ActionType>,
35
35
  type: string;
36
36
  } | {
37
37
  payload: {
38
- messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
38
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
39
39
  messageText: "failed" | "success" | "notification";
40
40
  type: import("../..").SnackbarMessageType;
41
41
  showStatusIcon?: boolean | undefined;
@@ -32,7 +32,7 @@ export declare const inviteZeniPeopleEpic: (actions$: ActionsObservable<ActionTy
32
32
  type: string;
33
33
  } | {
34
34
  payload: {
35
- messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
35
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
36
36
  messageText: "failed" | "success" | "notification";
37
37
  type: import("../..").SnackbarMessageType;
38
38
  showStatusIcon?: boolean | undefined;
@@ -13,7 +13,7 @@ export declare const resendInviteEpic: (actions$: ActionsObservable<ActionType>,
13
13
  type: string;
14
14
  } | {
15
15
  payload: {
16
- messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
16
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
17
17
  messageText: "failed" | "success" | "notification";
18
18
  type: import("../..").SnackbarMessageType;
19
19
  showStatusIcon?: boolean | undefined;
@@ -46,7 +46,7 @@ export declare const REFERRAL_LIST_VIEW_SORT_KEYS: readonly ["invitee_email", "a
46
46
  export declare const toReferralListViewSortKeyType: (v: string) => "status" | "amount" | "invitee_email" | "referral_date";
47
47
  export declare type ReferralListViewSortKey = ReturnType<typeof toReferralListViewSortKeyType>;
48
48
  export declare const ALL_REFERRAL_STATUSES: readonly ["invite_processing", "invite_sent", "onboarding", "active", "declined", "resend_invite", "reward_sent"];
49
- export declare const toReferralStatusType: (v: string) => "active" | "onboarding" | "declined" | "invite_processing" | "invite_sent" | "resend_invite" | "reward_sent";
49
+ export declare const toReferralStatusType: (v: string) => "active" | "onboarding" | "invite_processing" | "invite_sent" | "declined" | "resend_invite" | "reward_sent";
50
50
  export declare type ReferralStatus = ReturnType<typeof toReferralStatusType>;
51
51
  export declare const StatusTypes: Record<ReferralStatus, string>;
52
52
  export declare const ALL_REFERRAL_AMOUNT_STATUSES: readonly ["received", "to_be_received"];
@@ -69,47 +69,51 @@ exports.getReviewCompanySelectorView = (0, toolkit_1.createSelector)((state) =>
69
69
  }
70
70
  });
71
71
  const sortOrderValue = (0, sortOrderPayload_1.getSortOrder)(sortOrder);
72
- const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (sortKey === 'auditScore') ? ['auditSummary.auditScorePercentage', 'auditSummary.fixesRequired'] : (company) => {
73
- var _a;
74
- const warningCount = (0, exports.getAuditWarningsCount)(company);
75
- let primarySortValue;
76
- let secondarySortValue;
77
- let isSecondarySortApplicable;
78
- switch (sortKey) {
79
- case 'notes':
80
- primarySortValue = (_a = company.note) === null || _a === void 0 ? void 0 : _a.toLowerCase();
81
- break;
82
- case 'uncategorized':
83
- isSecondarySortApplicable = true;
84
- primarySortValue = company.uncategorizedTransactions.income ? 1 : 0;
85
- secondarySortValue = company.uncategorizedTransactions.expense
86
- ? 1
87
- : 0;
88
- break;
89
- case 'miscategorized':
90
- isSecondarySortApplicable = true;
91
- primarySortValue = company.miscategorizedTransactions.income
92
- ? 1
93
- : 0;
94
- secondarySortValue = company.miscategorizedTransactions.expense
95
- ? 1
96
- : 0;
97
- break;
98
- case 'warnings':
99
- primarySortValue = warningCount;
100
- break;
101
- case 'reviewVendor':
102
- primarySortValue = company.isVendorReviewReqiured;
103
- break;
104
- case 'companyName':
105
- default:
106
- primarySortValue = company.name.toLowerCase();
107
- break;
108
- }
109
- return isSecondarySortApplicable === true
110
- ? [primarySortValue, secondarySortValue]
111
- : primarySortValue;
112
- }, [sortOrderValue, sortOrderValue]);
72
+ const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, sortKey === 'auditScore'
73
+ ? ['auditSummary.auditScorePercentage', 'auditSummary.fixesRequired']
74
+ : (company) => {
75
+ var _a;
76
+ const warningCount = (0, exports.getAuditWarningsCount)(company);
77
+ let primarySortValue;
78
+ let secondarySortValue;
79
+ let isSecondarySortApplicable;
80
+ switch (sortKey) {
81
+ case 'notes':
82
+ primarySortValue = (_a = company.note) === null || _a === void 0 ? void 0 : _a.toLowerCase();
83
+ break;
84
+ case 'uncategorized':
85
+ isSecondarySortApplicable = true;
86
+ primarySortValue = company.uncategorizedTransactions.income
87
+ ? 1
88
+ : 0;
89
+ secondarySortValue = company.uncategorizedTransactions.expense
90
+ ? 1
91
+ : 0;
92
+ break;
93
+ case 'miscategorized':
94
+ isSecondarySortApplicable = true;
95
+ primarySortValue = company.miscategorizedTransactions.income
96
+ ? 1
97
+ : 0;
98
+ secondarySortValue = company.miscategorizedTransactions.expense
99
+ ? 1
100
+ : 0;
101
+ break;
102
+ case 'warnings':
103
+ primarySortValue = warningCount;
104
+ break;
105
+ case 'reviewVendor':
106
+ primarySortValue = company.isVendorReviewReqiured;
107
+ break;
108
+ case 'companyName':
109
+ default:
110
+ primarySortValue = company.name.toLowerCase();
111
+ break;
112
+ }
113
+ return isSecondarySortApplicable === true
114
+ ? [primarySortValue, secondarySortValue]
115
+ : primarySortValue;
116
+ }, [sortOrderValue, sortOrderValue]);
113
117
  return {
114
118
  companies: [
115
119
  ...sortedCompaniesWithSortKeyValue,
@@ -10,7 +10,7 @@ export declare const ALL_SCHEDULES_SUB_TABS: readonly ["all", "new", "ongoing",
10
10
  export declare const toScheduleSubTabType: (v: string) => "all" | "new" | "completed" | "ongoing";
11
11
  export declare type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
12
12
  export declare const ALL_SCHEDULES_PAY_SORT_KEYS: readonly ["transactionDate", "vendor", "scheduleCategory", "expenseCategory", "accumulatedDepreciationCategory", "class", "amount", "balanceAsOfToday", "memo", "startMonth", "endMonth", "months", "transactionType", "status", "assetId", "user"];
13
- export declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "memo" | "transactionDate" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "balanceAsOfToday" | "startMonth" | "endMonth" | "transactionType" | "assetId";
13
+ export declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "memo" | "transactionDate" | "transactionType" | "balanceAsOfToday" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth" | "assetId";
14
14
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
15
15
  export interface DownloadJEScheduleTabOptions {
16
16
  timezone: string;
@@ -1,6 +1,8 @@
1
- import { ActionsObservable } from 'redux-observable';
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
3
4
  import { fetchBankConnectionsView, fetchBankAccountsList } from '../settingsViewReducer';
4
- import { getPaymentAccounts } from '../../spendManagement/plaidAccount/plaidAccountViewReducer';
5
- export declare type ActionType = ReturnType<typeof fetchBankConnectionsView> | ReturnType<typeof fetchBankAccountsList> | ReturnType<typeof getPaymentAccounts>;
6
- export declare const fetchBankConnectionsViewEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
5
+ import { fetchPaymentAccountList } from '../../spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer';
6
+ import { fetchDepositAccountList } from '../../spendManagement/zeniAccounts/depositAccountList/depositAccountListReducer';
7
+ export declare type ActionType = ReturnType<typeof fetchBankConnectionsView> | ReturnType<typeof fetchBankAccountsList> | ReturnType<typeof fetchPaymentAccountList> | ReturnType<typeof fetchDepositAccountList>;
8
+ export declare const fetchBankConnectionsViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -4,11 +4,34 @@ exports.fetchBankConnectionsViewEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const settingsViewReducer_1 = require("../settingsViewReducer");
7
- const plaidAccountViewReducer_1 = require("../../spendManagement/plaidAccount/plaidAccountViewReducer");
8
- const fetchBankConnectionsViewEpic = (actions$) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.fetchBankConnectionsView.match), (0, operators_1.switchMap)(() => {
9
- return (0, rxjs_1.from)([
10
- (0, settingsViewReducer_1.fetchBankAccountsList)(),
11
- (0, plaidAccountViewReducer_1.getPaymentAccounts)('bill_pay', 'spend_management_setup', false),
12
- ]);
7
+ const paymentAccountListReducer_1 = require("../../spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer");
8
+ const depositAccountListReducer_1 = require("../../spendManagement/zeniAccounts/depositAccountList/depositAccountListReducer");
9
+ const fetchBankConnectionsViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.fetchBankConnectionsView.match), (0, operators_1.mergeMap)((action) => {
10
+ const { cacheOverride } = action.payload;
11
+ const bankConnectionActions = [];
12
+ const state = state$.value;
13
+ if (cacheOverride === true) {
14
+ bankConnectionActions.push((0, settingsViewReducer_1.fetchBankAccountsList)());
15
+ bankConnectionActions.push((0, paymentAccountListReducer_1.fetchPaymentAccountList)());
16
+ bankConnectionActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
17
+ }
18
+ else {
19
+ const bankAccountsList = state.settingsViewState.bankConnection;
20
+ if (bankAccountsList.fetchState !== 'Completed' &&
21
+ bankAccountsList.fetchState !== 'In-Progress') {
22
+ bankConnectionActions.push((0, settingsViewReducer_1.fetchBankAccountsList)());
23
+ }
24
+ const paymentAccountList = state.paymentAccountListState;
25
+ if (paymentAccountList.hasValidState() === false &&
26
+ paymentAccountList.fetchState !== 'In-Progress') {
27
+ bankConnectionActions.push((0, paymentAccountListReducer_1.fetchPaymentAccountList)());
28
+ }
29
+ const depositAccountList = state.depositAccountListState;
30
+ if (depositAccountList.hasValidState() === false &&
31
+ depositAccountList.fetchState !== 'In-Progress') {
32
+ bankConnectionActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
33
+ }
34
+ }
35
+ return (0, rxjs_1.concat)((0, rxjs_1.from)(bankConnectionActions));
13
36
  }));
14
37
  exports.fetchBankConnectionsViewEpic = fetchBankConnectionsViewEpic;
@@ -18,7 +18,7 @@ export declare const saveNotificationSettingsEpic: (actions$: ActionsObservable<
18
18
  type: string;
19
19
  } | {
20
20
  payload: {
21
- messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
21
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
22
22
  messageText: "failed" | "success" | "notification";
23
23
  type: import("../../..").SnackbarMessageType;
24
24
  showStatusIcon?: boolean | undefined;
@@ -11,7 +11,9 @@ export declare const fetchMyProfileView: import("@reduxjs/toolkit").ActionCreato
11
11
  companyId: string;
12
12
  }, string, never, never>, updateMyProfileOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string], {
13
13
  userId: string;
14
- }, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchBillingAccountsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
14
+ }, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: any], {
15
+ cacheOverride: any;
16
+ }, string, never, never>, fetchBillingAccountsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
17
  bankAccountIds: ID[];
16
18
  }, string>, updateBankConnectionOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankAccountsList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchNotificationSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateNotificationSettingsOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[data: NotificationSettingsPayload, loggedInUserEmail: string], {
17
19
  data: NotificationSettingsPayload;
@@ -94,8 +94,17 @@ const settings = (0, toolkit_1.createSlice)({
94
94
  draft.profile.fetchState = 'Error';
95
95
  draft.profile.error = action.payload;
96
96
  },
97
- fetchBankConnectionsView() {
98
- // Do nothing.
97
+ fetchBankConnectionsView: {
98
+ reducer() {
99
+ // do nothing
100
+ },
101
+ prepare(cacheOverride) {
102
+ return {
103
+ payload: {
104
+ cacheOverride,
105
+ },
106
+ };
107
+ },
99
108
  },
100
109
  fetchBillingAccountsView() {
101
110
  // Do nothing.
@@ -3,7 +3,7 @@ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
3
3
  import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView, NotificationSettingsSelectorView, IntegrationsView, BillingView } from './types/settingsViewSelectorTypes';
4
4
  import { NotificationSettings } from './settingsViewState';
5
5
  export declare function getApprovalRuleViewDetails(state: RootState): FetchStateAndError;
6
- export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID): BankConnectionsSetupView;
6
+ export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID, isAccountEnabled: boolean, isCardEnabled: boolean): BankConnectionsSetupView;
7
7
  export declare function getBillingAccountsViewDetails(state: RootState, companyId: ID): BillingView;
8
8
  export declare function getMyBankConnectionsDetails(state: RootState, userId: ID): MyBankConnectionsView;
9
9
  export declare function getIntegrationsView(state: RootState, companyId: ID): IntegrationsView;
@@ -19,6 +19,8 @@ const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
19
19
  const companyPassportViewSelector_1 = require("../companyView/selector/companyPassportViewSelector");
20
20
  const userFinancialAccountSelector_1 = require("../userFinancialAccount/userFinancialAccountSelector");
21
21
  const setupViewSelector_1 = require("../../view/spendManagement/commonSetup/setupViewSelector");
22
+ const depositAccountSelector_1 = require("../../entity/depositAccount/depositAccountSelector");
23
+ const getCompanyView_1 = require("../companyView/selectorHelpers/getCompanyView");
22
24
  const cardPaymentViewSelector_1 = require("../cardPayment/cardPaymentViewSelector");
23
25
  function getApprovalRuleViewDetails(state) {
24
26
  const { billPaySetupApproverViewState, remiSetupApproverViewState } = state;
@@ -31,18 +33,65 @@ function getApprovalRuleViewDetails(state) {
31
33
  };
32
34
  }
33
35
  exports.getApprovalRuleViewDetails = getApprovalRuleViewDetails;
34
- function getBankConnectionsSetupViewDetails(state, companyId) {
35
- const { accountState, plaidAccountViewState, settingsViewState } = state;
36
+ function getBankConnectionsSetupViewDetails(state, companyId, isAccountEnabled, isCardEnabled) {
37
+ var _a, _b, _c, _d, _e, _f;
38
+ const { accountState, settingsViewState, paymentAccountState, depositAccountState, depositAccountListState, paymentAccountListState, } = state;
36
39
  const { bankConnection } = settingsViewState;
37
- const allBankAccounts = bankConnection.bankAccountIds
38
- .map((accountId) => (0, accountSelector_1.getAccountBase)(accountState, accountId, 'bill_pay'))
39
- .filter((account) => account != null);
40
+ const { paymentAccountIds } = paymentAccountListState;
41
+ const { accountIds: depositAccountIds } = depositAccountListState;
42
+ const allBankAccounts = bankConnection.fetchState === 'Completed'
43
+ ? bankConnection.bankAccountIds
44
+ .map((accountId) => (0, accountSelector_1.getAccountBase)(accountState, accountId, 'bill_pay'))
45
+ .filter((account) => account != null)
46
+ : [];
47
+ const paymentAccounts = paymentAccountListState.hasValidState()
48
+ ? (_a = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, paymentAccountIds).filter((account) => account != null)) !== null && _a !== void 0 ? _a : []
49
+ : [];
50
+ const depositAccounts = depositAccountListState.hasValidState()
51
+ ? (_b = (0, depositAccountSelector_1.getDepositAccountsByDepositAccountIds)(depositAccountState, depositAccountIds).filter((account) => account != null)) !== null && _b !== void 0 ? _b : []
52
+ : [];
40
53
  const fetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
41
54
  settingsViewState.bankConnection,
42
- plaidAccountViewState['spend_management_setup'].accountDetails.fetchStatus,
55
+ paymentAccountListState,
56
+ depositAccountListState,
43
57
  ]);
58
+ const allFundingAccounts = fetchState.fetchState === 'Completed'
59
+ ? (0, setupViewSelector_1.getAllFundingAccounts)(depositAccounts, paymentAccounts, false)
60
+ : [];
61
+ const primaryAccountsProductWise = [
62
+ Object.assign({ productType: 'bill_pay' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'bill_pay_setup')),
63
+ Object.assign({ productType: 'reimbursement' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'reimbursement', 'reimbursement_setup')),
64
+ ];
65
+ if (isAccountEnabled) {
66
+ primaryAccountsProductWise.push(Object.assign({ productType: 'zeni_accounts' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'zeni_accounts', 'account_setup')));
67
+ }
68
+ if (isCardEnabled) {
69
+ primaryAccountsProductWise.push(Object.assign({ productType: 'charge_cards' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'charge_cards', 'charge_card_setup')));
70
+ }
71
+ const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
72
+ const billPayPrimaryAccount = (_c = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyBillPayInfo.primaryFundingAccount) === null || _c === void 0 ? void 0 : _c.accountId; //companyBillPayInfo
73
+ const remiPrimaryAccount = (_d = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyReimbursementInfo.primaryFundingAccount) === null || _d === void 0 ? void 0 : _d.accountId;
74
+ const accountsPrimaryAccount = (_e = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyZeniAccountInfo.primaryFundingAccount) === null || _e === void 0 ? void 0 : _e.accountId; //companyZeniAccountInfo
75
+ const chargeCardsPrimaryAccount = (_f = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyChargeCardInfo.primaryFundingAccount) === null || _f === void 0 ? void 0 : _f.accountId; //companyChargeCardInfo
76
+ const primaryAccounts = [];
77
+ if (billPayPrimaryAccount != null) {
78
+ primaryAccounts.push(billPayPrimaryAccount);
79
+ }
80
+ if (remiPrimaryAccount != null) {
81
+ primaryAccounts.push(remiPrimaryAccount);
82
+ }
83
+ if (accountsPrimaryAccount != null) {
84
+ primaryAccounts.push(accountsPrimaryAccount);
85
+ }
86
+ if (chargeCardsPrimaryAccount != null) {
87
+ primaryAccounts.push(chargeCardsPrimaryAccount);
88
+ }
89
+ const nonPrimaryPaymentAccounts = paymentAccounts.filter((paymentAcc) => !primaryAccounts.includes(paymentAcc.paymentAccountId));
44
90
  return {
45
- setupView: Object.assign(Object.assign({}, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'spend_management_setup')), { allBankAccounts }),
91
+ primaryConnection: primaryAccountsProductWise,
92
+ otherPaymentAccounts: nonPrimaryPaymentAccounts,
93
+ allFundingAccounts,
94
+ allBankAccounts,
46
95
  fetchState: fetchState.fetchState,
47
96
  };
48
97
  }
@@ -5,11 +5,13 @@ import { PaymentAccount } from '../../../entity/paymentAccount/paymentAccountSta
5
5
  import { User } from '../../../entity/user/userState';
6
6
  import { UserRole } from '../../../entity/userRole/userRoleState';
7
7
  import { Person } from '../../people/peopleSelectorTypes';
8
- import { SetupView } from '../../spendManagement/commonSetup/setupViewSelector';
8
+ import { FundingAccount, SetupView } from '../../spendManagement/commonSetup/setupViewSelector';
9
9
  import { UserFinancialAccountSelectorView } from '../../userFinancialAccount/userFinancialAccountSelector';
10
10
  import { IntegrationsSettings, NotificationSettings, SettingsViewUIState } from '../settingsViewState';
11
11
  import { TenantExternalConnections } from '../../../entity/tenant/tenantState';
12
12
  import { Company } from '../../../entity/company/companyStateTypes';
13
+ import { EntityType as SpendManagementEntityType } from '../../../entity/entityApprovalStatus/entityApprovalStatusState';
14
+ import { AccountBase } from '../../../entity/account/accountState';
13
15
  import { CardPaymentSelectorView } from '../../cardPayment/cardPaymentViewSelector';
14
16
  export interface MyProfileSelectorView extends SelectorView {
15
17
  isZeniUser: boolean;
@@ -29,13 +31,19 @@ export interface MyBankConnectionsView extends UserFinancialAccountSelectorView
29
31
  paymentAccounts: PaymentAccount[];
30
32
  }
31
33
  export interface BankConnectionsSetupView extends FetchStateAndError {
32
- setupView: SetupView;
34
+ primaryConnection: ProductWisePrimaryAccount[];
35
+ otherPaymentAccounts: PaymentAccount[];
36
+ allFundingAccounts: FundingAccount[];
37
+ allBankAccounts: AccountBase[];
33
38
  }
34
39
  export interface BillingView extends FetchStateAndError {
35
40
  setupView: SetupView;
36
41
  cardPaymentView: CardPaymentSelectorView;
37
42
  uiState: SettingsViewUIState;
38
43
  }
44
+ export interface ProductWisePrimaryAccount extends SetupView {
45
+ productType: SpendManagementEntityType;
46
+ }
39
47
  export interface NotificationSettingsSelectorView extends NotificationSettings {
40
48
  allUsers: User[];
41
49
  classList: Class[];
@@ -37,7 +37,7 @@ const getDuplicateBills = (state, billId) => {
37
37
  exports.getDuplicateBills = getDuplicateBills;
38
38
  const getReviewPageBillDetail = (state, billId) => {
39
39
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
40
- const { accountListState, accountState, plaidAccountViewState, billTransactionState, classListState, editBillDetailViewState, paymentAccountState, vendorState, contactState, billPayConfigState, recurringBillState, depositAccountState, depositAccountListState, } = state;
40
+ const { accountListState, accountState, billTransactionState, classListState, editBillDetailViewState, paymentAccountState, vendorState, contactState, billPayConfigState, recurringBillState, depositAccountState, depositAccountListState, paymentAccountListState, } = state;
41
41
  const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
42
42
  const sourceBillDetail = billId != null
43
43
  ? (_a = editBillDetailViewState.editBillStateById) === null || _a === void 0 ? void 0 : _a[key]
@@ -47,8 +47,7 @@ const getReviewPageBillDetail = (state, billId) => {
47
47
  let paymentDetailsSection;
48
48
  let file;
49
49
  let contactDetails = [];
50
- const primaryPaymentAccount = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, plaidAccountViewState['spend_management_setup'].accountDetails
51
- .paymentAccountIds);
50
+ const primaryPaymentAccount = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, paymentAccountListState.paymentAccountIds);
52
51
  const allDepositAccounts = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState).depositAccounts;
53
52
  const withdrawFromList = (0, setupViewSelector_1.getAllFundingAccounts)(allDepositAccounts, primaryPaymentAccount);
54
53
  let fetchState = 'Not-Started';
@@ -4,7 +4,7 @@ exports.getBillPayBusinessVerificationDetails = exports.getBillPaySetupViewDetai
4
4
  const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
5
5
  const helpers_1 = require("../../helpers");
6
6
  function getBillPaySetupViewDetails(state, companyId) {
7
- const billPaySetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'spend_management_setup');
7
+ const billPaySetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'bill_pay_setup');
8
8
  const businessVerificationDetails = getBillPayBusinessVerificationDetails(state, companyId);
9
9
  const selectedCompanyOfficer = (0, helpers_1.getSelectedCompanyOfficer)(businessVerificationDetails);
10
10
  const { billPaySetupViewState, setupViewState } = state;
@@ -13,5 +13,8 @@ import { openSnackbar } from '../../../../../../entity/snackbar/snackbarReducer'
13
13
  import { updateSetupViewLocalStoreData } from '../../../../commonSetup/setupViewReducer';
14
14
  import { fetchBillPaySetupView, fetchBillPaySetupViewSuccess, fetchBillPaySetupViewFailure } from '../../billPaySetupViewReducer';
15
15
  import { updatePlaidAccountViewAccountDetails } from '../../../../plaidAccount/plaidAccountViewReducer';
16
- export declare type ActionType = ReturnType<typeof fetchBillPaySetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePlaidAccountViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchBillPaySetupViewSuccess> | ReturnType<typeof fetchBillPaySetupViewFailure>;
16
+ import { updatePaymentAccountList } from '../../../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
17
+ import { updateDepositAccounts } from '../../../../../../entity/depositAccount/depositAccountReducer';
18
+ import { updateDepositAccountList } from '../../../../zeniAccounts/depositAccountList/depositAccountListReducer';
19
+ export declare type ActionType = ReturnType<typeof fetchBillPaySetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePaymentAccountList> | ReturnType<typeof updateDepositAccounts> | ReturnType<typeof updateDepositAccountList> | ReturnType<typeof updatePlaidAccountViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchBillPaySetupViewSuccess> | ReturnType<typeof fetchBillPaySetupViewFailure>;
17
20
  export declare const fetchBillPaySetupViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -16,6 +16,9 @@ const snackbarReducer_1 = require("../../../../../../entity/snackbar/snackbarRed
16
16
  const setupViewReducer_1 = require("../../../../commonSetup/setupViewReducer");
17
17
  const billPaySetupViewReducer_1 = require("../../billPaySetupViewReducer");
18
18
  const plaidAccountViewReducer_1 = require("../../../../plaidAccount/plaidAccountViewReducer");
19
+ const paymentAccountListReducer_1 = require("../../../../zeniAccounts/paymentAccountList/paymentAccountListReducer");
20
+ const depositAccountReducer_1 = require("../../../../../../entity/depositAccount/depositAccountReducer");
21
+ const depositAccountListReducer_1 = require("../../../../zeniAccounts/depositAccountList/depositAccountListReducer");
19
22
  const fetchBillPaySetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billPaySetupViewReducer_1.fetchBillPaySetupView.match), (0, operators_1.switchMap)((action) => {
20
23
  var _a;
21
24
  const { companyId, cacheOverride, refreshViewInBackground } = action.payload;
@@ -29,9 +32,9 @@ const fetchBillPaySetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((
29
32
  return zeniAPI
30
33
  .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}?query={"view":"bill_pay_setup"}`)
31
34
  .pipe((0, operators_1.mergeMap)((response) => {
35
+ var _a, _b, _c;
32
36
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
33
37
  const allBankAccountIds = response.data.accounts.map((account) => account.account_id);
34
- const paymentAccountIds = response.data.payment_accounts.map((paymentAccount) => paymentAccount.payment_account_id);
35
38
  const actions = [
36
39
  (0, userReducer_1.updateAllUsers)({ users: response.data.users }),
37
40
  (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles),
@@ -43,10 +46,19 @@ const fetchBillPaySetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((
43
46
  (0, fileReducer_1.updateFiles)({ files: response.data.files }),
44
47
  (0, accountReducer_1.updateAccounts)(response.data.accounts, 'bill_pay'),
45
48
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
49
+ (0, paymentAccountListReducer_1.updatePaymentAccountList)({
50
+ data: response.data.payment_accounts,
51
+ updateType: 'replace',
52
+ }),
53
+ (0, depositAccountReducer_1.updateDepositAccounts)((_a = response.data.deposit_accounts) !== null && _a !== void 0 ? _a : []),
54
+ (0, depositAccountListReducer_1.updateDepositAccountList)({
55
+ data: (_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.deposit_accounts) !== null && _c !== void 0 ? _c : [],
56
+ updateType: 'replace',
57
+ }),
46
58
  (0, setupViewReducer_1.updateSetupViewLocalStoreData)({
47
59
  companyId: response.data.companies[0].company_id,
48
60
  }),
49
- (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'),
61
+ (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'bill_pay_setup'),
50
62
  (0, billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess)(),
51
63
  ];
52
64
  return (0, rxjs_1.from)(actions);
@@ -62,10 +74,10 @@ const fetchBillPaySetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((
62
74
  JSON.stringify(error))))));
63
75
  }
64
76
  else {
65
- const { allBankAccountIds, paymentAccountIds } = plaidAccountViewState['spend_management_setup'].accountDetails;
77
+ const { allBankAccountIds } = plaidAccountViewState['spend_management_setup'].accountDetails;
66
78
  return (0, rxjs_1.of)((0, setupViewReducer_1.updateSetupViewLocalStoreData)({
67
79
  companyId,
68
- }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'), (0, billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess)());
80
+ }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'bill_pay_setup'), (0, billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess)());
69
81
  }
70
82
  }));
71
83
  exports.fetchBillPaySetupViewEpic = fetchBillPaySetupViewEpic;