@zeniai/client-epic-state 5.0.84 → 5.0.85-beta1ND

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 (85) 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 +2 -0
  4. package/lib/entity/company/companyPayload.js +2 -0
  5. package/lib/entity/company/companyStateTypes.d.ts +2 -0
  6. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  7. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  8. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  9. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  10. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  11. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  12. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  13. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  14. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  15. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  16. package/lib/entity/tenant/tenantPayload.d.ts +19 -0
  17. package/lib/entity/tenant/tenantReducer.d.ts +49 -28
  18. package/lib/entity/tenant/tenantReducer.js +111 -5
  19. package/lib/entity/tenant/tenantState.d.ts +21 -0
  20. package/lib/epic.d.ts +8 -2
  21. package/lib/epic.js +9 -2
  22. package/lib/esm/commonStateTypes/animations.js +1 -0
  23. package/lib/esm/entity/company/companyPayload.js +2 -0
  24. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  25. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  26. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  27. package/lib/esm/entity/tenant/tenantReducer.js +108 -3
  28. package/lib/esm/epic.js +9 -2
  29. package/lib/esm/index.js +12 -9
  30. package/lib/esm/view/companyView/companyViewReducer.js +45 -1
  31. package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
  32. package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +79 -0
  33. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  34. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +7 -1
  35. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +45 -0
  36. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  37. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +202 -50
  38. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +17 -1
  39. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -0
  40. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +52 -0
  41. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +59 -0
  42. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  43. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  44. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
  45. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  46. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  47. package/lib/index.d.ts +15 -11
  48. package/lib/index.js +56 -34
  49. package/lib/view/companyView/companyViewReducer.d.ts +11 -1
  50. package/lib/view/companyView/companyViewReducer.js +47 -3
  51. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
  52. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
  53. package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +10 -0
  54. package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +83 -0
  55. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  56. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  57. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +7 -1
  58. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  59. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  60. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +49 -0
  61. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  62. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  63. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  64. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +45 -4
  65. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +204 -51
  66. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +8 -1
  67. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +24 -2
  68. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +42 -0
  69. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +14 -1
  70. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  71. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +56 -0
  72. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
  73. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +63 -0
  74. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
  75. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  76. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  77. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  78. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  79. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
  80. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  81. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  82. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  83. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
  84. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  85. package/package.json +1 -1
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseUploadedKycDocumentEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const countryListSelector_1 = require("../../../../../entity/countryList/countryListSelector");
7
+ const responsePayload_1 = require("../../../../../responsePayload");
8
+ const onboardingCustomerViewReducer_1 = require("../../../../onboardingView/customerView/onboardingCustomerViewReducer");
9
+ const kycKybAutofillActions_1 = require("../../kycKybAutofillActions");
10
+ const kycKybParseMapper_1 = require("../../kycKybParseMapper");
11
+ const setupViewReducer_1 = require("../../setupViewReducer");
12
+ const PROCESS_DOCUMENT_SYNC_PATH = '/1.0/documents/process/sync';
13
+ const parseUploadedKycDocumentEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(kycKybAutofillActions_1.parseUploadedKycDocument.match), (0, operators_1.mergeMap)((action) => {
14
+ const { target, companyId, officerType, fileId, documentType } = action.payload;
15
+ const url = `${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}${PROCESS_DOCUMENT_SYNC_PATH}`;
16
+ const requestPayload = {
17
+ provided_document_type: documentType,
18
+ files: [{ file_id: fileId }],
19
+ processing_priority: 10,
20
+ metadata: { source: 'kyc_kyb_autofill' },
21
+ };
22
+ const failureAction = (0, kycKybAutofillActions_1.parseUploadedKycDocumentFailure)({ target, fileId });
23
+ return zeniAPI
24
+ .postAndGetJSON(url, requestPayload)
25
+ .pipe((0, operators_1.mergeMap)((response) => {
26
+ if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
27
+ return (0, rxjs_1.of)(failureAction);
28
+ }
29
+ const allCountries = (0, countryListSelector_1.getCountryList)(state$.value.countryListState, 'nationalityCountryList').countries;
30
+ let result;
31
+ switch (documentType) {
32
+ case 'passport':
33
+ result = (0, kycKybParseMapper_1.mapPassportToOfficer)(response.data, allCountries);
34
+ break;
35
+ case 'driving_license':
36
+ result = (0, kycKybParseMapper_1.mapDrivingLicenseToOfficer)(response.data);
37
+ break;
38
+ case 'social_security_card':
39
+ result = (0, kycKybParseMapper_1.mapSsnCardToOfficer)(response.data);
40
+ break;
41
+ }
42
+ if (result.autoFilledFieldNames.length === 0) {
43
+ return (0, rxjs_1.of)(failureAction);
44
+ }
45
+ const applyAction = target === 'setup'
46
+ ? (0, setupViewReducer_1.applyKycDocumentAutofillForSetup)({
47
+ companyId,
48
+ officerType,
49
+ fileId,
50
+ values: result.values,
51
+ autoFilledFieldNames: result.autoFilledFieldNames,
52
+ })
53
+ : (0, onboardingCustomerViewReducer_1.applyKycDocumentAutofillForOnboarding)({
54
+ companyId,
55
+ officerType,
56
+ fileId,
57
+ values: result.values,
58
+ autoFilledFieldNames: result.autoFilledFieldNames,
59
+ });
60
+ return (0, rxjs_1.of)(applyAction);
61
+ }), (0, operators_1.catchError)(() => (0, rxjs_1.of)(failureAction)));
62
+ }));
63
+ exports.parseUploadedKycDocumentEpic = parseUploadedKycDocumentEpic;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Trigger actions for the KYC / KYB autofill epics.
3
+ *
4
+ * These actions don't mutate state — the epic listens for them, calls
5
+ * document-communication-agent's sync endpoint, and dispatches the appropriate
6
+ * `applyKyc/KybDocumentAutofillFor{Setup,Onboarding}` against the matching
7
+ * slice. Co-located with the rest of the commonSetup module because the entire
8
+ * autofill flow is auxiliary to the setup view; there is no separate state.
9
+ */
10
+ import { ID } from '../../../commonStateTypes/common';
11
+ import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
12
+ import { KybProvidedDocumentType, KycKybAutofillTarget, KycProvidedDocumentType } from './types/kycKybAutofill';
13
+ export interface ParseUploadedKycDocumentPayload {
14
+ companyId: ID;
15
+ documentType: KycProvidedDocumentType;
16
+ fileId: ID;
17
+ officerType: CompanyOfficerType;
18
+ target: KycKybAutofillTarget;
19
+ }
20
+ export interface ParseUploadedKybDocumentPayload {
21
+ companyId: ID;
22
+ documentType: KybProvidedDocumentType;
23
+ fileId: ID;
24
+ target: KycKybAutofillTarget;
25
+ }
26
+ export declare const parseUploadedKycDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<ParseUploadedKycDocumentPayload, string>;
27
+ export declare const parseUploadedKybDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<ParseUploadedKybDocumentPayload, string>;
28
+ export interface ParseUploadedDocumentFailurePayload {
29
+ fileId: ID;
30
+ target: KycKybAutofillTarget;
31
+ }
32
+ export declare const parseUploadedKycDocumentFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ParseUploadedDocumentFailurePayload, string>;
33
+ export declare const parseUploadedKybDocumentFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ParseUploadedDocumentFailurePayload, string>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Trigger actions for the KYC / KYB autofill epics.
4
+ *
5
+ * These actions don't mutate state — the epic listens for them, calls
6
+ * document-communication-agent's sync endpoint, and dispatches the appropriate
7
+ * `applyKyc/KybDocumentAutofillFor{Setup,Onboarding}` against the matching
8
+ * slice. Co-located with the rest of the commonSetup module because the entire
9
+ * autofill flow is auxiliary to the setup view; there is no separate state.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.parseUploadedKybDocumentFailure = exports.parseUploadedKycDocumentFailure = exports.parseUploadedKybDocument = exports.parseUploadedKycDocument = void 0;
13
+ const toolkit_1 = require("@reduxjs/toolkit");
14
+ exports.parseUploadedKycDocument = (0, toolkit_1.createAction)('commonSetup/parseUploadedKycDocument');
15
+ exports.parseUploadedKybDocument = (0, toolkit_1.createAction)('commonSetup/parseUploadedKybDocument');
16
+ exports.parseUploadedKycDocumentFailure = (0, toolkit_1.createAction)('commonSetup/parseUploadedKycDocumentFailure');
17
+ exports.parseUploadedKybDocumentFailure = (0, toolkit_1.createAction)('commonSetup/parseUploadedKybDocumentFailure');
@@ -0,0 +1,24 @@
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 { Country } from '../../../entity/countryList/countryListState';
9
+ import { CompanyDetailsLocalData, CompanyOfficerLocalData } from './setupViewState';
10
+ import { ExtendCertificateOfIncorporationParsed, ExtendDrivingLicenseParsed, ExtendPassportParsed, ExtendSsnCardParsed, ExtendTaxEinParsed } from './types/kycKybAutofill';
11
+ export interface AutofillResult<TLocalData> {
12
+ autoFilledFieldNames: (keyof TLocalData & string)[];
13
+ values: Partial<TLocalData>;
14
+ }
15
+ /** Passport → Company Officer. */
16
+ export declare const mapPassportToOfficer: (parsed: ExtendPassportParsed, allNationalityCountries: Country[]) => AutofillResult<CompanyOfficerLocalData>;
17
+ /** Driving License → Company Officer. */
18
+ export declare const mapDrivingLicenseToOfficer: (parsed: ExtendDrivingLicenseParsed) => AutofillResult<CompanyOfficerLocalData>;
19
+ /** SSN Card → Company Officer (name only — SSN value not yet returned by parser). */
20
+ export declare const mapSsnCardToOfficer: (parsed: ExtendSsnCardParsed) => AutofillResult<CompanyOfficerLocalData>;
21
+ /** Certificate of Incorporation → Company Details. */
22
+ export declare const mapCoiToCompanyDetails: (parsed: ExtendCertificateOfIncorporationParsed) => AutofillResult<CompanyDetailsLocalData>;
23
+ /** Tax EIN letter → Company Details. */
24
+ export declare const mapTaxEinToCompanyDetails: (parsed: ExtendTaxEinParsed) => AutofillResult<CompanyDetailsLocalData>;
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ /**
3
+ * Pure mappers from ExtendAI parser payloads to our form-side local-data shapes.
4
+ *
5
+ * Each mapper filters out fields below KYC_KYB_AUTOFILL_MIN_CONFIDENCE and returns
6
+ * both the merged values and the list of field names that were autofilled so the
7
+ * UI can show the ✦ AI badge next to each.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.mapTaxEinToCompanyDetails = exports.mapCoiToCompanyDetails = exports.mapSsnCardToOfficer = exports.mapDrivingLicenseToOfficer = exports.mapPassportToOfficer = void 0;
11
+ const zeniDayJS_1 = require("../../../zeniDayJS");
12
+ const zeniUrl_1 = require("../../../zeniUrl");
13
+ const kycKybAutofill_1 = require("./types/kycKybAutofill");
14
+ const emptyResult = () => ({
15
+ values: {},
16
+ autoFilledFieldNames: [],
17
+ });
18
+ const isConfident = (field) => {
19
+ if (field == null) {
20
+ return false;
21
+ }
22
+ if (field.value == null) {
23
+ return false;
24
+ }
25
+ return field.confidence >= kycKybAutofill_1.KYC_KYB_AUTOFILL_MIN_CONFIDENCE;
26
+ };
27
+ const assignAutofilledValue = (result, key, value) => {
28
+ if (value == null) {
29
+ return;
30
+ }
31
+ if (typeof value === 'string' && value.trim() === '') {
32
+ return;
33
+ }
34
+ result.values[key] = value;
35
+ result.autoFilledFieldNames.push(key);
36
+ };
37
+ const tryParseDate = (rawDate) => {
38
+ const parsedDate = (0, zeniDayJS_1.date)(rawDate);
39
+ if (parsedDate.isValid()) {
40
+ return parsedDate;
41
+ }
42
+ return undefined;
43
+ };
44
+ const normalizeNationality = (rawNationality, countries) => {
45
+ const needle = rawNationality.trim().toLowerCase();
46
+ if (needle === '') {
47
+ return undefined;
48
+ }
49
+ // Exact ISO-2 / ISO-3 match.
50
+ const isoMatch = countries.find((country) => country.countryCode.toLowerCase() === needle);
51
+ if (isoMatch != null) {
52
+ return isoMatch.countryCode;
53
+ }
54
+ // Common nationality adjectives map to country names (e.g. "American" → "United States").
55
+ const adjectiveToCountry = {
56
+ american: 'united states',
57
+ british: 'united kingdom',
58
+ indian: 'india',
59
+ canadian: 'canada',
60
+ australian: 'australia',
61
+ german: 'germany',
62
+ french: 'france',
63
+ chinese: 'china',
64
+ japanese: 'japan',
65
+ mexican: 'mexico',
66
+ brazilian: 'brazil',
67
+ };
68
+ const resolvedName = adjectiveToCountry[needle] ?? needle;
69
+ const nameMatch = countries.find((country) => country.countryName.toLowerCase() === resolvedName);
70
+ return nameMatch?.countryCode;
71
+ };
72
+ const splitFullName = (fullName) => {
73
+ const parts = fullName.trim().split(/\s+/);
74
+ if (parts.length === 1) {
75
+ return { firstName: parts[0], lastName: '' };
76
+ }
77
+ const lastName = parts[parts.length - 1];
78
+ const firstName = parts.slice(0, -1).join(' ');
79
+ return { firstName, lastName };
80
+ };
81
+ /** Passport → Company Officer. */
82
+ const mapPassportToOfficer = (parsed, allNationalityCountries) => {
83
+ const result = emptyResult();
84
+ if (isConfident(parsed.first_name)) {
85
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
86
+ }
87
+ if (isConfident(parsed.last_name)) {
88
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
89
+ }
90
+ if (isConfident(parsed.date_of_birth)) {
91
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
92
+ if (parsedDate != null) {
93
+ assignAutofilledValue(result, 'birthday', parsedDate);
94
+ }
95
+ }
96
+ if (isConfident(parsed.nationality)) {
97
+ const isoCode = normalizeNationality(parsed.nationality.value, allNationalityCountries);
98
+ if (isoCode != null) {
99
+ assignAutofilledValue(result, 'nationalityCountryCode', isoCode);
100
+ }
101
+ }
102
+ return result;
103
+ };
104
+ exports.mapPassportToOfficer = mapPassportToOfficer;
105
+ /** Driving License → Company Officer. */
106
+ const mapDrivingLicenseToOfficer = (parsed) => {
107
+ const result = emptyResult();
108
+ if (isConfident(parsed.first_name)) {
109
+ assignAutofilledValue(result, 'firstName', parsed.first_name.value);
110
+ }
111
+ if (isConfident(parsed.last_name)) {
112
+ assignAutofilledValue(result, 'lastName', parsed.last_name.value);
113
+ }
114
+ if (isConfident(parsed.date_of_birth)) {
115
+ const parsedDate = tryParseDate(parsed.date_of_birth.value);
116
+ if (parsedDate != null) {
117
+ assignAutofilledValue(result, 'birthday', parsedDate);
118
+ }
119
+ }
120
+ // address_* fields are mapped at a higher layer (addressView reducer) — kept here as values
121
+ // only, the consuming epic dispatches the address payload separately.
122
+ return result;
123
+ };
124
+ exports.mapDrivingLicenseToOfficer = mapDrivingLicenseToOfficer;
125
+ /** SSN Card → Company Officer (name only — SSN value not yet returned by parser). */
126
+ const mapSsnCardToOfficer = (parsed) => {
127
+ const result = emptyResult();
128
+ if (isConfident(parsed.full_name)) {
129
+ const { firstName, lastName } = splitFullName(parsed.full_name.value);
130
+ if (firstName !== '') {
131
+ assignAutofilledValue(result, 'firstName', firstName);
132
+ }
133
+ if (lastName !== '') {
134
+ assignAutofilledValue(result, 'lastName', lastName);
135
+ }
136
+ }
137
+ return result;
138
+ };
139
+ exports.mapSsnCardToOfficer = mapSsnCardToOfficer;
140
+ /** Certificate of Incorporation → Company Details. */
141
+ const mapCoiToCompanyDetails = (parsed) => {
142
+ const result = emptyResult();
143
+ if (isConfident(parsed.company_legal_name)) {
144
+ assignAutofilledValue(result, 'companyLegalName', parsed.company_legal_name.value);
145
+ }
146
+ if (isConfident(parsed.ein)) {
147
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
148
+ }
149
+ if (isConfident(parsed.phone_number)) {
150
+ assignAutofilledValue(result, 'phone', parsed.phone_number.value);
151
+ }
152
+ if (isConfident(parsed.product_description)) {
153
+ assignAutofilledValue(result, 'companyDescription', parsed.product_description.value);
154
+ }
155
+ if (isConfident(parsed.website)) {
156
+ try {
157
+ assignAutofilledValue(result, 'website', (0, zeniUrl_1.toZeniUrl)(parsed.website.value));
158
+ }
159
+ catch {
160
+ // ignore — malformed URL string from OCR
161
+ }
162
+ }
163
+ if (isConfident(parsed.industry)) {
164
+ assignAutofilledValue(result, 'companyIndustryType', parsed.industry.value);
165
+ }
166
+ if (isConfident(parsed.sub_industry)) {
167
+ assignAutofilledValue(result, 'companySubIndustry', parsed.sub_industry.value);
168
+ }
169
+ if (isConfident(parsed.type_of_incorporation)) {
170
+ assignAutofilledValue(result, 'typeOfIncorporation', parsed.type_of_incorporation.value);
171
+ }
172
+ if (isConfident(parsed.date_of_incorporation)) {
173
+ const parsedDate = tryParseDate(parsed.date_of_incorporation.value);
174
+ if (parsedDate != null) {
175
+ assignAutofilledValue(result, 'incDate', parsedDate);
176
+ }
177
+ }
178
+ if (isConfident(parsed.state_of_incorporation)) {
179
+ assignAutofilledValue(result, 'stateOfIncorporation', parsed.state_of_incorporation.value);
180
+ }
181
+ if (isConfident(parsed.countries_of_operations)) {
182
+ assignAutofilledValue(result, 'countriesOfOperations', parsed.countries_of_operations.value);
183
+ }
184
+ if (isConfident(parsed.source_of_funds)) {
185
+ assignAutofilledValue(result, 'sourceOfFunds', parsed.source_of_funds.value);
186
+ }
187
+ if (isConfident(parsed.transaction_volume_expectations)) {
188
+ assignAutofilledValue(result, 'transactionVolume', parsed.transaction_volume_expectations.value);
189
+ }
190
+ if (isConfident(parsed.purpose_of_account)) {
191
+ assignAutofilledValue(result, 'purposeOfAccount', parsed.purpose_of_account.value);
192
+ }
193
+ if (isConfident(parsed.regulated_status)) {
194
+ assignAutofilledValue(result, 'regulatedStatus', parsed.regulated_status.value);
195
+ }
196
+ if (isConfident(parsed.us_nexus)) {
197
+ assignAutofilledValue(result, 'usNexus', parsed.us_nexus.value);
198
+ }
199
+ return result;
200
+ };
201
+ exports.mapCoiToCompanyDetails = mapCoiToCompanyDetails;
202
+ /** Tax EIN letter → Company Details. */
203
+ const mapTaxEinToCompanyDetails = (parsed) => {
204
+ const result = emptyResult();
205
+ if (isConfident(parsed.legal_business_name)) {
206
+ assignAutofilledValue(result, 'companyLegalName', parsed.legal_business_name.value);
207
+ }
208
+ if (isConfident(parsed.ein)) {
209
+ assignAutofilledValue(result, 'taxIdOrEIN', parsed.ein.value);
210
+ }
211
+ return result;
212
+ };
213
+ exports.mapTaxEinToCompanyDetails = mapTaxEinToCompanyDetails;
@@ -2,7 +2,7 @@ import { ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
3
  import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
5
- import { CompanyDetailsLocalData, SetupViewLocalData, SetupViewState } from './setupViewState';
5
+ import { CompanyDetailsLocalData, CompanyOfficerLocalData, SetupViewLocalData, SetupViewState } from './setupViewState';
6
6
  export declare const initialState: SetupViewState;
7
7
  export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards"], {
8
8
  companyId: string;
@@ -29,6 +29,32 @@ export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPr
29
29
  }, "setupView/sendOtpSuccess">, sendOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "setupView/sendOtpFailure">, verifyOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/verifyOtp">, verifyOtpSuccessSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/verifyOtpSuccess">, verifyOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "setupView/verifyOtpFailure">, saveIndustryAndIncDateInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
