@zeniai/client-epic-state 5.0.89 → 5.0.90-beta0ND

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 (78) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.js +1 -0
  3. package/lib/entity/company/companyPayload.d.ts +4 -0
  4. package/lib/entity/company/companyPayload.js +4 -0
  5. package/lib/entity/company/companyStateTypes.d.ts +4 -0
  6. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  7. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  8. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  9. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  10. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  11. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  12. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  13. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  14. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  15. package/lib/entity/tenant/tenantReducer.d.ts +38 -25
  16. package/lib/entity/tenant/tenantReducer.js +65 -5
  17. package/lib/entity/tenant/tenantState.d.ts +1 -0
  18. package/lib/epic.d.ts +8 -3
  19. package/lib/epic.js +9 -3
  20. package/lib/esm/commonStateTypes/animations.js +1 -0
  21. package/lib/esm/entity/company/companyPayload.js +4 -0
  22. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  23. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  24. package/lib/esm/entity/tenant/tenantReducer.js +63 -3
  25. package/lib/esm/epic.js +9 -3
  26. package/lib/esm/index.js +9 -6
  27. package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
  28. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  29. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  30. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  31. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +42 -0
  32. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
  33. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  34. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +217 -50
  35. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +7 -1
  36. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
  37. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +52 -0
  38. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +59 -0
  39. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  40. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  41. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
  42. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  43. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  44. package/lib/index.d.ts +11 -7
  45. package/lib/index.js +51 -31
  46. package/lib/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
  47. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  48. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  49. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  50. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  51. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +46 -0
  52. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
  53. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
  54. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  55. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  56. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  57. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
  58. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +219 -51
  59. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
  60. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +11 -2
  61. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
  62. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
  63. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  64. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +56 -0
  65. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
  66. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +63 -0
  67. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
  68. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  69. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  70. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  71. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  72. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
  73. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  74. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  75. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  76. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
  77. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  78. package/package.json +1 -1
