@zeniai/client-epic-state 5.0.44 → 5.0.45

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 (64) hide show
  1. package/lib/entity/chargeCardRepayment/chargeCardRepayment.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  3. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  4. package/lib/entity/tenant/clearAllEpic.d.ts +3 -5
  5. package/lib/entity/tenant/clearAllEpic.js +2 -6
  6. package/lib/epic.d.ts +1 -7
  7. package/lib/epic.js +1 -7
  8. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  9. package/lib/esm/entity/tenant/clearAllEpic.js +2 -6
  10. package/lib/esm/epic.js +1 -7
  11. package/lib/esm/index.js +6 -12
  12. package/lib/esm/reducer.js +3 -9
  13. package/lib/index.d.ts +10 -18
  14. package/lib/index.js +46 -75
  15. package/lib/reducer.d.ts +3 -9
  16. package/lib/reducer.js +3 -9
  17. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  18. package/package.json +1 -1
  19. package/lib/entity/creditAgent/creditAgentPayload.d.ts +0 -41
  20. package/lib/entity/creditAgent/creditAgentPayload.js +0 -40
  21. package/lib/entity/creditAgent/creditAgentReducer.d.ts +0 -9
  22. package/lib/entity/creditAgent/creditAgentReducer.js +0 -37
  23. package/lib/entity/creditAgent/creditAgentSelector.d.ts +0 -3
  24. package/lib/entity/creditAgent/creditAgentSelector.js +0 -10
  25. package/lib/entity/creditAgent/creditAgentState.d.ts +0 -39
  26. package/lib/entity/creditAgent/creditAgentState.js +0 -17
  27. package/lib/esm/entity/creditAgent/creditAgentPayload.js +0 -36
  28. package/lib/esm/entity/creditAgent/creditAgentReducer.js +0 -33
  29. package/lib/esm/entity/creditAgent/creditAgentSelector.js +0 -6
  30. package/lib/esm/entity/creditAgent/creditAgentState.js +0 -13
  31. package/lib/esm/view/creditAgentView/buildCreditReportCsv.js +0 -44
  32. package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +0 -2
  33. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +0 -183
  34. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -85
  35. package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -20
  36. package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +0 -20
  37. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +0 -13
  38. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -19
  39. package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -58
  40. package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -39
  41. package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +0 -62
  42. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  43. package/lib/view/creditAgentView/buildCreditReportCsv.d.ts +0 -17
  44. package/lib/view/creditAgentView/buildCreditReportCsv.js +0 -47
  45. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -9
  46. package/lib/view/creditAgentView/creditAgentViewPayload.js +0 -7
  47. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +0 -41
  48. package/lib/view/creditAgentView/creditAgentViewReducer.js +0 -187
  49. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -20
  50. package/lib/view/creditAgentView/creditAgentViewSelector.js +0 -93
  51. package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -34
  52. package/lib/view/creditAgentView/creditAgentViewState.js +0 -22
  53. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +0 -15
  54. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +0 -24
  55. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +0 -11
  56. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +0 -17
  57. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +0 -15
  58. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -23
  59. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +0 -29
  60. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -62
  61. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +0 -30
  62. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -43
  63. package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +0 -37
  64. package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +0 -66
package/lib/reducer.d.ts CHANGED
@@ -2,8 +2,6 @@ import { AccountState } from './entity/account/accountState';
2
2
  import { AccountGroupState } from './entity/accountGroup/accountGroupState';
3
3
  import { AccountReconState } from './entity/accountRecon/accountReconState';
4
4
  import { AddressState } from './entity/address/addressState';
5
- import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
6
- import { CreditAgentEntityState } from './entity/creditAgent/creditAgentState';
7
5
  import { AiCfoState } from './entity/aiCfo/aiCfoState';
8
6
  import { ApprovalRuleState } from './entity/approvalRule/approvalRuleState';
9
7
  import { BankAccountState } from './entity/bankAccount/bankAccount';
@@ -15,6 +13,7 @@ import { ChargeCardState } from './entity/chargeCard/chargeCard';
15
13
  import { ChargeCardRepaymentState } from './entity/chargeCardRepayment/chargeCardRepayment';
16
14
  import { ChargeCardTransactionState } from './entity/chargeCardTransaction/chargeCardTransaction';
17
15
  import { ClassState } from './entity/class/classState';