30
30
  incDate: ZeniDate;
31
31
  industry: string;
32
- }, "setupView/saveIndustryAndIncDateInLocalStore">, clearSetupViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupViewDataInLocalStore">, clearSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupView">;
32
+ }, "setupView/saveIndustryAndIncDateInLocalStore">, clearSetupViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupViewDataInLocalStore">, clearSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupView">, applyKycDocumentAutofillForSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
33
+ autoFilledFieldNames: string[];
34
+ companyId: ID;
35
+ fileId: ID;
36
+ officerType: CompanyOfficerType;
37
+ values: Partial<CompanyOfficerLocalData>;
38
+ }], {
39
+ autoFilledFieldNames: string[];
40
+ companyId: ID;
41
+ fileId: ID;
42
+ officerType: CompanyOfficerType;
43
+ values: Partial<CompanyOfficerLocalData>;
44
+ }, "setupView/applyKycDocumentAutofillForSetup", never, never>, applyKybDocumentAutofillForSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
45
+ autoFilledFieldNames: string[];
46
+ companyId: ID;
47
+ fileId: ID;
48
+ values: Partial<CompanyDetailsLocalData>;
49
+ }], {
50
+ autoFilledFieldNames: string[];
51
+ companyId: ID;
52
+ fileId: ID;
53
+ values: Partial<CompanyDetailsLocalData>;
54
+ }, "setupView/applyKybDocumentAutofillForSetup", never, never>, clearKycKybAutofillForSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
55
+ officerType?: CompanyOfficerType;
56
+ } | undefined], {
57
+ officerType?: CompanyOfficerType;
58
+ }, "setupView/clearKycKybAutofillForSetup", never, never>;
33
59
  declare const _default: import("redux").Reducer<SetupViewState>;
