@zeniai/client-epic-state 5.1.3 → 5.1.4-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 (76) hide show
  1. package/lib/entity/company/companyPayload.d.ts +4 -0
  2. package/lib/entity/company/companyPayload.js +6 -0
  3. package/lib/entity/company/companyStateTypes.d.ts +7 -0
  4. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  5. package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
  6. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  7. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  8. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  9. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  10. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  11. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  12. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  13. package/lib/entity/tenant/tenantReducer.d.ts +38 -25
  14. package/lib/entity/tenant/tenantReducer.js +65 -5
  15. package/lib/entity/tenant/tenantState.d.ts +1 -0
  16. package/lib/epic.d.ts +6 -1
  17. package/lib/epic.js +7 -1
  18. package/lib/esm/entity/company/companyPayload.js +6 -0
  19. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -0
  20. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  21. package/lib/esm/entity/tenant/tenantReducer.js +63 -3
  22. package/lib/esm/epic.js +7 -1
  23. package/lib/esm/index.js +9 -6
  24. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  25. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  26. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  27. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +40 -0
  28. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
  29. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  30. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +218 -50
  31. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +12 -2
  32. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
  33. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +2 -2
  34. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
  35. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +77 -0
  36. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  37. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +207 -0
  38. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
  39. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  40. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -0
  41. package/lib/index.d.ts +11 -7
  42. package/lib/index.js +55 -35
  43. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  44. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  45. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  46. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  47. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -0
  48. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
  49. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
  50. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  51. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  52. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  53. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
  54. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +220 -51
  55. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
  56. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +15 -2
  57. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
  58. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
  59. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +1 -1
  60. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +2 -2
  61. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  62. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
  63. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +9 -0
  64. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
  65. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
  66. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  67. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
  68. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +215 -0
  69. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  70. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -53
  71. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  72. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  73. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  74. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +154 -0
  75. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -0
  76. package/package.json +1 -1