16
+ import { ProjectState } from './entity/project/projectReducer';
18
17
  import { CompanyState } from './entity/company/companyState';
19
18
  import { CompanyHealthState } from './entity/companyHealthMetric/companyHealthMetricState';
20
19
  import { ConnectedAccountState } from './entity/connectedAccount/connectedAccount';
@@ -39,7 +38,6 @@ import { OnboardingCustomerState } from './entity/onboardingCustomer/onboardingC
39
38
  import { PaymentAccountState } from './entity/paymentAccount/paymentAccountState';
40
39
  import { PaymentInstrumentState } from './entity/paymentInstrument/paymentInstrument';
41
40
  import { AccountingSummaryState } from './entity/portfolio/accountingSummary/accountingSummaryState';
42
- import { ProjectState } from './entity/project/projectReducer';
43
41
  import { ReimbursementState } from './entity/reimbursement/reimbursementState';
44
42
  import { SectionAccountsViewState } from './entity/sectionAccountsView/sectionAccountsViewState';
45
43
  import { SectionClassesViewStateV2 } from './entity/sectionClassesViewV2/sectionClassesViewState';
@@ -68,9 +66,10 @@ import { VendorExpenseState } from './entity/vendorExpense/vendorExpenseState';
68
66
  import { AccountListState } from './view/accountList/accountListState';
69
67
  import { AccountMappingState } from './view/accountMappingView/accountMappingState';
70
68
  import { AddressViewState } from './view/addressView/addressViewState';
71
- import { AiAccountantViewState } from './view/aiAccountantView/aiAccountantViewState';
72
69
  import { AggregatedReportViewState } from './view/aiAgentPerformance/aggregatedReportViewReducer';
73
70
  import { AiCfoViewState } from './view/aiCfoView/aiCfoViewState';
71
+ import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
72
+ import { AiAccountantViewState } from './view/aiAccountantView/aiAccountantViewState';
74
73
  import { ApAgingDetailState } from './view/apAgingView/apAgingDetail/apAgingDetailState';
75
74
  import { ApAgingState } from './view/apAgingView/apAgingReport/apAgingState';
76
75
  import { ArAgingDetailState } from './view/arAgingView/arAgingDetail/arAgingDetailState';
@@ -97,7 +96,6 @@ import { CompanyHealthMetricView } from './view/companyHealthMetricView/companyH
97
96
  import { CompanyMonthEndReportViewState } from './view/companyMonthEndReportView/companyMonthEndReportViewState';
98
97
  import { CompanyTaskManagerViewState } from './view/companyTaskManagerView/companyTaskManagerViewState';
99
98
  import { CompanyViewState } from './view/companyView/companyViewState';
100
- import { CreditAgentViewState } from './view/creditAgentView/creditAgentViewState';
101
99
  import { DashboardState } from './view/dashboard/dashboardState';
102
100
  import { DashboardLayoutState } from './view/dashboardLayout/dashboardLayoutState';
103
101
  import { ExpenseAutomationViewState } from './view/expenseAutomationView/expenseAutomationViewState';