@@ -0,0 +1,205 @@
1
+ /**
2
+ * Pure mappers from ExtendAI parser payloads to our form-side local-data shapes.
3
+ *
4
+ * Each mapper filters out fields below KYC_KYB_AUTOFILL_MIN_CONFIDENCE and returns
5
+ * both the merged values and the list of field names that were autofilled so the
6
+ * UI can show the ✦ AI badge next to each.
7
+ */
8
+ import { date } from '../../../zeniDayJS';
9
+ import { toZeniUrl } from '../../../zeniUrl';
10
+ import { KYC_KYB_AUTOFILL_MIN_CONFIDENCE, } from './types/kycKybAutofill';
11
+ const emptyResult = () => ({
12
+ values: {},
13
+ autoFilledFieldNames: [],
14
+ });
15
+ const isConfident = (field) => {
16
+ if (field == null) {
17
+ return false;
18
+ }
19
+ if (field.value == null) {
20
+ return false;
21
+ }
22
+ return field.confidence >= KYC_KYB_AUTOFILL_MIN_CONFIDENCE;
23
+ };
24
+ const assignAutofilledValue = (result, key, value) => {
25
+ if (value == null) {
26
+ return;
27
+ }
28
+ if (typeof value === 'string' && value.trim() === '') {
29
+ return;
30
+ }
31
+ result.values[key] = value;
32
+ result.autoFilledFieldNames.push(key);
33
+ };
34
+ const tryParseDate = (rawDate) => {
35
+ const parsedDate = date(rawDate);
36
+ if (parsedDate.isValid()) {
37
+ return parsedDate;
38
+ }
39
+ return undefined;
40
+ };
41
+ const normalizeNationality = (rawNationality, countries) => {
42
+ const needle = rawNationality.trim().toLowerCase();
43
+ if (needle === '') {
44
+ return undefined;
45
+ }
46
+ // Exact ISO-2 / ISO-3 match.
47
+ const isoMatch = countries.find((country) => country.countryCode.toLowerCase() === needle);
48
+ if (isoMatch != null) {
49
+ return isoMatch.countryCode;
50
+ }
51
+ // Common nationality adjectives map to country names (e.g. "American" → "United States").
52
+ const adjectiveToCountry = {
53
+ american: 'united states',
54
+ british: 'united kingdom',
55
+ indian: 'india',
56
+ canadian: 'canada',
57
+ australian: 'australia',
58
+ german: 'germany',
59
+ french: 'france',
60
+ chinese: 'china',
61
+ japanese: 'japan',
62
+ mexican: 'mexico',
63
+ brazilian: 'brazil',
64
+ };
65
+ const resolvedName = adjectiveToCountry[needle] ?? needle;
66
+ const nameMatch = countries.find((country) => country.countryName.toLowerCase() === resolvedName);
67
+ return nameMatch?.countryCode;
68
+ };
69
+ const splitFullName = (fullName) => {
70
+ const parts = fullName.trim().split(/\s+/);
71
+ if (parts.length === 1) {
72
+ return { firstName: parts[0], lastName: '' };
73
+ }
74
+ const lastName = parts[parts.length - 1];
75
+ const firstName = parts.slice(0, -1).join(' ');
76
+ return { firstName, lastName };
77
+ };
78
+ /** Passport → Company Officer. */
79
+ export const mapPassportToOfficer = (parsed, allNationalityCountries) => {
80
+ const result = emptyResult();
81
+ if (isConfident(parsed.first_name)) {
82
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
83
+ }
84
+ if (isConfident(parsed.last_name)) {
85
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
86
+ }
87
+ if (isConfident(parsed.date_of_birth)) {
88
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
89
+ if (parsedDate != null) {
90
+ assignAutofilledValue(result, 'birthday', parsedDate);
91
+ }
92
+ }
93
+ if (isConfident(parsed.nationality)) {
94
+ const isoCode = normalizeNationality(parsed.nationality.value, allNationalityCountries);
95
+ if (isoCode != null) {
96
+ assignAutofilledValue(result, 'nationalityCountryCode', isoCode);
97
+ }
98
+ }
99
+ return result;
100
+ };
101
+ /** Driving License → Company Officer. */
102
+ export const mapDrivingLicenseToOfficer = (parsed) => {
103
+ const result = emptyResult();
104
+ if (isConfident(parsed.first_name)) {
105
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
106
+ }
107
+ if (isConfident(parsed.last_name)) {
108
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
109
+ }
110
+ if (isConfident(parsed.date_of_birth)) {
111
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
112
+ if (parsedDate != null) {
113
+ assignAutofilledValue(result, 'birthday', parsedDate);
114
+ }
115
+ }
116
+ // address_* fields are mapped at a higher layer (addressView reducer) — kept here as values
117
+ // only, the consuming epic dispatches the address payload separately.
118
+ return result;
119
+ };
120
+ /** SSN Card → Company Officer (name only — SSN value not yet returned by parser). */
121
+ export const mapSsnCardToOfficer = (parsed) => {
122
+ const result = emptyResult();
123
+ if (isConfident(parsed.full_name)) {
124
+ const { firstName, lastName } = splitFullName(parsed.full_name.value);
125
+ if (firstName !== '') {
126
+ assignAutofilledValue(result, 'firstName', firstName);
127
+ }
128
+ if (lastName !== '') {
129
+ assignAutofilledValue(result, 'lastName', lastName);
130
+ }
131
+ }
132
+ return result;
133
+ };
134
+ /** Certificate of Incorporation → Company Details. */
135
+ export const mapCoiToCompanyDetails = (parsed) => {
136
+ const result = emptyResult();
137
+ if (isConfident(parsed.company_legal_name)) {
138
+ assignAutofilledValue(result, 'companyLegalName', parsed.company_legal_name.value);
139
+ }
140
+ if (isConfident(parsed.ein)) {
141
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
142
+ }
143
+ if (isConfident(parsed.phone_number)) {
144
+ assignAutofilledValue(result, 'phone', parsed.phone_number.value);
145
+ }
146
+ if (isConfident(parsed.product_description)) {
147
+ assignAutofilledValue(result, 'companyDescription', parsed.product_description.value);
148
+ }
149
+ if (isConfident(parsed.website)) {
150
+ try {
151
+ assignAutofilledValue(result, 'website', toZeniUrl(parsed.website.value));
152
+ }
153
+ catch {
154
+ // ignore — malformed URL string from OCR
155
+ }
156
+ }
157
+ if (isConfident(parsed.industry)) {
158
+ assignAutofilledValue(result, 'companyIndustryType', parsed.industry.value);
159
+ }
160
+ if (isConfident(parsed.sub_industry)) {
161
+ assignAutofilledValue(result, 'companySubIndustry', parsed.sub_industry.value);
162
+ }
163
+ if (isConfident(parsed.type_of_incorporation)) {
164
+ assignAutofilledValue(result, 'typeOfIncorporation', parsed.type_of_incorporation.value);
165
+ }
166
+ if (isConfident(parsed.date_of_incorporation)) {
167
+ const parsedDate = tryParseDate(parsed.date_of_incorporation.value);
168
+ if (parsedDate != null) {
169
+ assignAutofilledValue(result, 'incDate', parsedDate);
170
+ }
171
+ }
172
+ if (isConfident(parsed.state_of_incorporation)) {
173
+ assignAutofilledValue(result, 'stateOfIncorporation', parsed.state_of_incorporation.value);
174
+ }
175
+ if (isConfident(parsed.countries_of_operations)) {
176
+ assignAutofilledValue(result, 'countriesOfOperations', parsed.countries_of_operations.value);
177
+ }
178
+ if (isConfident(parsed.source_of_funds)) {
179
+ assignAutofilledValue(result, 'sourceOfFunds', parsed.source_of_funds.value);
180
+ }
181
+ if (isConfident(parsed.transaction_volume_expectations)) {
182
+ assignAutofilledValue(result, 'transactionVolume', parsed.transaction_volume_expectations.value);
183
+ }
184
+ if (isConfident(parsed.purpose_of_account)) {
185
+ assignAutofilledValue(result, 'purposeOfAccount', parsed.purpose_of_account.value);
186
+ }
187
+ if (isConfident(parsed.regulated_status)) {
188
+ assignAutofilledValue(result, 'regulatedStatus', parsed.regulated_status.value);
189
+ }
190
+ if (isConfident(parsed.us_nexus)) {
191
+ assignAutofilledValue(result, 'usNexus', parsed.us_nexus.value);
192
+ }
193
+ return result;
194
+ };
195
+ /** Tax EIN letter → Company Details. */
196
+ export const mapTaxEinToCompanyDetails = (parsed) => {
197
+ const result = emptyResult();
198
+ if (isConfident(parsed.legal_business_name)) {
199
+ assignAutofilledValue(result, 'companyLegalName', parsed.legal_business_name.value);
200
+ }
201
+ if (isConfident(parsed.ein)) {
202
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
203
+ }
204
+ return result;
205
+ };
@@ -1,62 +1,30 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
+ import { parseUploadedKybDocument, parseUploadedKybDocumentFailure, parseUploadedKycDocument, parseUploadedKycDocumentFailure, } from './kycKybAutofillActions';
2
3
  const initialFetchStatus = {
3
4
  fetchState: 'Not-Started',
4
5
  error: undefined,
5
6
  };
