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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +1 -3
  2. package/lib/__testHelpers__/apiFailure.json +6 -0
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  4. package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
  5. package/lib/entity/vendor/__mocks__/vendorMock.js +311 -0
  6. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +8 -0
  7. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +415 -0
  8. package/lib/entity/vendor/vendorPayload.d.ts +1 -1
  9. package/lib/epic.d.ts +1 -2
  10. package/lib/epic.js +1 -2
  11. package/lib/esm/__testHelpers__/apiFailure.json +6 -0
  12. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +3 -2
  13. package/lib/esm/entity/vendor/__mocks__/vendorMock.js +308 -0
  14. package/lib/esm/entity/vendor/__mocks__/vendorStateMocks.js +412 -0
  15. package/lib/esm/epic.js +1 -2
  16. package/lib/esm/index.js +2 -2
  17. package/lib/esm/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4650 -0
  18. package/lib/esm/view/addressView/__mocks__/addressViewMocks.js +203 -0
  19. package/lib/esm/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  20. package/lib/esm/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  21. package/lib/esm/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  22. package/lib/esm/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  23. package/lib/esm/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  24. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -29
  25. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -11
  26. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  27. package/lib/esm/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
  28. package/lib/esm/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
  29. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  30. package/lib/esm/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +16 -4
  31. package/lib/esm/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  32. package/lib/esm/view/referralView/epics/sendReferralInviteEpic.js +1 -9
  33. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  34. package/lib/esm/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  35. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  36. package/lib/esm/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
  37. package/lib/esm/view/vendorList/vendorListReducer.js +3 -1
  38. package/lib/esm/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  39. package/lib/index.d.ts +4 -4
  40. package/lib/index.js +5 -9
  41. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
  42. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
  43. package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
  44. package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
  45. package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
  46. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
  47. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
  48. package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
  49. package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
  50. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -14
  51. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +4 -8
  52. package/lib/view/aiCfoView/aiCfoViewReducer.js +4 -30
  53. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -2
  54. package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -12
  55. package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -15
  56. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  57. package/lib/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
  58. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
  59. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  60. package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +15 -3
  61. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  62. package/lib/view/referralView/epics/sendReferralInviteEpic.js +1 -9
  63. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  64. package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
  65. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  66. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
  67. package/lib/view/vendorList/vendorListReducer.js +3 -1
  68. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  69. package/package.json +2 -5
  70. package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +0 -34
  71. package/lib/view/aiCfoView/epics/fetchSkillsEpic.d.ts +0 -8
  72. package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +0 -38
package/README.md CHANGED
@@ -89,9 +89,7 @@ Testing types with `tsc` and Vitest is an experimental feature. Breaking changes
89
89
  - `pnpm check-version` — Checks the current version using a custom script.
90
90
  - `pnpm check-dependencies` — Checks dependencies using a custom script.
91
91
  - `pnpm clean-resolutions` — Cleans up resolutions using a custom script.
92
- - `pnpm create-or-update-release-branch` — Runs the release branch creation/update script.
93
- - `pnpm bump-versions-master` — Bumps versions and publishes all client repos on master end-to-end (per-repo PR + auto-merge + publish; v2 bumps only, no deploy).
94
- - `pnpm bump-versions-beta` — Selectable upstream→downstream beta publish chain (CES / analytics / web-components / app-ui / cockpit) tagged `beta<initials>`. v2 step is a local-only dep repointing (no commit, no publish). Single-popup config.
92
+ - `pnpm create-release-branch` — Runs the release branch creation script.
95
93
  - `pnpm bump-update-web-app-cockpit-beta` — Runs the cockpit beta update script.
96
94
  - `pnpm send-release-notes` — Sends release notes using a custom script.
97
95
  - `pnpm update-slack-group-topic` — Updates the Slack group topic using a custom script.
@@ -0,0 +1,6 @@
1
+ {
2
+ "status": {
3
+ "message": "Internal server error",
4
+ "code": 500
5
+ }
6
+ }
@@ -12,6 +12,7 @@ const amount_1 = require("../../commonStateTypes/amount");
12
12
  const timePeriod_1 = require("../../commonStateTypes/timePeriod");
