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

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 (81) hide show
  1. package/lib/__testHelpers__/apiFailure.json +6 -0
  2. package/lib/entity/genericEntity/entity.d.ts +1 -1
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -1
  5. package/lib/entity/jeSchedules/jeSchedulesSelector.js +4 -4
  6. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -1
  7. package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
  8. package/lib/entity/vendor/__mocks__/vendorMock.js +311 -0
  9. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +8 -0
  10. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +415 -0
  11. package/lib/entity/vendor/vendorPayload.d.ts +4 -2
  12. package/lib/entity/vendor/vendorPayload.js +3 -1
  13. package/lib/esm/__testHelpers__/apiFailure.json +6 -0
  14. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  15. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +4 -4
  16. package/lib/esm/entity/vendor/__mocks__/vendorMock.js +308 -0
  17. package/lib/esm/entity/vendor/__mocks__/vendorStateMocks.js +412 -0
  18. package/lib/esm/entity/vendor/vendorPayload.js +3 -1
  19. package/lib/esm/index.js +2 -2
  20. package/lib/esm/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4650 -0
  21. package/lib/esm/view/addressView/__mocks__/addressViewMocks.js +203 -0
  22. package/lib/esm/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  23. package/lib/esm/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  24. package/lib/esm/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  25. package/lib/esm/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  26. package/lib/esm/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  27. package/lib/esm/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +11 -6
  28. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +5 -1
  29. package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +4 -1
  30. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +1 -1
  31. package/lib/esm/view/referralView/referralReducer.js +3 -2
  32. package/lib/esm/view/scheduleView/scheduleAccruedDetailView/epics/deleteScheduleAccruedDetailEpic.js +1 -1
  33. package/lib/esm/view/scheduleView/scheduleAccruedDetailView/epics/fetchRecommendedTransactionRowIndexEpic.js +11 -5
  34. package/lib/esm/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.js +4 -1
  35. package/lib/esm/view/scheduleView/scheduleDetailView/epics/createNewSchedulesEpic.js +1 -1
  36. package/lib/esm/view/scheduleView/scheduleDetailView/epics/deleteScheduleDetailEpic.js +1 -1
  37. package/lib/esm/view/scheduleView/scheduleDetailView/epics/markAsCompleteScheduleDetailEpic.js +1 -1
  38. package/lib/esm/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +1 -1
  39. package/lib/esm/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +12 -3
  40. package/lib/esm/view/scheduleView/scheduleListView/scheduleListSelector.js +8 -7
  41. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +8 -3
  42. package/lib/esm/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  43. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +5 -1
  44. package/lib/esm/view/trendWithTransactions/fetchTrendForEntityEpic.js +3 -1
  45. package/lib/esm/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +4 -1
  46. package/lib/esm/view/vendorList/vendorListReducer.js +4 -1
  47. package/lib/esm/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +9 -1
  48. package/lib/index.d.ts +2 -2
  49. package/lib/index.js +7 -6
  50. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
  51. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
  52. package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
  53. package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
  54. package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  55. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  56. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  57. package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  58. package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  59. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +11 -6
  60. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +5 -1
  61. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +4 -1
  62. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +1 -1
  63. package/lib/view/referralView/referralReducer.d.ts +1 -0
  64. package/lib/view/referralView/referralReducer.js +4 -3
  65. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/deleteScheduleAccruedDetailEpic.js +1 -1
  66. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchRecommendedTransactionRowIndexEpic.js +11 -5
  67. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.js +4 -1
  68. package/lib/view/scheduleView/scheduleDetailView/epics/createNewSchedulesEpic.js +1 -1
  69. package/lib/view/scheduleView/scheduleDetailView/epics/deleteScheduleDetailEpic.js +1 -1
  70. package/lib/view/scheduleView/scheduleDetailView/epics/markAsCompleteScheduleDetailEpic.js +1 -1
  71. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +1 -1
  72. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +12 -3
  73. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +8 -7
  74. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +8 -3
  75. package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  76. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +5 -1
  77. package/lib/view/trendWithTransactions/fetchTrendForEntityEpic.js +3 -1
  78. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +4 -1
  79. package/lib/view/vendorList/vendorListReducer.js +4 -1
  80. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +9 -1
  81. package/package.json +1 -1
@@ -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
+ }
@@ -7,6 +7,7 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
7
7
  const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
8
  const transactionSelector_1 = require("../../../../entity/transaction/transactionSelector");
9
9
  const vendorReducer_1 = require("../../../../entity/vendor/vendorReducer");
10
+ const vendorPayload_1 = require("../../../../entity/vendor/vendorPayload");
10
11
  const responsePayload_1 = require("../../../../responsePayload");
11
12
  const zeniUrl_1 = require("../../../../zeniUrl");