7
+ const emptyOfficerSlot = {
8
+ autoFilledFields: [],
9
+ localData: undefined,
10
+ sendOtpStatus: initialFetchStatus,
11
+ otpverificationStatus: initialFetchStatus,
12
+ };
6
13
  export const initialState = {
7
14
  updateStatus: { fetchState: 'Not-Started', error: undefined },
8
- companyDetails: {},
15
+ parsingDocumentFileIds: [],
16
+ companyDetails: { autoFilledFields: [] },
9
17
  companyOfficerUpdateStatus: {
10
- Officer_1: {
11
- localData: undefined,
12
- sendOtpStatus: initialFetchStatus,
13
- otpverificationStatus: initialFetchStatus,
14
- },
15
- Officer_2: {
16
- localData: undefined,
17
- sendOtpStatus: initialFetchStatus,
18
- otpverificationStatus: initialFetchStatus,
19
- },
20
- Officer_3: {
21
- localData: undefined,
22
- sendOtpStatus: initialFetchStatus,
23
- otpverificationStatus: initialFetchStatus,
24
- },
25
- Officer_4: {
26
- localData: undefined,
27
- sendOtpStatus: initialFetchStatus,
28
- otpverificationStatus: initialFetchStatus,
29
- },
30
- Officer_5: {
31
- localData: undefined,
32
- sendOtpStatus: initialFetchStatus,
33
- otpverificationStatus: initialFetchStatus,
34
- },
35
- Officer_6: {
36
- localData: undefined,
37
- sendOtpStatus: initialFetchStatus,
38
- otpverificationStatus: initialFetchStatus,
39
- },
40
- Officer_7: {
41
- localData: undefined,
42
- sendOtpStatus: initialFetchStatus,
43
- otpverificationStatus: initialFetchStatus,
44
- },
45
- Officer_8: {
46
- localData: undefined,
47
- sendOtpStatus: initialFetchStatus,
48
- otpverificationStatus: initialFetchStatus,
49
- },
50
- Officer_9: {
51
- localData: undefined,
52
- sendOtpStatus: initialFetchStatus,
53
- otpverificationStatus: initialFetchStatus,
54
- },
55
- Officer_10: {
56
- localData: undefined,
57
- sendOtpStatus: initialFetchStatus,
58
- otpverificationStatus: initialFetchStatus,
59
- },
18
+ Officer_1: { ...emptyOfficerSlot },
19
+ Officer_2: { ...emptyOfficerSlot },
20
+ Officer_3: { ...emptyOfficerSlot },
21
+ Officer_4: { ...emptyOfficerSlot },
22
+ Officer_5: { ...emptyOfficerSlot },
23
+ Officer_6: { ...emptyOfficerSlot },
24
+ Officer_7: { ...emptyOfficerSlot },
25
+ Officer_8: { ...emptyOfficerSlot },
26
+ Officer_9: { ...emptyOfficerSlot },
27
+ Officer_10: { ...emptyOfficerSlot },
60
28
  },
61
29
  primaryContactDetails: {},
62
30
  };
