@zeniai/client-epic-state 5.1.6 → 5.1.8-betaAS1
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.
- package/lib/commonPayloadTypes/commonPayload.d.ts +25 -4
- package/lib/esm/index.js +6 -1
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +13 -7
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +8 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +7 -3
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -34
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +146 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +40 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +86 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +55 -8
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +5 -6
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +154 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +15 -1
- package/lib/index.d.ts +8 -2
- package/lib/index.js +24 -6
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +12 -6
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +1 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +9 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +6 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +32 -33
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +4 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +150 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +38 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +43 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +27 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +96 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +24 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +59 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +4 -5
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +32 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +159 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +15 -1
- package/package.json +6 -4
|
@@ -1,26 +1,50 @@
|
|
|
1
|
+
import { getCompanyByCompanyId } from '../../../../entity/company/companySelector';
|
|
1
2
|
import { getFilesByFileIds } from '../../../../entity/file/fileSelector';
|
|
3
|
+
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
2
4
|
import { getFileDeleteStatusById, getFileUpdateNameStatusById, } from '../../../fileView/fileViewSelector';
|
|
5
|
+
import { filterVerificationFormFieldsForReadonlyView } from './internationalWireVerificationPayload';
|
|
6
|
+
const collectFileIdsFromLocalData = (localData) => {
|
|
7
|
+
const fileIds = new Set();
|
|
8
|
+
Object.values(localData).forEach((value) => {
|
|
9
|
+
if (typeof value === 'string' && value.startsWith('file_')) {
|
|
10
|
+
fileIds.add(value);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
value.forEach((item) => {
|
|
15
|
+
if (typeof item === 'string' && item.startsWith('file_')) {
|
|
16
|
+
fileIds.add(item);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return Array.from(fileIds);
|
|
22
|
+
};
|
|
3
23
|
export const getIntlWireVerificationView = (state) => {
|
|
4
24
|
const deleteFileStatusById = {};
|
|
5
25
|
const updateFileStatusById = {};
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
if (fileField != null) {
|
|
10
|
-
fileId = state.internationalWireVerificationState.verificationFormLocalData[fileField.name];
|
|
11
|
-
}
|
|
12
|
-
if (fileId != null) {
|
|
26
|
+
const { verificationFormFetchState, verificationFormFields, verificationFormLocalData, verificationFormSubmitState, } = state.internationalWireVerificationState;
|
|
27
|
+
const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
|
|
28
|
+
fileIds.forEach((fileId) => {
|
|
13
29
|
deleteFileStatusById[fileId] = getFileDeleteStatusById(state, fileId);
|
|
14
30
|
updateFileStatusById[fileId] = getFileUpdateNameStatusById(state, fileId);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
});
|
|
32
|
+
const userFiles = fileIds.length > 0 ? getFilesByFileIds(state.fileState, fileIds) : [];
|
|
33
|
+
const fetchState = verificationFormFetchState.fetchState;
|
|
34
|
+
const currentTenant = getCurrentTenant(state);
|
|
35
|
+
const company = currentTenant?.companyId != null
|
|
36
|
+
? getCompanyByCompanyId(state.companyState, currentTenant.companyId)
|
|
37
|
+
?.company
|
|
38
|
+
: undefined;
|
|
39
|
+
const onboardingStatusCode = company?.companyBillPayInfo?.internationalWireOnboardingStatus?.code;
|
|
40
|
+
const isReadonly = onboardingStatusCode != null &&
|
|
41
|
+
onboardingStatusCode !== 'onboarding_status_not_started';
|
|
42
|
+
const visibleVerificationFormFields = filterVerificationFormFieldsForReadonlyView(verificationFormFields, verificationFormLocalData, isReadonly);
|
|
22
43
|
return {
|
|
23
|
-
|
|
44
|
+
verificationFormFetchState,
|
|
45
|
+
verificationFormFields: visibleVerificationFormFields,
|
|
46
|
+
verificationFormLocalData,
|
|
47
|
+
verificationFormSubmitState,
|
|
24
48
|
deleteFileStatusById,
|
|
25
49
|
updateFileStatusById,
|
|
26
50
|
userFiles,
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationFormFieldNames, InternationalWireVerificationSubfieldNames, } from './internationalWireVerificationFieldConstants';
|
|
2
|
+
export const IntlWireVerificationLocalDataSuffix = {
|
|
3
|
+
documentOption: '_option',
|
|
4
|
+
documentBack: '_back',
|
|
5
|
+
nameFirst: '_first_name',
|
|
6
|
+
nameLast: '_last_name',
|
|
7
|
+
};
|
|
8
|
+
const MULTI_OPTION_FILE_FIELD_NAMES = new Set([
|
|
9
|
+
InternationalWireVerificationFormFieldNames.businessOwnership,
|
|
10
|
+
InternationalWireVerificationFormFieldNames.companyProofOfAddress,
|
|
11
|
+
InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
|
|
12
|
+
]);
|
|
13
|
+
const BOOLEAN_WITH_SUBFIELDS_FIELD_NAMES = new Set([
|
|
14
|
+
InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder,
|
|
15
|
+
InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson,
|
|
16
|
+
]);
|
|
17
|
+
const FILE_SUBFIELD_NAMES = new Set([
|
|
18
|
+
InternationalWireVerificationSubfieldNames.proofOfIdentity,
|
|
19
|
+
InternationalWireVerificationSubfieldNames.proofOfAddress,
|
|
20
|
+
]);
|
|
21
|
+
const isInternalLocalDataKey = (key) => key.endsWith(IntlWireVerificationLocalDataSuffix.documentOption) ||
|
|
22
|
+
key.endsWith(IntlWireVerificationLocalDataSuffix.documentBack) ||
|
|
23
|
+
key.endsWith(IntlWireVerificationLocalDataSuffix.nameFirst) ||
|
|
24
|
+
key.endsWith(IntlWireVerificationLocalDataSuffix.nameLast);
|
|
25
|
+
const isPersonSubfieldKey = (key) => key.startsWith(`${InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_`) ||
|
|
26
|
+
key.startsWith(`${InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson}_`);
|
|
27
|
+
const toFileOptionPayloads = (localData, baseKey) => {
|
|
28
|
+
const option = localData[`${baseKey}${IntlWireVerificationLocalDataSuffix.documentOption}`];
|
|
29
|
+
if (typeof option !== 'string' || option.length === 0) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const payloads = [];
|
|
33
|
+
const frontFileId = localData[baseKey];
|
|
34
|
+
if (typeof frontFileId === 'string' && frontFileId.length > 0) {
|
|
35
|
+
payloads.push({ file_id: frontFileId, option });
|
|
36
|
+
}
|
|
37
|
+
const backFileId = localData[`${baseKey}${IntlWireVerificationLocalDataSuffix.documentBack}`];
|
|
38
|
+
if (typeof backFileId === 'string' && backFileId.length > 0) {
|
|
39
|
+
payloads.push({ file_id: backFileId, option });
|
|
40
|
+
}
|
|
41
|
+
return payloads.length > 0 ? payloads : undefined;
|
|
42
|
+
};
|
|
43
|
+
const buildPersonPayload = (localData, keyPrefix) => {
|
|
44
|
+
const person = {};
|
|
45
|
+
const nameBaseKey = `${keyPrefix}_${InternationalWireVerificationSubfieldNames.name}`;
|
|
46
|
+
const firstName = localData[`${nameBaseKey}${IntlWireVerificationLocalDataSuffix.nameFirst}`];
|
|
47
|
+
const lastName = localData[`${nameBaseKey}${IntlWireVerificationLocalDataSuffix.nameLast}`];
|
|
48
|
+
if (typeof firstName === 'string' || typeof lastName === 'string') {
|
|
49
|
+
person.name = {
|
|
50
|
+
first_name: typeof firstName === 'string' ? firstName : '',
|
|
51
|
+
last_name: typeof lastName === 'string' ? lastName : '',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const assignStringField = (subfieldName, assign) => {
|
|
55
|
+
const value = localData[`${keyPrefix}_${subfieldName}`];
|
|
56
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
57
|
+
assign(value);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
assignStringField(InternationalWireVerificationSubfieldNames.nationality, (value) => {
|
|
61
|
+
person.nationality = value;
|
|
62
|
+
});
|
|
63
|
+
assignStringField(InternationalWireVerificationSubfieldNames.email, (value) => {
|
|
64
|
+
person.email = value;
|
|
65
|
+
});
|
|
66
|
+
assignStringField(InternationalWireVerificationSubfieldNames.companyRole, (value) => {
|
|
67
|
+
person.company_role = value;
|
|
68
|
+
});
|
|
69
|
+
assignStringField(InternationalWireVerificationSubfieldNames.ssn, (value) => {
|
|
70
|
+
person.ssn = value;
|
|
71
|
+
});
|
|
72
|
+
assignStringField(InternationalWireVerificationSubfieldNames.dateOfBirth, (value) => {
|
|
73
|
+
person.date_of_birth = value;
|
|
74
|
+
});
|
|
75
|
+
const ownershipValue = localData[`${keyPrefix}_${InternationalWireVerificationSubfieldNames.ownershipPercentage}`];
|
|
76
|
+
if (ownershipValue != null && ownershipValue !== '') {
|
|
77
|
+
person.ownership_percentage = Number(ownershipValue);
|
|
78
|
+
}
|
|
79
|
+
FILE_SUBFIELD_NAMES.forEach((subfieldName) => {
|
|
80
|
+
const filePayloads = toFileOptionPayloads(localData, `${keyPrefix}_${subfieldName}`);
|
|
81
|
+
if (filePayloads != null) {
|
|
82
|
+
if (subfieldName ===
|
|
83
|
+
InternationalWireVerificationSubfieldNames.proofOfIdentity) {
|
|
84
|
+
person.proof_of_identity = filePayloads;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
person.proof_of_address = filePayloads;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return person;
|
|
92
|
+
};
|
|
93
|
+
const getStakeHolderOwnerIndices = (localData) => {
|
|
94
|
+
const stakeHolderPrefix = `${InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_`;
|
|
95
|
+
const indices = new Set();
|
|
96
|
+
Object.keys(localData).forEach((key) => {
|
|
97
|
+
const match = key.match(/^stake_holder_(\d+)_/);
|
|
98
|
+
if (match != null) {
|
|
99
|
+
indices.add(Number.parseInt(match[1], 10));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
if (indices.size === 0) {
|
|
103
|
+
const hasUnindexedStakeHolderData = Object.keys(localData).some((key) => key.startsWith(stakeHolderPrefix) &&
|
|
104
|
+
!/^stake_holder_(true|false)$/.test(key));
|
|
105
|
+
if (hasUnindexedStakeHolderData) {
|
|
106
|
+
indices.add(0);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return Array.from(indices).sort((a, b) => a - b);
|
|
110
|
+
};
|
|
111
|
+
const hasPersonPayloadData = (person) => Object.keys(person).length > 0;
|
|
112
|
+
export const toIntlWireVerificationFormDetails = (localData) => {
|
|
113
|
+
const formDetails = {};
|
|
114
|
+
Object.entries(localData).forEach(([key, value]) => {
|
|
115
|
+
if (BOOLEAN_WITH_SUBFIELDS_FIELD_NAMES.has(key) ||
|
|
116
|
+
isInternalLocalDataKey(key) ||
|
|
117
|
+
isPersonSubfieldKey(key)) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (MULTI_OPTION_FILE_FIELD_NAMES.has(key)) {
|
|
121
|
+
const filePayloads = toFileOptionPayloads(localData, key);
|
|
122
|
+
if (filePayloads != null) {
|
|
123
|
+
formDetails[key] = filePayloads;
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (value == null || value === '') {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
formDetails[key] = value;
|
|
131
|
+
});
|
|
132
|
+
const stakeHolderSelection = localData[InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder];
|
|
133
|
+
if (stakeHolderSelection === 'true') {
|
|
134
|
+
formDetails[InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder] = getStakeHolderOwnerIndices(localData)
|
|
135
|
+
.map((ownerIndex) => buildPersonPayload(localData, `${InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_${ownerIndex}`))
|
|
136
|
+
.filter(hasPersonPayloadData);
|
|
137
|
+
}
|
|
138
|
+
else if (stakeHolderSelection === 'false') {
|
|
139
|
+
formDetails[InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder] = [];
|
|
140
|
+
}
|
|
141
|
+
const controllingPersonSelection = localData[InternationalWireVerificationBooleanWithSubfieldsFieldNames
|
|
142
|
+
.controllingPerson];
|
|
143
|
+
if (controllingPersonSelection === 'false') {
|
|
144
|
+
const controllingPerson = buildPersonPayload(localData, InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson);
|
|
145
|
+
if (hasPersonPayloadData(controllingPerson)) {
|
|
146
|
+
formDetails[InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson] = controllingPerson;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return formDetails;
|
|
150
|
+
};
|
|
151
|
+
export const toIntlWireVerificationSubmitPayload = (localData) => ({
|
|
152
|
+
is_applicant_declaration: true,
|
|
153
|
+
form_details: toIntlWireVerificationFormDetails(localData),
|
|
154
|
+
});
|
|
@@ -11,7 +11,21 @@ import { KYC_KYB_AUTOFILL_MIN_CONFIDENCE, } from './types/kycKybAutofill';
|
|
|
11
11
|
export const OFFICER_ADDRESS_AUTOFILL_FIELD = 'officerAddress';
|
|
12
12
|
// US driving licenses carry a US state in `address_state` but no country field;
|
|
13
13
|
// default the composed address to the US.
|
|
14
|
-
|
|
14
|
+
// Extend's driving-license parser is US-focused — its response shape
|
|
15
|
+
// (`ExtendDrivingLicenseParsed`) only returns `issuing_state`, no
|
|
16
|
+
// `issuing_country` / `country_of_issue`. So we default the address country
|
|
17
|
+
// to US for autofill purposes.
|
|
18
|
+
//
|
|
19
|
+
// `country` is the alpha-3 ISO code (matches the rest of the codebase's
|
|
20
|
+
// address payloads — e.g. `subscriptionBillingAddress.country = 'USA'`).
|
|
21
|
+
// The Edit Address form's country dropdown looks up the option by alpha-3,
|
|
22
|
+
// so using the country name here would leave the dropdown blank.
|
|
23
|
+
//
|
|
24
|
+
// To support non-US driving licenses later: (1) extend the document-service
|
|
25
|
+
// Extend workflow to return an issuing-country field, (2) add it to
|
|
26
|
+
// `ExtendDrivingLicenseParsed`, (3) read it here with this US value as the
|
|
27
|
+
// fallback when the parser couldn't determine the country.
|
|
28
|
+
const DRIVING_LICENSE_DEFAULT_COUNTRY = 'USA';
|
|
15
29
|
const DRIVING_LICENSE_DEFAULT_COUNTRY_CODE = 'US';
|
|
16
30
|
const emptyResult = () => ({
|
|
17
31
|
values: {},
|
package/lib/index.d.ts
CHANGED
|
@@ -442,9 +442,10 @@ import { BillDetailLocalData, EditBillDetail, EditBillDetailViewState, EditRecur
|
|
|
442
442
|
import { CreateInternationalWireDetailsLocalData, DynamicFormField, SupportedAccountType } from './view/spendManagement/billPay/internationalWire/internationalWire';
|
|
443
443
|
import { clearInternationalWire, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, fetchInternationalWireDynamicForm, initializeDynamicForm, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData } from './view/spendManagement/billPay/internationalWire/internationalWireReducer';
|
|
444
444
|
import { InternationalWireSelectorView, getInternationalWireView } from './view/spendManagement/billPay/internationalWire/internationalWireSelector';
|
|
445
|
+
import { InternationalWireVerificationFormOrder, sortVerificationFormFields } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload';
|
|
445
446
|
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
446
447
|
import { InternationalWireVerificationView, getIntlWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
447
|
-
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
448
|
+
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
448
449
|
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
449
450
|
import { MagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, getMagicLinkView } from './view/spendManagement/billPay/magicLinkView/magicLinkViewSelector';
|
|
450
451
|
import { PreviousBillsSelectorView } from './view/spendManagement/billPay/previousBills/previousBillsSelector';
|
|
@@ -906,7 +907,12 @@ export { getReferralListView, getInviteFormView, ReferralListSelectorView, Refer
|
|
|
906
907
|
export { ALL_WEEK_DAYS, DayOfWeek, RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
907
908
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, TaskManagerMetrics, getCompanyTaskManagerView, TaskWithCompanyDetail, createTaskFromTaskGroupTemplate, TaskGroupTemplate, };
|
|
908
909
|
export { Country };
|
|
909
|
-
export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
910
|
+
export { InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField, FieldValueType, InternationalWireVerificationFormOrder, sortVerificationFormFields, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
911
|
+
export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
912
|
+
export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
|
|
913
|
+
export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
|
|
914
|
+
export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
|
|
915
|
+
export type { InternationalWireVerificationBooleanWithSubfieldsFieldName, InternationalWireVerificationFormFieldName, InternationalWireVerificationSubfieldName, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
910
916
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
|
|
911
917
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
912
918
|
export { AiAccountantCustomer, AiAccountantCustomerState, AiAccountantEnrollment, AiAccountantEnrollmentStatus, AiAccountantJob, AiAccountantJobStatus, AiAccountantOperationType, getAllowedOperationsForStatus, toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
package/lib/index.js
CHANGED
|
@@ -70,12 +70,12 @@ exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForSch
|
|
|
70
70
|
exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = void 0;
|
|
71
71
|
exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = void 0;
|
|
72
72
|
exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = void 0;
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.getCashManagementOverviewBanner = exports.getCashManagementOverview = exports.bufferAmountToRisk = exports.RISK_BUFFER_AMOUNT = exports.getAutoSweepFlow = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = exports.updateAutoSweepSettingsFetchStatus = exports.updateAutoSweepRisk = exports.updateAutoSweepDraft = exports.saveAutoSweepSettings = exports.clearAutoSweepFlow = exports.fetchCashManagementOverviewPage = exports.fetchCashManagementBanner = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = void 0;
|
|
73
|
+
exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.toVerificationFormLocalDataFromOnboardingDetails = exports.getStakeHolderOwnerIndicesFromLocalData = exports.toIntlWireVerificationSubmitPayload = exports.toIntlWireVerificationFormDetails = exports.IntlWireVerificationLocalDataSuffix = exports.InternationalWireVerificationSubfieldNames = exports.InternationalWireVerificationStakeHolderFieldName = exports.InternationalWireVerificationFormFieldNames = exports.InternationalWireVerificationControllingPersonFieldName = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNames = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNameList = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.sortVerificationFormFields = exports.InternationalWireVerificationFormOrder = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = void 0;
|
|
74
|
+
exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = void 0;
|
|
75
|
+
exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = exports.removeCardPolicyTemplate = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers = exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = void 0;
|
|
76
|
+
exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = void 0;
|
|
77
|
+
exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = void 0;
|
|
78
|
+
exports.getCashManagementOverviewBanner = exports.getCashManagementOverview = exports.bufferAmountToRisk = exports.RISK_BUFFER_AMOUNT = exports.getAutoSweepFlow = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = exports.updateAutoSweepSettingsFetchStatus = exports.updateAutoSweepRisk = exports.updateAutoSweepDraft = exports.saveAutoSweepSettings = exports.clearAutoSweepFlow = exports.fetchCashManagementOverviewPage = exports.fetchCashManagementBanner = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = void 0;
|
|
79
79
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
80
80
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
81
81
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -1506,6 +1506,9 @@ Object.defineProperty(exports, "initializeInternationalWireLocalData", { enumera
|
|
|
1506
1506
|
Object.defineProperty(exports, "updateInternationalWireLocalStoreData", { enumerable: true, get: function () { return internationalWireReducer_1.updateInternationalWireLocalStoreData; } });
|
|
1507
1507
|
const internationalWireSelector_1 = require("./view/spendManagement/billPay/internationalWire/internationalWireSelector");
|
|
1508
1508
|
Object.defineProperty(exports, "getInternationalWireView", { enumerable: true, get: function () { return internationalWireSelector_1.getInternationalWireView; } });
|
|
1509
|
+
const internationalWireVerificationPayload_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload");
|
|
1510
|
+
Object.defineProperty(exports, "InternationalWireVerificationFormOrder", { enumerable: true, get: function () { return internationalWireVerificationPayload_1.InternationalWireVerificationFormOrder; } });
|
|
1511
|
+
Object.defineProperty(exports, "sortVerificationFormFields", { enumerable: true, get: function () { return internationalWireVerificationPayload_1.sortVerificationFormFields; } });
|
|
1509
1512
|
const internationalWireVerificationReducer_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
|
|
1510
1513
|
Object.defineProperty(exports, "fetchInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.fetchInternationalVerificationForm; } });
|
|
1511
1514
|
Object.defineProperty(exports, "submitInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.submitInternationalVerificationForm; } });
|
|
@@ -2276,6 +2279,21 @@ Object.defineProperty(exports, "updateReportUIOptionIsCompareModeOn", { enumerab
|
|
|
2276
2279
|
Object.defineProperty(exports, "toggleReportUIOptionForecastMode", { enumerable: true, get: function () { return reportUIOptionsReducer_1.toggleReportUIOptionForecastMode; } });
|
|
2277
2280
|
Object.defineProperty(exports, "updateReportUIOptionThisPeriod", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionThisPeriod; } });
|
|
2278
2281
|
Object.defineProperty(exports, "updateReportUIOptionCOABalancesRange", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange; } });
|
|
2282
|
+
var internationalWireVerificationFieldConstants_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants");
|
|
2283
|
+
Object.defineProperty(exports, "InternationalWireVerificationBooleanWithSubfieldsFieldNameList", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNameList; } });
|
|
2284
|
+
Object.defineProperty(exports, "InternationalWireVerificationBooleanWithSubfieldsFieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames; } });
|
|
2285
|
+
Object.defineProperty(exports, "InternationalWireVerificationControllingPersonFieldName", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationControllingPersonFieldName; } });
|
|
2286
|
+
Object.defineProperty(exports, "InternationalWireVerificationFormFieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames; } });
|
|
2287
|
+
Object.defineProperty(exports, "InternationalWireVerificationStakeHolderFieldName", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationStakeHolderFieldName; } });
|
|
2288
|
+
Object.defineProperty(exports, "InternationalWireVerificationSubfieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames; } });
|
|
2289
|
+
var internationalWireVerificationSubmitPayload_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload");
|
|
2290
|
+
Object.defineProperty(exports, "IntlWireVerificationLocalDataSuffix", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix; } });
|
|
2291
|
+
Object.defineProperty(exports, "toIntlWireVerificationFormDetails", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationFormDetails; } });
|
|
2292
|
+
Object.defineProperty(exports, "toIntlWireVerificationSubmitPayload", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationSubmitPayload; } });
|
|
2293
|
+
var internationalWireVerificationLocalDataHelpers_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers");
|
|
2294
|
+
Object.defineProperty(exports, "getStakeHolderOwnerIndicesFromLocalData", { enumerable: true, get: function () { return internationalWireVerificationLocalDataHelpers_1.getStakeHolderOwnerIndicesFromLocalData; } });
|
|
2295
|
+
var internationalWireOnboardingDetailsToLocalData_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData");
|
|
2296
|
+
Object.defineProperty(exports, "toVerificationFormLocalDataFromOnboardingDetails", { enumerable: true, get: function () { return internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails; } });
|
|
2279
2297
|
// ── AI Accountant Entity ──
|
|
2280
2298
|
var aiAccountantCustomerState_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerState");
|
|
2281
2299
|
Object.defineProperty(exports, "getAllowedOperationsForStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.getAllowedOperationsForStatus; } });
|
|
@@ -213,14 +213,20 @@ function isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, officer
|
|
|
213
213
|
isPhoneVerified === true);
|
|
214
214
|
}
|
|
215
215
|
const onboardingStepsData = (isValidConnection, productSettings, accountingConnectionCreationMode) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
// 3 cohorts:
|
|
217
|
+
// - Core-only (banking/cards, no bookkeeping): no ledger, no integrations.
|
|
218
|
+
// - Zeni-team-connects-QBO bookkeeping: skip ledger but keep integrations
|
|
219
|
+
// so the customer can still wire up Plaid / Stripe / HubSpot / email.
|
|
220
|
+
// - Customer-connects-QBO bookkeeping: full 4-step flow.
|
|
221
|
+
const isCoreOnlyTenant = (productSettings.isBankingEnabled || productSettings.isCardsEnabled) &&
|
|
222
|
+
!productSettings.isBookkeepingEnabled;
|
|
223
|
+
const allStepsData = isCoreOnlyTenant
|
|
219
224
|
? onboardingCustomerViewState_1.ALL_ZENI_USER_ONBOARDING_STEPS
|
|
220
|
-
:
|
|
225
|
+
: accountingConnectionCreationMode === 'zeni_user'
|
|
226
|
+
? onboardingCustomerViewState_1.ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS
|
|
227
|
+
: onboardingCustomerViewState_1.ALL_ONBOARDING_STEPS;
|
|
221
228
|
const requiredStepsData = (accountingConnectionCreationMode === 'zeni_user' && isValidConnection) ||
|
|
222
|
-
|
|
223
|
-
!productSettings.isBookkeepingEnabled)
|
|
229
|
+
isCoreOnlyTenant
|
|
224
230
|
? onboardingCustomerViewState_1.ZENI_USER_REQUIRED_ONBOARDING_STEPS
|
|
225
231
|
: onboardingCustomerViewState_1.REQUIRED_ONBOARDING_STEPS;
|
|
226
232
|
return {
|
|
@@ -8,6 +8,7 @@ export declare const CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO: readonly ["con
|
|
|
8
8
|
export declare const REQUIRED_ONBOARDING_STEPS: readonly ["setup_billing", "connect_ledger"];
|
|
9
9
|
export declare const ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT: readonly ["verification"];
|
|
10
10
|
export declare const ALL_ZENI_USER_ONBOARDING_STEPS: readonly ["setup_billing", "verification"];
|
|
11
|
+
export declare const ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS: readonly ["setup_billing", "connect_data_source", "verification"];
|
|
11
12
|
export declare const ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO: readonly ["connect_ledger", "connect_data_source", "verification"];
|
|
12
13
|
export declare const ALL_ONBOARDING_STEPS: readonly ["setup_billing", "connect_ledger", "connect_data_source", "verification"];
|
|
13
14
|
export declare const toOnboardingStepType: (v: string) => "setup_billing" | "connect_ledger" | "verification" | "connect_data_source";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyAiAgentsActivationSubview = exports.emptyAiAgentsActivationCounts = exports.toOnboardingSubStepType = exports.ALL_ONBOARDING_SUB_STEPS = exports.toOnboardingStepType = exports.ALL_ONBOARDING_STEPS = exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = exports.ALL_ZENI_USER_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = exports.REQUIRED_ONBOARDING_STEPS = exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = void 0;
|
|
3
|
+
exports.emptyAiAgentsActivationSubview = exports.emptyAiAgentsActivationCounts = exports.toOnboardingSubStepType = exports.ALL_ONBOARDING_SUB_STEPS = exports.toOnboardingStepType = exports.ALL_ONBOARDING_STEPS = exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = exports.ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = exports.REQUIRED_ONBOARDING_STEPS = exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
// Onboarding steps are the 4 top-level surfaces. Officer + details verification
|
|
6
6
|
// live as sub-steps under `verification` (state machine in CustomerOnboardingPage).
|
|
@@ -21,6 +21,14 @@ exports.ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
|
21
21
|
...exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
22
22
|
...exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
23
23
|
];
|
|
24
|
+
// Zeni-team-connects-QBO bookkeeping tenants: skip the `connect_ledger` step
|
|
25
|
+
// (Zeni already did it) but keep `connect_data_source` so the customer can
|
|
26
|
+
// still wire up non-QBO integrations (Plaid, Stripe, HubSpot, email, etc.).
|
|
27
|
+
exports.ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS = [
|
|
28
|
+
...exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
29
|
+
'connect_data_source',
|
|
30
|
+
...exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
31
|
+
];
|
|
24
32
|
exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = [
|
|
25
33
|
...exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
26
34
|
'connect_data_source',
|
|
@@ -2,6 +2,6 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
4
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchInternationalVerificationForm,
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof
|
|
7
|
-
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>,
|
|
5
|
+
import { fetchInternationalVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof updateVerificationFormLocalData>;
|
|
7
|
+
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,8 +4,9 @@ exports.fetchIntlVerificationFormEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
7
8
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
8
|
-
const fetchIntlVerificationFormEpic = (actions$,
|
|
9
|
+
const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.fetchInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
9
10
|
const query = {
|
|
10
11
|
region: 'US',
|
|
11
12
|
legal_type: 'BUSINESS',
|
|
@@ -14,11 +15,14 @@ const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
14
15
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
15
16
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
17
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
+
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
19
|
+
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
20
|
+
const localData = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, response.data.labels);
|
|
17
21
|
return (0, rxjs_1.from)([
|
|
18
22
|
(0, internationalWireVerificationReducer_1.updateInternationalVerificationForm)({
|
|
19
23
|
internationalWireFormPayload: response.data.labels,
|
|
20
24
|
}),
|
|
21
|
-
(0, internationalWireVerificationReducer_1.
|
|
25
|
+
(0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData),
|
|
22
26
|
]);
|
|
23
27
|
}
|
|
24
28
|
else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
|
+
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
4
5
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
5
6
|
export type ActionType = ReturnType<typeof updateVerificationFormLocalData> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
6
|
-
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType
|
|
7
|
+
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType | ReturnType<typeof fetchBillPaySetupViewSuccess>>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -3,41 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initializeIntlVerificationFormEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
7
|
+
const billPaySetupViewReducer_1 = require("../../billPaySetupView/billPaySetupViewReducer");
|
|
8
|
+
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
6
9
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const hasSavedPersonSubfieldData = (localData) => Object.keys(localData).some((key) => /^stake_holder_\d+_/.test(key) ||
|
|
11
|
+
(key.startsWith('controlling_person_') && key !== 'controlling_person'));
|
|
12
|
+
const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ||
|
|
13
|
+
billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)), (0, operators_1.mergeMap)((action) => {
|
|
10
14
|
const state = state$.value;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
: values[0];
|
|
15
|
+
const formFieldLabels = state.internationalWireVerificationState.verificationFormFieldLabels;
|
|
16
|
+
if (Object.keys(formFieldLabels).length === 0) {
|
|
17
|
+
return (0, rxjs_1.empty)();
|
|
18
|
+
}
|
|
19
|
+
const companyId = internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ?
|
|
20
|
+
action.payload.companyId
|
|
21
|
+
: (0, tenantSelector_1.getCurrentTenant)(state)?.companyId;
|
|
22
|
+
if (companyId == null) {
|
|
23
|
+
return (0, rxjs_1.empty)();
|
|
24
|
+
}
|
|
25
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId]?.companyBillPayInfo
|
|
26
|
+
?.internationalWireOnboardingDetails;
|
|
27
|
+
const localDataFromCompany = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, formFieldLabels);
|
|
28
|
+
const existingLocalData = state.internationalWireVerificationState.verificationFormLocalData;
|
|
29
|
+
if (billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)) {
|
|
30
|
+
if (!hasSavedPersonSubfieldData(localDataFromCompany) ||
|
|
31
|
+
hasSavedPersonSubfieldData(existingLocalData)) {
|
|
32
|
+
return (0, rxjs_1.empty)();
|
|
30
33
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData));
|
|
41
|
-
return (0, rxjs_1.from)(actions);
|
|
34
|
+
}
|
|
35
|
+
return (0, rxjs_1.from)([
|
|
36
|
+
(0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)({
|
|
37
|
+
...existingLocalData,
|
|
38
|
+
...localDataFromCompany,
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
42
41
|
}));
|
|
43
42
|
exports.initializeIntlVerificationFormEpic = initializeIntlVerificationFormEpic;
|