34
60
  export default _default;
@@ -1,66 +1,34 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearSetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
4
+ exports.clearKycKybAutofillForSetup = exports.applyKybDocumentAutofillForSetup = exports.applyKycDocumentAutofillForSetup = exports.clearSetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
+ const kycKybAutofillActions_1 = require("./kycKybAutofillActions");
6
7
  const initialFetchStatus = {
7
8
  fetchState: 'Not-Started',
8
9
  error: undefined,
9
10
  };
11
+ const emptyOfficerSlot = {
12
+ autoFilledFields: [],
13
+ localData: undefined,
14
+ sendOtpStatus: initialFetchStatus,
15
+ otpverificationStatus: initialFetchStatus,
16
+ };
10
17
  exports.initialState = {
11
18
  updateStatus: { fetchState: 'Not-Started', error: undefined },
12
- companyDetails: {},
19
+ parsingDocumentFileIds: [],
20
+ companyDetails: { autoFilledFields: [] },
13
21
  companyOfficerUpdateStatus: {
14
- Officer_1: {
15
- localData: undefined,
16
- sendOtpStatus: initialFetchStatus,
17
- otpverificationStatus: initialFetchStatus,
18
- },
19
- Officer_2: {
20
- localData: undefined,
21
- sendOtpStatus: initialFetchStatus,
22
- otpverificationStatus: initialFetchStatus,
23
- },
24
- Officer_3: {
25
- localData: undefined,
26
- sendOtpStatus: initialFetchStatus,
27
- otpverificationStatus: initialFetchStatus,
28
- },
29
- Officer_4: {
30
- localData: undefined,
31
- sendOtpStatus: initialFetchStatus,
32
- otpverificationStatus: initialFetchStatus,
33
- },
34
- Officer_5: {
35
- localData: undefined,
36
- sendOtpStatus: initialFetchStatus,
37
- otpverificationStatus: initialFetchStatus,
38
- },
39
- Officer_6: {
40
- localData: undefined,
41
- sendOtpStatus: initialFetchStatus,
42
- otpverificationStatus: initialFetchStatus,
43
- },
44
- Officer_7: {
45
- localData: undefined,
46
- sendOtpStatus: initialFetchStatus,
47
- otpverificationStatus: initialFetchStatus,
48
- },
49
- Officer_8: {
50
- localData: undefined,
51
- sendOtpStatus: initialFetchStatus,
52
- otpverificationStatus: initialFetchStatus,
53
- },
54
- Officer_9: {
55
- localData: undefined,
56
- sendOtpStatus: initialFetchStatus,
57
- otpverificationStatus: initialFetchStatus,
58
- },
59
- Officer_10: {
60
- localData: undefined,
61
- sendOtpStatus: initialFetchStatus,
62
- otpverificationStatus: initialFetchStatus,
63
- },
22
+ Officer_1: { ...emptyOfficerSlot },
23
+ Officer_2: { ...emptyOfficerSlot },
24
+ Officer_3: { ...emptyOfficerSlot },
25
+ Officer_4: { ...emptyOfficerSlot },
26
+ Officer_5: { ...emptyOfficerSlot },
27
+ Officer_6: { ...emptyOfficerSlot },
28
+ Officer_7: { ...emptyOfficerSlot },
29
+ Officer_8: { ...emptyOfficerSlot },
30
+ Officer_9: { ...emptyOfficerSlot },
31
+ Officer_10: { ...emptyOfficerSlot },
64
32
  },
65
33
  primaryContactDetails: {},
66
34
  };