@@ -297,7 +265,92 @@ const setupView = createSlice({
297
265
  clearSetupView(draft) {
298
266
  Object.assign(draft, initialState);
299
267
  },
268
+ /**
269
+ * Merge AI-parsed officer fields into the selected officer's localData and
270
+ * track which field names were autofilled so the form can show the ✦ badge.
271
+ */
272
+ applyKycDocumentAutofillForSetup: {
273
+ reducer(draft, action) {
274
+ const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
275
+ const slot = draft.companyOfficerUpdateStatus[officerType];
276
+ slot.localData = Object.assign({}, slot.localData, values);
277
+ slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
278
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
279
+ },
280
+ prepare(payload) {
281
+ return { payload };
282
+ },
283
+ },
284
+ /**
285
+ * Merge AI-parsed company fields into companyDetails.localData and track
286
+ * which field names were autofilled.
287
+ */
288
+ applyKybDocumentAutofillForSetup: {
289
+ reducer(draft, action) {
290
+ const { values, autoFilledFieldNames, fileId } = action.payload;
291
+ draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
292
+ draft.companyDetails.autoFilledFields = Array.from(new Set([
293
+ ...draft.companyDetails.autoFilledFields,
294
+ ...autoFilledFieldNames,
295
+ ]));
296
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
297
+ },
298
+ prepare(payload) {
299
+ return { payload };
300
+ },
301
+ },
302
+ /**
303
+ * Wipe AI-autofill badges. If `officerType` is provided, clears only that
304
+ * officer; otherwise clears company details too.
305
+ */
306
+ clearKycKybAutofillForSetup: {
307
+ reducer(draft, action) {
308
+ const { officerType } = action.payload;
309
+ if (officerType != null) {
310
+ draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
311
+ }
312
+ else {
313
+ draft.companyDetails.autoFilledFields = [];
314
+ Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
315
+ draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
316
+ });
317
+ }
318
+ },
319
+ prepare(payload = {}) {
320
+ return { payload };
321
+ },
322
+ },
323
+ },
324
+ extraReducers: (builder) => {
325
+ const addParsingFileId = (draft, fileId) => {
326
+ if (!draft.parsingDocumentFileIds.includes(fileId)) {
327
+ draft.parsingDocumentFileIds.push(fileId);
328
+ }
329
+ };
330
+ const removeParsingFileId = (draft, fileId) => {
331
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
332
+ };
333
+ builder.addCase(parseUploadedKycDocument, (draft, action) => {
334
+ if (action.payload.target === 'setup') {
335
+ addParsingFileId(draft, action.payload.fileId);
336
+ }
337
+ });
338
+ builder.addCase(parseUploadedKybDocument, (draft, action) => {
339
+ if (action.payload.target === 'setup') {
340
+ addParsingFileId(draft, action.payload.fileId);
341
+ }
342
+ });
343
+ builder.addCase(parseUploadedKycDocumentFailure, (draft, action) => {
344
+ if (action.payload.target === 'setup') {
345
+ removeParsingFileId(draft, action.payload.fileId);
346
+ }
347
+ });
348
+ builder.addCase(parseUploadedKybDocumentFailure, (draft, action) => {
349
+ if (action.payload.target === 'setup') {
350
+ removeParsingFileId(draft, action.payload.fileId);
351
+ }
352
+ });
300
353
  },