@@ -0,0 +1,207 @@
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
+ export const OFFICER_ADDRESS_AUTOFILL_FIELD = 'officerAddress';
12
+ // US driving licenses carry a US state in `address_state` but no country field;
13
+ // default the composed address to the US.
14
+ const DRIVING_LICENSE_DEFAULT_COUNTRY = 'United States';
15
+ const DRIVING_LICENSE_DEFAULT_COUNTRY_CODE = 'US';
16
+ const emptyResult = () => ({
17
+ values: {},
18
+ autoFilledFieldNames: [],
19
+ });
20
+ const isConfident = (field) => {
21
+ if (field == null) {
22
+ return false;
23
+ }
24
+ if (field.value == null) {
25
+ return false;
26
+ }
27
+ return field.confidence >= KYC_KYB_AUTOFILL_MIN_CONFIDENCE;
28
+ };
29
+ const assignAutofilledValue = (result, key, value) => {
30
+ if (value == null) {
31
+ return;
32
+ }
33
+ if (typeof value === 'string' && value.trim() === '') {
34
+ return;
35
+ }
36
+ result.values[key] = value;
37
+ result.autoFilledFieldNames.push(key);
38
+ };
39
+ const tryParseDate = (rawDate) => {
40
+ const parsedDate = date(rawDate);
41
+ if (parsedDate.isValid()) {
42
+ return parsedDate;
43
+ }
44
+ return undefined;
45
+ };
46
+ const splitFullName = (fullName) => {
47
+ const parts = fullName.trim().split(/\s+/);
48
+ if (parts.length === 1) {
49
+ return { firstName: parts[0], lastName: '' };
50
+ }
51
+ const lastName = parts[parts.length - 1];
52
+ const firstName = parts.slice(0, -1).join(' ');
53
+ return { firstName, lastName };
54
+ };
55
+ /** Passport → Company Officer. */
56
+ export const mapPassportToOfficer = (parsed) => {
57
+ const result = emptyResult();
58
+ if (isConfident(parsed.first_name)) {
59
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
60
+ }
61
+ if (isConfident(parsed.last_name)) {
62
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
63
+ }
64
+ if (isConfident(parsed.date_of_birth)) {
65
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
66
+ if (parsedDate != null) {
67
+ assignAutofilledValue(result, 'birthday', parsedDate);
68
+ }
69
+ }
70
+ // The raw nationality string (e.g. "USA", "UNITED STATES OF AMERICA") is
71
+ // passed through unresolved; the consuming form section normalizes it to an
72
+ // ISO-2 code via the `countries-list` dataset before `setValue`. The form
73
+ // value (not this localData seed) is what gets submitted.
74
+ if (isConfident(parsed.nationality)) {
75
+ assignAutofilledValue(result, 'nationalityCountryCode', parsed.nationality.value);
76
+ }
77
+ return result;
78
+ };
79
+ /** Driving License → Company Officer (name, DOB, and home address). */
80
+ export const mapDrivingLicenseToOfficer = (parsed) => {
81
+ const result = emptyResult();
82
+ if (isConfident(parsed.first_name)) {
83
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
84
+ }
85
+ if (isConfident(parsed.last_name)) {
86
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
87
+ }
88
+ if (isConfident(parsed.date_of_birth)) {
89
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
90
+ if (parsedDate != null) {
91
+ assignAutofilledValue(result, 'birthday', parsedDate);
92
+ }
93
+ }
94
+ // The officer address lives in the addressView slice rather than
95
+ // CompanyOfficerLocalData, so it's returned separately for the epic to
96
+ // dispatch via newAddressInLocalStore.
97
+ const street = isConfident(parsed.address_street)
98
+ ? parsed.address_street.value.trim()
99
+ : undefined;
100
+ const city = isConfident(parsed.address_city)
101
+ ? parsed.address_city.value.trim()
102
+ : undefined;
103
+ const state = isConfident(parsed.address_state)
104
+ ? parsed.address_state.value.trim()
105
+ : undefined;
106
+ const postalCode = isConfident(parsed.address_zip)
107
+ ? parsed.address_zip.value.trim()
108
+ : undefined;
109
+ if (street != null || city != null || state != null || postalCode != null) {
110
+ result.address = {
111
+ street: street != null ? [street] : [],
112
+ city: city ?? '',
113
+ state: state ?? '',
114
+ postalCode: postalCode ?? '',
115
+ country: DRIVING_LICENSE_DEFAULT_COUNTRY,
116
+ countryCode: DRIVING_LICENSE_DEFAULT_COUNTRY_CODE,
117
+ };
118
+ result.autoFilledFieldNames.push(OFFICER_ADDRESS_AUTOFILL_FIELD);
119
+ }
120
+ return result;
121
+ };
122
+ /** SSN Card → Company Officer (name only — SSN value not yet returned by parser). */
123
+ export const mapSsnCardToOfficer = (parsed) => {
124
+ const result = emptyResult();
125
+ if (isConfident(parsed.full_name)) {
126
+ const { firstName, lastName } = splitFullName(parsed.full_name.value);
127
+ if (firstName !== '') {
128
+ assignAutofilledValue(result, 'firstName', firstName);
129
+ }
130
+ if (lastName !== '') {
131
+ assignAutofilledValue(result, 'lastName', lastName);
132
+ }
133
+ }
134
+ return result;
135
+ };
136
+ /** Certificate of Incorporation → Company Details. */
137
+ export const mapCoiToCompanyDetails = (parsed) => {
138
+ const result = emptyResult();
139
+ if (isConfident(parsed.company_legal_name)) {
140
+ assignAutofilledValue(result, 'companyLegalName', parsed.company_legal_name.value);
141
+ }
142
+ if (isConfident(parsed.ein)) {
143
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
144
+ }
145
+ if (isConfident(parsed.phone_number)) {
146
+ assignAutofilledValue(result, 'phone', parsed.phone_number.value);
147
+ }
148
+ if (isConfident(parsed.product_description)) {
149
+ assignAutofilledValue(result, 'companyDescription', parsed.product_description.value);
150
+ }
151
+ if (isConfident(parsed.website)) {
152
+ try {
153
+ assignAutofilledValue(result, 'website', toZeniUrl(parsed.website.value));
154
+ }
155
+ catch {
156
+ // ignore — malformed URL string from OCR
157
+ }
158
+ }
159
+ if (isConfident(parsed.industry)) {
160
+ assignAutofilledValue(result, 'companyIndustryType', parsed.industry.value);
161
+ }
162
+ if (isConfident(parsed.sub_industry)) {
163
+ assignAutofilledValue(result, 'companySubIndustry', parsed.sub_industry.value);
164
+ }
165
+ if (isConfident(parsed.type_of_incorporation)) {
166
+ assignAutofilledValue(result, 'typeOfIncorporation', parsed.type_of_incorporation.value);
167
+ }
168
+ if (isConfident(parsed.date_of_incorporation)) {
169
+ const parsedDate = tryParseDate(parsed.date_of_incorporation.value);
170
+ if (parsedDate != null) {
171
+ assignAutofilledValue(result, 'incDate', parsedDate);
172
+ }
173
+ }
174
+ if (isConfident(parsed.state_of_incorporation)) {
175
+ assignAutofilledValue(result, 'stateOfIncorporation', parsed.state_of_incorporation.value);
176
+ }
177
+ if (isConfident(parsed.countries_of_operations)) {
178
+ assignAutofilledValue(result, 'countriesOfOperations', parsed.countries_of_operations.value);
179
+ }
180
+ if (isConfident(parsed.source_of_funds)) {
181
+ assignAutofilledValue(result, 'sourceOfFunds', parsed.source_of_funds.value);
182
+ }
183
+ if (isConfident(parsed.transaction_volume_expectations)) {
184
+ assignAutofilledValue(result, 'transactionVolume', parsed.transaction_volume_expectations.value);
185
+ }
186
+ if (isConfident(parsed.purpose_of_account)) {
187
+ assignAutofilledValue(result, 'purposeOfAccount', parsed.purpose_of_account.value);
188
+ }
189
+ if (isConfident(parsed.regulated_status)) {
190
+ assignAutofilledValue(result, 'regulatedStatus', parsed.regulated_status.value);
191
+ }
192
+ if (isConfident(parsed.us_nexus)) {
193
+ assignAutofilledValue(result, 'usNexus', parsed.us_nexus.value);
194
+ }
195
+ return result;
196
+ };
197
+ /** Tax EIN letter → Company Details. */
198
+ export const mapTaxEinToCompanyDetails = (parsed) => {
199
+ const result = emptyResult();
200
+ if (isConfident(parsed.legal_business_name)) {
201
+ assignAutofilledValue(result, 'companyLegalName', parsed.legal_business_name.value);
202
+ }
203
+ if (isConfident(parsed.ein)) {
204
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
205
+ }
206
+ return result;
207
+ };
@@ -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,93 @@ 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
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds ?? [];
327
+ if (!draft.parsingDocumentFileIds.includes(fileId)) {
328
+ draft.parsingDocumentFileIds.push(fileId);
329
+ }
330
+ };
331
+ const removeParsingFileId = (draft, fileId) => {
332
+ draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
333
+ };
334
+ builder.addCase(parseUploadedKycDocument, (draft, action) => {
335
+ if (action.payload.target === 'setup') {
336
+ addParsingFileId(draft, action.payload.fileId);
337
+ }
338
+ });
339
+ builder.addCase(parseUploadedKybDocument, (draft, action) => {
340
+ if (action.payload.target === 'setup') {
341
+ addParsingFileId(draft, action.payload.fileId);
342
+ }
343
+ });
344
+ builder.addCase(parseUploadedKycDocumentFailure, (draft, action) => {
345
+ if (action.payload.target === 'setup') {
346
+ removeParsingFileId(draft, action.payload.fileId);
347
+ }
348
+ });
349
+ builder.addCase(parseUploadedKybDocumentFailure, (draft, action) => {
350
+ if (action.payload.target === 'setup') {
351
+ removeParsingFileId(draft, action.payload.fileId);
352
+ }
353
+ });
300
354
  },
