@zeniai/client-epic-state 5.1.29-beta0ND → 5.1.29

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 (72) hide show
  1. package/README.md +1 -3
  2. package/lib/__testHelpers__/apiFailure.json +6 -0
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  4. package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
  5. package/lib/entity/vendor/__mocks__/vendorMock.js +311 -0
  6. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +8 -0
  7. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +415 -0
  8. package/lib/entity/vendor/vendorPayload.d.ts +1 -1
  9. package/lib/epic.d.ts +1 -2
  10. package/lib/epic.js +1 -2
  11. package/lib/esm/__testHelpers__/apiFailure.json +6 -0
  12. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  13. package/lib/esm/entity/vendor/__mocks__/vendorMock.js +308 -0
  14. package/lib/esm/entity/vendor/__mocks__/vendorStateMocks.js +412 -0
  15. package/lib/esm/epic.js +1 -2
  16. package/lib/esm/index.js +2 -2
  17. package/lib/esm/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4650 -0
  18. package/lib/esm/view/addressView/__mocks__/addressViewMocks.js +203 -0
  19. package/lib/esm/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  20. package/lib/esm/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  21. package/lib/esm/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  22. package/lib/esm/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  23. package/lib/esm/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  24. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -29
  25. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -11
  26. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  27. package/lib/esm/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
  28. package/lib/esm/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
  29. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  30. package/lib/esm/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +16 -4
  31. package/lib/esm/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  32. package/lib/esm/view/referralView/epics/sendReferralInviteEpic.js +1 -9
  33. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  34. package/lib/esm/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  35. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  36. package/lib/esm/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
  37. package/lib/esm/view/vendorList/vendorListReducer.js +3 -1
  38. package/lib/esm/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  39. package/lib/index.d.ts +4 -4
  40. package/lib/index.js +5 -9
  41. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
  42. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
  43. package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
  44. package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
  45. package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  46. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  47. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  48. package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  49. package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  50. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -14
  51. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +4 -8
  52. package/lib/view/aiCfoView/aiCfoViewReducer.js +4 -30
  53. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -2
  54. package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -12
  55. package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -15
  56. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  57. package/lib/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
  58. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
  59. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  60. package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +15 -3
  61. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  62. package/lib/view/referralView/epics/sendReferralInviteEpic.js +1 -9
  63. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  64. package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  65. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  66. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
  67. package/lib/view/vendorList/vendorListReducer.js +3 -1
  68. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  69. package/package.json +2 -5
  70. package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +0 -34
  71. package/lib/view/aiCfoView/epics/fetchSkillsEpic.d.ts +0 -8
  72. package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +0 -38