301
354
  });
302
- export const { enableSetup, enableSetupSuccess, enableSetupFailure, updateBusinessVerificationDetails, updateBusinessVerificationDetailsSuccess, updateBusinessVerificationDetailsFailure, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, sendOtp: sendOtpSpendManagementSetUp, resendOtp: resendOtpSpendManagementSetUp, sendOtpSuccess: sendOtpSuccessSpendManagementSetUp, sendOtpFailure: sendOtpFailureSpendManagementSetUp, verifyOtp: verifyOtpSpendManagementSetUp, verifyOtpSuccess: verifyOtpSuccessSpendManagementSetUp, verifyOtpFailure: verifyOtpFailureSpendManagementSetUp, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearSetupView, } = setupView.actions;
355
+ export const { enableSetup, enableSetupSuccess, enableSetupFailure, updateBusinessVerificationDetails, updateBusinessVerificationDetailsSuccess, updateBusinessVerificationDetailsFailure, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, sendOtp: sendOtpSpendManagementSetUp, resendOtp: resendOtpSpendManagementSetUp, sendOtpSuccess: sendOtpSuccessSpendManagementSetUp, sendOtpFailure: sendOtpFailureSpendManagementSetUp, verifyOtp: verifyOtpSpendManagementSetUp, verifyOtpSuccess: verifyOtpSuccessSpendManagementSetUp, verifyOtpFailure: verifyOtpFailureSpendManagementSetUp, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearSetupView, applyKycDocumentAutofillForSetup, applyKybDocumentAutofillForSetup, clearKycKybAutofillForSetup, } = setupView.actions;
303
356
  export default setupView.reducer;
