@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,308 @@
1
+ import { vendorStateMock1, vendorStateMock2 } from './vendorStateMocks';
2
+ export const vendorPaylod = [
3
+ {
4
+ vendor_id: 'vendor_j12jh1g2g12jg3jh12:12',
5
+ transaction_attachments: [],
6
+ qbo_id: '12',
7
+ vendor_name: 'Sample Vendor 1',
8
+ legal_name: 'Sample Vendor 1',
9
+ title: '',
10
+ suffix: '',
11
+ first_name: 'Sample',
12
+ middle_name: '',
13
+ last_name: 'Vendor',
14
+ vendor_type: 'individual',
15
+ logo: {
16
+ url: '',
17
+ base64: '',
18
+ },
19
+ year_to_date_spend: 0,
20
+ last_30_days_spend: 0,
21
+ last_90_days_spend: 0,
22
+ last_month_spend: 0,
23
+ last_3_months_spend: 0,
24
+ last_6_months_spend: 0,
25
+ last_12_months_spend: 0,
26
+ previous_year_spend: 0,
27
+ owner: null,
28
+ balance: 0,
29
+ is_deleted: false,
30
+ qbo_create_time: '2022-01-24T05:59:37.057383',
31
+ qbo_update_time: '2022-01-24T05:59:37.057383',
32
+ create_time: '2022-01-24T05:59:37.057383',
33
+ update_time: '2022-01-24T05:59:37.057383',
34
+ sync_token: '1',
35
+ email: '',
36
+ phone: '',
37
+ website_url: '',
38
+ currency_code: 'USD',
39
+ currency_symbol: '$',
40
+ country_code: 'US',
41
+ account: {
42
+ qbo_id: '12',
43
+ coa_id: '123',
44
+ labels: [],
45
+ account_id: 'Travel Meals',
46
+ account_name: 'Travel Meals',
47
+ },
48
+ accounting_class: {
49
+ accounting_class_id: 'class_e0f33254-2651-4d5c-9d57-2611788265ca',
50
+ accounting_class_name: 'product 500',
51
+ accounting_class_number: '4011',
52
+ fully_qualified_accounting_class_name: 'product 500',
53
+ qbo_id: '5100000000000040143',
54
+ },
55
+ contacts: [
56
+ {
57
+ full_name: 'Aniket Patil',
58
+ phone: '+91-8xxxxxxxx',
59
+ email: 'aniket@personalmail.com',
60
+ contact_id: 'contacts_f3881db1-35c0-4699-891c-6cca724e75d6',
61
+ },
62
+ {
63
+ full_name: 'Ankit Singh',
64
+ phone: '+91-8xxxxxxxx',
65
+ email: 'ankit@personalmail.com',
66
+ contact_id: 'contacts_6856c987-17ff-44a4-aad3-eef4b7696554',
67
+ },
68
+ ],
69
+ address: {
70
+ address_id: 'a_e3e99a8b-d400-42ac-ae09-e655bff1af97',
71
+ city: 'Bangalore',
72
+ country: 'India',
73
+ country_code: null,
74
+ create_time: '2022-02-01T15:47:44.681429',
75
+ hash_value: '2be1de50bedd7a2dfb8094846698b2b8bc86869bf903c27b69b74ae3e2651983',
76
+ latitude: null,
77
+ longitude: null,
78
+ postal_code: '560001',
79
+ state: 'Karnataka',
80
+ street: ['2nd lane', 'Opp Peter England showroom', 'Mg Road'],
81
+ update_time: '2022-02-01T15:47:44.681439',
82
+ },
83
+ shipping_address: null,
84
+ bank_account_ids: [
85
+ 'bank_adg67-asnds-a6sad-sdfgf8',
86
+ 'bank_asghj-hags23-hgfjh-g3asfas',
87
+ ],
88
+ bank_accounts: [
89
+ {
90
+ bank_account_id: 'bank_adg67-asnds-a6sad-sdfgf8',
91
+ bank_branch_id: 'HDFC000547',
92
+ bank_branch_name: 'Khadki',
93
+ bank_account_number: '201301203012013012',
94
+ bank_account_name: 'Person/Company Name',
95
+ bank_name: 'HDFC Bank',
96
+ bank_routing_number_ach: '210000000',
97
+ bank_routing_number_wire_transfer: '210000000',
98
+ note: '',
99
+ is_deleted: false,
100
+ update_time: '2022-02-01T15:47:44.681439',
101
+ create_time: '2022-02-01T15:47:44.681439',
102
+ bank_swift_code: null,
103
+ bank_account_iban: null,
104
+ bank_account_type: null,
105
+ },
106
+ {
107
+ bank_account_id: 'bank_asghj-hags23-hgfjh-g3asfas',
108
+ bank_branch_id: 'ICICI00004',
109
+ bank_branch_name: 'Baner',
110
+ bank_account_number: '20130120301286273826',
111
+ bank_account_name: 'Person/Company Name',
112
+ bank_name: 'ICICI Bank',
113
+ bank_routing_number_ach: '110000000',
114
+ bank_routing_number_wire_transfer: '110000000',
115
+ note: '',
116
+ is_deleted: false,
117
+ update_time: '2022-02-01T15:47:44.681439',
118
+ create_time: '2022-02-01T15:47:44.681439',
119
+ bank_swift_code: null,
120
+ bank_account_iban: null,
121
+ bank_account_type: null,
122
+ },
123
+ ],
124
+ payment_instrument_ids: ['pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3'],
125
+ payment_instruments: [
126
+ {
127
+ account_source: 'email',
128
+ create_time: '2023-12-17T11:29:27.544391',
129
+ display_text: 'UPI ID - lgtextiles@okicici',
130
+ labels: [
131
+ {
132
+ key: 'Account Holder Name',
133
+ value: 'LG Textiles',
134
+ },
135
+ {
136
+ key: 'UPI ID',
137
+ value: 'lgtextiles@okicici',
138
+ },
139
+ {
140
+ key: 'Source',
141
+ value: 'email',
142
+ },
143
+ {
144
+ key: 'Type of account',
145
+ value: 'indian_upi',
146
+ },
147
+ ],
148
+ max_valid_amount: 100000,
149
+ min_valid_amount: 0,
150
+ pi_display_number: 'lgtextiles@okicici',
151
+ update_time: '2023-12-17T11:29:27.544396',
152
+ zeni_payment_instrument_id: 'pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3',
153
+ },
154
+ ],
155
+ vendor_currency_code: 'USD',
156
+ vendor_currency_symbol: '$',
157
+ vendor_1099_status: 'incomplete',
158
+ tin: { type: 'ein', value: '550258131' },
159
+ },
160
+ {
161
+ vendor_id: 'vendor_j12jh1g2g12jg3jh12:2',
162
+ transaction_attachments: [],
163
+ qbo_id: '13',
164
+ vendor_name: 'Sample Vendor 2',
165
+ legal_name: 'Sample Vendor 2',
166
+ title: '',
167
+ suffix: '',
168
+ first_name: 'Sample',
169
+ middle_name: '',
170
+ last_name: 'Vendor 3',
171
+ vendor_type: 'c_corporation',
172
+ logo: {
173
+ url: '',
174
+ base64: '',
175
+ },
176
+ last_month_spend: 0,
177
+ last_3_months_spend: 0,
178
+ last_6_months_spend: 0,
179
+ last_12_months_spend: 0,
180
+ previous_year_spend: 0,
181
+ owner: null,
182
+ balance: 0,
183
+ is_deleted: false,
184
+ qbo_create_time: '2022-01-24T05:59:37.057383',
185
+ qbo_update_time: '2022-01-24T05:59:37.057383',
186
+ create_time: '2022-01-24T05:59:37.057383',
187
+ update_time: '2022-01-24T05:59:37.057383',
188
+ sync_token: '1',
189
+ email: '',
190
+ phone: '',
191
+ website_url: '',
192
+ currency_code: 'USD',
193
+ currency_symbol: '$',
194
+ country_code: 'US',
195
+ contacts: [
196
+ {
197
+ full_name: 'Aniket Patil',
198
+ phone: '+91-8xxxxxxxx',
199
+ email: 'aniket@personalmail.com',
200
+ contact_id: 'contacts_f3881db1-35c0-4699-891c-6cca724e75d6',
201
+ },
202
+ {
203
+ full_name: 'Ankit Singh',
204
+ phone: '+91-8xxxxxxxx',
205
+ email: 'ankit@personalmail.com',
206
+ contact_id: 'contacts_6856c987-17ff-44a4-aad3-eef4b7696554',
207
+ },
208
+ ],
209
+ account: {
210
+ qbo_id: '12',
211
+ coa_id: '123',
212
+ labels: [],
213
+ account_id: 'Travel Meals',
214
+ account_name: 'Travel Meals',
215
+ },
216
+ accounting_class: {
217
+ accounting_class_id: 'class_e0f33254-2651-4d5c-9d57-2611788265ca',
218
+ accounting_class_name: 'product 500',
219
+ accounting_class_number: '4011',
220
+ fully_qualified_accounting_class_name: 'product 500',
221
+ qbo_id: '5100000000000040143',
222
+ },
223
+ shipping_address: null,
224
+ bank_accounts: [
225
+ {
226
+ bank_account_id: 'bank_asghj-hgfjh-g3asfas-hags23',
227
+ bank_branch_id: 'SBINOOOO9765',
228
+ bank_branch_name: 'Wakad',
229
+ bank_account_number: '20130120301286273826',
230
+ bank_account_name: 'Person/Company Name',
231
+ bank_name: 'SBI Bank',
232
+ bank_routing_number_ach: '410000000',
233
+ bank_routing_number_wire_transfer: '310000000',
234
+ note: '',
235
+ is_deleted: false,
236
+ update_time: '2022-02-01T15:47:44.681439',
237
+ create_time: '2022-02-01T15:47:44.681439',
238
+ bank_swift_code: null,
239
+ bank_account_iban: null,
240
+ bank_account_type: null,
241
+ },
242
+ {
243
+ bank_account_id: 'bank_g3asfas-hags23-hgfjh-asghj',
244
+ bank_branch_id: 'UBI0014267',
245
+ bank_branch_name: 'SB Road',
246
+ bank_account_number: '20130120301286273826',
247
+ bank_account_name: 'Person/Company Name',
248
+ bank_name: 'SBI Bank',
249
+ bank_routing_number_ach: '510000000',
250
+ bank_routing_number_wire_transfer: '610000000',
251
+ note: '',
252
+ is_deleted: false,
253
+ update_time: '2022-02-01T15:47:44.681439',
254
+ create_time: '2022-02-01T15:47:44.681439',
255
+ bank_swift_code: null,
256
+ bank_account_iban: null,
257
+ bank_account_type: null,
258
+ },
259
+ ],
260
+ payment_instrument_ids: ['pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3'],
261
+ payment_instruments: [
262
+ {
263
+ account_source: 'email',
264
+ create_time: '2023-12-17T11:29:27.544391',
265
+ display_text: 'UPI ID - lgtextiles@okicici',
266
+ labels: [
267
+ {
268
+ key: 'Account Holder Name',
269
+ value: 'LG Textiles',
270
+ },
271
+ {
272
+ key: 'UPI ID',
273
+ value: 'lgtextiles@okicici',
274
+ },
275
+ {
276
+ key: 'Source',
277
+ value: 'email',
278
+ },
279
+ {
280
+ key: 'Type of account',
281
+ value: 'indian_upi',
282
+ },
283
+ ],
284
+ max_valid_amount: 100000,
285
+ min_valid_amount: 0,
286
+ pi_display_number: 'lgtextiles@okicici',
287
+ update_time: '2023-12-17T11:29:27.544396',
288
+ zeni_payment_instrument_id: 'pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3',
289
+ },
290
+ ],
291
+ vendor_currency_code: 'USD',
292
+ vendor_currency_symbol: '$',
293
+ vendor_1099_status: 'incomplete',
294
+ tin: { type: 'ein', value: '550258131' },
295
+ },
296
+ ];
297
+ export const vendorStateWithVendors = {
298
+ vendorByID: {
299
+ 'vendor_j12jh1g2g12jg3jh12:12': vendorStateMock1,
300
+ 'vendor_j12jh1g2g12jg3jh12:2': vendorStateMock2,
301
+ },
302
+ };
303
+ export const vendorIdToBeRemoved = 'vendor_j12jh1g2g12jg3jh12:2';
304
+ export const vendorStateAfterRemoval = {
305
+ vendorByID: {
306
+ 'vendor_j12jh1g2g12jg3jh12:12': vendorStateMock1,
307
+ },
308
+ };