@@ -0,0 +1,418 @@
1
+ {
2
+ "status": {
3
+ "message": "Successful",
4
+ "code": 200
5
+ },
6
+ "data": {
7
+ "user_roles": [
8
+ {
9
+ "invite_accept_time": "2020-11-18T04:52:24.237160",
10
+ "address_id": "a_dacb87ff-91b8-4649-9201-804cba767929",
11
+ "is_preparer": false,
12
+ "is_ap_analyst": false,
13
+ "is_reviewer": false,
14
+ "is_bookkeeping_admin": false,
15
+ "is_company_officer": false,
16
+ "is_invite_accepted": true,
17
+ "inviter_email": "mohan@zeni.ai",
18
+ "user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
19
+ "user_last_check_in_time_into_tenant": "2021-12-08T12:05:50.399411",
20
+ "user_email_domain": "zeni.ai",
21
+ "company_id": "c_1ad773dc-2395-4fa7-9fbc-3f1c5f06a333",
22
+ "is_invited": true,
23
+ "is_bookkeeping_user": false,
24
+ "invite_updater_id": null,
25
+ "invite_update_time": null,
26
+ "tenant_email_domain": "fingo.ai",
27
+ "is_tax_lead": false,
28
+ "update_time": "2021-12-16T10:15:02.615038",
29
+ "inviter_id": "u_70221b69-51a0-4b48-a634-f59391365805",
30
+ "is_admin": true,
31
+ "is_zeni_support_user": false,
32
+ "user_role_id": "ur_003da742-26c2-441a-bd2c-77d91f3762a6",
33
+ "is_investor_or_banker": false,
34
+ "is_deleted": false,
35
+ "tenant_id": "tenant_cc2926db-168c-4d27-844e-932090dd66fc",
36
+ "is_zeni": true,
37
+ "create_time": "2020-09-03T07:14:07.711552",
38
+ "invite_create_time": "2020-09-03T07:14:07.168188",
39
+ "user_email": "nikunj@zeni.ai",
40
+ "is_controller": false,
41
+ "is_customer_success_manager": false,
42
+ "is_bill_pay_admin": false,
43
+ "is_bill_pay_user": false,
44
+ "is_charge_card_admin": false,
45
+ "is_charge_card_user": false,
46
+ "is_deposit_accounts_admin": false,
47
+ "is_deposit_accounts_user": false,
48
+ "is_treasury_admin": false,
49
+ "is_treasury_user": false,
50
+ "is_reimbursements_admin": false,
51
+ "is_reimbursements_user": false,
52
+ "accounting_class_ids": [],
53
+ "manager_user_id": null,
54
+ "is_banker": false,
55
+ "title_at_company": null,
56
+ "additional_document_types_requested_for_verification": null,
57
+ "additional_submitted_documents_for_verification_file_ids": null,
58
+ "are_additional_documents_requested_for_verification": false,
59
+ "are_additional_documents_submitted_for_verification": false,
60
+ "user_verification_status": {
61
+ "code": "not_started",
62
+ "name": "Not Started"
63
+ },
64
+ "reimbursement_info": {
65
+ "reimbursement_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
66
+ "reimbursement_tos_acceptance_time": "2022-08-12T06:08:24.590000",
67
+ "is_reimbursement_tos_accepted": true,
68
+ "reimbursement_tos_acceptance_ip": "43.250.156.219",
69
+ "primary_funding_account": {
70
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
71
+ "account_type": "payment_account"
72
+ }
73
+ },
74
+ "deposit_accounts_info": {
75
+ "is_deposit_accounts_enabled": true,
76
+ "deposit_accounts_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
77
+ "deposit_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
78
+ "deposit_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
79
+ "is_deposit_accounts_tos_accepted": true,
80
+ "deposit_accounts_tos_acceptance_ip": "43.250.156.219"
81
+ },
82
+ "charge_cards_info": {
83
+ "charge_cards_credit_account_limit": 50000,
84
+ "is_company_interested_in_charge_card": true,
85
+ "charge_cards_tos_acceptance_time": "2023-12-18T08:07:26.864486",
86
+ "charge_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
87
+ "charge_cards_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
88
+ "charge_cards_tos_acceptance_ip": "219.91.160.34",
89
+ "is_charge_cards_tos_accepted": true,
90
+ "is_charge_cards_enabled": false
91
+ },
92
+ "debit_cards_info": {
93
+ "is_debit_cards_tos_accepted": true,
94
+ "is_debit_cards_enabled": true,
95
+ "debit_cards_tos_acceptance_time": "2023-11-18T08:07:26.864486",
96
+ "debit_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
97
+ "debit_cards_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
98
+ "debit_cards_tos_acceptance_ip": "219.91.160.34"
99
+ },
100
+ "treasury_accounts_info": {
101
+ "treasury_accounts_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
102
+ "treasury_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
103
+ "is_treasury_accounts_tos_accepted": true,
104
+ "treasury_accounts_tos_acceptance_ip": "43.250.156.219",
105
+ "treasury_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
106
+ "treasury_business_verification_verified_time": "2023-11-18T08:07:26.864486",
107
+ "primary_funding_account": {
108
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
109
+ "account_type": "payment_account"
110
+ },
111
+ "business_verification_status": {
112
+ "code": "verified",
113
+ "name": "Verified"
114
+ },
115
+ "company_verification_status": {
116
+ "code": "verified",
117
+ "name": "Verified"
118
+ }
119
+ }
120
+ }
121
+ ],
122
+ "companies": [
123
+ {
124
+ "status": {
125
+ "code": "onboarding",
126
+ "name": null
127
+ },
128
+ "subscription_billing_address_id": "a_72f1f8a4-1251-4445-8709-c1fd2f6effe7",
129
+ "company_money_raised_max": 50000,
130
+ "company_description": null,
131
+ "company_url": "fingo.ai",
132
+ "is_bill_pay_feature_enabled": false,
133
+ "is_reimbursement_feature_enabled": true,
134
+ "is_deposit_accounts_feature_enabled": true,
135
+ "is_same_day_ach_enabled": true,
136
+ "is_feature_vendor_listing_enabled": true,
137
+ "onboarding_user_ids": [],
138
+ "book_close_date": null,
139
+ "is_zeni_coa_in_use": true,
140
+ "is_subsidiary": false,
141
+ "is_onboarding_completed": false,
142
+ "is_onboarding_company_details_step_completed": false,
143
+ "parent_company_id": null,
144
+ "bill_pay_info": {
145
+ "bill_pay_tos_acceptance_user_id": null,
146
+ "bill_pay_tos_acceptance_user_agent": null,
147
+ "bill_pay_tos_acceptance_time": null,
148
+ "bill_pay_tos_acceptance_ip": null,
149
+ "is_bill_pay_tos_accepted": false,
150
+ "is_bill_pay_enabled": false,
151
+ "is_business_verified": false,
152
+ "is_ready_for_verification": false,
153
+ "is_international_wire_enabled": false,
154
+ "is_vendor_magic_link_feature_enabled": false,
155
+ "business_verification_status": {
156
+ "code": "in_progress",
157
+ "name": "In Progress"
158
+ },
159
+ "company_verification_status": {
160
+ "code": "in_progress",
161
+ "name": "In Progress"
162
+ },
163
+ "is_bill_payment_account_setup": false,
164
+ "bill_payment_account_ids": ["3f3181d2-76de-40c2-8f3b-152d2c6726d7"],
165
+ "users_for_verification": ["u_e1fb3ecf-83a4-4477-8930-ad60bb010044"],
166
+ "is_bill_pay_approval_enabled": true,
167
+ "schedule_pay_now_cutoff_time_by_payment_method": {
168
+ "ach": "2022-08-26T20:00:00+00:00"
169
+ },
170
+ "primary_funding_account": {
171
+ "account_id": null,
172
+ "account_type": null
173
+ },
174
+ "international_wire_onboarding_status": {
175
+ "code": "verified",
176
+ "name": "Verified"
177
+ },
178
+ "international_wire_onboarding_details": {}
179
+ },
180
+ "reimbursement_info": {
181
+ "is_reimbursement_enabled": true,
182
+ "reimbursement_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
183
+ "reimbursement_tos_acceptance_time": "2022-08-12T06:08:24.590000",
184
+ "reimbursement_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
185
+ "is_reimbursement_tos_accepted": true,
186
+ "reimbursement_tos_acceptance_ip": "43.250.156.219",
187
+ "primary_funding_account": {
188
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
189
+ "account_type": "payment_account"
190
+ }
191
+ },
192
+ "deposit_accounts_info": {
193
+ "is_deposit_accounts_enabled": true,
194
+ "deposit_accounts_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
195
+ "deposit_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
196
+ "deposit_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
197
+ "is_deposit_accounts_tos_accepted": true,
198
+ "deposit_accounts_tos_acceptance_ip": "43.250.156.219",
199
+ "primary_funding_account": {
200
+ "account_id": null,
201
+ "account_type": null
202
+ }
203
+ },
204
+ "charge_cards_info": {
205
+ "charge_cards_credit_account_limit": 50000,
206
+ "is_company_interested_in_charge_card": true,
207
+ "charge_cards_tos_acceptance_time": "2023-12-18T08:07:26.864486",
208
+ "charge_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
209
+ "charge_cards_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
210
+ "charge_cards_tos_acceptance_ip": "219.91.160.34",
211
+ "is_charge_cards_tos_accepted": true,
212
+ "is_charge_cards_enabled": false,
213
+ "primary_funding_account": {
214
+ "account_id": null,
215
+ "account_type": null,
216
+ "is_auto_pay_enabled": false
217
+ }
218
+ },
219
+ "debit_cards_info": {
220
+ "is_debit_cards_tos_accepted": true,
221
+ "is_debit_cards_enabled": true,
222
+ "debit_cards_tos_acceptance_time": "2023-11-18T08:07:26.864486",
223
+ "debit_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
224
+ "debit_cards_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
225
+ "debit_cards_tos_acceptance_ip": "219.91.160.34"
226
+ },
227
+ "treasury_accounts_info": {
228
+ "treasury_accounts_tos_acceptance_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
229
+ "treasury_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
230
+ "is_treasury_accounts_tos_accepted": true,
231
+ "treasury_accounts_tos_acceptance_ip": "43.250.156.219",
232
+ "treasury_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
233
+ "treasury_business_verification_verified_time": "2023-11-18T08:07:26.864486",
234
+ "primary_funding_account": {
235
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
236
+ "account_type": "payment_account"
237
+ },
238
+ "business_verification_status": {
239
+ "code": "verified",
240
+ "name": "Verified"
241
+ },
242
+ "company_verification_status": {
243
+ "code": "verified",
244
+ "name": "Verified"
245
+ }
246
+ },
247
+ "source_of_funds": "alimony",
248
+ "mileage_rate_config": {
249
+ "default_mileage_unit_amount": 0.67,
250
+ "mileage_unit_amount": 0.655,
251
+ "mileage_unit": "mile",
252
+ "mileage_currency_code": "USD",
253
+ "mileage_currency_symbol": "$",
254
+ "denomination_conversions": {
255
+ "amount": 65.5,
256
+ "denomination": "cents",
257
+ "denomination_symbol": "¢"
258
+ },
259
+ "description": "62.5 cents/mile as per IRS guidelines"
260
+ },
261
+ "is_month_end_email_in_draft": false,
262
+ "meeting_url": "https://calendly.com/zeni-cfo-plan/cfo-discovery-call",
263
+ "taxes_due_date": null,
264
+ "company_id": "c_1ad773dc-2395-4fa7-9fbc-3f1c5f06a333",
265
+ "controller_user_ids": [
266
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
267
+ "u_67e6a6a4-fab3-4e5b-a467-79a35147a0ff"
268
+ ],
269
+ "customer_success_manager_user_ids": [
270
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
271
+ "u_67e6a6a4-fab3-4e5b-a467-79a35147a0ff"
272
+ ],
273
+ "preparer_user_ids": [
274
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
275
+ "u_dc6565f1-f079-4f47-a579-0374dc713536"
276
+ ],
277
+ "ap_analyst_user_ids": [],
278
+ "receiver_emails": ["fingo@zeni.ai", "abhijeet@zeni.ai"],
279
+ "create_time": "2020-01-27T19:24:55.432000",
280
+ "company_payment_processors": ["Stripe"],
281
+ "is_multi_currency_enabled": false,
282
+ "note_last_updated_user_id": null,
283
+ "company_finance_management_type": "We manage it ourselves",
284
+ "company_credit_cards": ["Brex"],
285
+ "is_qbo_multi_currency_enabled": false,
286
+ "company_inc_type": "C Corporation",
287
+ "connected_account_provider": "stripe",
288
+ "last_report_sent_date": null,
289
+ "last_report_sent_business_day": null,
290
+ "company_contact_user_id": null,
291
+ "taxes_filed_years": [2021, 2020],
292
+ "sic_code": null,
293
+ "note": "Hello world",
294
+ "company_inc_country_code": null,
295
+ "tax_lead_user_ids": [],
296
+ "note_last_update_time": null,
297
+ "company_status_code": "live1",
298
+ "company_inc_state_code": null,
299
+ "company_industry": "construction",
300
+ "company_legal_name": "Fingo Inc.",
301
+ "update_time": "2021-11-24T08:14:09.590788",
302
+ "reviewer_user_ids": [],
303
+ "naics_code": null,
304
+ "referrer_name": null,
305
+ "bookkeeping_software_used": "Quickbooks Online",
306
+ "services_requested": [
307
+ "Yearly Taxes",
308
+ "Bookkeeping & Accounting",
309
+ "Financial Budgeting & Projections"
310
+ ],
311
+ "payroll_provider": "Trinet",
312
+ "company_monthly_expenses_max": 100000,
313
+ "phone": "+1 (732) 497-2351",
314
+ "company_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
315
+ "registered_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
316
+ "company_group": {
317
+ "id": "z4",
318
+ "name": null
319
+ },
320
+ "taxes_filed_date": "2021-08-24",
321
+ "company_inc_date": null,
322
+ "company_size_max": 20,
323
+ "company_money_raised_min": 400000,
324
+ "tax_id": "833464357",
325
+ "company_monthly_expenses_min": 0,
326
+ "company_size_min": 1,
327
+ "company_officer_user_ids": [
328
+ "u_3890bff3-191c-4528-867f-5869518b8078",
329
+ "u_964c3270-25f7-42f3-a6fc-7ef040e6d0f1",
330
+ "u_7def9138-9ee1-44bf-8fbb-da72d13ed720",
331
+ "u_50c92aa7-821e-4d50-aa30-5420e6bc2e6c",
332
+ "u_a50aacd8-0f74-40c3-b539-e25228c44cab",
333
+ "u_70dedfef-a40b-4e01-970b-b07d04b227c6",
334
+ "u_31d1bb27-1039-4a23-9de0-ae409d594371"
335
+ ],
336
+ "name": "fingo_.ai",
337
+ "company_business_model": null,
338
+ "company_inc_country": null,
339
+ "primary_email_domain": "fingo.ai",
340
+ "company_inc_state": "Delaware",
341
+ "business_banks": ["Silicon Valley Bank"],
342
+ "tax_status": {
343
+ "code": "filed",
344
+ "name": null
345
+ },
346
+ "referrer_type": null,
347
+ "primary_contact_user_id": "u_7def9138-9ee1-44bf-8fbb-da72d13ed720",
348
+ "duns_id": null,
349
+ "company_group_code": "Z2",
350
+ "currency_code": "USD",
351
+ "company_finance_management_firm_name": null,
352
+ "is_unit_migration_tos_required": false,
353
+ "is_new_company_industry_verified": true,
354
+ "is_unit_migration_required": false
355
+ }
356
+ ],
357
+ "addresses": [
358
+ {
359
+ "city": "San francisco",
360
+ "update_time": "2021-11-08T12:02:58.380658",
361
+ "country": "USA",
362
+ "address_id": "a_72f1f8a4-1251-4445-8709-c1fd2f6effe7",
363
+ "longitude": null,
364
+ "state": "California",
365
+ "street": ["503 Bryant St", "Suite 224"],
366
+ "create_time": "2021-11-08T12:02:58.380652",
367
+ "country_code": null,
368
+ "latitude": null,
369
+ "postal_code": "96204"
370
+ }
371
+ ],
372
+ "users": [
373
+ {
374
+ "microsoft_oauth_info_web": null,
375
+ "address_id": null,
376
+ "last_name": "Dalsaniya",
377
+ "google_oauth_disabled": false,
378
+ "photo": {
379
+ "original": "https://lh3.googleusercontent.com/a-/AOh14Gh8H_iXVbPLWE5OBbWqR4mLop8__gksY7t6w5nT=s96-c"
380
+ },
381
+ "last_seen_time": null,
382
+ "last_locale": null,
383
+ "last_country": null,
384
+ "is_onboarding_successful": false,
385
+ "role_at_company": null,
386
+ "country_code": null,
387
+ "gender": null,
388
+ "external_metadata": null,
389
+ "last_state": null,
390
+ "city": null,
391
+ "first_name": "Nikunj",
392
+ "is_pre_onboarding_successful": false,
393
+ "middle_name": null,
394
+ "last_auth_provider": "google",
395
+ "last_location": null,
396
+ "company_id": null,
397
+ "is_potential_fraud": false,
398
+ "state": null,
399
+ "email": "nikunj@zeni.ai",
400
+ "mixpanel_alias": null,
401
+ "birthday": null,
402
+ "update_time": "2021-12-08T08:35:49.584591",
403
+ "phone": null,
404
+ "ssn": null,
405
+ "address": null,
406
+ "user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
407
+ "is_deleted": false,
408
+ "zipcode": null,
409
+ "time_zone": null,
410
+ "last_time_zone": null,
411
+ "create_time": "2020-09-03T07:14:06.899663",
412
+ "last_city": null,
413
+ "country": null,
414
+ "external_id": []
415
+ }
416
+ ]
417
+ }
418
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "status": {
3
+ "message": "Successful",
4
+ "code": 200
5
+ },
6
+ "data": {
7
+ "addresses": [
8
+ {
9
+ "city": "San francisco",
10
+ "update_time": "2022-01-10T17:18:56.269034",
11
+ "country": "USA",
12
+ "address_id": "a_0bd3a94a-482c-430e-b5f2-10c16d3cee5c",
13
+ "longitude": -122.3898194,
14
+ "state": "California",
15
+ "street": ["129 Bryant St", "Suite 204"],
16
+ "create_time": "2021-12-08T18:44:54.971860",
17
+ "country_code": null,
18
+ "latitude": 37.786175,
19
+ "postal_code": "94105",
20
+ "hash_value": "57bcd83923ac258877664fb1cc142af1f3febfdbcaab6913ac6eab2c3fb15ed1"
21
+ }
22
+ ]
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "status": {
3
+ "message": "Successful",
4
+ "code": 200
5
+ },
6
+ "data": {
7
+ "addresses": [
8
+ {
9
+ "city": "San francisco",
10
+ "update_time": "2022-01-10T17:18:56.269034",
11
+ "country": "USA",
12
+ "address_id": "a_0bd3a94a-482c-430e-b5f2-10c16d3cee5c",
13
+ "longitude": -122.3898194,
14
+ "state": "California",
15
+ "street": ["129 Bryant St", "Suite 204"],
16
+ "create_time": "2021-12-08T18:44:54.971860",
17
+ "country_code": null,
18
+ "latitude": 37.786175,
19
+ "postal_code": "94105",
20
+ "hash_value": "57bcd83923ac258877664fb1cc142af1f3febfdbcaab6913ac6eab2c3fb15ed1"
21
+ }
22
+ ]
23
+ }
24
+ }
@@ -47,7 +47,6 @@ export const initialAiCfoViewState = {
47
47
  responseStateByChatSessionId: {},
48
48
  stopSubmitStateByChatSessionId: {},
49
49
  suggestedQuestionsByPageContext: {},
50
- skills: { fetchState: 'Not-Started', error: undefined, skills: [] },
51
50
  };
52
51
  const aiCfoView = createSlice({
53
52
  name: 'aiCfoView',
@@ -63,7 +62,7 @@ const aiCfoView = createSlice({
63
62
  answer: { fetchState: 'In-Progress', error: undefined },
64
63
  };
65
64
  },
66
- prepare(sessionId, questionAnswerId, userId, questionId, createdAt, question, files, macroId) {
65
+ prepare(sessionId, questionAnswerId, userId, questionId, createdAt, question, files) {
67
66
  return {
68
67
  payload: {
69
68
  sessionId,
@@ -73,7 +72,6 @@ const aiCfoView = createSlice({
73
72
  createdAt,
74
73
  question,
75
74
  files,
76
- macroId,
77
75
  },
78
76
  };
79
77
  },
@@ -224,7 +222,7 @@ const aiCfoView = createSlice({
224
222
  draft.createSessionAndSubmitState.fetchState = 'In-Progress';
225
223
  draft.createSessionAndSubmitState.error = undefined;
226
224
  },
227
- prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, macroId) {
225
+ prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
228
226
  return {
229
227
  payload: {
230
228
  agentId,
@@ -235,7 +233,6 @@ const aiCfoView = createSlice({
235
233
  question,
236
234
  files,
237
235
  pageContext,
238
- macroId,
239
236
  },
240
237
  };
241
238
  },
@@ -448,29 +445,6 @@ const aiCfoView = createSlice({
448
445
  error,
449
446
  };
450
447
  },
451
- fetchSkills(draft) {
452
- // Optional-chain: persisted/rehydrated state from before this slice existed
453
- // may have no `skills`, so don't assume draft.skills is set.
454
- draft.skills = {
455
- fetchState: 'In-Progress',
456
- error: undefined,
457
- skills: draft.skills?.skills ?? [],
458
- };
459
- },
460
- fetchSkillsSuccess(draft, action) {
461
- draft.skills = {
462
- fetchState: 'Completed',
463
- error: undefined,
464
- skills: action.payload.skills,
465
- };
466
- },
467
- fetchSkillsFailure(draft, action) {
468
- draft.skills = {
469
- fetchState: 'Error',
470
- error: action.payload,
471
- skills: draft.skills?.skills ?? [],
472
- };
473
- },
474
448
  clearAiCfoView(draft) {
475
449
  Object.assign(draft, initialAiCfoViewState);
476
450
  },
@@ -481,5 +455,5 @@ const aiCfoView = createSlice({
481
455
  },
482
456
  },
483
457
  });
484
- export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } = aiCfoView.actions;
458
+ export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } = aiCfoView.actions;
485
459
  export default aiCfoView.reducer;
@@ -22,14 +22,3 @@ export const getAiCfoView = (state) => {
22
22
  export function getSuggestedQuestionsForPageContext(state, pageContext) {
23
23
  return state.aiCfoViewState?.suggestedQuestionsByPageContext?.[pageContext];
24
24
  }
25
- // Stable fallback so getSkills returns a referentially-stable object when skills
26
- // state is absent — a fresh literal each call would defeat useSelector identity
27
- // checks and cause needless re-renders.
28
- const EMPTY_SKILLS_STATE = {
29
- fetchState: 'Not-Started',
30
- error: undefined,
31
- skills: [],
32
- };
33
- export function getSkills(state) {
34
- return state.aiCfoViewState?.skills ?? EMPTY_SKILLS_STATE;
35
- }
@@ -66,7 +66,7 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
66
66
  }));
67
67
  }
68
68
  export const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createSessionAndSubmit.match), switchMap((action) => {
69
- const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, macroId, } = action.payload;
69
+ const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
70
70
  const payload = {
71
71
  agent_id: agentId,
72
72
  ...(pageContext != null && { page_context: pageContext }),
@@ -113,7 +113,7 @@ export const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => action
113
113
  // This allows fetchChatHistory to run after the question is submitted
114
114
  of(createSessionAndSubmitSuccess(),
115
115
  // Submit the question after handlers are bound
116
- submitQuestion(sessionId, questionAnswerId, userId, questionId, createdAt, question, files, macroId),
116
+ submitQuestion(sessionId, questionAnswerId, userId, questionId, createdAt, question, files),
117
117
  // Add question payload optimistically after submitQuestion (matches original order)
118
118
  // This is idempotent - won't create duplicates if called multiple times
119
119
  // submitQuestionEpic will find the question already exists and only update the response
@@ -4,7 +4,7 @@ import { upsertOrAddQuestionAnswerPayload } from '../../../entity/aiCfo/aiCfoRed
4
4
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
5
  import { submitQuestion, submitQuestionFailure, submitQuestionSuccess, } from '../aiCfoViewReducer';
6
6
  export const submitQuestionEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitQuestion.match), mergeMap((action) => {
7
- const { questionAnswerId, userId, sessionId, questionId, createdAt, question, files, macroId, } = action.payload;
7
+ const { questionAnswerId, userId, sessionId, questionId, createdAt, question, files, } = action.payload;
8
8
  const { aiCfoViewState } = state$.value;
9
9
  const { uiState } = aiCfoViewState;
10
10
  const agentId = uiState.agentId;
@@ -17,21 +17,15 @@ export const submitQuestionEpic = (actions$, state$, zeniAPI) => actions$.pipe(f
17
17
  const formData = new FormData();
18
18
  formData.append('chat_session_id', sessionId);
19
19
  formData.append('message', question);
20
- if (macroId != null) {
21
- formData.append('macro_id', macroId);
22
- }
23
20
  for (const file of files) {
24
21
  formData.append('files', file, file.name);
25
22
  }
26
23
  apiCall = zeniAPI.postFormData(endpoint, formData);
27
24
  }
28
25
  else {
29
- // `message` is the display token (e.g. "/flux"); `macro_id` tells the chat
30
- // service to expand the skill's instructions as the actual agent prompt.
31
26
  apiCall = zeniAPI.postAndGetJSON(endpoint, {
32
27
  chat_session_id: sessionId,
33
28
  message: question,
34
- ...(macroId != null && { macro_id: macroId }),
35
29
  });
36
30
  }
37
31
  return apiCall.pipe(mergeMap((response) => {