301
355
  });
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;
356
+ 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
357
  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,41 @@
1
+ /** Confidence floor below which we drop an autofill candidate. */
2
+ export const KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
3
+ /**
4
+ * Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
5
+ * parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
6
+ * `stateId`, which has no parser today.
7
+ */
8
+ export const toKycProvidedDocumentType = (selectType) => {
9
+ switch (selectType) {
10
+ case 'driverLicense':
11
+ return 'driving_license';
12
+ case 'passport':
13
+ return 'passport';
14
+ case 'ssnCard':
15
+ return 'social_security_card';
16
+ case 'stateId':
17
+ return null;
18
+ }
19
+ };
20
+ /**
21
+ * Maps a persisted {@link AllowedDocumentType} (snake_case — the value stored on
22
+ * an officer's `documentTypeSelectedForVerification`) to the parser-side
23
+ * {@link KycProvidedDocumentType}. Returns `null` for document types with no KYC
24
+ * parser today (e.g. `id_document` / state ID, and any non-identity doc).
25
+ *
26
+ * The officer's stored selection is an `AllowedDocumentType`, not a
27
+ * {@link KycSelectDocumentType}; use this — not {@link toKycProvidedDocumentType}
28
+ * — when triggering autofill off that field.
29
+ */
30
+ export const toKycProvidedDocumentTypeFromAllowed = (allowedType) => {
31
+ switch (allowedType) {
32
+ case 'passport':
33
+ return 'passport';
34
+ case 'driving_license':
35
+ return 'driving_license';
36
+ case 'social_security_card':
37
+ return 'social_security_card';
38
+ default:
39
+ return null;
40
+ }
41
+ };
package/lib/index.d.ts CHANGED
@@ -105,6 +105,7 @@ import { updateCommentsNotifications, updateCommentsNotificationsStatuses } from
105
105
  import { NotificationWithAuthors } from './entity/notification/types/notificationSelectorTypes';