@@ -301,7 +269,92 @@ const setupView = (0, toolkit_1.createSlice)({
301
269
  clearSetupView(draft) {
302
270
  Object.assign(draft, exports.initialState);
303
271
  },
272
+ /**
273
+ * Merge AI-parsed officer fields into the selected officer's localData and
274
+ * track which field names were autofilled so the form can show the ✦ badge.
275
+ */
276
+ applyKycDocumentAutofillForSetup: {
277
+ reducer(draft, action) {
278
+ const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
279
+ const slot = draft.companyOfficerUpdateStatus[officerType];
280
+ slot.localData = Object.assign({}, slot.localData, values);
281
+ slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
282
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
283
+ },
284
+ prepare(payload) {
285
+ return { payload };
286
+ },
287
+ },
288
+ /**
289
+ * Merge AI-parsed company fields into companyDetails.localData and track
290
+ * which field names were autofilled.
291
+ */
292
+ applyKybDocumentAutofillForSetup: {
293
+ reducer(draft, action) {
294
+ const { values, autoFilledFieldNames, fileId } = action.payload;
295
+ draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
296
+ draft.companyDetails.autoFilledFields = Array.from(new Set([
297
+ ...draft.companyDetails.autoFilledFields,
298
+ ...autoFilledFieldNames,
299
+ ]));
300
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
301
+ },
302
+ prepare(payload) {
303
+ return { payload };
304
+ },
305
+ },
306
+ /**
307
+ * Wipe AI-autofill badges. If `officerType` is provided, clears only that
308
+ * officer; otherwise clears company details too.
309
+ */
310
+ clearKycKybAutofillForSetup: {
311
+ reducer(draft, action) {
312
+ const { officerType } = action.payload;
313
+ if (officerType != null) {
314
+ draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
315
+ }
316
+ else {
317
+ draft.companyDetails.autoFilledFields = [];
318
+ Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
319
+ draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
320
+ });
321
+ }
322
+ },
323
+ prepare(payload = {}) {
324
+ return { payload };
325
+ },
326
+ },
327
+ },
328
+ extraReducers: (builder) => {
329
+ const addParsingFileId = (draft, fileId) => {
330
+ if (!draft.parsingDocumentFileIds.includes(fileId)) {
331
+ draft.parsingDocumentFileIds.push(fileId);
332
+ }
333
+ };
334
+ const removeParsingFileId = (draft, fileId) => {
335
+ draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
336
+ };
337
+ builder.addCase(kycKybAutofillActions_1.parseUploadedKycDocument, (draft, action) => {
338
+ if (action.payload.target === 'setup') {
339
+ addParsingFileId(draft, action.payload.fileId);
340
+ }
341
+ });
342
+ builder.addCase(kycKybAutofillActions_1.parseUploadedKybDocument, (draft, action) => {
343
+ if (action.payload.target === 'setup') {
344
+ addParsingFileId(draft, action.payload.fileId);
345
+ }
346
+ });
347
+ builder.addCase(kycKybAutofillActions_1.parseUploadedKycDocumentFailure, (draft, action) => {
348
+ if (action.payload.target === 'setup') {
349
+ removeParsingFileId(draft, action.payload.fileId);
350
+ }
351
+ });
352
+ builder.addCase(kycKybAutofillActions_1.parseUploadedKybDocumentFailure, (draft, action) => {
353
+ if (action.payload.target === 'setup') {
354
+ removeParsingFileId(draft, action.payload.fileId);
355
+ }
356
+ });
304
357
  },
