@zeniai/client-epic-state 4.12.65 → 4.12.66

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 (91) hide show
  1. package/lib/entity/paymentAccount/paymentAccountPayload.d.ts +1 -1
  2. package/lib/entity/paymentAccount/paymentAccountPayload.js +7 -7
  3. package/lib/entity/tenant/clearAllEpic.d.ts +1 -1
  4. package/lib/entity/tenant/clearAllEpic.js +1 -1
  5. package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
  6. package/lib/entity/vendor/__mocks__/vendorMock.js +339 -0
  7. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +6 -1
  8. package/lib/entity/vendor/vendorPayload.d.ts +2 -1
  9. package/lib/entity/vendor/vendorPayload.js +6 -4
  10. package/lib/entity/vendor/vendorState.d.ts +1 -0
  11. package/lib/entity/vendor/vendorType.d.ts +2 -1
  12. package/lib/epic.d.ts +5 -2
  13. package/lib/epic.js +5 -2
  14. package/lib/index.d.ts +15 -8
  15. package/lib/index.js +31 -16
  16. package/lib/reducer.d.ts +4 -1
  17. package/lib/reducer.js +4 -1
  18. package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +34 -0
  19. package/lib/view/addressView/__mocks__/addressViewMocks.js +223 -0
  20. package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  21. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +218 -0
  22. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +345 -0
  23. package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  24. package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  25. package/lib/view/commonVendorView/vendorView/epics/fetchVendorDetailsEpic.js +2 -2
  26. package/lib/view/commonVendorView/vendorView/vendorViewPayload.d.ts +6 -0
  27. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.d.ts +2 -1
  28. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.js +6 -1
  29. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.d.ts +3 -2
  30. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.js +4 -2
  31. package/lib/view/commonVendorView/vendorsTabVendorView/epics/resetVendorsTabVendorDetailLocalDataEpic.js +1 -1
  32. package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.d.ts +3 -1
  33. package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.js +14 -3
  34. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.d.ts +5 -0
  35. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.js +35 -1
  36. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +7 -2
  37. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +23 -3
  38. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +16 -1
  39. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +24 -7
  40. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +16 -0
  41. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.js +3 -0
  42. package/lib/view/settingsView/settingsViewSelector.js +1 -1
  43. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +2 -2
  44. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
  45. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +5 -5
  46. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +11 -4
  47. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +16 -7
  48. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.d.ts +9 -0
  49. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.js +48 -0
  50. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.d.ts +2 -2
  51. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.js +12 -6
  52. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountList.d.ts +1 -0
  53. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.d.ts +6 -0
  54. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.js +25 -2
  55. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts +1 -0
  56. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js +1 -0
  57. package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +8 -0
  58. package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
  59. package/lib/view/twoFactorAuthentication/sendOtpEpic.js +9 -6
  60. package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/json/vendorFiling1099ListSuccess.json +1 -1
  61. package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.d.ts +3 -3
  62. package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.js +17 -3
  63. package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListSelectorMock.d.ts +1 -1
  64. package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListSelectorMock.js +10 -1
  65. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +132 -0
  66. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.js +146 -0
  67. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +8 -0
  68. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +30 -0
  69. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/fetchVendorsFiling1099ListEpic.d.ts +5 -5
  70. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/fetchVendorsFiling1099ListEpic.js +6 -6
  71. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListPayload.d.ts +3 -3
  72. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListReducer.d.ts +8 -4
  73. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListReducer.js +18 -5
  74. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListSelector.d.ts +6 -6
  75. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListSelector.js +8 -3
  76. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListState.d.ts +3 -3
  77. package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListState.js +1 -1
  78. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.d.ts +20 -0
  79. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.js +48 -0
  80. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +25 -0
  81. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +180 -0
  82. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.d.ts +11 -0
  83. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.js +58 -0
  84. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.d.ts +14 -0
  85. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.js +17 -0
  86. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.d.ts +26 -0
  87. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.js +2 -0
  88. package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +1 -1
  89. package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +2 -2
  90. package/package.json +2 -1
  91. /package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListPayload.js +0 -0
