@zeniai/client-epic-state 5.1.3-betaAS1 → 5.1.3
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 +4 -25
- package/lib/esm/index.js +1 -6
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +3 -7
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +34 -33
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +8 -55
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +6 -5
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +15 -39
- package/lib/index.d.ts +2 -8
- package/lib/index.js +7 -25
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +2 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +1 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -32
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +1 -24
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +9 -59
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +5 -4
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +15 -39
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +1 -20
- package/package.json +1 -1
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -146
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +0 -40
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -86
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -154
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +0 -4
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -150
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +0 -38
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +0 -43
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +0 -27
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -96
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +0 -32
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -159
|
@@ -10,31 +10,10 @@ export interface AllowedValueWithCodeOptionalPayload {
|
|
|
10
10
|
export declare function isAllowedValueWithCodePayload(allowedValueWithCodePayload: any): allowedValueWithCodePayload is AllowedValueWithCodePayload;
|
|
11
11
|
export declare function isAllowedValueWithCodeOptionalPayload(allowedValueWithCodePayload: any): allowedValueWithCodePayload is AllowedValueWithCodeOptionalPayload;
|
|
12
12
|
export declare function toAllowedValueWithCode(allowedValueWithCodePayload: AllowedValueWithCodePayload): AllowedValueWithCode;
|
|
13
|
-
export interface LabelValueCodeDescriptionPayload {
|
|
14
|
-
code: string;
|
|
15
|
-
description: string;
|
|
16
|
-
}
|
|
17
|
-
export interface LabelValueFileOptionPayload {
|
|
18
|
-
file_id: string;
|
|
19
|
-
option?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface LabelValuePersonNamePayload {
|
|
22
|
-
first_name?: string;
|
|
23
|
-
last_name?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface LabelValuePersonPayload {
|
|
26
|
-
company_role?: string;
|
|
27
|
-
date_of_birth?: string;
|
|
28
|
-
email?: string;
|
|
29
|
-
name?: LabelValuePersonNamePayload;
|
|
30
|
-
nationality?: string;
|
|
31
|
-
ownership_percentage?: number;
|
|
32
|
-
proof_of_address?: LabelValueFileOptionPayload[];
|
|
33
|
-
proof_of_identity?: LabelValueFileOptionPayload[];
|
|
34
|
-
ssn?: string;
|
|
35
|
-
}
|
|
36
|
-
export type LabelValueCodesValuesPayload = string | string[] | LabelValueCodeDescriptionPayload | LabelValueCodeDescriptionPayload[] | LabelValueFileOptionPayload | LabelValueFileOptionPayload[] | LabelValuePersonPayload | LabelValuePersonPayload[];
|
|
37
13
|
export interface LabelValueCodesPayload {
|
|
38
14
|
label: string;
|
|
39
|
-
values:
|
|
15
|
+
values: {
|
|
16
|
+
code: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}[] | string[];
|
|
40
19
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -290,7 +290,6 @@ import { convertAmountToHomeCurrency, discardBillUpdatesInLocalStore, discardOut
|
|
|
290
290
|
import { checkIfCreatorIsApprover, getEditBillDetail, toPaymentToOption, } from './view/spendManagement/billPay/editBillView/editBillViewSelector';
|
|
291
291
|
import { clearInternationalWire, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, fetchInternationalWireDynamicForm, initializeDynamicForm, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData, } from './view/spendManagement/billPay/internationalWire/internationalWireReducer';
|
|
292
292
|
import { getInternationalWireView, } from './view/spendManagement/billPay/internationalWire/internationalWireSelector';
|
|
293
|
-
import { InternationalWireVerificationFormOrder, sortVerificationFormFields, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload';
|
|
294
293
|
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
295
294
|
import { getIntlWireVerificationView, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
296
295
|
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
@@ -642,11 +641,7 @@ export { pushToastNotification, getLastNotificationTime, getNotifications, };
|
|
|
642
641
|
export { getReferralListView, getInviteFormView, toReferralListViewSortKeyType, StatusTypes, AmountStatusTypes, fetchReferrals, sendReferralInvite, clearReferrals, saveReferralFormDataInLocalStore, updateReferralListSortUiState, resendReferralInvite, fetchRewardsPlan, getRewardsPlanCard, updateReferViewed, };
|
|
643
642
|
export { ALL_WEEK_DAYS, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
644
643
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskManagerView, createTaskFromTaskGroupTemplate, };
|
|
645
|
-
export {
|
|
646
|
-
export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
647
|
-
export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
|
|
648
|
-
export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
|
|
649
|
-
export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
|
|
644
|
+
export { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, };
|
|
650
645
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, getExpressPayView, };
|
|
651
646
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
652
647
|
// ── AI Accountant Entity ──
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { from, of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
|
|
4
|
+
import { fetchInternationalVerificationForm, initializeIntlVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, } from '../internationalWireVerificationReducer';
|
|
5
|
+
export const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
|
|
7
6
|
const query = {
|
|
8
7
|
region: 'US',
|
|
9
8
|
legal_type: 'BUSINESS',
|
|
@@ -12,14 +11,11 @@ export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => acti
|
|
|
12
11
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
13
12
|
.pipe(mergeMap((response) => {
|
|
14
13
|
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
-
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
16
|
-
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
17
|
-
const localData = toVerificationFormLocalDataFromOnboardingDetails(onboardingDataFromCompanyInfo, response.data.labels);
|
|
18
14
|
return from([
|
|
19
15
|
updateInternationalVerificationForm({
|
|
20
16
|
internationalWireFormPayload: response.data.labels,
|
|
21
17
|
}),
|
|
22
|
-
|
|
18
|
+
initializeIntlVerificationForm(action.payload.companyId, response.data.labels),
|
|
23
19
|
]);
|
|
24
20
|
}
|
|
25
21
|
else {
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getCurrentTenant } from '../../../../../entity/tenant/tenantSelector';
|
|
4
|
-
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
5
|
-
import { toVerificationFormLocalDataFromOnboardingDetails } from '../internationalWireOnboardingDetailsToLocalData';
|
|
6
3
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData, } from '../internationalWireVerificationReducer';
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fetchBillPaySetupViewSuccess.match(action)), mergeMap((action) => {
|
|
4
|
+
export const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe(filter(initializeIntlVerificationForm.match), mergeMap((action) => {
|
|
5
|
+
const { companyId, internationalWireFormPayload } = action.payload;
|
|
6
|
+
const actions = [];
|
|
11
7
|
const state = state$.value;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
8
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
|
|
9
|
+
.internationalWireOnboardingDetails;
|
|
10
|
+
const localData = {};
|
|
11
|
+
Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
|
|
12
|
+
const values = onboardingDataFromCompanyInfo != null
|
|
13
|
+
? onboardingDataFromCompanyInfo[formFieldKey]?.values
|
|
14
|
+
: undefined;
|
|
15
|
+
if (values != null) {
|
|
16
|
+
localData[formFieldKey] =
|
|
17
|
+
internationalWireFormPayload[formFieldKey].type === 'enum'
|
|
18
|
+
? internationalWireFormPayload[formFieldKey]
|
|
19
|
+
.is_multiple_values_allowed === false
|
|
20
|
+
? typeof values[0] === 'object' && 'code' in values[0]
|
|
21
|
+
? values[0].code
|
|
22
|
+
: ''
|
|
23
|
+
: values.map((value) => typeof value === 'object' && 'code' in value
|
|
24
|
+
? value.code
|
|
25
|
+
: '')
|
|
26
|
+
: values[0];
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
else {
|
|
29
|
+
localData[formFieldKey] =
|
|
30
|
+
internationalWireFormPayload[formFieldKey].type === 'enum' &&
|
|
31
|
+
internationalWireFormPayload[formFieldKey]
|
|
32
|
+
.is_multiple_values_allowed === true
|
|
33
|
+
? []
|
|
34
|
+
: '';
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
actions.push(updateVerificationFormLocalData(localData));
|
|
38
|
+
return from(actions);
|
|
38
39
|
}));
|
|
@@ -3,7 +3,6 @@ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
|
3
3
|
import { updateInternationalWireOnboardingStatus } from '../../../../../entity/company/companyReducer';
|
|
4
4
|
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
6
|
-
import { toIntlWireVerificationSubmitPayload } from '../internationalWireVerificationSubmitPayload';
|
|
7
6
|
import { submitInternationalVerificationForm, updateVerificationFormSubmissionStatus, } from '../internationalWireVerificationReducer';
|
|
8
7
|
export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitInternationalVerificationForm.match), switchMap((action) => {
|
|
9
8
|
const { internationalWireVerificationState } = state$.value;
|
|
@@ -11,7 +10,7 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
|
|
|
11
10
|
const localData = internationalWireVerificationState.verificationFormLocalData;
|
|
12
11
|
if (localData != null) {
|
|
13
12
|
return zeniAPI
|
|
14
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`,
|
|
13
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
|
|
15
14
|
.pipe(mergeMap((response) => {
|
|
16
15
|
const actions = [];
|
|
17
16
|
if (isSuccessResponse(response) && response.data != null) {
|
|
@@ -55,3 +54,9 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
|
|
|
55
54
|
return from([]);
|
|
56
55
|
}
|
|
57
56
|
}));
|
|
57
|
+
const toIntlWireVerificationPayload = (localData) => {
|
|
58
|
+
return {
|
|
59
|
+
is_applicant_declaration: true,
|
|
60
|
+
form_details: localData,
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -1,62 +1,15 @@
|
|
|
1
|
-
import { InternationalWireVerificationReadonlyHideableFieldNames, InternationalWireVerificationFormFieldNames, } from './internationalWireVerificationFieldConstants';
|
|
2
|
-
import { hasBusinessOwnershipValueInLocalData } from './internationalWireVerificationLocalDataHelpers';
|
|
3
|
-
export const InternationalWireVerificationFormOrder = [
|
|
4
|
-
InternationalWireVerificationFormFieldNames.certificateOfGoodStanding,
|
|
5
|
-
InternationalWireVerificationFormFieldNames.businessOwnership,
|
|
6
|
-
InternationalWireVerificationFormFieldNames.companyProofOfAddress,
|
|
7
|
-
InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
|
|
8
|
-
InternationalWireVerificationFormFieldNames.companyRegistrationDate,
|
|
9
|
-
InternationalWireVerificationFormFieldNames.annualTurnover,
|
|
10
|
-
InternationalWireVerificationFormFieldNames.expectedTransactionVolume,
|
|
11
|
-
InternationalWireVerificationFormFieldNames.employeeCount,
|
|
12
|
-
InternationalWireVerificationFormFieldNames.intendedUseOfAccount,
|
|
13
|
-
InternationalWireVerificationFormFieldNames.transactionCountries,
|
|
14
|
-
InternationalWireVerificationFormFieldNames.stakeHolder,
|
|
15
|
-
InternationalWireVerificationFormFieldNames.controllingPerson,
|
|
16
|
-
];
|
|
17
|
-
const toFieldValues = (fieldValues) => fieldValues?.map(({ code, description }) => ({ code, description })) ?? [];
|
|
18
|
-
const toSubField = (subfield) => ({
|
|
19
|
-
label: subfield.label,
|
|
20
|
-
placeholder: subfield.field_hint_text ?? '',
|
|
21
|
-
type: subfield.type,
|
|
22
|
-
fieldValues: toFieldValues(subfield.field_values),
|
|
23
|
-
isMultipleOptionsSupported: subfield.is_multiple_options_supported,
|
|
24
|
-
options: subfield.options,
|
|
25
|
-
});
|
|
26
1
|
export const toDynamicFormField = (key, payload) => ({
|
|
27
2
|
name: key,
|
|
28
3
|
label: payload.label,
|
|
29
4
|
placeholder: payload.field_hint_text ?? '',
|
|
30
5
|
isMultipleValuesAllowed: payload.is_multiple_values_allowed ?? false,
|
|
31
6
|
type: payload.type,
|
|
32
|
-
fieldValues:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
toSubField(subfield),
|
|
41
|
-
]))
|
|
42
|
-
: undefined,
|
|
7
|
+
fieldValues: payload.field_values != null && payload.field_values.length > 0
|
|
8
|
+
? payload.field_values.map((fieldValue) => {
|
|
9
|
+
return {
|
|
10
|
+
code: fieldValue.code,
|
|
11
|
+
description: fieldValue.description,
|
|
12
|
+
};
|
|
13
|
+
})
|
|
14
|
+
: [],
|
|
43
15
|
});
|
|
44
|
-
const readonlyHideableVerificationFormFieldNames = new Set(InternationalWireVerificationReadonlyHideableFieldNames);
|
|
45
|
-
export const filterVerificationFormFieldsForReadonlyView = (fields, localData, isReadonly) => {
|
|
46
|
-
if (!isReadonly || hasBusinessOwnershipValueInLocalData(localData)) {
|
|
47
|
-
return fields;
|
|
48
|
-
}
|
|
49
|
-
return fields.filter((field) => !readonlyHideableVerificationFormFieldNames.has(field.name));
|
|
50
|
-
};
|
|
51
|
-
export const sortVerificationFormFields = (fields) => {
|
|
52
|
-
const orderIndex = new Map(InternationalWireVerificationFormOrder.map((name, index) => [name, index]));
|
|
53
|
-
return fields.slice().sort((a, b) => {
|
|
54
|
-
const aIndex = orderIndex.get(a.name) ?? InternationalWireVerificationFormOrder.length;
|
|
55
|
-
const bIndex = orderIndex.get(b.name) ?? InternationalWireVerificationFormOrder.length;
|
|
56
|
-
if (aIndex !== bIndex) {
|
|
57
|
-
return aIndex - bIndex;
|
|
58
|
-
}
|
|
59
|
-
return a.name.localeCompare(b.name);
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
export const toVerificationFormFields = (internationalWireFormPayload) => sortVerificationFormFields(Object.keys(internationalWireFormPayload).map((key) => toDynamicFormField(key, internationalWireFormPayload[key])));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { toDynamicFormField, } from './internationalWireVerificationPayload';
|
|
3
3
|
export const initialState = {
|
|
4
4
|
verificationFormFetchState: {
|
|
5
5
|
fetchState: 'Not-Started',
|
|
6
6
|
},
|
|
7
|
-
verificationFormFieldLabels: {},
|
|
8
7
|
verificationFormFields: [],
|
|
9
8
|
verificationFormLocalData: {},
|
|
10
9
|
verificationFormSubmitState: {
|
|
@@ -32,8 +31,11 @@ const internationalWireVerification = createSlice({
|
|
|
32
31
|
},
|
|
33
32
|
updateInternationalVerificationForm(draft, action) {
|
|
34
33
|
const { internationalWireFormPayload } = action.payload;
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const verificationFormFields = [];
|
|
35
|
+
Object.keys(internationalWireFormPayload).forEach((key) => {
|
|
36
|
+
verificationFormFields.push(toDynamicFormField(key, internationalWireFormPayload[key]));
|
|
37
|
+
});
|
|
38
|
+
draft.verificationFormFields = verificationFormFields;
|
|
37
39
|
draft.verificationFormFetchState.fetchState = 'Completed';
|
|
38
40
|
},
|
|
39
41
|
updateVerificationFormFailure(draft, action) {
|
|
@@ -43,7 +45,6 @@ const internationalWireVerification = createSlice({
|
|
|
43
45
|
},
|
|
44
46
|
updateVerificationFormLocalData(draft, action) {
|
|
45
47
|
draft.verificationFormLocalData = {
|
|
46
|
-
...draft.verificationFormLocalData,
|
|
47
48
|
...action.payload,
|
|
48
49
|
};
|
|
49
50
|
},
|
|
@@ -1,50 +1,26 @@
|
|
|
1
|
-
import { getCompanyByCompanyId } from '../../../../entity/company/companySelector';
|
|
2
1
|
import { getFilesByFileIds } from '../../../../entity/file/fileSelector';
|
|
3
|
-
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
4
2
|
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
|
-
};
|
|
23
3
|
export const getIntlWireVerificationView = (state) => {
|
|
24
4
|
const deleteFileStatusById = {};
|
|
25
5
|
const updateFileStatusById = {};
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
6
|
+
// field with type = file
|
|
7
|
+
const fileField = state.internationalWireVerificationState.verificationFormFields.find((field) => field.type === 'file');
|
|
8
|
+
let fileId;
|
|
9
|
+
if (fileField != null) {
|
|
10
|
+
fileId = state.internationalWireVerificationState.verificationFormLocalData[fileField.name];
|
|
11
|
+
}
|
|
12
|
+
if (fileId != null) {
|
|
29
13
|
deleteFileStatusById[fileId] = getFileDeleteStatusById(state, fileId);
|
|
30
14
|
updateFileStatusById[fileId] = getFileUpdateNameStatusById(state, fileId);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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);
|
|
15
|
+
}
|
|
16
|
+
let userFiles = [];
|
|
17
|
+
if (fileId != null) {
|
|
18
|
+
userFiles = getFilesByFileIds(state.fileState, [fileId]);
|
|
19
|
+
}
|
|
20
|
+
const fetchState = state.internationalWireVerificationState.verificationFormFetchState
|
|
21
|
+
.fetchState;
|
|
43
22
|
return {
|
|
44
|
-
|
|
45
|
-
verificationFormFields: visibleVerificationFormFields,
|
|
46
|
-
verificationFormLocalData,
|
|
47
|
-
verificationFormSubmitState,
|
|
23
|
+
...state.internationalWireVerificationState,
|
|
48
24
|
deleteFileStatusById,
|
|
49
25
|
updateFileStatusById,
|
|
50
26
|
userFiles,
|
package/lib/index.d.ts
CHANGED
|
@@ -441,10 +441,9 @@ 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';
|
|
445
444
|
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
446
445
|
import { InternationalWireVerificationView, getIntlWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
447
|
-
import { FieldValueType, InternationalWireVerificationState, VerificationFormField,
|
|
446
|
+
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
448
447
|
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
449
448
|
import { MagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, getMagicLinkView } from './view/spendManagement/billPay/magicLinkView/magicLinkViewSelector';
|
|
450
449
|
import { PreviousBillsSelectorView } from './view/spendManagement/billPay/previousBills/previousBillsSelector';
|
|
@@ -905,12 +904,7 @@ export { getReferralListView, getInviteFormView, ReferralListSelectorView, Refer
|
|
|
905
904
|
export { ALL_WEEK_DAYS, DayOfWeek, RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
906
905
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, TaskManagerMetrics, getCompanyTaskManagerView, TaskWithCompanyDetail, createTaskFromTaskGroupTemplate, TaskGroupTemplate, };
|
|
907
906
|
export { Country };
|
|
908
|
-
export { InternationalWireVerificationState, VerificationFormField,
|
|
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';
|
|
907
|
+
export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
914
908
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
|
|
915
909
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
916
910
|
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 =
|
|
72
|
+
exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = 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.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 = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = void 0;
|
|
74
|
+
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 = 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 = void 0;
|
|
75
|
+
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 = 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 = void 0;
|
|
76
|
+
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 = 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 = void 0;
|
|
77
|
+
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 = 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 = void 0;
|
|
78
|
+
exports.getCashManagementOverviewBanner = exports.getCashManagementOverview = exports.bufferAmountToRisk = exports.RISK_BUFFER_AMOUNT = exports.getAutoSweepFlow = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = 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,9 +1485,6 @@ 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; } });
|
|
1491
1488
|
const internationalWireVerificationReducer_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
|
|
1492
1489
|
Object.defineProperty(exports, "fetchInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.fetchInternationalVerificationForm; } });
|
|
1493
1490
|
Object.defineProperty(exports, "submitInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.submitInternationalVerificationForm; } });
|
|
@@ -2252,21 +2249,6 @@ Object.defineProperty(exports, "updateReportUIOptionIsCompareModeOn", { enumerab
|
|
|
2252
2249
|
Object.defineProperty(exports, "toggleReportUIOptionForecastMode", { enumerable: true, get: function () { return reportUIOptionsReducer_1.toggleReportUIOptionForecastMode; } });
|
|
2253
2250
|
Object.defineProperty(exports, "updateReportUIOptionThisPeriod", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionThisPeriod; } });
|
|
2254
2251
|
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; } });
|
|
2270
2252
|
// ── AI Accountant Entity ──
|
|
2271
2253
|
var aiAccountantCustomerState_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerState");
|
|
2272
2254
|
Object.defineProperty(exports, "getAllowedOperationsForStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.getAllowedOperationsForStatus; } });
|
|
@@ -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, updateInternationalVerificationForm, updateVerificationFormFailure
|
|
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, initializeIntlVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure } from '../internationalWireVerificationReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
7
|
+
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,9 +4,8 @@ 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");
|
|
8
7
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
9
|
-
const fetchIntlVerificationFormEpic = (actions$,
|
|
8
|
+
const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.fetchInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
10
9
|
const query = {
|
|
11
10
|
region: 'US',
|
|
12
11
|
legal_type: 'BUSINESS',
|
|
@@ -15,14 +14,11 @@ const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
15
14
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
16
15
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
16
|
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);
|
|
21
17
|
return (0, rxjs_1.from)([
|
|
22
18
|
(0, internationalWireVerificationReducer_1.updateInternationalVerificationForm)({
|
|
23
19
|
internationalWireFormPayload: response.data.labels,
|
|
24
20
|
}),
|
|
25
|
-
(0, internationalWireVerificationReducer_1.
|
|
21
|
+
(0, internationalWireVerificationReducer_1.initializeIntlVerificationForm)(action.payload.companyId, response.data.labels),
|
|
26
22
|
]);
|
|
27
23
|
}
|
|
28
24
|
else {
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
6
5
|
export type ActionType = ReturnType<typeof updateVerificationFormLocalData> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
7
|
-
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType
|
|
6
|
+
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|