305
358
  });
306
- _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView;
359
+ _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView, exports.applyKycDocumentAutofillForSetup = _a.applyKycDocumentAutofillForSetup, exports.applyKybDocumentAutofillForSetup = _a.applyKybDocumentAutofillForSetup, exports.clearKycKybAutofillForSetup = _a.clearKycKybAutofillForSetup;
307
360
  exports.default = setupView.reducer;
@@ -16,7 +16,7 @@ import { CompanyOfficerType } from '../../companyView/types/companyPassport/comp
16
16
  import { CompanyView } from '../../companyView/types/companyView';
17
17
  import { AccountTypeSubConfigCodeKeyType } from '../billPay/billPayConfig/billPayConfigState';
18
18
  import { PlaidAccountKeyType, PlaidConnectionDetails } from '../plaidAccount/plaidAccountViewState';
19
- import { CompanyAndIdentityDetails, CompanyOfficerLocalData, PrimaryContactLocalData, SetupViewType } from './setupViewState';
19
+ import { CompanyAndIdentityDetails, CompanyOfficerLocalData, PrimaryContactLocalData, SetupViewState, SetupViewType } from './setupViewState';
20
20
  export interface SetupView {
21
21
  accountFetchStatus: FetchStateAndError;
22
22
  accountUpdateStatus: FetchStateAndError;
@@ -54,6 +54,8 @@ export interface FundingAccount {
54
54
  }
55
55
  export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
56
56
  additionalFiles: File[];
57
+ /** Field names in this officer's localData populated by AI doc autofill. */
58
+ autoFilledFields: string[];
57
59
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
58
60
  otpverificationStatus: FetchStateAndError;
59
61
  sendOtpStatus: FetchStateAndError;
@@ -62,6 +64,8 @@ export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
62
64
  addressStatus?: NewAddressData;
63
65
  }