13
13
  const zeniDayJS_1 = require("../../zeniDayJS");
14
14
  const transactionIDPayload_1 = require("../transaction/payloadTypes/transactionIDPayload");
15
+ const vendorPayload_1 = require("../vendor/vendorPayload");
15
16
  const jeScheduleHelper_1 = require("./jeScheduleHelper");
16
17
  const jeSchedulesTypes_1 = require("./jeSchedulesTypes");
17
18
  function toScheduledJournalEntryState(payload, currency_code, currency_symbol) {
@@ -250,7 +251,7 @@ function toJEScheduledTransaction(payload) {
250
251
  code: (0, jeSchedulesTypes_1.toScheduleStatusCodeType)(payload.status.code),
251
252
  label: payload.status.label,
252
253
  },
253
- vendorId: payload.vendor.vendor_id,
254
+ vendorId: (0, vendorPayload_1.getVendorPayloadIdentifier)(payload.vendor) ?? '',
254
255
  baseTransaction: (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
255
256
  ...(0, transactionIDPayload_1.toTransactionID)(payload.base_transaction),
256
257
  lineId: payload.base_transaction.line_id,
@@ -296,7 +297,7 @@ function toJEAccruedScheduledTransaction(payload) {
296
297
  code: (0, jeSchedulesTypes_1.toScheduleStatusCodeType)(payload.status.code),
297
298
  label: payload.status.label,
298
299
  },
299
- vendorId: payload.vendor.vendor_id,
300
+ vendorId: (0, vendorPayload_1.getVendorPayloadIdentifier)(payload.vendor) ?? '',
300
301
  recurringAmount: {
301
302
  amount: payload.recurring_amount,
302
303
  currencyCode: 'USD',
@@ -0,0 +1,7 @@
1
+ import { ID } from '../../../commonStateTypes/common';
2
+ import { VendorPayload } from '../vendorPayload';
3
+ import { VendorState } from '../vendorState';
4
+ export declare const vendorPaylod: VendorPayload[];
5
+ export declare const vendorStateWithVendors: VendorState;
6
+ export declare const vendorIdToBeRemoved: ID;
7
+ export declare const vendorStateAfterRemoval: VendorState;
@@ -0,0 +1,311 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.vendorStateAfterRemoval = exports.vendorIdToBeRemoved = exports.vendorStateWithVendors = exports.vendorPaylod = void 0;
4
+ const vendorStateMocks_1 = require("./vendorStateMocks");
5
+ exports.vendorPaylod = [
6
+ {
7
+ vendor_id: 'vendor_j12jh1g2g12jg3jh12:12',
8
+ transaction_attachments: [],
9
+ qbo_id: '12',
10
+ vendor_name: 'Sample Vendor 1',
11
+ legal_name: 'Sample Vendor 1',
12
+ title: '',
13
+ suffix: '',
14
+ first_name: 'Sample',
15
+ middle_name: '',
16
+ last_name: 'Vendor',
17
+ vendor_type: 'individual',
18
+ logo: {
19
+ url: '',
20
+ base64: '',
21
+ },
22
+ year_to_date_spend: 0,
23
+ last_30_days_spend: 0,
24
+ last_90_days_spend: 0,
25
+ last_month_spend: 0,
26
+ last_3_months_spend: 0,
27
+ last_6_months_spend: 0,
28
+ last_12_months_spend: 0,
29
+ previous_year_spend: 0,
30
+ owner: null,
31
+ balance: 0,
32
+ is_deleted: false,
33
+ qbo_create_time: '2022-01-24T05:59:37.057383',
34
+ qbo_update_time: '2022-01-24T05:59:37.057383',
35
+ create_time: '2022-01-24T05:59:37.057383',
36
+ update_time: '2022-01-24T05:59:37.057383',
37
+ sync_token: '1',
38
+ email: '',
39
+ phone: '',
40
+ website_url: '',
41
+ currency_code: 'USD',
42
+ currency_symbol: '$',
43
+ country_code: 'US',
44
+ account: {
45
+ qbo_id: '12',
46
+ coa_id: '123',
47
+ labels: [],
48
+ account_id: 'Travel Meals',
49
+ account_name: 'Travel Meals',
50
+ },
51
+ accounting_class: {
52
+ accounting_class_id: 'class_e0f33254-2651-4d5c-9d57-2611788265ca',
53
+ accounting_class_name: 'product 500',
54
+ accounting_class_number: '4011',
55
+ fully_qualified_accounting_class_name: 'product 500',
56
+ qbo_id: '5100000000000040143',
57
+ },
58
+ contacts: [
59
+ {
60
+ full_name: 'Aniket Patil',
61
+ phone: '+91-8xxxxxxxx',
62
+ email: 'aniket@personalmail.com',
63
+ contact_id: 'contacts_f3881db1-35c0-4699-891c-6cca724e75d6',
64
+ },
65
+ {
66
+ full_name: 'Ankit Singh',
67
+ phone: '+91-8xxxxxxxx',
68
+ email: 'ankit@personalmail.com',
69
+ contact_id: 'contacts_6856c987-17ff-44a4-aad3-eef4b7696554',
70
+ },
71
+ ],
72
+ address: {
73
+ address_id: 'a_e3e99a8b-d400-42ac-ae09-e655bff1af97',
74
+ city: 'Bangalore',
75
+ country: 'India',
76
+ country_code: null,
77
+ create_time: '2022-02-01T15:47:44.681429',
78
+ hash_value: '2be1de50bedd7a2dfb8094846698b2b8bc86869bf903c27b69b74ae3e2651983',
79
+ latitude: null,
80
+ longitude: null,
81
+ postal_code: '560001',
82
+ state: 'Karnataka',
83
+ street: ['2nd lane', 'Opp Peter England showroom', 'Mg Road'],
84
+ update_time: '2022-02-01T15:47:44.681439',
85
+ },
86
+ shipping_address: null,
87
+ bank_account_ids: [
88
+ 'bank_adg67-asnds-a6sad-sdfgf8',
89
+ 'bank_asghj-hags23-hgfjh-g3asfas',
90
+ ],
91
+ bank_accounts: [
92
+ {
93
+ bank_account_id: 'bank_adg67-asnds-a6sad-sdfgf8',
94
+ bank_branch_id: 'HDFC000547',
95
+ bank_branch_name: 'Khadki',
96
+ bank_account_number: '201301203012013012',
97
+ bank_account_name: 'Person/Company Name',
98
+ bank_name: 'HDFC Bank',
99
+ bank_routing_number_ach: '210000000',
100
+ bank_routing_number_wire_transfer: '210000000',
101
+ note: '',
102
+ is_deleted: false,
103
+ update_time: '2022-02-01T15:47:44.681439',
104
+ create_time: '2022-02-01T15:47:44.681439',
105
+ bank_swift_code: null,
106
+ bank_account_iban: null,
107
+ bank_account_type: null,
108
+ },
109
+ {
110
+ bank_account_id: 'bank_asghj-hags23-hgfjh-g3asfas',
111
+ bank_branch_id: 'ICICI00004',
112
+ bank_branch_name: 'Baner',
113
+ bank_account_number: '20130120301286273826',
114
+ bank_account_name: 'Person/Company Name',
115
+ bank_name: 'ICICI Bank',
116
+ bank_routing_number_ach: '110000000',
117
+ bank_routing_number_wire_transfer: '110000000',
118
+ note: '',
119
+ is_deleted: false,
120
+ update_time: '2022-02-01T15:47:44.681439',
121
+ create_time: '2022-02-01T15:47:44.681439',
122
+ bank_swift_code: null,
123
+ bank_account_iban: null,
124
+ bank_account_type: null,
125
+ },
126
+ ],
127
+ payment_instrument_ids: ['pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3'],
128
+ payment_instruments: [
129
+ {
130
+ account_source: 'email',
131
+ create_time: '2023-12-17T11:29:27.544391',
132
+ display_text: 'UPI ID - lgtextiles@okicici',
133
+ labels: [
134
+ {
135
+ key: 'Account Holder Name',
136
+ value: 'LG Textiles',
137
+ },
138
+ {
139
+ key: 'UPI ID',
140
+ value: 'lgtextiles@okicici',
141
+ },
142
+ {
143
+ key: 'Source',
144
+ value: 'email',
145
+ },
146
+ {
147
+ key: 'Type of account',
148
+ value: 'indian_upi',
149
+ },
150
+ ],
151
+ max_valid_amount: 100000,
152
+ min_valid_amount: 0,
153
+ pi_display_number: 'lgtextiles@okicici',
154
+ update_time: '2023-12-17T11:29:27.544396',
155
+ zeni_payment_instrument_id: 'pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3',
156
+ },
157
+ ],
158
+ vendor_currency_code: 'USD',
159
+ vendor_currency_symbol: '$',
160
+ vendor_1099_status: 'incomplete',
161
+ tin: { type: 'ein', value: '550258131' },
162
+ },
163
+ {
164
+ vendor_id: 'vendor_j12jh1g2g12jg3jh12:2',
165
+ transaction_attachments: [],
166
+ qbo_id: '13',
167
+ vendor_name: 'Sample Vendor 2',
168
+ legal_name: 'Sample Vendor 2',
169
+ title: '',
170
+ suffix: '',
171
+ first_name: 'Sample',
172
+ middle_name: '',
173
+ last_name: 'Vendor 3',
174
+ vendor_type: 'c_corporation',
175
+ logo: {
176
+ url: '',
177
+ base64: '',
178
+ },
179
+ last_month_spend: 0,
180
+ last_3_months_spend: 0,
181
+ last_6_months_spend: 0,
182
+ last_12_months_spend: 0,
183
+ previous_year_spend: 0,
184
+ owner: null,
185
+ balance: 0,
186
+ is_deleted: false,
187
+ qbo_create_time: '2022-01-24T05:59:37.057383',
188
+ qbo_update_time: '2022-01-24T05:59:37.057383',
189
+ create_time: '2022-01-24T05:59:37.057383',
190
+ update_time: '2022-01-24T05:59:37.057383',
191
+ sync_token: '1',
192
+ email: '',
193
+ phone: '',
194
+ website_url: '',
195
+ currency_code: 'USD',
196
+ currency_symbol: '$',
197
+ country_code: 'US',
198
+ contacts: [
199
+ {
200
+ full_name: 'Aniket Patil',
201
+ phone: '+91-8xxxxxxxx',
202
+ email: 'aniket@personalmail.com',
203
+ contact_id: 'contacts_f3881db1-35c0-4699-891c-6cca724e75d6',
204
+ },
205
+ {
206
+ full_name: 'Ankit Singh',
207
+ phone: '+91-8xxxxxxxx',
208
+ email: 'ankit@personalmail.com',
209
+ contact_id: 'contacts_6856c987-17ff-44a4-aad3-eef4b7696554',
210
+ },
211
+ ],
212
+ account: {
213
+ qbo_id: '12',
214
+ coa_id: '123',
215
+ labels: [],
216
+ account_id: 'Travel Meals',
217
+ account_name: 'Travel Meals',
218
+ },
219
+ accounting_class: {
220
+ accounting_class_id: 'class_e0f33254-2651-4d5c-9d57-2611788265ca',
221
+ accounting_class_name: 'product 500',
222
+ accounting_class_number: '4011',
223
+ fully_qualified_accounting_class_name: 'product 500',
224
+ qbo_id: '5100000000000040143',
225
+ },
226
+ shipping_address: null,
227
+ bank_accounts: [
228
+ {
229
+ bank_account_id: 'bank_asghj-hgfjh-g3asfas-hags23',
230
+ bank_branch_id: 'SBINOOOO9765',
231
+ bank_branch_name: 'Wakad',
232
+ bank_account_number: '20130120301286273826',
233
+ bank_account_name: 'Person/Company Name',
234
+ bank_name: 'SBI Bank',
235
+ bank_routing_number_ach: '410000000',
236
+ bank_routing_number_wire_transfer: '310000000',
237
+ note: '',
238
+ is_deleted: false,
239
+ update_time: '2022-02-01T15:47:44.681439',
240
+ create_time: '2022-02-01T15:47:44.681439',
241
+ bank_swift_code: null,
242
+ bank_account_iban: null,
243
+ bank_account_type: null,
244
+ },
245
+ {
246
+ bank_account_id: 'bank_g3asfas-hags23-hgfjh-asghj',
247
+ bank_branch_id: 'UBI0014267',
248
+ bank_branch_name: 'SB Road',
249
+ bank_account_number: '20130120301286273826',
250
+ bank_account_name: 'Person/Company Name',
251
+ bank_name: 'SBI Bank',
252
+ bank_routing_number_ach: '510000000',
253
+ bank_routing_number_wire_transfer: '610000000',
254
+ note: '',
255
+ is_deleted: false,
256
+ update_time: '2022-02-01T15:47:44.681439',
257
+ create_time: '2022-02-01T15:47:44.681439',
258
+ bank_swift_code: null,
259
+ bank_account_iban: null,
260
+ bank_account_type: null,
261
+ },
262
+ ],
263
+ payment_instrument_ids: ['pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3'],
264
+ payment_instruments: [
265
+ {
266
+ account_source: 'email',
267
+ create_time: '2023-12-17T11:29:27.544391',
268
+ display_text: 'UPI ID - lgtextiles@okicici',
269
+ labels: [
270
+ {
271
+ key: 'Account Holder Name',
272
+ value: 'LG Textiles',
273
+ },
274
+ {
275
+ key: 'UPI ID',
276
+ value: 'lgtextiles@okicici',
277
+ },
278
+ {
279
+ key: 'Source',
280
+ value: 'email',
281
+ },
282
+ {
283
+ key: 'Type of account',
284
+ value: 'indian_upi',
285
+ },
286
+ ],
287
+ max_valid_amount: 100000,
288
+ min_valid_amount: 0,
289
+ pi_display_number: 'lgtextiles@okicici',
290
+ update_time: '2023-12-17T11:29:27.544396',
291
+ zeni_payment_instrument_id: 'pay_inst_f3fc9b06-694a-4609-a710-b0e1d4de72d3',
292
+ },
293
+ ],
294
+ vendor_currency_code: 'USD',
295
+ vendor_currency_symbol: '$',
296
+ vendor_1099_status: 'incomplete',
297
+ tin: { type: 'ein', value: '550258131' },
298
+ },
299
+ ];
300
+ exports.vendorStateWithVendors = {
301
+ vendorByID: {
302
+ 'vendor_j12jh1g2g12jg3jh12:12': vendorStateMocks_1.vendorStateMock1,
303
+ 'vendor_j12jh1g2g12jg3jh12:2': vendorStateMocks_1.vendorStateMock2,
304
+ },
305
+ };
306
+ exports.vendorIdToBeRemoved = 'vendor_j12jh1g2g12jg3jh12:2';
307
+ exports.vendorStateAfterRemoval = {
308
+ vendorByID: {
309
+ 'vendor_j12jh1g2g12jg3jh12:12': vendorStateMocks_1.vendorStateMock1,
310
+ },
311
+ };
@@ -0,0 +1,8 @@
1
+ import { Vendor } from '../vendorState';
2
+ export declare const vendorStateMock1: Vendor;
3
+ export declare const vendorStateMock2: Vendor;
4
+ export declare const vendorStateMock4: Vendor;
5
+ export declare const vendorStateMock5: Vendor;
6
+ export declare const vendorStateMock6: Vendor;
7
+ export declare const vendorStateMock7: Vendor;
8
+ export declare const vendorStateMock8: Vendor;