12
13
  const accountListSelector_1 = require("../../../accountList/accountListSelector");
@@ -38,11 +39,13 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
38
39
  const actions = [
39
40
  (0, vendorReducer_1.updateVendors)(response.data.vendors ?? []),
40
41
  ];
42
+ const savedVendor = response.data.vendors[0];
43
+ const resolvedVendorId = (0, vendorPayload_1.getVendorPayloadIdentifier)(savedVendor) ?? undefined;
41
44
  actions.push((0, transactionVendorViewReducer_1.updateTransactionVendorLocalData)({
42
- vendorId: response.data.vendors[0].vendor_id,
45
+ vendorId: resolvedVendorId,
43
46
  localData: {
44
- vendorName: response.data.vendors[0].vendor_name,
45
- vendorId: response.data.vendors[0].vendor_id,
47
+ vendorName: savedVendor.vendor_name,
48
+ vendorId: resolvedVendorId,
46
49
  },
47
50
  }));
48
51
  if (effectiveVendorId == null &&
@@ -70,7 +73,8 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
70
73
  name: response.data.vendors[0].vendor_name,
71
74
  id: response.data.vendors[0].qbo_id,
72
75
  type: 'vendor',
73
- zeniId: response.data.vendors[0].vendor_id,
76
+ // Zeni platform id (vendor_id field), not the resolved id used for local-data keys.
77
+ zeniId: savedVendor.vendor_id ?? undefined,
74
78
  qboId: response.data.vendors[0].qbo_id,
75
79
  logo: (0, zeniUrl_1.toZeniUrlWithoutBaseURL)(response.data.vendors[0].logo?.url ?? ''),
76
80
  },
@@ -83,14 +87,15 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
83
87
  transactionId: action.payload.transactionId,
84
88
  vendorUpdates: {
85
89
  name: response.data.vendors[0].vendor_name,
86
- id: response.data.vendors[0].vendor_id,
90
+ id: savedVendor.vendor_id ?? undefined,
87
91
  qboId: response.data.vendors[0].qbo_id,
88
92
  },
89
93
  entity: {
90
94
  name: response.data.vendors[0].vendor_name,
91
95
  id: response.data.vendors[0].qbo_id,
92
96
  type: 'vendor',
93
- zeniId: response.data.vendors[0].vendor_id,
97
+ // Zeni platform id (vendor_id field), not the resolved id used for local-data keys.
98
+ zeniId: savedVendor.vendor_id ?? undefined,
94
99
  qboId: response.data.vendors[0].qbo_id,
95
100
  logo: (0, zeniUrl_1.toZeniUrlWithoutBaseURL)(response.data.vendors[0].logo?.url ?? ''),
96
101
  },
@@ -6,6 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
7
7
  const transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
8
8
  const transactionReducer_1 = require("../../../entity/transaction/transactionReducer");
9
+ const vendorPayload_1 = require("../../../entity/vendor/vendorPayload");
9
10
  const responsePayload_1 = require("../../../responsePayload");
10
11
  const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/transactionsViewReducer");
11
12
  const transactionDetailReducer_1 = require("../../transactionDetail/transactionDetailReducer");