106
106
  import { Notification, NotificationActivity, NotificationEventData, NotificationMetaData, NotificationUpdates, NotificationValueFormat } from './entity/notification/types/notificationStateTypes';
107
107
  import { ExternalNotificationData, NotificationActivityType, NotificationGroup, NotificationIdentifierType, NotificationMode, NotificationStatus, NotificationUpdateValue, toNotificationModeStrict } from './entity/notification/types/notificationTypes';
108
+ import { getPlaidPaymentAccounts } from './entity/paymentAccount/paymentAccountSelector';
108
109
  import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
109
110
  import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
110
111
  import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
@@ -131,7 +132,7 @@ import { ALL_WEEK_DAYS, DayOfWeek, PriorityCodeType, Task, TaskCodeType, TaskPri
131
132
  import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
132
133
  import { TaskGroupState } from './entity/taskGroup/taskGroupState';
133
134
  import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
134
- 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';
135
+ 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';
135
136
  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';
136
137
  import { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
137
138
  import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
@@ -340,9 +341,9 @@ import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetc
340
341
  import { NewOnboardingCustomerLocalData, NewOnboardingCustomerView, OnboardingCockpitView, ProductInfo, getNewOnboardingCustomerView, getOnboardingCockpitView } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
341
342
  import { OnboardingCustomerListUIState, QBOConnectionPool } from './view/onboardingView/cockpitView/onboardingCockpitViewState';
342
343
  import { CustomerCreationStatus, NewOnboardingCustomer, OnboardingCompanyDetails, OnboardingCustomer, OnboardingCustomerCompletedStatus, ProductGroupType, ProductType, toProductType, toProductTypeStrict } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
343
- import { clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
344
+ 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';
344
345
  import { OnboardingCustomerView, getOnboardingCustomerView, getProductSettingsString } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
345
- import { OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
346
+ import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
346
347
  import { fetchOpEx, fetchOpExWithForecast, updateOpExCOABalancesRange, updateOpExDownloadState, updateOpExUIState } from './view/opEx/opExReducer';
347
348
  import { getOperatingExpensesForHighlightedRange, getOperatingExpensesForSelectedRange, getOperatingExpensesReport, getOperatingExpensesReportFetchState, getOperatingExpensesUIState } from './view/opEx/opExSelector';
348
349
  import { OpExReport, OpExUIStateSelectorView } from './view/opEx/opExSelectorTypes';
@@ -486,7 +487,8 @@ import { ActiveChargeCardCount, ActiveDebitCardCount, ActiveDebitCardCountByUser
486
487
  import { toIssueChargeCardLocalDataFromDraft } from './view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft';
487
488
  import { CommonHistoryView, HistoricEvent, HistoricEventUpdate } from './view/spendManagement/commonHistoryView/commonHistory';
488
489
  import { ActivityHistorySelectorView } from './view/spendManagement/commonHistoryView/commonHistorySelector';
489
- import { clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
490
+ import { parseUploadedKybDocument, parseUploadedKycDocument } from './view/spendManagement/commonSetup/kycKybAutofillActions';
491
+ import { applyKybDocumentAutofillForSetup, applyKycDocumentAutofillForSetup, clearKycKybAutofillForSetup, clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
490
492
  import { BusinessVerificationDetails, CompanyDetails, CompanyOfficersDetails, FundingAccount, SetupView, getBusinessVerificationDetails, getCommonSetupViewDetails } from './view/spendManagement/commonSetup/setupViewSelector';
491
493
  import { SetupViewLocalData, SetupViewState } from './view/spendManagement/commonSetup/setupViewState';
492
494
  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';
@@ -680,7 +682,7 @@ export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePerio
680
682
  export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
681
683
  export { getNumberOfPeriods };
682
684
  export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
683
- 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, };
685
+ 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, };
684
686
  export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, AccountFilterOption, getAllAccounts, getTransactionFilterAccountOptions, };
685
687
  export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
686
688
  export { ClassFilterOption, getAllClasses, getClassById, getClassFilterOptions, } from './entity/class/classSelector';
@@ -810,7 +812,7 @@ export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClas
810
812
  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, };
811
813
  export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
812
814
  export { TRANSACTION_FILTER_CATEGORIES, TransactionFilterAmountMatchingOperator, TransactionFilterCategory, TransactionFilterCategoryDropdownOption, TransactionFilterCategoryField, TransactionFilterEntityType, TransactionFilters, applyTransactionFilters, };
813
- 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, };
815
+ 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, };
814
816
  export { BankConnectionsSetupView, IntegrationsView, getApprovalRuleViewDetails, getBankConnectionsSetupViewDetails, getIntegrationsView, };
815
817
  export { fetchUserFinancialAccount };
816
818
  export { getUserFinancialAccount, UserFinancialAccountSelectorView };
@@ -864,7 +866,7 @@ export { CountryWithCurrency };
864
866
  export { fetchCompanyConfig };
865
867
  export { getCompanyConfig };
866
868
  export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, };
867
- export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, };
869
+ 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, };
868
870
  export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, AccountMappingLocalData, AccountMappingView, VendorAccountMappingView, getAccountMappingView, initializeAccountMappingView, ExpenseCategory1099Filing, };
869
871
  export { MagicLinkView, getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
870
872
  export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
@@ -977,6 +979,8 @@ export { UserGroup } from './entity/userGroups/userGroupsState';
977
979
  export { SessionManager } from './entity/tenant/SessionManager';
978
980
  export type { SessionCallbacks, SessionConfig, } from './entity/tenant/sessionTypes';
979
981
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
982
+ export type { KybProvidedDocumentType, KycKybAutofillTarget, KycKybProvidedDocumentType, KycProvidedDocumentType, KycSelectDocumentType, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
983
+ export { toKycProvidedDocumentType, toKycProvidedDocumentTypeFromAllowed, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
980
984
  export { fetchCashManagementBanner, fetchCashManagementOverviewPage, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
981
985
  export { clearAutoSweepFlow, saveAutoSweepSettings, updateAutoSweepDraft, updateAutoSweepRisk, updateAutoSweepSettingsFetchStatus, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
982
986
  export { getAutoSweepFlow } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector';