@zeniai/client-epic-state 5.1.2 → 5.1.3-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/entity/approvalRule/approvalRulePayload.d.ts +1 -1
- package/lib/entity/approvalRule/approvalRulePayload.js +5 -1
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +5 -1
- package/lib/esm/index.js +6 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -1
- 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/index.d.ts +8 -2
- package/lib/index.js +25 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -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/package.json +1 -1
|
@@ -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
|
+
});
|
package/lib/index.d.ts
CHANGED
|
@@ -441,9 +441,10 @@ import { BillDetailLocalData, EditBillDetail, EditBillDetailViewState, EditRecur
|
|
|
441
441
|
import { CreateInternationalWireDetailsLocalData, DynamicFormField, SupportedAccountType } from './view/spendManagement/billPay/internationalWire/internationalWire';
|
|
442
442
|
import { clearInternationalWire, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, fetchInternationalWireDynamicForm, initializeDynamicForm, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData } from './view/spendManagement/billPay/internationalWire/internationalWireReducer';
|
|
443
443
|
import { InternationalWireSelectorView, getInternationalWireView } from './view/spendManagement/billPay/internationalWire/internationalWireSelector';
|
|
444
|
+
import { InternationalWireVerificationFormOrder, sortVerificationFormFields } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload';
|
|
444
445
|
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
445
446
|
import { InternationalWireVerificationView, getIntlWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
446
|
-
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
447
|
+
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
447
448
|
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
448
449
|
import { MagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, getMagicLinkView } from './view/spendManagement/billPay/magicLinkView/magicLinkViewSelector';
|
|
449
450
|
import { PreviousBillsSelectorView } from './view/spendManagement/billPay/previousBills/previousBillsSelector';
|
|
@@ -904,7 +905,12 @@ export { getReferralListView, getInviteFormView, ReferralListSelectorView, Refer
|
|
|
904
905
|
export { ALL_WEEK_DAYS, DayOfWeek, RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
905
906
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, TaskManagerMetrics, getCompanyTaskManagerView, TaskWithCompanyDetail, createTaskFromTaskGroupTemplate, TaskGroupTemplate, };
|
|
906
907
|
export { Country };
|
|
907
|
-
export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
908
|
+
export { InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField, FieldValueType, InternationalWireVerificationFormOrder, sortVerificationFormFields, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
909
|
+
export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
910
|
+
export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
|
|
911
|
+
export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
|
|
912
|
+
export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
|
|
913
|
+
export type { InternationalWireVerificationBooleanWithSubfieldsFieldName, InternationalWireVerificationFormFieldName, InternationalWireVerificationSubfieldName, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
908
914
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
|
|
909
915
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
910
916
|
export { AiAccountantCustomer, AiAccountantCustomerState, AiAccountantEnrollment, AiAccountantEnrollmentStatus, AiAccountantJob, AiAccountantJobStatus, AiAccountantOperationType, getAllowedOperationsForStatus, toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
package/lib/index.js
CHANGED
|
@@ -69,13 +69,13 @@ exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = e
|
|
|
69
69
|
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 = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = void 0;
|
|
70
70
|
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 = 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 = void 0;
|
|
71
71
|
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 = 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 = void 0;
|
|
72
|
-
exports.
|
|
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 = void 0;
|
|
72
|
+
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 = 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 = void 0;
|
|
73
|
+
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 = 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 = void 0;
|
|
74
|
+
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 = 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 = void 0;
|
|
75
|
+
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 = 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 = void 0;
|
|
76
|
+
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 = 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 = void 0;
|
|
77
|
+
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 = 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 = 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.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = 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; } });
|
|
@@ -1485,6 +1485,9 @@ Object.defineProperty(exports, "initializeInternationalWireLocalData", { enumera
|
|
|
1485
1485
|
Object.defineProperty(exports, "updateInternationalWireLocalStoreData", { enumerable: true, get: function () { return internationalWireReducer_1.updateInternationalWireLocalStoreData; } });
|
|
1486
1486
|
const internationalWireSelector_1 = require("./view/spendManagement/billPay/internationalWire/internationalWireSelector");
|
|
1487
1487
|
Object.defineProperty(exports, "getInternationalWireView", { enumerable: true, get: function () { return internationalWireSelector_1.getInternationalWireView; } });
|
|
1488
|
+
const internationalWireVerificationPayload_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload");
|
|
1489
|
+
Object.defineProperty(exports, "InternationalWireVerificationFormOrder", { enumerable: true, get: function () { return internationalWireVerificationPayload_1.InternationalWireVerificationFormOrder; } });
|
|
1490
|
+
Object.defineProperty(exports, "sortVerificationFormFields", { enumerable: true, get: function () { return internationalWireVerificationPayload_1.sortVerificationFormFields; } });
|
|
1488
1491
|
const internationalWireVerificationReducer_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
|
|
1489
1492
|
Object.defineProperty(exports, "fetchInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.fetchInternationalVerificationForm; } });
|
|
1490
1493
|
Object.defineProperty(exports, "submitInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.submitInternationalVerificationForm; } });
|
|
@@ -2249,6 +2252,21 @@ Object.defineProperty(exports, "updateReportUIOptionIsCompareModeOn", { enumerab
|
|
|
2249
2252
|
Object.defineProperty(exports, "toggleReportUIOptionForecastMode", { enumerable: true, get: function () { return reportUIOptionsReducer_1.toggleReportUIOptionForecastMode; } });
|
|
2250
2253
|
Object.defineProperty(exports, "updateReportUIOptionThisPeriod", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionThisPeriod; } });
|
|
2251
2254
|
Object.defineProperty(exports, "updateReportUIOptionCOABalancesRange", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange; } });
|
|
2255
|
+
var internationalWireVerificationFieldConstants_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants");
|
|
2256
|
+
Object.defineProperty(exports, "InternationalWireVerificationBooleanWithSubfieldsFieldNameList", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNameList; } });
|
|
2257
|
+
Object.defineProperty(exports, "InternationalWireVerificationBooleanWithSubfieldsFieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames; } });
|
|
2258
|
+
Object.defineProperty(exports, "InternationalWireVerificationControllingPersonFieldName", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationControllingPersonFieldName; } });
|
|
2259
|
+
Object.defineProperty(exports, "InternationalWireVerificationFormFieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames; } });
|
|
2260
|
+
Object.defineProperty(exports, "InternationalWireVerificationStakeHolderFieldName", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationStakeHolderFieldName; } });
|
|
2261
|
+
Object.defineProperty(exports, "InternationalWireVerificationSubfieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames; } });
|
|
2262
|
+
var internationalWireVerificationSubmitPayload_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload");
|
|
2263
|
+
Object.defineProperty(exports, "IntlWireVerificationLocalDataSuffix", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix; } });
|
|
2264
|
+
Object.defineProperty(exports, "toIntlWireVerificationFormDetails", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationFormDetails; } });
|
|
2265
|
+
Object.defineProperty(exports, "toIntlWireVerificationSubmitPayload", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationSubmitPayload; } });
|
|
2266
|
+
var internationalWireVerificationLocalDataHelpers_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers");
|
|
2267
|
+
Object.defineProperty(exports, "getStakeHolderOwnerIndicesFromLocalData", { enumerable: true, get: function () { return internationalWireVerificationLocalDataHelpers_1.getStakeHolderOwnerIndicesFromLocalData; } });
|
|
2268
|
+
var internationalWireOnboardingDetailsToLocalData_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData");
|
|
2269
|
+
Object.defineProperty(exports, "toVerificationFormLocalDataFromOnboardingDetails", { enumerable: true, get: function () { return internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails; } });
|
|
2252
2270
|
// ── AI Accountant Entity ──
|
|
2253
2271
|
var aiAccountantCustomerState_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerState");
|
|
2254
2272
|
Object.defineProperty(exports, "getAllowedOperationsForStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.getAllowedOperationsForStatus; } });
|
|
@@ -32,7 +32,11 @@ const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
32
32
|
}
|
|
33
33
|
if (department != null && department.departmentIds.length > 0) {
|
|
34
34
|
conditions.push({
|
|
35
|
-
|
|
35
|
+
// The backend models 'department' as the accounting class
|
|
36
|
+
// entity, so the wire field name is 'accounting_class_id'
|
|
37
|
+
// (not 'department_id'). State-side and form-side keep
|
|
38
|
+
// 'department' / 'departmentIds' to match product copy.
|
|
39
|
+
field: 'accounting_class_id',
|
|
36
40
|
type: department.operator === 'is_not' ? 'not_in' : 'in',
|
|
37
41
|
value: department.departmentIds,
|
|
38
42
|
});
|
|
@@ -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;
|
|
@@ -6,6 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
7
|
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
8
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
9
|
+
const internationalWireVerificationSubmitPayload_1 = require("../internationalWireVerificationSubmitPayload");
|
|
9
10
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
10
11
|
const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.submitInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
11
12
|
const { internationalWireVerificationState } = state$.value;
|
|
@@ -13,7 +14,7 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
13
14
|
const localData = internationalWireVerificationState.verificationFormLocalData;
|
|
14
15
|
if (localData != null) {
|
|
15
16
|
return zeniAPI
|
|
16
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`,
|
|
17
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, (0, internationalWireVerificationSubmitPayload_1.toIntlWireVerificationSubmitPayload)(localData))
|
|
17
18
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
19
|
const actions = [];
|
|
19
20
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -58,9 +59,3 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
58
59
|
}
|
|
59
60
|
}));
|
|
60
61
|
exports.submitIntlVerificationEpic = submitIntlVerificationEpic;
|
|
61
|
-
const toIntlWireVerificationPayload = (localData) => {
|
|
62
|
-
return {
|
|
63
|
-
is_applicant_declaration: true,
|
|
64
|
-
form_details: localData,
|
|
65
|
-
};
|
|
66
|
-
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LabelValueCodesPayload } from '../../../../commonPayloadTypes/commonPayload';
|
|
2
|
+
import { FieldPayload } from './internationalWireVerificationPayload';
|
|
3
|
+
import { VerificationFormLocalData } from './internationalWireVerificationState';
|
|
4
|
+
export declare const toVerificationFormLocalDataFromOnboardingDetails: (onboardingDetails: Record<string, LabelValueCodesPayload> | undefined, internationalWireFormPayload: Record<string, FieldPayload>) => VerificationFormLocalData;
|