@@ -87,15 +87,17 @@ export function getBusinessVerificationDetails(state, companyId) {
87
87
  const { setupViewState, countryListState } = state;
88
88
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
89
89
  const companyView = getCompanyView(state, companyId, []);
90
- const { companyDetailsLocalData, companyOfficerLocalData } = getCompanyAndIdentityDetails(state, companyId, {
90
+ const { companyDetailsLocalData, companyOfficerLocalData, parsingDocumentFileIds } = getCompanyAndIdentityDetails(state, companyId, {
91
91
  companyDetails,
92
92
  companyOfficerUpdateStatus,
93
93
  primaryContactDetails,
94
+ parsingDocumentFileIds: setupViewState.parsingDocumentFileIds,
94
95
  });
95
96
  const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
96
97
  return {
97
98
  companyDetailsLocalData,
98
99
  companyOfficerLocalData,
100
+ parsingDocumentFileIds,
99
101
  companyView,
100
102
  updateStatus,
101
103
  allNationalityCountries,
@@ -119,6 +121,7 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
119
121
  const companyAddress = addressViewState.newAddressState?.company_address;
120
122
  const registeredCompanyAddress = addressViewState.newAddressState?.company_registered_address;
121
123
  companyDetailsLocalData = {
124
+ autoFilledFields: companyDetails.autoFilledFields,
122
125
  companyId,
123
126
  companyDescription,
124
127
  companyLegalName,
@@ -191,6 +194,7 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
191
194
  const companyOfficerAddress = addressViewState.newAddressState?.[addressType];
192
195
  companyOfficerLocalData[officerType] = {
193
196
  ...companyOfficer.localData,
197
+ autoFilledFields: companyOfficer.autoFilledFields,
194
198
  userFiles: getFilesByFileIds(fileState, fileIds),
195
199
  additionalFiles: getFilesByFileIds(fileState, additionalSubmittedDocumentsForVerificationFileIds),
196
200
  deleteFileStatusById,
@@ -204,6 +208,7 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
204
208
  return {
205
209
  companyDetailsLocalData,
206
210
  companyOfficerLocalData,
211
+ parsingDocumentFileIds: companyAndIdentityDetails.parsingDocumentFileIds,
207
212
  };
208
213
  };
209
214
  /* This helper function takes deposit accounts and payment accounts
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Shared types for the KYC / KYB document autofill flow that lives inside the
3
+ * commonSetup feature (Setup pages + Onboarding both consume it via the same
4
+ * selector view; there is no separate state slice).
5
+ *
6
+ * Backed by document-communication-agent `POST /1.0/documents/process/sync`,
7
+ * which proxies document-service ExtendAI parsers and returns one of the
8
+ * parser payloads below — each value shaped as `{value, confidence}` per field.
9
+ */
10
+ /** Confidence floor below which we drop an autofill candidate. */
11
+ export const KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
12
+ /**
13
+ * Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
14
+ * parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
15
+ * `stateId`, which has no parser today.
16
+ */
17
+ export const toKycProvidedDocumentType = (selectType) => {
18
+ switch (selectType) {
19
+ case 'driverLicense':
20
+ return 'driving_license';
21
+ case 'passport':
22
+ return 'passport';
23
+ case 'ssnCard':
24
+ return 'social_security_card';
25
+ case 'stateId':
26
+ return null;
27
+ }
28
+ };
package/lib/index.d.ts CHANGED
@@ -103,6 +103,7 @@ import { updateCommentsNotifications, updateCommentsNotificationsStatuses } from
103
103
  import { NotificationWithAuthors } from './entity/notification/types/notificationSelectorTypes';
104
104
  import { Notification, NotificationActivity, NotificationEventData, NotificationMetaData, NotificationUpdates, NotificationValueFormat } from './entity/notification/types/notificationStateTypes';
105
105
  import { ExternalNotificationData, NotificationActivityType, NotificationGroup, NotificationIdentifierType, NotificationMode, NotificationStatus, NotificationUpdateValue, toNotificationModeStrict } from './entity/notification/types/notificationTypes';
106
+ import { getPlaidPaymentAccounts } from './entity/paymentAccount/paymentAccountSelector';
106
107
  import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
107
108
  import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
108
109
  import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
@@ -128,7 +129,7 @@ import { ALL_WEEK_DAYS, DayOfWeek, PriorityCodeType, Task, TaskCodeType, TaskPri
128
129
  import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
129
130
  import { TaskGroupState } from './entity/taskGroup/taskGroupState';
130
131
  import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
131
- import { DoSignInPayload, clearAll, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
132
+ import { DoSignInPayload, clearAll, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, initEmailConnectOAuth, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
132
133
  import { CurrentTenant, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
133
134
  import { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
134
135
  import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
@@ -337,9 +338,9 @@ import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetc
337
338
  import { NewOnboardingCustomerLocalData, NewOnboardingCustomerView, OnboardingCockpitView, ProductInfo, getNewOnboardingCustomerView, getOnboardingCockpitView } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
338
339
  import { OnboardingCustomerListUIState, QBOConnectionPool } from './view/onboardingView/cockpitView/onboardingCockpitViewState';
339
340
  import { CustomerCreationStatus, NewOnboardingCustomer, OnboardingCompanyDetails, OnboardingCustomer, OnboardingCustomerCompletedStatus, ProductGroupType, ProductType, toProductType, toProductTypeStrict } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
340
- import { clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
341
+ import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
341
342
  import { OnboardingCustomerView, getOnboardingCustomerView, getProductSettingsString } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
342
- import { OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
343
+ import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
343
344
  import { fetchOpEx, fetchOpExWithForecast, updateOpExCOABalancesRange, updateOpExDownloadState, updateOpExUIState } from './view/opEx/opExReducer';
344
345
  import { getOperatingExpensesForHighlightedRange, getOperatingExpensesForSelectedRange, getOperatingExpensesReport, getOperatingExpensesReportFetchState, getOperatingExpensesUIState } from './view/opEx/opExSelector';
345
346
  import { OpExReport, OpExUIStateSelectorView } from './view/opEx/opExSelectorTypes';
@@ -478,7 +479,8 @@ import { IssueChargeCardSelectorView, getIssueChargeCardView } from './view/spen
478
479
  import { ActiveChargeCardCount, ActiveDebitCardCount, ActiveDebitCardCountByUserId, IssueChargeCardLocalData, IssueChargeCardState, PhysicalCreditCardData, PhysicalDebitCardData, VirtualCreditCardData, VirtualDebitCardData } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState';
479
480
  import { CommonHistoryView, HistoricEvent, HistoricEventUpdate } from './view/spendManagement/commonHistoryView/commonHistory';
480
481
  import { ActivityHistorySelectorView } from './view/spendManagement/commonHistoryView/commonHistorySelector';
481
- import { clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
482
+ import { parseUploadedKybDocument, parseUploadedKycDocument } from './view/spendManagement/commonSetup/kycKybAutofillActions';
483
+ import { applyKybDocumentAutofillForSetup, applyKycDocumentAutofillForSetup, clearKycKybAutofillForSetup, clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
482
484
  import { BusinessVerificationDetails, CompanyDetails, CompanyOfficersDetails, FundingAccount, SetupView, getBusinessVerificationDetails, getCommonSetupViewDetails } from './view/spendManagement/commonSetup/setupViewSelector';
483
485
  import { SetupViewLocalData, SetupViewState } from './view/spendManagement/commonSetup/setupViewState';
484
486
  import { COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES, COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY, COMPANY_PURPOSE_OF_ACCOUNT_CODES, COMPANY_SOURCE_OF_FUNDS_CODES, COMPANY_TRANSACTION_VOLUME_CODES, COMPANY_US_NEXUS_TYPE_CODES, CompanyOnboardingIndustryTypeCode, CompanyOnboardingSubIndustryTypeCode, CompanyPurposeOfAccountCode, CompanySourceOfFundsCode, CompanyTransactionVolumeCode, CompanyUsNexusTypeCode, getCompanyOnboardingSubIndustryCodesForIndustry } from './view/spendManagement/commonSetup/types/businessVerification';
@@ -672,7 +674,7 @@ export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePerio
672
674
  export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
673
675
  export { getNumberOfPeriods };
674
676
  export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
675
- export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
677
+ export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, initEmailConnectOAuth, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
676
678
  export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, AccountFilterOption, getAllAccounts, getTransactionFilterAccountOptions, };
677
679
  export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
678
680
  export { ClassFilterOption, getAllClasses, getClassById, getClassFilterOptions, } from './entity/class/classSelector';
@@ -802,7 +804,7 @@ export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClas
802
804
  export { BillTab, BillsSubTabType, SaveBillStageCode, BillPayReviewSelectorView, DuplicateBillsSelectorView, EditBillDetailSelectorView, LineItemRecommendationsLocalData, EditBillInitialDetails, BillableStatus, PaymentDetailsSection, BillListReport, BillListDownloadReport, WhatForSection, fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, BillDetailViewSelector, ActorActivityWithUser, BillActivity, StepWithStatus, getBillDetailView, checkApproveRejectBtnShowForBill, BillDetailView, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, EditBillDetail, EditBillDetailViewState, getEditBillDetail, getReviewPageBillDetail, BillDetailLocalData, PaymentDetailsSectionView, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, BillPaymentStatus, BillPaymentStatusCodeType, BillPaymentRefundStatus, BillPaymentRefundStatusCodeType, BillStatus, BillStatusCodeType, BillApprovalType, updateBillListUIState, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, PaymentToOption, toPaymentToOption, convertAmountToHomeCurrency, RecurringBillInstance, RecurringBillConfigLocalData, EditRecurringBillType, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
803
805
  export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
804
806
  export { TRANSACTION_FILTER_CATEGORIES, TransactionFilterAmountMatchingOperator, TransactionFilterCategory, TransactionFilterCategoryDropdownOption, TransactionFilterCategoryField, TransactionFilterEntityType, TransactionFilters, applyTransactionFilters, };
805
- export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
807
+ export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, applyKycDocumentAutofillForSetup, applyKybDocumentAutofillForSetup, clearKycKybAutofillForSetup, parseUploadedKycDocument, parseUploadedKybDocument, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getPlaidPaymentAccounts, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
806
808
  export { BankConnectionsSetupView, IntegrationsView, getApprovalRuleViewDetails, getBankConnectionsSetupViewDetails, getIntegrationsView, };
807
809
  export { fetchUserFinancialAccount };
808
810
  export { getUserFinancialAccount, UserFinancialAccountSelectorView };
@@ -856,7 +858,7 @@ export { CountryWithCurrency };
856
858
  export { fetchCompanyConfig };
857
859
  export { getCompanyConfig };
858
860
  export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, };
859
- export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, };
861
+ export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, };
860
862
  export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, AccountMappingLocalData, AccountMappingView, VendorAccountMappingView, getAccountMappingView, initializeAccountMappingView, ExpenseCategory1099Filing, };
861
863
  export { MagicLinkView, getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
862
864
  export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
@@ -940,3 +942,5 @@ export { UserGroup } from './entity/userGroups/userGroupsState';
940
942
  export { SessionManager } from './entity/tenant/SessionManager';
941
943
  export type { SessionCallbacks, SessionConfig, } from './entity/tenant/sessionTypes';
942
944
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
945
+ export type { KybProvidedDocumentType, KycKybAutofillTarget, KycKybProvidedDocumentType, KycProvidedDocumentType, KycSelectDocumentType, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
946
+ export { toKycProvidedDocumentType } from './view/spendManagement/commonSetup/types/kycKybAutofill';