64
66
  export interface CompanyDetails {
67
+ /** Field names in companyDetails localData populated by AI doc autofill. */
68
+ autoFilledFields: string[];
65
69
  companyFiles: File[];
66
70
  companyId: ID;
67
71
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
@@ -96,6 +100,7 @@ export interface CompanyDetails {
96
100
  }
97
101
  interface CompanyAndOfficerLocalData {
98
102
  companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
103
+ parsingDocumentFileIds: ID[];
99
104
  companyDetailsLocalData?: CompanyDetails;
100
105
  }
101
106
  export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
@@ -105,7 +110,7 @@ export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData
105
110
  }
106
111
  export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
107
112
  export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
108
- export declare const getCompanyAndIdentityDetails: (state: RootState, companyId: ID, companyAndIdentityDetails: CompanyAndIdentityDetails) => CompanyAndOfficerLocalData;
113
+ export declare const getCompanyAndIdentityDetails: (state: RootState, companyId: ID, companyAndIdentityDetails: CompanyAndIdentityDetails & Pick<SetupViewState, "parsingDocumentFileIds">) => CompanyAndOfficerLocalData;
109
114
  export declare const getAllFundingAccounts: (depositAccounts: DepositAccount[], paymentAccounts: PaymentAccount[], paymentAccountBalanceFetchStatus: Record<ID, FetchStateAndError>, includeOnlyVerifiedAccounts?: boolean) => FundingAccount[];
110
115
  export declare const mapDepositAccToFundingAccount: (depositAcc: DepositAccount) => FundingAccount;
111
116
  export declare const mapDepositAccountWithLimitToFundingAccount: (depositAcc: DepositAccountWithLimit) => FundingAccount;