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

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 (49) hide show
  1. package/lib/__testHelpers__/apiFailure.json +6 -0
  2. package/lib/entity/customer/customerPayload.js +11 -2
  3. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +1 -1
  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 +2 -4
  9. package/lib/entity/vendor/vendorPayload.js +3 -12
  10. package/lib/entity/vendor/vendorReducer.js +0 -3
  11. package/lib/esm/__testHelpers__/apiFailure.json +6 -0
  12. package/lib/esm/entity/customer/customerPayload.js +11 -2
  13. package/lib/esm/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -2
  14. package/lib/esm/entity/vendor/__mocks__/vendorMock.js +308 -0
  15. package/lib/esm/entity/vendor/__mocks__/vendorStateMocks.js +412 -0
  16. package/lib/esm/entity/vendor/vendorPayload.js +2 -10
  17. package/lib/esm/entity/vendor/vendorReducer.js +1 -4
  18. package/lib/esm/index.js +2 -2
  19. package/lib/esm/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4650 -0
  20. package/lib/esm/view/addressView/__mocks__/addressViewMocks.js +203 -0
  21. package/lib/esm/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  22. package/lib/esm/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  23. package/lib/esm/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  24. package/lib/esm/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  25. package/lib/esm/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  26. package/lib/esm/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
  27. package/lib/esm/view/referralView/referralReducer.js +3 -2
  28. package/lib/esm/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  29. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +9 -10
  30. package/lib/index.d.ts +2 -2
  31. package/lib/index.js +7 -6
  32. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
  33. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
  34. package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
  35. package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
  36. package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  37. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  38. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  39. package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  40. package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  41. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
  42. package/lib/view/referralView/referralReducer.d.ts +1 -0
  43. package/lib/view/referralView/referralReducer.js +4 -3
  44. package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  45. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -9
  46. package/package.json +70 -38
  47. package/lib/commonPayloadTypes/payloadIdentifier.d.ts +0 -6
  48. package/lib/commonPayloadTypes/payloadIdentifier.js +0 -18
  49. package/lib/esm/commonPayloadTypes/payloadIdentifier.js +0 -14
@@ -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
+ }
@@ -94,8 +94,6 @@ const transactionVendorView = (0, toolkit_1.createSlice)({
94
94
  };
95
95
  }
96
96
  else {
97
- // Legacy empty-string key from pre-resolution vendor id writes.
98
- delete draft.editVendorStateById[''];
99
97
  if (draft.editVendorStateById[vendorId] != null) {
100
98
  draft.editVendorStateById[vendorId].vendorDetailLocalData = {
101
99
  ...exports.initialVendorDetailLocalData,
@@ -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
  },
@@ -12,36 +12,10 @@ const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/
12
12
  const transactionDetailReducer_1 = require("../transactionDetailReducer");
13
13
  const transactionDetailState_1 = require("../transactionDetailState");
14
14
  const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionDetailReducer_1.markTransactionAsNotMiscategorized.match), (0, operators_1.mergeMap)((action) => {
15
- // Expense-automation customers must be marked review-complete through the
16
- // same endpoint the categorization list uses; mark-miscategorized-as-correct
17
- // does not move their lines out of review. Mirror the list flow by reviewing
18
- // the transaction's categorizable line ids (updatesByLineId).
19
- const { url, body } = action.payload.isExpenseAutomationEnabled === true
20
- ? {
21
- url: `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/mark-as-reviewed`,
22
- body: {
23
- transactions_reviewed: [
24
- {
25
- transaction_id: action.payload.transactionId.id,
26
- line_ids: Object.keys(action.payload.transactionSaveUpdates.updates
27
- ?.updatesByLineId ?? {}),
28
- },
29
- ],
30
- },
31
- }
32
- : {
33
- url: `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/${action.payload.transactionId.id}/mark-miscategorized-as-correct`,
34
- body: preparePayload(action.payload.transactionId),
35
- };
36
15
  return zeniAPI
37
- .putAndGetJSON(url, body)
16
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/${action.payload.transactionId.id}/mark-miscategorized-as-correct`, preparePayload(action.payload.transactionId))
38
17
  .pipe((0, operators_1.mergeMap)((response) => {
39
- // mark-as-reviewed can return 200 while still listing this
40
- // transaction under transactions_reviewed_failed; don't clear it then.
41
- const reviewedFailedForExpenseAutomation = action.payload.isExpenseAutomationEnabled === true &&
42
- (response.data?.transactions_reviewed_failed ?? []).some((reviewed) => reviewed.transaction_id === action.payload.transactionId.id);
43
- if ((0, responsePayload_1.isSuccessStatus)(response) &&
44
- !reviewedFailedForExpenseAutomation) {
18
+ if ((0, responsePayload_1.isSuccessStatus)(response)) {
45
19
  const actions = [];
46
20
  actions.push((0, transactionDetailReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.transactionId, 'Completed', undefined));
47
21
  const transactionKey = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
@@ -62,11 +62,11 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
62
62
  const transcationId = (0, transactionIDPayload_1.toTransactionID)(response.data.transaction);
63
63
  const responseData = {
64
64
  ...response.data,
65
- vendors: response.data.vendors?.map((vendor) => (0, vendorPayload_1.normalizeVendorBasePayload)(vendor)) ?? [],
65
+ vendors: response.data.vendors?.map((vendor) => ({
66
+ ...vendor,
67
+ vendor_id: vendor.qbo_id ?? vendor.vendor_id,
68
+ })) ?? [],
66
69
  };
67
- const resolvedVendorId = responseData.vendors.length > 0
68
- ? (0, vendorPayload_1.getVendorPayloadIdentifier)(responseData.vendors[0])
69
- : null;
70
70
  if (responseData.vendors.length > 0) {
71
71
  updateActions.push((0, vendorReducer_1.updateVendors)(responseData.vendors, 'merge'));
72
72
  }
@@ -74,16 +74,15 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
74
74
  updateActions.push((0, transactionReducer_1.updateTransaction)(transactionDetailKeyForResponse, responseData.transaction));
75
75
  updateActions.push((0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
76
76
  transactionId: transcationId,
77
- vendorId: resolvedVendorId ?? undefined,
77
+ vendorId: responseData.vendors[0]?.vendor_id,
78
78
  }));
79
79
  updateActions.push((0, transactionDetailReducer_1.updateTransactionDetailFetchState)(transcationId, 'Completed'));
80
80
  // IMPORTANT: Fetch linked transactions..
81
81
  updateActions.push(...getAllFetchLinkedTransactionDetailActions(responseData.transaction, state$.value));
82
- if (resolvedVendorId != null) {
83
- const vendorPayload = responseData.vendors[0];
82
+ if (responseData.vendors.length > 0) {
84
83
  updateActions.push((0, transactionVendorViewReducer_1.updateTransactionVendorLocalData)({
85
- vendorId: resolvedVendorId,
86
- localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(vendorPayload)),
84
+ vendorId: responseData.vendors[0].vendor_id,
85
+ localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(responseData.vendors[0])),
87
86
  }));
88
87
  }
89
88
  // If vendor transaction, fetch owners list