@@ -88,11 +89,14 @@ function handleSuccessWithoutTransactionBody(transactionId) {
88
89
  function handleSuccessWithTransactionBody(transactionPayload, vendorPayload, previousTransactionId, sourceTransactionId) {
89
90
  const newTransactionId = (0, transactionIDPayload_1.toTransactionID)(transactionPayload);
90
91
  const replaced = !transactionIdsAreEqual(previousTransactionId, newTransactionId);
92
+ const firstVendor = vendorPayload?.[0];
91
93
  const immediate = [
92
94
  (0, transactionReducer_1.updateTransaction)((0, transactionDetailState_1.getTransactionDetailKey)(newTransactionId), transactionPayload),
93
95
  (0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
94
96
  transactionId: newTransactionId,
95
- vendorId: vendorPayload?.[0]?.vendor_id,
97
+ vendorId: firstVendor != null
98
+ ? (0, vendorPayload_1.getVendorPayloadIdentifier)(firstVendor) ?? undefined
99
+ : undefined,
96
100
  }),
97
101
  ...buildSuccessSideEffects(sourceTransactionId),
98
102
  ];
@@ -6,7 +6,10 @@ const scheduleDetailPayload_1 = require("../../scheduleView/scheduleDetailView/s
6
6
  const prepareIgnoreSchedulePayload = (scheduleType, jeScheduleTransaction, state) => {
7
7
  const { vendorState } = state;
8
8
  const { vendor, currencyCode, currencySymbol, baseTransaction, status, balanceAsOfToday, period, startDate, endDate, jeCredit, jeDebit, } = jeScheduleTransaction;
9
- const vendorID = vendor.id;
9
+ const vendorID = vendor?.id;
10
+ if (vendorID == null) {
11
+ throw new Error('Vendor is required to build JE schedule payload');
12
+ }
10
13
  const vendorDetails = vendorState.vendorByID[vendorID];
11
14
  const jeSchedulePayload = {
12
15
  status: status,
@@ -21,7 +21,7 @@ const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector
21
21
  function getJEScheduleSortAccessor(sortKey) {
22
22
  switch (sortKey) {
23
23
  case 'vendor':
24
- return (s) => s.vendor.name?.toLowerCase();
24
+ return (s) => s.vendor?.name?.toLowerCase();
25
25
  case 'category':
26
26
  return (s) => s.jeDebit.account?.accountName?.toLowerCase();
27
27
  case 'class':
@@ -2,6 +2,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
2
2
  import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { FetchRewardsPayload, FetchRewardsPlanPayload } from './referralPayload';
4
4
  import { InviteCompanyLocalData, ReferralListViewSortKey, ReferralViewState } from './referralState';
5
+ export declare const DEFAULT_REFERRER_AMOUNT = 4000;
5
6
  export declare const initialState: ReferralViewState;
6
7
  export declare const fetchReferrals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: any, refreshViewInBackground?: any], {
7
8
  cacheOverride: any;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateRewardsPlanFailure = exports.updateRewardsPlan = exports.fetchRewardsPlan = exports.clearReferrals = exports.updateReferViewedFailure = exports.updateReferViewedSuccess = exports.updateReferViewed = exports.resendReferralInviteSuccess = exports.resendReferralInvite = exports.sendReferralInviteFailure = exports.sendReferralInviteSuccess = exports.sendReferralInvite = exports.clearReferralFormDataInLocalStore = exports.saveReferralFormDataInLocalStore = exports.updateReferralsFailure = exports.updateReferralListSortUiState = exports.updateReferrals = exports.fetchReferrals = exports.initialState = void 0;
4
+ exports.updateRewardsPlanFailure = exports.updateRewardsPlan = exports.fetchRewardsPlan = exports.clearReferrals = exports.updateReferViewedFailure = exports.updateReferViewedSuccess = exports.updateReferViewed = exports.resendReferralInviteSuccess = exports.resendReferralInvite = exports.sendReferralInviteFailure = exports.sendReferralInviteSuccess = exports.sendReferralInvite = exports.clearReferralFormDataInLocalStore = exports.saveReferralFormDataInLocalStore = exports.updateReferralsFailure = exports.updateReferralListSortUiState = exports.updateReferrals = exports.fetchReferrals = exports.initialState = exports.DEFAULT_REFERRER_AMOUNT = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const amount_1 = require("../../commonStateTypes/amount");
7
7
  const zeniDayJS_1 = require("../../zeniDayJS");
8
8
  const zeniUrl_1 = require("../../zeniUrl");
9
9
  const referralPayload_1 = require("./referralPayload");
10
10
  const referralState_1 = require("./referralState");
11
+ exports.DEFAULT_REFERRER_AMOUNT = 4000;
11
12
  exports.initialState = {
12
13
  fetchState: 'Not-Started',
13
14
  error: undefined,
@@ -48,7 +49,7 @@ exports.initialState = {
48
49
  },
49
50
  rewardsPlan: {
50
51
  referrerAmount: {
51
- amount: 0,
52
+ amount: exports.DEFAULT_REFERRER_AMOUNT,
52
53
  currencyCode: 'USD',
53
54
  currencySymbol: '$',
54
55
  },
@@ -57,7 +58,7 @@ exports.initialState = {
57
58
  currencyCode: 'USD',
58
59
  currencySymbol: '$',
59
60
  },
60
- planName: 'PLAN_1000',
61
+ planName: 'PLAN_4000',
61
62
  planId: 'dummy',
62
63
  referralLink: (0, zeniUrl_1.toZeniUrl)(''),
63
64
  },
@@ -23,7 +23,7 @@ const deleteScheduleAccruedDetailEpic = (actions$, state$, zeniAPI) => actions$.
23
23
  return (0, rxjs_1.from)(actions);
24
24
  }
25
25
  const scheduleDetailId = jeScheduleState.jeScheduleId;
26
- const vendorName = jeScheduleState.vendor.name;
26
+ const vendorName = jeScheduleState.vendor?.name ?? '';
27
27
  const scheduleDetailsUpdated = state.scheduleAccruedDetailState.editScheduleStateByDetailId[scheduleDetailId];
28
28
  const payload = {
29
29
  ...(0, scheduleAccruedDetailPayload_1.prepareScheduleAccruedDetailPayload)(state, scheduleDetailsUpdated, selectedJEScheduleKey, true),