@zeniai/client-epic-state 5.1.4-beta0ND → 5.1.4
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/entity/company/companyPayload.d.ts +0 -4
- package/lib/entity/company/companyPayload.js +0 -6
- package/lib/entity/company/companyStateTypes.d.ts +0 -7
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +0 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.js +0 -9
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +25 -38
- package/lib/entity/tenant/tenantReducer.js +5 -65
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/epic.d.ts +1 -6
- package/lib/epic.js +1 -7
- package/lib/esm/entity/company/companyPayload.js +0 -6
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +0 -8
- package/lib/esm/entity/tenant/tenantReducer.js +3 -63
- package/lib/esm/epic.js +1 -7
- package/lib/esm/index.js +6 -9
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +50 -218
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +2 -12
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +0 -12
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +52 -106
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
- package/lib/index.d.ts +7 -11
- package/lib/index.js +35 -55
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +0 -3
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +4 -41
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +51 -220
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +2 -15
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +0 -40
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +1 -13
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +2 -28
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +53 -107
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -7
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -19
- package/package.json +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +0 -21
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -54
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -50
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -40
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -29
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -40
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -58
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -77
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -14
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -207
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -41
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +0 -7
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -44
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +0 -8
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -33
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +0 -9
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -44
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +0 -28
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -62
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +0 -9
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -81
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +0 -24
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -17
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +0 -29
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -215
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +0 -154
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -46
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFile.match), (0, operators_1.
|
|
9
|
+
const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFile.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
/**
|
|
11
11
|
* tenantId is required for deleting onboarding files.
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFileList.match), (0, operators_1.
|
|
9
|
+
const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFileList.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
const { fileIds } = action.payload;
|
|
11
11
|
return zeniAPI
|
|
12
12
|
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.fileMicroServiceBaseUrl}/1.0/files?query=${encodeURIComponent(JSON.stringify({ file_ids: fileIds }))}`)
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.
|
|
9
|
+
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
/**
|
|
11
11
|
* tenantId is required for updating onboarding file names.
|
|
12
12
|
*/
|
|
@@ -15,9 +15,6 @@ export interface OnboardingStatusPayload {
|
|
|
15
15
|
is_user_landed_to_interim_page: boolean;
|
|
16
16
|
should_complete_onboarding: boolean;
|
|
17
17
|
}
|
|
18
|
-
export interface AiFinanceTeamAcknowledgementPayload {
|
|
19
|
-
is_onboarding_ai_finance_team_acknowledged: boolean;
|
|
20
|
-
}
|
|
21
18
|
interface CompaniesData {
|
|
22
19
|
companies: CompanyPayload[];
|
|
23
20
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
3
|
import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
|
|
4
|
-
import { CompanyDetailsLocalData, CompanyOfficerLocalData } from '../../spendManagement/commonSetup/setupViewState';
|
|
5
4
|
import { PlaidLinkTokenType } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
6
|
-
import {
|
|
5
|
+
import { OnboardingCustomerViewState, OnboardingCustomerViewUIState, OnboardingStep } from './onboardingCustomerViewState';
|
|
7
6
|
export declare const initialState: OnboardingCustomerViewState;
|
|
8
7
|
export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, cacheOverride?: any, reCalculateCurrentStep?: any], {
|
|
9
8
|
companyId: string;
|
|
@@ -17,17 +16,7 @@ export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").Act
|
|
|
17
16
|
companyId: string;
|
|
18
17
|
checkOnboardingComplete: boolean;
|
|
19
18
|
productSuitePage: boolean;
|
|
20
|
-
}, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatus", never, never>, updateOnboardingCustomerViewCompleteStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusSuccess">, updateOnboardingCustomerViewCompleteStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusFailure", never, never>,
|
|
21
|
-
companyId: string;
|
|
22
|
-
}, "onboardingCustomerView/acknowledgeOnboardingAiFinanceTeam", never, never>, acknowledgeOnboardingAiFinanceTeamSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/acknowledgeOnboardingAiFinanceTeamSuccess">, acknowledgeOnboardingAiFinanceTeamFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/acknowledgeOnboardingAiFinanceTeamFailure", never, never>, acknowledgeOnboardingAiActivationViewed: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
23
|
-
companyId: string;
|
|
24
|
-
}, "onboardingCustomerView/acknowledgeOnboardingAiActivationViewed", never, never>, acknowledgeOnboardingAiActivationViewedSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/acknowledgeOnboardingAiActivationViewedSuccess">, acknowledgeOnboardingAiActivationViewedFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/acknowledgeOnboardingAiActivationViewedFailure", never, never>, fetchAiAgentsActivationStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/fetchAiAgentsActivationStatus">, fetchAiAgentsActivationStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
25
|
-
counts: AiAgentsActivationCounts;
|
|
26
|
-
phases: AiAgentsActivationPhase[];
|
|
27
|
-
}], {
|
|
28
|
-
counts: AiAgentsActivationCounts;
|
|
29
|
-
phases: AiAgentsActivationPhase[];
|
|
30
|
-
}, "onboardingCustomerView/fetchAiAgentsActivationStatusSuccess", never, never>, fetchAiAgentsActivationStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/fetchAiAgentsActivationStatusFailure", never, never>, aiAgentsActivationCountsUpdated: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: Partial<AiAgentsActivationCounts>], Partial<AiAgentsActivationCounts>, "onboardingCustomerView/aiAgentsActivationCountsUpdated", never, never>, aiAgentsActivationPhaseChanged: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: AiAgentsActivationPhase], AiAgentsActivationPhase, "onboardingCustomerView/aiAgentsActivationPhaseChanged", never, never>, updateOnboardingCustomerViewDashboardLoaded: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
19
|
+
}, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatus", never, never>, updateOnboardingCustomerViewCompleteStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusSuccess">, updateOnboardingCustomerViewCompleteStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusFailure", never, never>, updateOnboardingCustomerViewDashboardLoaded: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
31
20
|
companyId: string;
|
|
32
21
|
}, "onboardingCustomerView/updateOnboardingCustomerViewDashboardLoaded", never, never>, updateOnboardingCustomerViewDashboardLoadedSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/updateOnboardingCustomerViewDashboardLoadedSuccess">, updateOnboardingCustomerViewDashboardLoadedFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/updateOnboardingCustomerViewDashboardLoadedFailure", never, never>, updateOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, sendForVerification: boolean, reCalculateCurrentStep?: boolean | undefined, isBillingAddressUpdate?: boolean | undefined, officerType?: "Officer_1" | "Officer_3" | "Officer_2" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10" | undefined], {
|
|
33
22
|
companyId: string;
|
|
@@ -83,37 +72,11 @@ export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").Act
|
|
|
83
72
|
companyId: ID;
|
|
84
73
|
currentStep?: OnboardingStep;
|
|
85
74
|
reCalculateCurrentStep?: boolean;
|
|
86
|
-
}, "onboardingCustomerView/updateOnboardingCustomerViewLocalStoreData">, saveOnboardingCustomerViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<import("
|
|
75
|
+
}, "onboardingCustomerView/updateOnboardingCustomerViewLocalStoreData">, saveOnboardingCustomerViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<import("../../..").SetupViewLocalData>, "onboardingCustomerView/saveOnboardingCustomerViewDataInLocalStore">, saveOnboardingCompnayOfficerPhoneInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
87
76
|
officerType: CompanyOfficerType;
|
|
88
77
|
phone: string | number;
|
|
89
78
|
}, "onboardingCustomerView/saveOnboardingCompnayOfficerPhoneInLocalStore">, updateOnboardingCustomerViewUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<OnboardingCustomerViewUIState>, "onboardingCustomerView/updateOnboardingCustomerViewUIState">, sendOnboardingOfficerOtp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/sendOnboardingOfficerOtp">, sendOnboardingOfficerOtpSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
90
79
|
otpChallenge: string;
|
|
91
|
-
}, "onboardingCustomerView/sendOnboardingOfficerOtpSuccess">, sendOnboardingOfficerOtpFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/sendOnboardingOfficerOtpFailure">, resendOnboardingOfficerOtp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/resendOnboardingOfficerOtp">, verifyOnboardingOfficerOtp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/verifyOnboardingOfficerOtp">, verifyOnboardingOfficerOtpSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/verifyOnboardingOfficerOtpSuccess">, verifyOnboardingOfficerOtpFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/verifyOnboardingOfficerOtpFailure">, clearOnboardingCustomerViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/clearOnboardingCustomerViewDataInLocalStore">, clearOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/clearOnboardingCustomerView"
|
|
92
|
-
autoFilledFieldNames: string[];
|
|
93
|
-
companyId: ID;
|
|
94
|
-
fileId: ID;
|
|
95
|
-
officerType: CompanyOfficerType;
|
|
96
|
-
values: Partial<CompanyOfficerLocalData>;
|
|
97
|
-
}], {
|
|
98
|
-
autoFilledFieldNames: string[];
|
|
99
|
-
companyId: ID;
|
|
100
|
-
fileId: ID;
|
|
101
|
-
officerType: CompanyOfficerType;
|
|
102
|
-
values: Partial<CompanyOfficerLocalData>;
|
|
103
|
-
}, "onboardingCustomerView/applyKycDocumentAutofillForOnboarding", never, never>, applyKybDocumentAutofillForOnboarding: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
104
|
-
autoFilledFieldNames: string[];
|
|
105
|
-
companyId: ID;
|
|
106
|
-
fileId: ID;
|
|
107
|
-
values: Partial<CompanyDetailsLocalData>;
|
|
108
|
-
}], {
|
|
109
|
-
autoFilledFieldNames: string[];
|
|
110
|
-
companyId: ID;
|
|
111
|
-
fileId: ID;
|
|
112
|
-
values: Partial<CompanyDetailsLocalData>;
|
|
113
|
-
}, "onboardingCustomerView/applyKybDocumentAutofillForOnboarding", never, never>, clearKycKybAutofillForOnboarding: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
|
|
114
|
-
officerType?: CompanyOfficerType;
|
|
115
|
-
} | undefined], {
|
|
116
|
-
officerType?: CompanyOfficerType;
|
|
117
|
-
}, "onboardingCustomerView/clearKycKybAutofillForOnboarding", never, never>;
|
|
80
|
+
}, "onboardingCustomerView/sendOnboardingOfficerOtpSuccess">, sendOnboardingOfficerOtpFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/sendOnboardingOfficerOtpFailure">, resendOnboardingOfficerOtp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/resendOnboardingOfficerOtp">, verifyOnboardingOfficerOtp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/verifyOnboardingOfficerOtp">, verifyOnboardingOfficerOtpSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/verifyOnboardingOfficerOtpSuccess">, verifyOnboardingOfficerOtpFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/verifyOnboardingOfficerOtpFailure">, clearOnboardingCustomerViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/clearOnboardingCustomerViewDataInLocalStore">, clearOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/clearOnboardingCustomerView">;
|
|
118
81
|
declare const _default: import("redux").Reducer<OnboardingCustomerViewState>;
|
|
119
82
|
export default _default;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.verifyOnboardingOfficerOtpFailure = exports.verifyOnboardingOfficerOtpSuccess = exports.verifyOnboardingOfficerOtp = exports.resendOnboardingOfficerOtp = exports.sendOnboardingOfficerOtpFailure = exports.sendOnboardingOfficerOtpSuccess = exports.sendOnboardingOfficerOtp = exports.updateOnboardingCustomerViewUIState = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.saveOnboardingCustomerViewDataInLocalStore = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerViewAccountDetails = exports.updateCurrentStep = exports.getOnboardingPlaidLinkTokenFailure = exports.getOnboardingPlaidLinkTokenSuccess = exports.getOnboardingPlaidLinkToken = exports.establishOnboardingPlaidConnectionFailure = exports.establishOnboardingPlaidConnectionSuccess = exports.establishOnboardingPlaidConnection = exports.updateOnboardingPaymentAccountLoginStatusFailure = exports.updateOnboardingPaymentAccountLoginStatusSuccess = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingPaymentAccountStatusFailure = exports.updateOnboardingPaymentAccountStatusSuccess = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingCustomerViewFailure = exports.updateOnboardingCustomerViewSuccess = exports.updateOnboardingCustomerView = exports.updateOnboardingCustomerViewDashboardLoadedFailure = exports.updateOnboardingCustomerViewDashboardLoadedSuccess = exports.updateOnboardingCustomerViewDashboardLoaded = exports.
|
|
5
|
-
exports.clearKycKybAutofillForOnboarding = exports.applyKybDocumentAutofillForOnboarding = exports.applyKycDocumentAutofillForOnboarding = exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = void 0;
|
|
4
|
+
exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.verifyOnboardingOfficerOtpFailure = exports.verifyOnboardingOfficerOtpSuccess = exports.verifyOnboardingOfficerOtp = exports.resendOnboardingOfficerOtp = exports.sendOnboardingOfficerOtpFailure = exports.sendOnboardingOfficerOtpSuccess = exports.sendOnboardingOfficerOtp = exports.updateOnboardingCustomerViewUIState = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.saveOnboardingCustomerViewDataInLocalStore = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerViewAccountDetails = exports.updateCurrentStep = exports.getOnboardingPlaidLinkTokenFailure = exports.getOnboardingPlaidLinkTokenSuccess = exports.getOnboardingPlaidLinkToken = exports.establishOnboardingPlaidConnectionFailure = exports.establishOnboardingPlaidConnectionSuccess = exports.establishOnboardingPlaidConnection = exports.updateOnboardingPaymentAccountLoginStatusFailure = exports.updateOnboardingPaymentAccountLoginStatusSuccess = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingPaymentAccountStatusFailure = exports.updateOnboardingPaymentAccountStatusSuccess = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingCustomerViewFailure = exports.updateOnboardingCustomerViewSuccess = exports.updateOnboardingCustomerView = exports.updateOnboardingCustomerViewDashboardLoadedFailure = exports.updateOnboardingCustomerViewDashboardLoadedSuccess = exports.updateOnboardingCustomerViewDashboardLoaded = exports.updateOnboardingCustomerViewCompleteStatusFailure = exports.updateOnboardingCustomerViewCompleteStatusSuccess = exports.updateOnboardingCustomerViewCompleteStatus = exports.fetchOnboardingCustomerSetupViewFailure = exports.fetchOnboardingCustomerSetupViewSuccess = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.initialState = void 0;
|
|
6
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
6
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
8
|
-
const kycKybAutofillActions_1 = require("../../spendManagement/commonSetup/kycKybAutofillActions");
|
|
9
|
-
const onboardingCustomerViewState_1 = require("./onboardingCustomerViewState");
|
|
10
7
|
const initialStatus = {
|
|
11
8
|
fetchState: 'Not-Started',
|
|
12
9
|
error: undefined,
|
|
@@ -16,31 +13,61 @@ exports.initialState = {
|
|
|
16
13
|
saveStatus: initialStatus,
|
|
17
14
|
dashboardLoadedStatus: initialStatus,
|
|
18
15
|
currentStep: 'link_payment_account',
|
|
19
|
-
parsingDocumentFileIds: [],
|
|
20
16
|
companyDetails: {
|
|
21
|
-
autoFilledFields: [],
|
|
22
17
|
localData: undefined,
|
|
23
18
|
},
|
|
24
|
-
companyOfficerUpdateStatus:
|
|
25
|
-
|
|
26
|
-
autoFilledFields: [],
|
|
19
|
+
companyOfficerUpdateStatus: {
|
|
20
|
+
Officer_1: {
|
|
27
21
|
localData: undefined,
|
|
28
22
|
sendOtpStatus: initialStatus,
|
|
29
23
|
otpverificationStatus: initialStatus,
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
24
|
+
},
|
|
25
|
+
Officer_2: {
|
|
26
|
+
localData: undefined,
|
|
27
|
+
sendOtpStatus: initialStatus,
|
|
28
|
+
otpverificationStatus: initialStatus,
|
|
29
|
+
},
|
|
30
|
+
Officer_3: {
|
|
31
|
+
localData: undefined,
|
|
32
|
+
sendOtpStatus: initialStatus,
|
|
33
|
+
otpverificationStatus: initialStatus,
|
|
34
|
+
},
|
|
35
|
+
Officer_4: {
|
|
36
|
+
localData: undefined,
|
|
37
|
+
sendOtpStatus: initialStatus,
|
|
38
|
+
otpverificationStatus: initialStatus,
|
|
39
|
+
},
|
|
40
|
+
Officer_5: {
|
|
41
|
+
localData: undefined,
|
|
42
|
+
sendOtpStatus: initialStatus,
|
|
43
|
+
otpverificationStatus: initialStatus,
|
|
44
|
+
},
|
|
45
|
+
Officer_6: {
|
|
46
|
+
localData: undefined,
|
|
47
|
+
sendOtpStatus: initialStatus,
|
|
48
|
+
otpverificationStatus: initialStatus,
|
|
49
|
+
},
|
|
50
|
+
Officer_7: {
|
|
51
|
+
localData: undefined,
|
|
52
|
+
sendOtpStatus: initialStatus,
|
|
53
|
+
otpverificationStatus: initialStatus,
|
|
54
|
+
},
|
|
55
|
+
Officer_8: {
|
|
56
|
+
localData: undefined,
|
|
57
|
+
sendOtpStatus: initialStatus,
|
|
58
|
+
otpverificationStatus: initialStatus,
|
|
59
|
+
},
|
|
60
|
+
Officer_9: {
|
|
61
|
+
localData: undefined,
|
|
62
|
+
sendOtpStatus: initialStatus,
|
|
63
|
+
otpverificationStatus: initialStatus,
|
|
64
|
+
},
|
|
65
|
+
Officer_10: {
|
|
66
|
+
localData: undefined,
|
|
67
|
+
sendOtpStatus: initialStatus,
|
|
68
|
+
otpverificationStatus: initialStatus,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
44
71
|
primaryContactDetails: {},
|
|
45
72
|
paymentAccountDetails: {
|
|
46
73
|
fetchStatus: initialStatus,
|
|
@@ -68,7 +95,6 @@ exports.initialState = {
|
|
|
68
95
|
},
|
|
69
96
|
fetchState: 'Not-Started',
|
|
70
97
|
error: undefined,
|
|
71
|
-
aiAgentsActivation: { ...onboardingCustomerViewState_1.emptyAiAgentsActivationSubview },
|
|
72
98
|
uiState: {
|
|
73
99
|
isQBOPopupOpen: false,
|
|
74
100
|
isCardPaymentPopupOpen: false,
|
|
@@ -158,126 +184,6 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
158
184
|
};
|
|
159
185
|
},
|
|
160
186
|
},
|
|
161
|
-
acknowledgeOnboardingAiFinanceTeam: {
|
|
162
|
-
reducer(draft) {
|
|
163
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
164
|
-
fetchState: 'In-Progress',
|
|
165
|
-
error: undefined,
|
|
166
|
-
};
|
|
167
|
-
},
|
|
168
|
-
prepare(companyId) {
|
|
169
|
-
return {
|
|
170
|
-
payload: { companyId },
|
|
171
|
-
};
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
acknowledgeOnboardingAiFinanceTeamSuccess(draft) {
|
|
175
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
176
|
-
fetchState: 'Completed',
|
|
177
|
-
error: undefined,
|
|
178
|
-
};
|
|
179
|
-
},
|
|
180
|
-
acknowledgeOnboardingAiFinanceTeamFailure: {
|
|
181
|
-
reducer(draft, action) {
|
|
182
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
183
|
-
fetchState: 'Error',
|
|
184
|
-
error: action.payload,
|
|
185
|
-
};
|
|
186
|
-
},
|
|
187
|
-
prepare(error) {
|
|
188
|
-
return {
|
|
189
|
-
payload: error,
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
acknowledgeOnboardingAiActivationViewed: {
|
|
194
|
-
reducer(draft) {
|
|
195
|
-
draft.aiActivationViewedAcknowledgementStatus = {
|
|
196
|
-
fetchState: 'In-Progress',
|
|
197
|
-
error: undefined,
|
|
198
|
-
};
|
|
199
|
-
},
|
|
200
|
-
prepare(companyId) {
|
|
201
|
-
return {
|
|
202
|
-
payload: { companyId },
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
acknowledgeOnboardingAiActivationViewedSuccess(draft) {
|
|
207
|
-
draft.aiActivationViewedAcknowledgementStatus = {
|
|
208
|
-
fetchState: 'Completed',
|
|
209
|
-
error: undefined,
|
|
210
|
-
};
|
|
211
|
-
},
|
|
212
|
-
acknowledgeOnboardingAiActivationViewedFailure: {
|
|
213
|
-
reducer(draft, action) {
|
|
214
|
-
draft.aiActivationViewedAcknowledgementStatus = {
|
|
215
|
-
fetchState: 'Error',
|
|
216
|
-
error: action.payload,
|
|
217
|
-
};
|
|
218
|
-
},
|
|
219
|
-
prepare(error) {
|
|
220
|
-
return {
|
|
221
|
-
payload: error,
|
|
222
|
-
};
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
fetchAiAgentsActivationStatus(draft) {
|
|
226
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
227
|
-
fetchState: 'In-Progress',
|
|
228
|
-
error: undefined,
|
|
229
|
-
};
|
|
230
|
-
},
|
|
231
|
-
fetchAiAgentsActivationStatusSuccess: {
|
|
232
|
-
reducer(draft, action) {
|
|
233
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
234
|
-
fetchState: 'Completed',
|
|
235
|
-
error: undefined,
|
|
236
|
-
};
|
|
237
|
-
draft.aiAgentsActivation.phases = action.payload.phases;
|
|
238
|
-
draft.aiAgentsActivation.counts = action.payload.counts;
|
|
239
|
-
},
|
|
240
|
-
prepare(payload) {
|
|
241
|
-
return { payload };
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
fetchAiAgentsActivationStatusFailure: {
|
|
245
|
-
reducer(draft, action) {
|
|
246
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
247
|
-
fetchState: 'Error',
|
|
248
|
-
error: action.payload,
|
|
249
|
-
};
|
|
250
|
-
},
|
|
251
|
-
prepare(error) {
|
|
252
|
-
return { payload: error };
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
aiAgentsActivationCountsUpdated: {
|
|
256
|
-
reducer(draft, action) {
|
|
257
|
-
draft.aiAgentsActivation.counts = {
|
|
258
|
-
...draft.aiAgentsActivation.counts,
|
|
259
|
-
...action.payload,
|
|
260
|
-
};
|
|
261
|
-
},
|
|
262
|
-
prepare(payload) {
|
|
263
|
-
return { payload };
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
aiAgentsActivationPhaseChanged: {
|
|
267
|
-
reducer(draft, action) {
|
|
268
|
-
const target = draft.aiAgentsActivation.phases;
|
|
269
|
-
const index = target.findIndex((phase) => phase.key === action.payload.key);
|
|
270
|
-
if (index === -1) {
|
|
271
|
-
target.push(action.payload);
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
target[index] = { ...target[index], ...action.payload };
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
prepare(payload) {
|
|
278
|
-
return { payload };
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
187
|
updateOnboardingCustomerViewDashboardLoaded: {
|
|
282
188
|
reducer(draft) {
|
|
283
189
|
draft.dashboardLoadedStatus = {
|
|
@@ -690,82 +596,7 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
690
596
|
clearOnboardingCustomerView(draft) {
|
|
691
597
|
Object.assign(draft, exports.initialState);
|
|
692
598
|
},
|
|
693
|
-
/** Merge AI-parsed officer fields into the officer's onboarding localData. */
|
|
694
|
-
applyKycDocumentAutofillForOnboarding: {
|
|
695
|
-
reducer(draft, action) {
|
|
696
|
-
const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
|
|
697
|
-
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
698
|
-
slot.localData = Object.assign({}, slot.localData, values);
|
|
699
|
-
slot.autoFilledFields = Array.from(new Set([...(slot.autoFilledFields ?? []), ...autoFilledFieldNames]));
|
|
700
|
-
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
701
|
-
},
|
|
702
|
-
prepare(payload) {
|
|
703
|
-
return { payload };
|
|
704
|
-
},
|
|
705
|
-
},
|
|
706
|
-
/** Merge AI-parsed company fields into companyDetails onboarding localData. */
|
|
707
|
-
applyKybDocumentAutofillForOnboarding: {
|
|
708
|
-
reducer(draft, action) {
|
|
709
|
-
const { values, autoFilledFieldNames, fileId } = action.payload;
|
|
710
|
-
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
711
|
-
const prev = draft.companyDetails.autoFilledFields ?? [];
|
|
712
|
-
draft.companyDetails.autoFilledFields = Array.from(new Set([...prev, ...autoFilledFieldNames]));
|
|
713
|
-
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
714
|
-
},
|
|
715
|
-
prepare(payload) {
|
|
716
|
-
return { payload };
|
|
717
|
-
},
|
|
718
|
-
},
|
|
719
|
-
/** Wipe AI-autofill badges during onboarding. */
|
|
720
|
-
clearKycKybAutofillForOnboarding: {
|
|
721
|
-
reducer(draft, action) {
|
|
722
|
-
const { officerType } = action.payload;
|
|
723
|
-
if (officerType != null) {
|
|
724
|
-
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
725
|
-
}
|
|
726
|
-
else {
|
|
727
|
-
draft.companyDetails.autoFilledFields = [];
|
|
728
|
-
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
729
|
-
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
},
|
|
733
|
-
prepare(payload = {}) {
|
|
734
|
-
return { payload };
|
|
735
|
-
},
|
|
736
|
-
},
|
|
737
|
-
},
|
|
738
|
-
extraReducers: (builder) => {
|
|
739
|
-
const addParsingFileId = (draft, fileId) => {
|
|
740
|
-
draft.parsingDocumentFileIds = draft.parsingDocumentFileIds ?? [];
|
|
741
|
-
if (!draft.parsingDocumentFileIds.includes(fileId)) {
|
|
742
|
-
draft.parsingDocumentFileIds.push(fileId);
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
const removeParsingFileId = (draft, fileId) => {
|
|
746
|
-
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
747
|
-
};
|
|
748
|
-
builder.addCase(kycKybAutofillActions_1.parseUploadedKycDocument, (draft, action) => {
|
|
749
|
-
if (action.payload.target === 'onboarding') {
|
|
750
|
-
addParsingFileId(draft, action.payload.fileId);
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
builder.addCase(kycKybAutofillActions_1.parseUploadedKybDocument, (draft, action) => {
|
|
754
|
-
if (action.payload.target === 'onboarding') {
|
|
755
|
-
addParsingFileId(draft, action.payload.fileId);
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
builder.addCase(kycKybAutofillActions_1.parseUploadedKycDocumentFailure, (draft, action) => {
|
|
759
|
-
if (action.payload.target === 'onboarding') {
|
|
760
|
-
removeParsingFileId(draft, action.payload.fileId);
|
|
761
|
-
}
|
|
762
|
-
});
|
|
763
|
-
builder.addCase(kycKybAutofillActions_1.parseUploadedKybDocumentFailure, (draft, action) => {
|
|
764
|
-
if (action.payload.target === 'onboarding') {
|
|
765
|
-
removeParsingFileId(draft, action.payload.fileId);
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
599
|
},
|
|
769
600
|
});
|
|
770
|
-
_a = onboardingCustomerView.actions, exports.fetchOnboardingCustomerView = _a.fetchOnboardingCustomerView, exports.fetchOnboardingCustomerSetupView = _a.fetchOnboardingCustomerSetupView, exports.fetchOnboardingCustomerSetupViewSuccess = _a.fetchOnboardingCustomerSetupViewSuccess, exports.fetchOnboardingCustomerSetupViewFailure = _a.fetchOnboardingCustomerSetupViewFailure, exports.updateOnboardingCustomerViewCompleteStatus = _a.updateOnboardingCustomerViewCompleteStatus, exports.updateOnboardingCustomerViewCompleteStatusSuccess = _a.updateOnboardingCustomerViewCompleteStatusSuccess, exports.updateOnboardingCustomerViewCompleteStatusFailure = _a.updateOnboardingCustomerViewCompleteStatusFailure, exports.
|
|
601
|
+
_a = onboardingCustomerView.actions, exports.fetchOnboardingCustomerView = _a.fetchOnboardingCustomerView, exports.fetchOnboardingCustomerSetupView = _a.fetchOnboardingCustomerSetupView, exports.fetchOnboardingCustomerSetupViewSuccess = _a.fetchOnboardingCustomerSetupViewSuccess, exports.fetchOnboardingCustomerSetupViewFailure = _a.fetchOnboardingCustomerSetupViewFailure, exports.updateOnboardingCustomerViewCompleteStatus = _a.updateOnboardingCustomerViewCompleteStatus, exports.updateOnboardingCustomerViewCompleteStatusSuccess = _a.updateOnboardingCustomerViewCompleteStatusSuccess, exports.updateOnboardingCustomerViewCompleteStatusFailure = _a.updateOnboardingCustomerViewCompleteStatusFailure, exports.updateOnboardingCustomerViewDashboardLoaded = _a.updateOnboardingCustomerViewDashboardLoaded, exports.updateOnboardingCustomerViewDashboardLoadedSuccess = _a.updateOnboardingCustomerViewDashboardLoadedSuccess, exports.updateOnboardingCustomerViewDashboardLoadedFailure = _a.updateOnboardingCustomerViewDashboardLoadedFailure, exports.updateOnboardingCustomerView = _a.updateOnboardingCustomerView, exports.updateOnboardingCustomerViewSuccess = _a.updateOnboardingCustomerViewSuccess, exports.updateOnboardingCustomerViewFailure = _a.updateOnboardingCustomerViewFailure, exports.updateOnboardingPaymentAccountStatus = _a.updateOnboardingPaymentAccountStatus, exports.updateOnboardingPaymentAccountStatusSuccess = _a.updateOnboardingPaymentAccountStatusSuccess, exports.updateOnboardingPaymentAccountStatusFailure = _a.updateOnboardingPaymentAccountStatusFailure, exports.updateOnboardingPaymentAccountLoginStatus = _a.updateOnboardingPaymentAccountLoginStatus, exports.updateOnboardingPaymentAccountLoginStatusSuccess = _a.updateOnboardingPaymentAccountLoginStatusSuccess, exports.updateOnboardingPaymentAccountLoginStatusFailure = _a.updateOnboardingPaymentAccountLoginStatusFailure, exports.establishOnboardingPlaidConnection = _a.establishOnboardingPlaidConnection, exports.establishOnboardingPlaidConnectionSuccess = _a.establishOnboardingPlaidConnectionSuccess, exports.establishOnboardingPlaidConnectionFailure = _a.establishOnboardingPlaidConnectionFailure, exports.getOnboardingPlaidLinkToken = _a.getOnboardingPlaidLinkToken, exports.getOnboardingPlaidLinkTokenSuccess = _a.getOnboardingPlaidLinkTokenSuccess, exports.getOnboardingPlaidLinkTokenFailure = _a.getOnboardingPlaidLinkTokenFailure, exports.updateCurrentStep = _a.updateCurrentStep, exports.updateOnboardingCustomerViewAccountDetails = _a.updateOnboardingCustomerViewAccountDetails, exports.updateOnboardingCustomerViewLocalStoreData = _a.updateOnboardingCustomerViewLocalStoreData, exports.saveOnboardingCustomerViewDataInLocalStore = _a.saveOnboardingCustomerViewDataInLocalStore, exports.saveOnboardingCompnayOfficerPhoneInLocalStore = _a.saveOnboardingCompnayOfficerPhoneInLocalStore, exports.updateOnboardingCustomerViewUIState = _a.updateOnboardingCustomerViewUIState, exports.sendOnboardingOfficerOtp = _a.sendOnboardingOfficerOtp, exports.sendOnboardingOfficerOtpSuccess = _a.sendOnboardingOfficerOtpSuccess, exports.sendOnboardingOfficerOtpFailure = _a.sendOnboardingOfficerOtpFailure, exports.resendOnboardingOfficerOtp = _a.resendOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtp = _a.verifyOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtpSuccess = _a.verifyOnboardingOfficerOtpSuccess, exports.verifyOnboardingOfficerOtpFailure = _a.verifyOnboardingOfficerOtpFailure, exports.clearOnboardingCustomerViewDataInLocalStore = _a.clearOnboardingCustomerViewDataInLocalStore, exports.clearOnboardingCustomerView = _a.clearOnboardingCustomerView;
|
|
771
602
|
exports.default = onboardingCustomerView.reducer;
|
|
@@ -15,7 +15,7 @@ import { CompanyView } from '../../companyView/types/companyView';
|
|
|
15
15
|
import { CompanyDetails, CompanyOfficersDetails } from '../../spendManagement/commonSetup/setupViewSelector';
|
|
16
16
|
import { CompanyOfficerLocalData } from '../../spendManagement/commonSetup/setupViewState';
|
|
17
17
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
18
|
-
import {
|
|
18
|
+
import { OnboardingCustomerViewUIState, OnboardingStep } from './onboardingCustomerViewState';
|
|
19
19
|
export interface OnboardingCustomerView {
|
|
20
20
|
allNationalityCountries: Country[];
|
|
21
21
|
allRequiredStepsCompleted: boolean;
|
|
@@ -28,7 +28,6 @@ export interface OnboardingCustomerView {
|
|
|
28
28
|
fetchStatus: FetchStateAndError;
|
|
29
29
|
halfCompletedSteps: OnboardingStep[];
|
|
30
30
|
isInterimEmailSent: boolean;
|
|
31
|
-
parsingDocumentFileIds: ID[];
|
|
32
31
|
paymentAccountFetchStatus: FetchStateAndError;
|
|
33
32
|
paymentAccountUpdateStatus: FetchStateAndError;
|
|
34
33
|
pendingSaveDetails: {
|
|
@@ -56,6 +55,3 @@ export declare const onboardingStepsData: (isValidConnection: boolean, productSe
|
|
|
56
55
|
};
|
|
57
56
|
export declare function isCompanyDetailsSavePending(fileState: FileState, company?: CompanyView, primaryContact?: User, companyDetailsLocalData?: CompanyDetails): boolean;
|
|
58
57
|
export declare const getProductSettingsString: (productSettings: TenantProductSettings | undefined) => string;
|
|
59
|
-
export declare const getAiAgentsActivationSubview: (state: RootState) => AiAgentsActivationSubview;
|
|
60
|
-
export declare const getAiAgentsActivationPhases: (state: RootState) => AiAgentsActivationPhase[];
|
|
61
|
-
export declare const getAiAgentsActivationCounts: (state: RootState) => AiAgentsActivationCounts;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getProductSettingsString = exports.onboardingStepsData = void 0;
|
|
4
4
|
exports.getOnboardingCustomerView = getOnboardingCustomerView;
|
|
5
5
|
exports.isOfficerDetailsCompleted = isOfficerDetailsCompleted;
|
|
6
6
|
exports.isCompanyDetailsSavePending = isCompanyDetailsSavePending;
|
|
@@ -17,7 +17,7 @@ const setupViewSelector_1 = require("../../spendManagement/commonSetup/setupView
|
|
|
17
17
|
const onboardingCustomerViewState_1 = require("./onboardingCustomerViewState");
|
|
18
18
|
function getOnboardingCustomerView(state, companyId) {
|
|
19
19
|
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, countryListState, addressViewState, } = state;
|
|
20
|
-
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails,
|
|
20
|
+
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
21
21
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
22
22
|
let subscriptionPaymentAccount;
|
|
23
23
|
let paymentAccount;
|
|
@@ -60,7 +60,6 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
60
60
|
companyDetails,
|
|
61
61
|
companyOfficerUpdateStatus,
|
|
62
62
|
primaryContactDetails,
|
|
63
|
-
parsingDocumentFileIds,
|
|
64
63
|
});
|
|
65
64
|
const companyAddress = addressViewState.newAddressState?.company_address;
|
|
66
65
|
if (companyAddress == null &&
|
|
@@ -126,7 +125,6 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
126
125
|
return {
|
|
127
126
|
companyDetailsLocalData,
|
|
128
127
|
companyOfficerLocalData,
|
|
129
|
-
parsingDocumentFileIds,
|
|
130
128
|
subscriptionBillingAddress: subscriptionBillingAddress?.addressToCreate,
|
|
131
129
|
companyView,
|
|
132
130
|
allNationalityCountries,
|
|
@@ -333,14 +331,3 @@ const getProductSettingsString = (productSettings) => {
|
|
|
333
331
|
.join(',');
|
|
334
332
|
};
|
|
335
333
|
exports.getProductSettingsString = getProductSettingsString;
|
|
336
|
-
const fromActivationView = (state) =>
|
|
337
|
-
// Fall back to the empty subview so state hydrated from an older persisted
|
|
338
|
-
// version (before aiAgentsActivation existed) doesn't crash on .phases/.counts.
|
|
339
|
-
state.onboardingCustomerViewState.aiAgentsActivation ??
|
|
340
|
-
onboardingCustomerViewState_1.emptyAiAgentsActivationSubview;
|
|
341
|
-
const getAiAgentsActivationSubview = (state) => fromActivationView(state);
|
|
342
|
-
exports.getAiAgentsActivationSubview = getAiAgentsActivationSubview;
|
|
343
|
-
const getAiAgentsActivationPhases = (state) => fromActivationView(state).phases;
|
|
344
|
-
exports.getAiAgentsActivationPhases = getAiAgentsActivationPhases;
|
|
345
|
-
const getAiAgentsActivationCounts = (state) => fromActivationView(state).counts;
|
|
346
|
-
exports.getAiAgentsActivationCounts = getAiAgentsActivationCounts;
|
|
@@ -21,32 +21,16 @@ export interface OnboardingCustomerViewUIState {
|
|
|
21
21
|
isQBOPopupOpen: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface OnboardingCustomerViewState extends FetchedState {
|
|
24
|
-
aiAgentsActivation: AiAgentsActivationSubview;
|
|
25
24
|
companyDetails: {
|
|
26
|
-
/**
|
|
27
|
-
* Field names from {@link CompanyDetailsLocalData} populated by AI autofill
|
|
28
|
-
* from an uploaded KYB document during onboarding. Drives the ✦ sparkle.
|
|
29
|
-
*/
|
|
30
|
-
autoFilledFields: string[];
|
|
31
25
|
localData?: CompanyDetailsLocalData;
|
|
32
26
|
};
|
|
33
27
|
companyOfficerUpdateStatus: Record<CompanyOfficerType, {
|
|
34
|
-
/**
|
|
35
|
-
* Field names from {@link CompanyOfficerLocalData} populated by AI autofill
|
|
36
|
-
* from an uploaded KYC identity document during onboarding.
|
|
37
|
-
*/
|
|
38
|
-
autoFilledFields: string[];
|
|
39
28
|
otpverificationStatus: FetchStateAndError;
|
|
40
29
|
sendOtpStatus: FetchStateAndError;
|
|
41
30
|
localData?: CompanyOfficerLocalData;
|
|
42
31
|
}>;
|
|
43
32
|
currentStep: OnboardingStep;
|
|
44
33
|
dashboardLoadedStatus: FetchStateAndError;
|
|
45
|
-
/**
|
|
46
|
-
* File IDs currently being parsed by the AI autofill epic for onboarding.
|
|
47
|
-
* Drives the "AI is reading your document" overlay on the upload field.
|
|
48
|
-
*/
|
|
49
|
-
parsingDocumentFileIds: ID[];
|
|
50
34
|
paymentAccountDetails: {
|
|
51
35
|
fetchStatus: FetchStateAndError;
|
|
52
36
|
paymentAccountIds: ID[];
|
|
@@ -60,29 +44,5 @@ export interface OnboardingCustomerViewState extends FetchedState {
|
|
|
60
44
|
subscriptionPaymentAccountIds: ID[];
|
|
61
45
|
uiState: OnboardingCustomerViewUIState;
|
|
62
46
|
updateStatus: FetchStateAndError;
|
|
63
|
-
aiActivationViewedAcknowledgementStatus?: FetchStateAndError;
|
|
64
|
-
aiFinanceTeamAcknowledgementStatus?: FetchStateAndError;
|
|
65
47
|
subscriptionBillingAddress?: Address;
|
|
66
48
|
}
|
|
67
|
-
export type AiAgentsActivationPhaseStatus = 'idle' | 'starting' | 'building' | 'ready';
|
|
68
|
-
export interface AiAgentsActivationPhase {
|
|
69
|
-
key: string;
|
|
70
|
-
status: AiAgentsActivationPhaseStatus;
|
|
71
|
-
completedAt?: string;
|
|
72
|
-
startedAt?: string;
|
|
73
|
-
}
|
|
74
|
-
export interface AiAgentsActivationCounts {
|
|
75
|
-
customerCount: number;
|
|
76
|
-
glAccountCount: number;
|
|
77
|
-
targetTransactionCount: number;
|
|
78
|
-
transactionCount: number;
|
|
79
|
-
vendorCount: number;
|
|
80
|
-
asOf?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface AiAgentsActivationSubview {
|
|
83
|
-
counts: AiAgentsActivationCounts;
|
|
84
|
-
fetchStatus: FetchStateAndError;
|
|
85
|
-
phases: AiAgentsActivationPhase[];
|
|
86
|
-
}
|
|
87
|
-
export declare const emptyAiAgentsActivationCounts: AiAgentsActivationCounts;
|
|
88
|
-
export declare const emptyAiAgentsActivationSubview: AiAgentsActivationSubview;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.toOnboardingStepType = exports.ALL_ONBOARDING_STEPS = exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = exports.ALL_ZENI_USER_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = exports.REQUIRED_ONBOARDING_STEPS = exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = [
|
|
6
6
|
'link_payment_account',
|
|
@@ -30,15 +30,3 @@ exports.ALL_ONBOARDING_STEPS = [
|
|
|
30
30
|
];
|
|
31
31
|
const toOnboardingStepType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ONBOARDING_STEPS);
|
|
32
32
|
exports.toOnboardingStepType = toOnboardingStepType;
|
|
33
|
-
exports.emptyAiAgentsActivationCounts = {
|
|
34
|
-
customerCount: 0,
|
|
35
|
-
glAccountCount: 0,
|
|
36
|
-
targetTransactionCount: 0,
|
|
37
|
-
transactionCount: 0,
|
|
38
|
-
vendorCount: 0,
|
|
39
|
-
};
|
|
40
|
-
exports.emptyAiAgentsActivationSubview = {
|
|
41
|
-
counts: exports.emptyAiAgentsActivationCounts,
|
|
42
|
-
fetchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
43
|
-
phases: [],
|
|
44
|
-
};
|