@@ -0,0 +1,345 @@
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
+ "user_role_id": "ur_003da742-26c2-441a-bd2c-77d91f3762a6",
32
+ "is_investor_or_banker": false,
33
+ "is_deleted": false,
34
+ "tenant_id": "tenant_cc2926db-168c-4d27-844e-932090dd66fc",
35
+ "is_zeni": true,
36
+ "create_time": "2020-09-03T07:14:07.711552",
37
+ "invite_create_time": "2020-09-03T07:14:07.168188",
38
+ "user_email": "nikunj@zeni.ai",
39
+ "is_controller": false,
40
+ "is_customer_success_manager": false,
41
+ "is_bill_pay_admin": false,
42
+ "is_bill_pay_user": false,
43
+ "is_charge_card_admin": false,
44
+ "is_charge_card_user": false,
45
+ "is_deposit_accounts_admin": false,
46
+ "is_deposit_accounts_user": false,
47
+ "is_reimbursements_admin": false,
48
+ "is_reimbursements_user": false,
49
+ "accounting_class_ids": [],
50
+ "manager_user_id": null,
51
+ "is_banker": false,
52
+ "title_at_company": null,
53
+ "additional_document_types_requested_for_verification": null,
54
+ "additional_submitted_documents_for_verification_file_ids": null,
55
+ "are_additional_documents_requested_for_verification": false,
56
+ "are_additional_documents_submitted_for_verification": false,
57
+ "user_verification_status": {
58
+ "code": "not_started",
59
+ "name": "Not Started"
60
+ },
61
+ "reimbursement_info": {
62
+ "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",
63
+ "reimbursement_tos_acceptance_time": "2022-08-12T06:08:24.590000",
64
+ "is_reimbursement_tos_accepted": true,
65
+ "reimbursement_tos_acceptance_ip": "43.250.156.219",
66
+ "primary_funding_account": {
67
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
68
+ "account_type": "payment_account"
69
+ }
70
+ },
71
+ "deposit_accounts_info": {
72
+ "is_deposit_accounts_enabled": true,
73
+ "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",
74
+ "deposit_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
75
+ "deposit_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
76
+ "is_deposit_accounts_tos_accepted": true,
77
+ "deposit_accounts_tos_acceptance_ip": "43.250.156.219"
78
+ },
79
+ "charge_cards_info": {
80
+ "charge_cards_tos_acceptance_time": "2023-12-18T08:07:26.864486",
81
+ "charge_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
82
+ "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",
83
+ "charge_cards_tos_acceptance_ip": "219.91.160.34",
84
+ "is_charge_cards_tos_accepted": true,
85
+ "is_charge_cards_enabled": false
86
+ }
87
+ }
88
+ ],
89
+ "companies": [
90
+ {
91
+ "status": {
92
+ "code": "onboarding",
93
+ "name": null
94
+ },
95
+ "company_money_raised_max": 50000,
96
+ "company_description": null,
97
+ "company_url": "fingo.ai",
98
+ "is_bill_pay_feature_enabled": false,
99
+ "is_reimbursement_feature_enabled": true,
100
+ "is_deposit_accounts_feature_enabled": true,
101
+ "is_feature_vendor_listing_enabled": true,
102
+ "onboarding_user_ids": [],
103
+ "book_close_date": null,
104
+ "is_zeni_coa_in_use": true,
105
+ "is_subsidiary": false,
106
+ "is_onboarding_completed": false,
107
+ "is_onboarding_company_details_step_completed": false,
108
+ "parent_company_id": null,
109
+ "bill_pay_info": {
110
+ "bill_pay_tos_acceptance_user_id": null,
111
+ "bill_pay_tos_acceptance_user_agent": null,
112
+ "bill_pay_tos_acceptance_time": null,
113
+ "bill_pay_tos_acceptance_ip": null,
114
+ "is_bill_pay_tos_accepted": false,
115
+ "is_bill_pay_enabled": false,
116
+ "is_business_verified": false,
117
+ "is_ready_for_verification": false,
118
+ "is_international_wire_enabled": false,
119
+ "is_vendor_magic_link_feature_enabled": false,
120
+ "business_verification_status": {
121
+ "code": "in_progress",
122
+ "name": "In Progress"
123
+ },
124
+ "company_verification_status": {
125
+ "code": "in_progress",
126
+ "name": "In Progress"
127
+ },
128
+ "is_bill_payment_account_setup": false,
129
+ "bill_payment_account_ids": ["3f3181d2-76de-40c2-8f3b-152d2c6726d7"],
130
+ "users_for_verification": ["u_e1fb3ecf-83a4-4477-8930-ad60bb010044"],
131
+ "is_bill_pay_approval_enabled": true,
132
+ "schedule_pay_now_cutoff_time_by_payment_method": {
133
+ "ach": "2022-08-26T20:00:00+00:00"
134
+ },
135
+ "primary_funding_account": {
136
+ "account_id": null,
137
+ "account_type": null
138
+ }
139
+ },
140
+ "reimbursement_info": {
141
+ "is_reimbursement_enabled": true,
142
+ "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",
143
+ "reimbursement_tos_acceptance_time": "2022-08-12T06:08:24.590000",
144
+ "reimbursement_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
145
+ "is_reimbursement_tos_accepted": true,
146
+ "reimbursement_tos_acceptance_ip": "43.250.156.219",
147
+ "primary_funding_account": {
148
+ "account_id": "pay_acc_f700239b-bab3-4abc-b482-6aa733a12d0d",
149
+ "account_type": "payment_account"
150
+ }
151
+ },
152
+ "deposit_accounts_info": {
153
+ "is_deposit_accounts_enabled": true,
154
+ "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",
155
+ "deposit_accounts_tos_acceptance_time": "2022-08-12T06:08:24.590000",
156
+ "deposit_accounts_tos_acceptance_user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
157
+ "is_deposit_accounts_tos_accepted": true,
158
+ "deposit_accounts_tos_acceptance_ip": "43.250.156.219",
159
+ "primary_funding_account": {
160
+ "account_id": null,
161
+ "account_type": null
162
+ }
163
+ },
164
+ "charge_cards_info": {
165
+ "charge_cards_tos_acceptance_time": "2023-12-18T08:07:26.864486",
166
+ "charge_cards_tos_acceptance_user_id": "u_1c176a71-77f9-428c-bf32-f90396024326",
167
+ "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",
168
+ "charge_cards_tos_acceptance_ip": "219.91.160.34",
169
+ "is_charge_cards_tos_accepted": true,
170
+ "is_charge_cards_enabled": false,
171
+ "primary_funding_account": {
172
+ "account_id": null,
173
+ "account_type": null
174
+ }
175
+ },
176
+ "mileage_rate_config": {
177
+ "default_mileage_unit_amount": 0.67,
178
+ "mileage_unit_amount": 0.655,
179
+ "mileage_unit": "mile",
180
+ "mileage_currency_code": "USD",
181
+ "mileage_currency_symbol": "$",
182
+ "denomination_conversions": {
183
+ "amount": 65.5,
184
+ "denomination": "cents",
185
+ "denomination_symbol": "¢"
186
+ },
187
+ "description": "62.5 cents/mile as per IRS guidelines"
188
+ },
189
+ "is_month_end_email_in_draft": false,
190
+ "meeting_url": "https://calendly.com/zeni-cfo-plan/cfo-discovery-call",
191
+ "taxes_due_date": null,
192
+ "company_id": "c_1ad773dc-2395-4fa7-9fbc-3f1c5f06a333",
193
+ "controller_user_ids": [
194
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
195
+ "u_67e6a6a4-fab3-4e5b-a467-79a35147a0ff"
196
+ ],
197
+ "customer_success_manager_user_ids": [
198
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
199
+ "u_67e6a6a4-fab3-4e5b-a467-79a35147a0ff"
200
+ ],
201
+ "preparer_user_ids": [
202
+ "u_4f8f233e-9740-4511-8d1b-3fbb8311f42d",
203
+ "u_dc6565f1-f079-4f47-a579-0374dc713536"
204
+ ],
205
+ "ap_analyst_user_ids": [],
206
+ "receiver_emails": ["fingo@zeni.ai", "abhijeet@zeni.ai"],
207
+ "create_time": "2020-01-27T19:24:55.432000",
208
+ "company_payment_processors": ["Stripe"],
209
+ "is_multi_currency_enabled": false,
210
+ "note_last_updated_user_id": null,
211
+ "company_finance_management_type": "We manage it ourselves",
212
+ "company_credit_cards": ["Brex"],
213
+ "is_qbo_multi_currency_enabled": false,
214
+ "company_inc_type": "C Corporation",
215
+ "connected_account_provider": "stripe",
216
+ "last_report_sent_date": null,
217
+ "last_report_sent_business_day": null,
218
+ "company_contact_user_id": null,
219
+ "taxes_filed_years": [2021, 2020],
220
+ "sic_code": null,
221
+ "note": "Hello world",
222
+ "company_inc_country_code": null,
223
+ "tax_lead_user_ids": [],
224
+ "note_last_update_time": null,
225
+ "company_status_code": "live1",
226
+ "company_inc_state_code": null,
227
+ "company_industry": "construction",
228
+ "company_legal_name": "Fingo Inc.",
229
+ "update_time": "2021-11-24T08:14:09.590788",
230
+ "reviewer_user_ids": [],
231
+ "naics_code": null,
232
+ "referrer_name": null,
233
+ "bookkeeping_software_used": "Quickbooks Online",
234
+ "services_requested": [
235
+ "Yearly Taxes",
236
+ "Bookkeeping & Accounting",
237
+ "Financial Budgeting & Projections"
238
+ ],
239
+ "payroll_provider": "Trinet",
240
+ "company_monthly_expenses_max": 100000,
241
+ "phone": "+1 (732) 497-2351",
242
+ "company_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
243
+ "company_group": {
244
+ "id": "z4",
245
+ "name": null
246
+ },
247
+ "taxes_filed_date": "2021-08-24",
248
+ "company_inc_date": null,
249
+ "company_size_max": 20,
250
+ "company_money_raised_min": 400000,
251
+ "tax_id": "833464357",
252
+ "company_monthly_expenses_min": 0,
253
+ "company_size_min": 1,
254
+ "company_officer_user_ids": [
255
+ "u_3890bff3-191c-4528-867f-5869518b8078",
256
+ "u_964c3270-25f7-42f3-a6fc-7ef040e6d0f1",
257
+ "u_7def9138-9ee1-44bf-8fbb-da72d13ed720",
258
+ "u_50c92aa7-821e-4d50-aa30-5420e6bc2e6c",
259
+ "u_a50aacd8-0f74-40c3-b539-e25228c44cab",
260
+ "u_70dedfef-a40b-4e01-970b-b07d04b227c6",
261
+ "u_31d1bb27-1039-4a23-9de0-ae409d594371"
262
+ ],
263
+ "name": "fingo_.ai",
264
+ "company_business_model": null,
265
+ "company_inc_country": null,
266
+ "primary_email_domain": "fingo.ai",
267
+ "company_inc_state": "Delaware",
268
+ "business_banks": ["Silicon Valley Bank"],
269
+ "tax_status": {
270
+ "code": "filed",
271
+ "name": null
272
+ },
273
+ "referrer_type": null,
274
+ "primary_contact_user_id": "u_7def9138-9ee1-44bf-8fbb-da72d13ed720",
275
+ "duns_id": null,
276
+ "company_group_code": "Z2",
277
+ "currency_code": "USD",
278
+ "company_finance_management_firm_name": null,
279
+ "is_unit_migration_tos_required": false,
280
+ "is_new_company_industry_verified": true,
281
+ "is_unit_migration_required": false
282
+ }
283
+ ],
284
+ "addresses": [
285
+ {
286
+ "city": "San francisco",
287
+ "update_time": "2021-11-08T12:02:58.380658",
288
+ "country": "USA",
289
+ "address_id": "a_72f1f8a4-1251-4445-8709-c1fd2f6effe7",
290
+ "longitude": null,
291
+ "state": "California",
292
+ "street": ["503 Bryant St", "Suite 224"],
293
+ "create_time": "2021-11-08T12:02:58.380652",
294
+ "country_code": null,
295
+ "latitude": null,
296
+ "postal_code": "96204"
297
+ }
298
+ ],
299
+ "users": [
300
+ {
301
+ "microsoft_oauth_info_web": null,
302
+ "address_id": null,
303
+ "last_name": "Dalsaniya",
304
+ "google_oauth_disabled": false,
305
+ "photo": {
306
+ "original": "https://lh3.googleusercontent.com/a-/AOh14Gh8H_iXVbPLWE5OBbWqR4mLop8__gksY7t6w5nT=s96-c"
307
+ },
308
+ "last_seen_time": null,
309
+ "last_locale": null,
310
+ "last_country": null,
311
+ "is_onboarding_successful": false,
312
+ "role_at_company": null,
313
+ "country_code": null,
314
+ "gender": null,
315
+ "external_metadata": null,
316
+ "last_state": null,
317
+ "city": null,
318
+ "first_name": "Nikunj",
319
+ "is_pre_onboarding_successful": false,
320
+ "middle_name": null,
321
+ "last_auth_provider": "google",
322
+ "last_location": null,
323
+ "company_id": null,
324
+ "is_potential_fraud": false,
325
+ "state": null,
326
+ "email": "nikunj@zeni.ai",
327
+ "mixpanel_alias": null,
328
+ "birthday": null,
329
+ "update_time": "2021-12-08T08:35:49.584591",
330
+ "phone": null,
331
+ "ssn": null,
332
+ "address": null,
333
+ "user_id": "u_c8488936-ba06-4533-89a5-d40d12b36071",
334
+ "is_deleted": false,
335
+ "zipcode": null,
336
+ "time_zone": null,
337
+ "last_time_zone": null,
338
+ "create_time": "2020-09-03T07:14:06.899663",
339
+ "last_city": null,
340
+ "country": null,
341
+ "external_id": []
342
+ }
343
+ ]
344
+ }
345
+ }
@@ -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
+ }
@@ -18,7 +18,7 @@ const fetchVendorDetailsEpic = (actions$, state$) => actions$.pipe((0, operators
18
18
  vendorActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
19
19
  vendorActions.push((0, ownerListReducer_1.fetchOwnerList)());
20
20
  action.payload.vendorId != null
21
- ? vendorActions.push((0, vendorViewReducer_1.fetchVendor)(action.payload.vendorId))
21
+ ? vendorActions.push((0, vendorViewReducer_1.fetchVendor)(action.payload.vendorId, false))
22
22
  : vendorActions.push((0, vendorListReducer_1.fetchVendorsList)());
23
23
  }
24
24
  else {
@@ -44,7 +44,7 @@ const fetchVendorDetailsEpic = (actions$, state$) => actions$.pipe((0, operators
44
44
  const vendorFetchStatus = state$.value.vendorViewState.editVendorStateById[action.payload.vendorId].fetchStatus;
45
45
  if (vendorFetchStatus.fetchState !== 'Completed' &&
46
46
  vendorFetchStatus.fetchState !== 'In-Progress') {
47
- vendorActions.push((0, vendorViewReducer_1.fetchVendor)(action.payload.vendorId));
47
+ vendorActions.push((0, vendorViewReducer_1.fetchVendor)(action.payload.vendorId, false));
48
48
  }
49
49
  }
50
50
  else {
@@ -7,6 +7,7 @@ import { ZeniAPIResponse } from '../../../responsePayload';
7
7
  import { VendorDetailLocalData } from './vendorViewState';
8
8
  import { AddressUpdatableInfoPayload } from '../../addressView/addressViewPayload';
9
9
  import { FetchAllVendorsPayload } from '../../vendorList/vendorListPayload';
10
+ import { Filing1099TinType } from '../../../entity/vendor/vendorType';
10
11
  export declare type VendorCreationResponse = ZeniAPIResponse<FetchAllVendorsPayload>;
11
12
  export interface VendorUpdatePayload {
12
13
  qbo_id: string;
@@ -24,7 +25,12 @@ export interface VendorUpdatePayload {
24
25
  address?: AddressUpdatableInfoPayload;
25
26
  is_vendor_1099?: boolean;
26
27
  document_ids?: ID[];
28
+ w9_document_ids?: ID[];
27
29
  owner_id: ID | null;
28
30
  is_two_factor_verification_required?: boolean;
31
+ email?: string;
32
+ phone?: string;
33
+ filing1099TaxClassification?: string;
34
+ tin?: Filing1099TinType;
29
35
  }
30
36
  export declare const prepareEditVendorPayload: (state: RootState, vendorDetailLocalData: VendorDetailLocalData, vendorId: ID | undefined) => Partial<VendorUpdatePayload>;
@@ -3,5 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../../reducer';
4
4
  import { fetchTrendForEntity } from '../../../trendWithTransactions/trendWithTransactionsReducer';
5
5
  import { fetchVendorsTabVendorDetails } from '../vendorsTabVendorViewReducer';
6
- export declare type ActionType = ReturnType<typeof fetchVendorsTabVendorDetails> | ReturnType<typeof fetchTrendForEntity>;
6
+ import { fetchVendorTypeList } from '../../../vendorTypeList/vendorTypeListReducer';
7
+ export declare type ActionType = ReturnType<typeof fetchVendorsTabVendorDetails> | ReturnType<typeof fetchTrendForEntity> | ReturnType<typeof fetchVendorTypeList>;
7
8
  export declare const fetchVendorsTabVendorDetailPageViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -5,18 +5,23 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const trendWithTransactionsReducer_1 = require("../../../trendWithTransactions/trendWithTransactionsReducer");
7
7
  const vendorsTabVendorViewReducer_1 = require("../vendorsTabVendorViewReducer");
8
+ const vendorTypeListReducer_1 = require("../../../vendorTypeList/vendorTypeListReducer");
8
9
  const fetchVendorsTabVendorDetailPageViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorsTabVendorViewReducer_1.fetchVendorsTabVendorDetailPageView.match), (0, operators_1.switchMap)((action) => {
9
10
  var _a, _b;
10
11
  const { vendorId, entity, cacheOverride } = action.payload;
11
12
  const fetchActions = [];
12
13
  if (cacheOverride === true) {
13
- fetchActions.push((0, vendorsTabVendorViewReducer_1.fetchVendorsTabVendorDetails)(vendorId, false), (0, trendWithTransactionsReducer_1.fetchTrendForEntity)(entity));
14
+ fetchActions.push((0, vendorsTabVendorViewReducer_1.fetchVendorsTabVendorDetails)(vendorId, false), (0, trendWithTransactionsReducer_1.fetchTrendForEntity)(entity), (0, vendorTypeListReducer_1.fetchVendorTypeList)());
14
15
  }
15
16
  else {
16
17
  const state = state$.value;
17
18
  const vendorState = (_b = (_a = state.vendorViewState.editVendorStateById[vendorId]) === null || _a === void 0 ? void 0 : _a.fetchStatus) !== null && _b !== void 0 ? _b : {
18
19
  fetchState: 'Not-Started',
19
20
  };
21
+ if (state.vendorTypeListState.hasValidState() === false &&
22
+ state.vendorTypeListState.fetchState !== 'In-Progress') {
23
+ fetchActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
24
+ }
20
25
  const hasAlreadyFetchedCurrentVendor = vendorState.fetchState === 'Completed' ||
21
26
  vendorState.fetchState === 'In-Progress';
22
27
  if (hasAlreadyFetchedCurrentVendor === false) {
@@ -11,5 +11,6 @@ import { updateClasses } from '../../../../entity/class/classReducer';
11
11
  import { updateBankAccounts } from '../../../../entity/bankAccount/bankAccountReducer';
12
12
  import { updateFiles } from '../../../../entity/file/fileReducer';
13
13
  import { updateAccounts } from '../../../../entity/account/accountReducer';
14
- export declare type ActionType = ReturnType<typeof fetchVendorsTabVendor> | ReturnType<typeof fetchClassList> | ReturnType<typeof updateVendorsTabVendorFetchStatus> | ReturnType<typeof updateVendors> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateClasses> | ReturnType<typeof updateContacts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof updateVendorsTabVendorSaveStatus> | ReturnType<typeof updateFiles>;
15
- export declare const fetchVendorsTabVendorEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
14
+ import { initializeVendorAddress } from '../../vendorView/vendorViewReducer';
15
+ export declare type ActionType = ReturnType<typeof fetchVendorsTabVendor> | ReturnType<typeof fetchClassList> | ReturnType<typeof updateVendorsTabVendorFetchStatus> | ReturnType<typeof updateVendors> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateClasses> | ReturnType<typeof updateContacts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof updateVendorsTabVendorSaveStatus> | ReturnType<typeof updateFiles> | ReturnType<typeof initializeVendorAddress>;
16
+ export declare const fetchVendorsTabVendorEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -15,7 +15,8 @@ const bankAccountReducer_1 = require("../../../../entity/bankAccount/bankAccount
15
15
  const fileReducer_1 = require("../../../../entity/file/fileReducer");
16
16
  const commonVendorViewHelper_1 = require("../../commonVendorViewHelper");
17
17
  const accountReducer_1 = require("../../../../entity/account/accountReducer");
18
- const fetchVendorsTabVendorEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorsTabVendorViewReducer_1.fetchVendorsTabVendor.match), (0, operators_1.switchMap)((action) => {
18
+ const vendorViewReducer_1 = require("../../vendorView/vendorViewReducer");
19
+ const fetchVendorsTabVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorsTabVendorViewReducer_1.fetchVendorsTabVendor.match), (0, operators_1.switchMap)((action) => {
19
20
  return zeniAPI
20
21
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors/${action.payload.vendorId}`)
21
22
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -43,11 +44,12 @@ const fetchVendorsTabVendorEpic = (actions$, _state$, zeniAPI) => actions$.pipe(
43
44
  (0, vendorsTabVendorViewReducer_1.updateVendorsTabVendorSaveStatus)({
44
45
  vendorId: action.payload.vendorId,
45
46
  }),
47
+ (0, vendorViewReducer_1.initializeVendorAddress)(action.payload.vendorId),
46
48
  ];
47
49
  if (vendorInResponse != null) {
48
50
  actions.push((0, vendorsTabVendorViewReducer_1.vendorsTabUpdateVendorDetailLocalData)({
49
51
  vendorId: action.payload.vendorId,
50
- localData: (0, vendorsTabVendorDetailLocalDataHelpers_1.getInitializedVendorDetailLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(vendorInResponse)),
52
+ localData: (0, vendorsTabVendorDetailLocalDataHelpers_1.getInitializedVendorTabDetailLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(vendorInResponse), state$.value, vendorInResponse),
51
53
  }));
52
54
  }
53
55
  return (0, rxjs_1.from)(actions);
@@ -14,7 +14,7 @@ _zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorsTabVendorViewReducer_1
14
14
  if (vendorStateData != null) {
15
15
  actions.push((0, vendorsTabVendorViewReducer_1.vendorsTabUpdateVendorDetailLocalData)({
16
16
  vendorId: action.payload.vendorId,
17
- localData: (0, vendorsTabVendorDetailLocalDataHelpers_1.getInitializedVendorDetailLocalData)(vendorStateData),
17
+ localData: (0, vendorsTabVendorDetailLocalDataHelpers_1.getInitializedVendorTabDetailLocalData)(vendorStateData, state$.value),
18
18
  }));
19
19
  }
20
20
  return (0, rxjs_1.from)(actions);
@@ -2,7 +2,9 @@ import { User } from '../../../../entity/user/userState';
2
2
  import { Vendor } from '../../../../entity/vendor/vendorState';
3
3
  import { VendorsTabVendorDetailLocalData } from '../vendorsTabVendorViewState';
4
4
  import { VendorsTabVendorViewSelectorView } from '../vendorsTabVendorViewSelector';
5
- export declare const getInitializedVendorDetailLocalData: (vendorData: Vendor) => VendorsTabVendorDetailLocalData;
5
+ import { RootState } from '../../../../reducer';
6
+ import { VendorPayload } from '../../../../entity/vendor/vendorPayload';
7
+ export declare const getInitializedVendorTabDetailLocalData: (vendorData: Vendor, state: RootState, vendorPayload?: VendorPayload | undefined) => VendorsTabVendorDetailLocalData;
6
8
  export declare const getAnalyticsDataOnVendorSave: (vendorViewDetails: VendorsTabVendorViewSelectorView, ownerList: User[]) => {
7
9
  vendorId: string | undefined;
8
10
  vendorName: string | undefined;
@@ -1,11 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAnalyticsDataOnVendorSave = exports.getInitializedVendorDetailLocalData = void 0;
3
+ exports.getAnalyticsDataOnVendorSave = exports.getInitializedVendorTabDetailLocalData = void 0;
4
4
  const commonVendorViewHelper_1 = require("../../commonVendorViewHelper");
5
- const getInitializedVendorDetailLocalData = (vendorData) => {
5
+ const contactPayload_1 = require("../../../../entity/billPay/contact/contactPayload");
6
+ const contactSelector_1 = require("../../../../entity/billPay/contact/contactSelector");
7
+ const getInitializedVendorTabDetailLocalData = (vendorData, state, vendorPayload) => {
8
+ var _a;
9
+ const { contactState } = state;
6
10
  const { recommendedAccount, recommendedClass } = (0, commonVendorViewHelper_1.getRecommendedCategoryClass)(vendorData.recommendations, vendorData.accountId, vendorData.classId);
7
11
  return {
8
12
  vendorName: vendorData.name,
13
+ vendorEmail: vendorData.email,
14
+ vendorPhone: vendorData.phone,
15
+ vendorType: vendorData.vendorType,
16
+ tin: vendorData.filing1099Tin,
17
+ contacts: (vendorPayload === null || vendorPayload === void 0 ? void 0 : vendorPayload.contacts) != null
18
+ ? vendorPayload.contacts.map((contact) => (0, contactPayload_1.toContact)(contact))
19
+ : (0, contactSelector_1.getContactsByIds)(contactState, (_a = vendorData.contactIds) !== null && _a !== void 0 ? _a : []),
9
20
  vendorCategory: vendorData.accountId,
10
21
  vendorClass: vendorData.classId,
11
22
  vendorOwner: vendorData.ownerId,
@@ -17,7 +28,7 @@ const getInitializedVendorDetailLocalData = (vendorData) => {
17
28
  isClassUpdateSelected: false,
18
29
  };
19
30
  };
20
- exports.getInitializedVendorDetailLocalData = getInitializedVendorDetailLocalData;
31
+ exports.getInitializedVendorTabDetailLocalData = getInitializedVendorTabDetailLocalData;
21
32
  const getAnalyticsDataOnVendorSave = (vendorViewDetails, ownerList) => {
22
33
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
34
  const vendorBasic = (_a = vendorViewDetails === null || vendorViewDetails === void 0 ? void 0 : vendorViewDetails.vendorView) === null || _a === void 0 ? void 0 : _a.vendorBasic;
@@ -7,10 +7,14 @@ import { ZeniAPIResponse } from '../../../responsePayload';
7
7
  import { VendorsTabVendorDetailLocalData } from './vendorsTabVendorViewState';
8
8
  import { AddressUpdatableInfoPayload } from '../../addressView/addressViewPayload';
9
9
  import { FetchAllVendorsPayload } from '../../vendorList/vendorListPayload';
10
+ import { Filing1099TinType } from '../../../entity/vendor/vendorType';
10
11
  export declare type VendorCreationResponse = ZeniAPIResponse<FetchAllVendorsPayload>;
11
12
  export interface VendorUpdatePayload {
12
13
  qbo_id: string;
13
14
  vendor_name: string;
15
+ email: string;
16
+ phone: string;
17
+ tin: Filing1099TinType | null;
14
18
  vendor_type: string;
15
19
  account: AccountBasePayload | null;
16
20
  accounting_class: ClassBasePayload | null;
@@ -21,6 +25,7 @@ export interface VendorUpdatePayload {
21
25
  vendor_currency_symbol: string;
22
26
  sync_token: string;
23
27
  address?: AddressUpdatableInfoPayload;
28
+ billing_address?: AddressUpdatableInfoPayload;
24
29
  is_vendor_1099?: boolean;
25
30
  document_ids: ID[] | null;
26
31
  owner_id: ID | null;
@@ -5,8 +5,11 @@ const accountPayload_1 = require("../../../entity/account/accountPayload");
5
5
  const accountSelector_1 = require("../../../entity/account/accountSelector");
6
6
  const classPayload_1 = require("../../../entity/class/classPayload");
7
7
  const classSelector_1 = require("../../../entity/class/classSelector");
8
+ const contactPayload_1 = require("../../../entity/billPay/contact/contactPayload");
9
+ const addressViewPayload_1 = require("../../addressView/addressViewPayload");
8
10
  const prepareEditVendorPayload = (state, vendorDetailLocalData, vendorId) => {
9
- const { accountState, classState, vendorState } = state;
11
+ var _a, _b;
12
+ const { accountState, classState, addressViewState, vendorState } = state;
10
13
  const payload = {};
11
14
  if (vendorDetailLocalData != null) {
12
15
  payload.vendor_name = vendorDetailLocalData.vendorName;
@@ -37,6 +40,37 @@ const prepareEditVendorPayload = (state, vendorDetailLocalData, vendorId) => {
37
40
  else {
38
41
  payload.owner_id = null;
39
42
  }
43
+ if (vendorDetailLocalData.vendorEmail != null) {
44
+ payload.email = vendorDetailLocalData.vendorEmail;
45
+ }
46
+ if (vendorDetailLocalData.vendorPhone != null) {
47
+ payload.phone = vendorDetailLocalData.vendorPhone;
48
+ }
49
+ if (vendorDetailLocalData.vendorType != null) {
50
+ payload.vendor_type = vendorDetailLocalData.vendorType;
51
+ }
52
+ if (vendorDetailLocalData.tin != null) {
53
+ payload.tin = {
54
+ type: vendorDetailLocalData.tin.type,
55
+ value: vendorDetailLocalData.tin.value,
56
+ };
57
+ }
58
+ else {
59
+ payload.tin = null;
60
+ }
61
+ }
62
+ const contacts = (_a = vendorDetailLocalData.contacts) !== null && _a !== void 0 ? _a : [];
63
+ payload.contacts = contacts
64
+ .filter((contact) => contact.email.length > 0 || contact.fullName.length > 0)
65
+ .map((contact) => {
66
+ return (0, contactPayload_1.toContactPayload)(contact);
67
+ });
68
+ const vendorAddressToCreate = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b['vendor_address'].addressToCreate;
69
+ const vendorAddressPayload = vendorAddressToCreate != null
70
+ ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(vendorAddressToCreate)
71
+ : undefined;
72
+ if (vendorAddressPayload != null) {
73
+ payload['address'] = vendorAddressPayload;
40
74
  }
41
75
  if (vendorId != null) {
42
76
  const syncToken = vendorState.vendorByID[vendorId].syncToken;