@@ -340,8 +338,6 @@ type ViewsState = {
340
338
  companyTaskManagerViewState: CompanyTaskManagerViewState;
341
339
  companyViewState: CompanyViewState;
342
340
  countryListState: CountryListState;
343
- creditAgentEntityState: CreditAgentEntityState;
344
- creditAgentViewState: CreditAgentViewState;
345
341
  dashboardLayoutState: DashboardLayoutState;
346
342
  dashboardState: DashboardState;
347
343
  depositAccountListState: DepositAccountListState;
@@ -499,8 +495,6 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
499
495
  companyTaskManagerViewState: CompanyTaskManagerViewState;
500
496
  companyViewState: CompanyViewState;
501
497
  countryListState: CountryListState;
502
- creditAgentEntityState: CreditAgentEntityState;
503
- creditAgentViewState: CreditAgentViewState;
504
498
  dashboardState: DashboardState;
505
499
  dashboardLayoutState: DashboardLayoutState;
506
500
  depositAccountListState: DepositAccountListState;
package/lib/reducer.js CHANGED
@@ -42,8 +42,6 @@ const accountReducer_1 = __importStar(require("./entity/account/accountReducer")
42
42
  const accountGroupReducer_1 = __importStar(require("./entity/accountGroup/accountGroupReducer"));
43
43
  const accountReconReducer_1 = __importStar(require("./entity/accountRecon/accountReconReducer"));
44
44
  const addressReducer_1 = __importStar(require("./entity/address/addressReducer"));
45
- const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
46
- const creditAgentReducer_1 = __importStar(require("./entity/creditAgent/creditAgentReducer"));
47
45
  const aiCfoReducer_1 = __importStar(require("./entity/aiCfo/aiCfoReducer"));
48
46
  const approvalRuleReducer_1 = __importStar(require("./entity/approvalRule/approvalRuleReducer"));
49
47
  const bankAccountReducer_1 = __importStar(require("./entity/bankAccount/bankAccountReducer"));
@@ -55,6 +53,7 @@ const chargeCardReducer_1 = __importStar(require("./entity/chargeCard/chargeCard
55
53
  const chargeCardRepaymentReducer_1 = __importStar(require("./entity/chargeCardRepayment/chargeCardRepaymentReducer"));
56
54
  const chargeCardTransactionReducer_1 = __importStar(require("./entity/chargeCardTransaction/chargeCardTransactionReducer"));
57
55
  const classReducer_1 = __importStar(require("./entity/class/classReducer"));
56
+ const projectReducer_1 = __importStar(require("./entity/project/projectReducer"));
58
57
  const companyReducer_1 = __importStar(require("./entity/company/companyReducer"));
59
58
  const companyHealthMetricReducer_1 = __importStar(require("./entity/companyHealthMetric/companyHealthMetricReducer"));
60
59
  const connectedAccountReducer_1 = __importStar(require("./entity/connectedAccount/connectedAccountReducer"));
@@ -79,7 +78,6 @@ const onboardingCustomerReducer_1 = __importStar(require("./entity/onboardingCus
79
78
  const paymentAccountReducer_1 = __importStar(require("./entity/paymentAccount/paymentAccountReducer"));
80
79
  const paymentInstrumentReducer_1 = __importStar(require("./entity/paymentInstrument/paymentInstrumentReducer"));
81
80
  const accountingSummaryReducer_1 = __importStar(require("./entity/portfolio/accountingSummary/accountingSummaryReducer"));
82
- const projectReducer_1 = __importStar(require("./entity/project/projectReducer"));
83
81
  const reimbursementReducer_1 = __importStar(require("./entity/reimbursement/reimbursementReducer"));
84
82
  const sectionAccountsViewReducer_1 = __importStar(require("./entity/sectionAccountsView/sectionAccountsViewReducer"));
85
83
  const sectionClassesViewReducer_1 = __importStar(require("./entity/sectionClassesViewV2/sectionClassesViewReducer"));
@@ -108,9 +106,10 @@ const vendorExpenseReducer_1 = __importStar(require("./entity/vendorExpense/vend
108
106
  const accountListReducer_1 = __importStar(require("./view/accountList/accountListReducer"));
109
107
  const accountMappingReducer_1 = __importStar(require("./view/accountMappingView/accountMappingReducer"));
110
108
  const addressViewReducer_1 = __importStar(require("./view/addressView/addressViewReducer"));
111
- const aiAccountantViewReducer_1 = __importStar(require("./view/aiAccountantView/aiAccountantViewReducer"));
112
109
  const aggregatedReportViewReducer_1 = __importStar(require("./view/aiAgentPerformance/aggregatedReportViewReducer"));
113
110
  const aiCfoViewReducer_1 = __importStar(require("./view/aiCfoView/aiCfoViewReducer"));
111
+ const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
112
+ const aiAccountantViewReducer_1 = __importStar(require("./view/aiAccountantView/aiAccountantViewReducer"));
114
113
  const apAgingDetailReducer_1 = __importStar(require("./view/apAgingView/apAgingDetail/apAgingDetailReducer"));
115
114
  const apAgingReducer_1 = __importStar(require("./view/apAgingView/apAgingReport/apAgingReducer"));
116
115
  const arAgingDetailReducer_1 = __importStar(require("./view/arAgingView/arAgingDetail/arAgingDetailReducer"));
@@ -137,7 +136,6 @@ const companyHealthMetricViewReducer_1 = __importStar(require("./view/companyHea
137
136
  const companyMonthEndReportViewReducer_1 = __importStar(require("./view/companyMonthEndReportView/companyMonthEndReportViewReducer"));
138
137
  const companyTaskManagerViewReducer_1 = __importStar(require("./view/companyTaskManagerView/companyTaskManagerViewReducer"));
139
138
  const companyViewReducer_1 = __importStar(require("./view/companyView/companyViewReducer"));
140
- const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
141
139
  const dashboardReducer_1 = __importStar(require("./view/dashboard/dashboardReducer"));
142
140
  const dashboardLayoutReducer_1 = __importStar(require("./view/dashboardLayout/dashboardLayoutReducer"));
143
141
  const expenseAutomationViewReducer_1 = __importStar(require("./view/expenseAutomationView/expenseAutomationViewReducer"));
@@ -382,8 +380,6 @@ const initialViewsState = {
382
380
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
383
381
  companyViewState: companyViewReducer_1.initialState,
384
382
  countryListState: countryListReducer_1.initialState,
385
- creditAgentEntityState: creditAgentReducer_1.initialCreditAgentEntityState,
386
- creditAgentViewState: creditAgentViewReducer_1.initialState,
387
383
  dashboardLayoutState: dashboardLayoutReducer_1.initialState,
388
384
  dashboardState: dashboardReducer_1.initialState,
389
385
  depositAccountListState: depositAccountListReducer_1.initialState,
@@ -616,8 +612,6 @@ const viewReducers = {
616
612
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
617
613
  companyViewState: companyViewReducer_1.default,
618
614
  countryListState: countryListReducer_1.default,
619
- creditAgentEntityState: creditAgentReducer_1.default,
620
- creditAgentViewState: creditAgentViewReducer_1.default,
621
615
  dashboardState: dashboardReducer_1.default,
622
616
  dashboardLayoutState: dashboardLayoutReducer_1.default,
623
617
  depositAccountListState: depositAccountListReducer_1.default,
@@ -37,7 +37,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
37
37
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
38
38
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
39
39
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
40
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "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_setup" | "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" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "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" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "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" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
40
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "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_setup" | "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" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "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" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "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" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request";
41
41
  messageText: "notification" | "failed" | "success";
42
42
  type: "error" | "success" | "info";
43
43
  variables: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.44",
3
+ "version": "5.0.45",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -1,41 +0,0 @@
1
- import { CardTenantProfileRow, CreditAgentMacro } from './creditAgentState';
2
- export interface CardTenantProfileRowPayload {
3
- card_score: string | null;
4
- card_status: string;
5
- company_id: string | null;
6
- credit_limit: number | null;
7
- customer_name: string | null;
8
- is_analyzing: boolean;
9
- is_new: boolean;
10
- rationale: string | null;
11
- recommended_amount: number | null;
12
- report_date: string | null;
13
- tenant_id: string;
14
- tenant_namespace: string;
15
- updated_by_name: string | null;
16
- updated_by_user_id: string | null;
17
- updated_on: string | null;
18
- }
19
- export interface CardTenantProfilesPayload {
20
- count: number;
21
- rows: CardTenantProfileRowPayload[];
22
- }
23
- export interface CardTenantProfileUpdatePayload {
24
- profile: CardTenantProfileRowPayload;
25
- }
26
- export interface MacroPayload {
27
- created_at: string;
28
- creator_id: string;
29
- description: string;
30
- instructions: string;
31
- is_active: boolean;
32
- is_latest: boolean;
33
- macro_id: string;
34
- name: string;
35
- parameters_schema: Record<string, unknown> | null;
36
- tenant_id: string;
37
- updated_at: string;
38
- version: number;
39
- }
40
- export declare function toCardTenantProfileRow(row: CardTenantProfileRowPayload): CardTenantProfileRow;
41
- export declare function toMacro(payload: MacroPayload): CreditAgentMacro;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCardTenantProfileRow = toCardTenantProfileRow;
4
- exports.toMacro = toMacro;
5
- const zeniDayJS_1 = require("../../zeniDayJS");
6
- const creditAgentState_1 = require("./creditAgentState");
7
- // ── Mapping functions (payload → domain) ──
8
- function toCardTenantProfileRow(row) {
9
- return {
10
- cardStatus: (0, creditAgentState_1.toCardStatus)(row.card_status),
11
- companyId: row.company_id ?? undefined,
12
- creditLimit: row.credit_limit ?? undefined,
13
- creditScore: row.card_score ?? undefined,
14
- customerName: row.customer_name ?? undefined,
15
- isAnalyzing: Boolean(row.is_analyzing),
16
- isNew: Boolean(row.is_new),
17
- rationale: row.rationale ?? undefined,
18
- recommendedAmount: row.recommended_amount ?? undefined,
19
- reportDate: row.report_date != null ? (0, zeniDayJS_1.date)(row.report_date) : undefined,
20
- tenantId: row.tenant_id,
21
- tenantEmailDomain: row.tenant_namespace,
22
- updatedByName: row.updated_by_name ?? undefined,
23
- updatedByUserId: row.updated_by_user_id ?? undefined,
24
- updatedOn: row.updated_on != null ? (0, zeniDayJS_1.date)(row.updated_on) : undefined,
25
- };
26
- }
27
- function toMacro(payload) {
28
- return {
29
- macroId: payload.macro_id,
30
- version: payload.version,
31
- isLatest: payload.is_latest,
32
- isActive: payload.is_active,
33
- name: payload.name,
34
- description: payload.description,
35
- instructions: payload.instructions,
36
- tenantId: payload.tenant_id,
37
- createdAt: (0, zeniDayJS_1.date)(payload.created_at),
38
- updatedAt: (0, zeniDayJS_1.date)(payload.updated_at),
39
- };
40
- }
@@ -1,9 +0,0 @@
1
- import { CardTenantProfileRowPayload, MacroPayload } from './creditAgentPayload';
2
- import { CreditAgentEntityState } from './creditAgentState';
3
- export declare const initialCreditAgentEntityState: CreditAgentEntityState;
4
- export declare const clearAllCreditAgent: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgent/clearAllCreditAgent">, updateCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithPayload<MacroPayload, "creditAgent/updateCreditAgentMacro">, updateCreditAgentRow: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
5
- payload: CardTenantProfileRowPayload;
6
- tenantId: string;
7
- }, "creditAgent/updateCreditAgentRow">, updateCreditAgentRows: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardTenantProfileRowPayload[], "creditAgent/updateCreditAgentRows">;
8
- declare const _default: import("redux").Reducer<CreditAgentEntityState>;
9
- export default _default;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateCreditAgentRows = exports.updateCreditAgentRow = exports.updateCreditAgentMacro = exports.clearAllCreditAgent = exports.initialCreditAgentEntityState = void 0;
5
- const toolkit_1 = require("@reduxjs/toolkit");
6
- const creditAgentPayload_1 = require("./creditAgentPayload");
7
- exports.initialCreditAgentEntityState = {
8
- macro: undefined,
9
- rowByTenantId: {},
10
- };
11
- const creditAgent = (0, toolkit_1.createSlice)({
12
- name: 'creditAgent',
13
- initialState: exports.initialCreditAgentEntityState,
14
- reducers: {
15
- updateCreditAgentRows(draft, action) {
16
- const newRowByTenantId = {};
17
- action.payload.forEach((payload) => {
18
- const row = (0, creditAgentPayload_1.toCardTenantProfileRow)(payload);
19
- newRowByTenantId[row.tenantId] = row;
20
- });
21
- draft.rowByTenantId = newRowByTenantId;
22
- },
23
- updateCreditAgentRow(draft, action) {
24
- const { tenantId, payload } = action.payload;
25
- const row = (0, creditAgentPayload_1.toCardTenantProfileRow)(payload);
26
- draft.rowByTenantId[tenantId] = row;
27
- },
28
- updateCreditAgentMacro(draft, action) {
29
- draft.macro = (0, creditAgentPayload_1.toMacro)(action.payload);
30
- },
31
- clearAllCreditAgent(draft) {
32
- Object.assign(draft, exports.initialCreditAgentEntityState);
33
- },
34
- },
35
- });
36
- _a = creditAgent.actions, exports.clearAllCreditAgent = _a.clearAllCreditAgent, exports.updateCreditAgentMacro = _a.updateCreditAgentMacro, exports.updateCreditAgentRow = _a.updateCreditAgentRow, exports.updateCreditAgentRows = _a.updateCreditAgentRows;
37
- exports.default = creditAgent.reducer;
@@ -1,3 +0,0 @@
1
- import { CardTenantProfileRow, CreditAgentEntityState, CreditAgentMacro } from './creditAgentState';
2
- export declare function getCreditAgentRows(state: CreditAgentEntityState): CardTenantProfileRow[];
3
- export declare function getCreditAgentMacroEntity(state: CreditAgentEntityState): CreditAgentMacro | undefined;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCreditAgentRows = getCreditAgentRows;
4
- exports.getCreditAgentMacroEntity = getCreditAgentMacroEntity;
5
- function getCreditAgentRows(state) {
6
- return Object.values(state.rowByTenantId);
7
- }
8
- function getCreditAgentMacroEntity(state) {
9
- return state.macro;
10
- }
@@ -1,39 +0,0 @@
1
- import { ID } from '../../commonStateTypes/common';
2
- import { ZeniDate } from '../../zeniDayJS';
3
- declare const ALL_CARD_STATUS_VALUES: readonly ["Not-Initiated", "Interested", "Pre-approved", "Approved", "Enabled", "Active", "Rejected", "Locked"];
4
- export declare const toCardStatus: (v: string) => "Not-Initiated" | "Interested" | "Pre-approved" | "Approved" | "Enabled" | "Active" | "Rejected" | "Locked";
5
- export type CardStatus = ReturnType<typeof toCardStatus>;
6
- export { ALL_CARD_STATUS_VALUES };
7
- export interface CardTenantProfileRow {
8
- cardStatus: CardStatus;
9
- isAnalyzing: boolean;
10
- isNew: boolean;
11
- tenantEmailDomain: string;
12
- tenantId: ID;
13
- companyId?: ID;
14
- creditLimit?: number;
15
- creditScore?: string;
16
- customerName?: string;
17
- rationale?: string;
18
- recommendedAmount?: number;
19
- reportDate?: ZeniDate;
20
- updatedByName?: string;
21
- updatedByUserId?: ID;
22
- updatedOn?: ZeniDate;
23
- }
24
- export interface CreditAgentMacro {
25
- createdAt: ZeniDate;
26
- description: string;
27
- instructions: string;
28
- isActive: boolean;
29
- isLatest: boolean;
30
- macroId: ID;
31
- name: string;
32
- tenantId: ID;
33
- updatedAt: ZeniDate;
34
- version: number;
35
- }
36
- export interface CreditAgentEntityState {
37
- rowByTenantId: Record<ID, CardTenantProfileRow>;
38
- macro?: CreditAgentMacro;
39
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_CARD_STATUS_VALUES = exports.toCardStatus = void 0;
4
- const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
- const ALL_CARD_STATUS_VALUES = [
6
- 'Not-Initiated',
7
- 'Interested',
8
- 'Pre-approved',
9
- 'Approved',
10
- 'Enabled',
11
- 'Active',
12
- 'Rejected',
13
- 'Locked',
14
- ];
15
- exports.ALL_CARD_STATUS_VALUES = ALL_CARD_STATUS_VALUES;
16
- const toCardStatus = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_CARD_STATUS_VALUES);
17
- exports.toCardStatus = toCardStatus;
@@ -1,36 +0,0 @@
1
- import { date } from '../../zeniDayJS';
2
- import { toCardStatus, } from './creditAgentState';
3
- // ── Mapping functions (payload → domain) ──
4
- export function toCardTenantProfileRow(row) {
5
- return {
6
- cardStatus: toCardStatus(row.card_status),
7
- companyId: row.company_id ?? undefined,
8
- creditLimit: row.credit_limit ?? undefined,
9
- creditScore: row.card_score ?? undefined,
10
- customerName: row.customer_name ?? undefined,
11
- isAnalyzing: Boolean(row.is_analyzing),
12
- isNew: Boolean(row.is_new),
13
- rationale: row.rationale ?? undefined,
14
- recommendedAmount: row.recommended_amount ?? undefined,
15
- reportDate: row.report_date != null ? date(row.report_date) : undefined,
16
- tenantId: row.tenant_id,
17
- tenantEmailDomain: row.tenant_namespace,
18
- updatedByName: row.updated_by_name ?? undefined,
19
- updatedByUserId: row.updated_by_user_id ?? undefined,
20
- updatedOn: row.updated_on != null ? date(row.updated_on) : undefined,
21
- };
22
- }
23
- export function toMacro(payload) {
24
- return {
25
- macroId: payload.macro_id,
26
- version: payload.version,
27
- isLatest: payload.is_latest,
28
- isActive: payload.is_active,
29
- name: payload.name,
30
- description: payload.description,
31
- instructions: payload.instructions,
32
- tenantId: payload.tenant_id,
33
- createdAt: date(payload.created_at),
34
- updatedAt: date(payload.updated_at),
35
- };
36
- }
@@ -1,33 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- import { toCardTenantProfileRow, toMacro, } from './creditAgentPayload';
3
- export const initialCreditAgentEntityState = {
4
- macro: undefined,
5
- rowByTenantId: {},
6
- };
7
- const creditAgent = createSlice({
8
- name: 'creditAgent',
9
- initialState: initialCreditAgentEntityState,
10
- reducers: {
11
- updateCreditAgentRows(draft, action) {
12
- const newRowByTenantId = {};
13
- action.payload.forEach((payload) => {
14
- const row = toCardTenantProfileRow(payload);
15
- newRowByTenantId[row.tenantId] = row;
16
- });
17
- draft.rowByTenantId = newRowByTenantId;
18
- },
19
- updateCreditAgentRow(draft, action) {
20
- const { tenantId, payload } = action.payload;
21
- const row = toCardTenantProfileRow(payload);
22
- draft.rowByTenantId[tenantId] = row;
23
- },
24
- updateCreditAgentMacro(draft, action) {
25
- draft.macro = toMacro(action.payload);
26
- },
27
- clearAllCreditAgent(draft) {
28
- Object.assign(draft, initialCreditAgentEntityState);
29
- },
30
- },
31
- });
32
- export const { clearAllCreditAgent, updateCreditAgentMacro, updateCreditAgentRow, updateCreditAgentRows, } = creditAgent.actions;
33
- export default creditAgent.reducer;
@@ -1,6 +0,0 @@
1
- export function getCreditAgentRows(state) {
2
- return Object.values(state.rowByTenantId);
3
- }
4
- export function getCreditAgentMacroEntity(state) {
5
- return state.macro;
6
- }
@@ -1,13 +0,0 @@
1
- import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
- const ALL_CARD_STATUS_VALUES = [
3
- 'Not-Initiated',
4
- 'Interested',
5
- 'Pre-approved',
6
- 'Approved',
7
- 'Enabled',
8
- 'Active',
9
- 'Rejected',
10
- 'Locked',
11
- ];
12
- export const toCardStatus = (v) => stringToUnion(v, ALL_CARD_STATUS_VALUES);
13
- export { ALL_CARD_STATUS_VALUES };
@@ -1,44 +0,0 @@
1
- const CREDIT_REPORT_COLUMNS = [
2
- 'Customer Name',
3
- 'Card Status',
4
- 'Credit Limit ($)',
5
- 'Credit Score',
6
- 'Recommended Amount ($)',
7
- 'Rationale',
8
- 'Report Date',
9
- 'Tenant Email Domain',
10
- 'Tenant ID',
11
- 'Company ID',
12
- 'Updated By',
13
- 'Updated On',
14
- ];
15
- function rowToFields(row) {
16
- return [
17
- row.customerName,
18
- row.cardStatus,
19
- row.creditLimit,
20
- row.creditScore,
21
- row.recommendedAmount,
22
- row.rationale,
23
- row.reportDate?.format('YYYY-MM-DD'),
24
- row.tenantEmailDomain,
25
- row.tenantId,
26
- row.companyId,
27
- row.updatedByName,
28
- row.updatedOn?.format('YYYY-MM-DD'),
29
- ];
30
- }
31
- /**
32
- * Build the payload for the web-app-v2 table download endpoint.
33
- *
34
- * The component calls this, then GETs the endpoint with the payload
35
- * as a query param and handles the blob response as a file download.
36
- */
37
- export function getCreditReportDownloadPayload(rows) {
38
- return {
39
- columns: CREDIT_REPORT_COLUMNS,
40
- rows: rows.map(rowToFields),
41
- file_name: 'credit-report',
42
- sheet_name: 'Credit Report',
43
- };
44
- }
@@ -1,2 +0,0 @@
1
- // Re-export entity payload types and mapping functions.
2
- export { toCardTenantProfileRow, toMacro, } from '../../entity/creditAgent/creditAgentPayload';