@zeniai/client-epic-state 5.0.31 → 5.0.32-betaRD2
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/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
- package/lib/esm/epic.js +2 -1
- package/lib/esm/index.js +4 -0
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/zeniOAuthView/epics/approveOAuthConsentEpic.js +60 -0
- package/lib/esm/view/zeniOAuthView/zeniOAuthParamsParser.js +41 -0
- package/lib/esm/view/zeniOAuthView/zeniOAuthReducer.js +49 -0
- package/lib/esm/view/zeniOAuthView/zeniOAuthSelector.js +3 -0
- package/lib/esm/view/zeniOAuthView/zeniOAuthState.js +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +16 -4
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/zeniOAuthView/epics/approveOAuthConsentEpic.d.ts +27 -0
- package/lib/view/zeniOAuthView/epics/approveOAuthConsentEpic.js +64 -0
- package/lib/view/zeniOAuthView/zeniOAuthParamsParser.d.ts +16 -0
- package/lib/view/zeniOAuthView/zeniOAuthParamsParser.js +44 -0
- package/lib/view/zeniOAuthView/zeniOAuthReducer.d.ts +29 -0
- package/lib/view/zeniOAuthView/zeniOAuthReducer.js +53 -0
- package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +5 -0
- package/lib/view/zeniOAuthView/zeniOAuthSelector.js +9 -0
- package/lib/view/zeniOAuthView/zeniOAuthState.d.ts +4 -0
- package/lib/view/zeniOAuthView/zeniOAuthState.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { from, of } from 'rxjs';
|
|
2
|
+
import { catchError, concatMap, filter, mergeMap, switchMap, } from 'rxjs/operators';
|
|
3
|
+
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { createZeniAPIStatus } from '../../../responsePayload';
|
|
5
|
+
import { approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuccess, } from '../zeniOAuthReducer';
|
|
6
|
+
const failureSnackbar = (reason) => openSnackbar({
|
|
7
|
+
messageSection: 'oauth_consent_approve',
|
|
8
|
+
messageText: 'failed',
|
|
9
|
+
type: 'error',
|
|
10
|
+
variables: [{ variableName: '__reason__', variableValue: reason }],
|
|
11
|
+
});
|
|
12
|
+
export const approveOAuthConsentEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(approveOAuthConsent.match), switchMap((action) => {
|
|
13
|
+
const { userId, zeniSessionId, tenantId, clientId, redirectUri, codeChallenge, codeChallengeMethod, state, responseType, } = action.payload;
|
|
14
|
+
const authHeaders = {
|
|
15
|
+
'zeni-user-id': userId,
|
|
16
|
+
'zeni-tenant-id': tenantId,
|
|
17
|
+
};
|
|
18
|
+
if (zeniSessionId != null) {
|
|
19
|
+
authHeaders['zeni-session-id'] = zeniSessionId;
|
|
20
|
+
}
|
|
21
|
+
return zeniAPI
|
|
22
|
+
.postJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/oauth/authorize/approve`, {
|
|
23
|
+
client_id: clientId,
|
|
24
|
+
redirect_uri: redirectUri,
|
|
25
|
+
code_challenge: codeChallenge,
|
|
26
|
+
code_challenge_method: codeChallengeMethod,
|
|
27
|
+
state,
|
|
28
|
+
response_type: responseType,
|
|
29
|
+
tenant_id: tenantId,
|
|
30
|
+
}, authHeaders)
|
|
31
|
+
.pipe(concatMap((response) => from(response.json()).pipe(mergeMap((responseJson) => {
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
const errBody = responseJson;
|
|
34
|
+
const errorMessage = errBody?.error ??
|
|
35
|
+
errBody?.message ??
|
|
36
|
+
errBody?.status?.message ??
|
|
37
|
+
`Authorization failed (${response.status})`;
|
|
38
|
+
return from([
|
|
39
|
+
approveOAuthConsentFailure(createZeniAPIStatus(errorMessage)),
|
|
40
|
+
failureSnackbar(errorMessage),
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
const body = responseJson;
|
|
44
|
+
const redirectUrl = body?.redirect_url ?? body?.data?.redirect_url;
|
|
45
|
+
if (redirectUrl == null || redirectUrl === '') {
|
|
46
|
+
const noRedirectMessage = 'No redirect URL returned from authorization server';
|
|
47
|
+
return from([
|
|
48
|
+
approveOAuthConsentFailure(createZeniAPIStatus(noRedirectMessage)),
|
|
49
|
+
failureSnackbar(noRedirectMessage),
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
return of(approveOAuthConsentSuccess({ redirectUrl }));
|
|
53
|
+
}))), catchError((error) => {
|
|
54
|
+
const networkErrorMessage = 'OAuth approve request failed: ' + JSON.stringify(error);
|
|
55
|
+
return from([
|
|
56
|
+
approveOAuthConsentFailure(createZeniAPIStatus(networkErrorMessage)),
|
|
57
|
+
failureSnackbar(networkErrorMessage),
|
|
58
|
+
]);
|
|
59
|
+
}));
|
|
60
|
+
}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export function parseOAuthParams(search) {
|
|
2
|
+
const searchParams = new URLSearchParams(search);
|
|
3
|
+
const clientId = searchParams.get('client_id');
|
|
4
|
+
const redirectUri = searchParams.get('redirect_uri');
|
|
5
|
+
const codeChallenge = searchParams.get('code_challenge');
|
|
6
|
+
const codeChallengeMethod = searchParams.get('code_challenge_method') ?? 'S256';
|
|
7
|
+
const state = searchParams.get('state');
|
|
8
|
+
const responseType = searchParams.get('response_type') ?? 'code';
|
|
9
|
+
if (clientId == null || clientId === '') {
|
|
10
|
+
return { params: null, error: 'Missing client_id parameter' };
|
|
11
|
+
}
|
|
12
|
+
if (redirectUri == null || redirectUri === '') {
|
|
13
|
+
return { params: null, error: 'Missing redirect_uri parameter' };
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
void new URL(redirectUri);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return { params: null, error: 'Invalid redirect_uri parameter' };
|
|
20
|
+
}
|
|
21
|
+
if (codeChallenge == null || codeChallenge === '') {
|
|
22
|
+
return {
|
|
23
|
+
params: null,
|
|
24
|
+
error: 'Missing code_challenge parameter (PKCE required)',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (state == null || state === '') {
|
|
28
|
+
return { params: null, error: 'Missing state parameter' };
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
params: {
|
|
32
|
+
clientId,
|
|
33
|
+
redirectUri,
|
|
34
|
+
codeChallenge,
|
|
35
|
+
codeChallengeMethod,
|
|
36
|
+
state,
|
|
37
|
+
responseType,
|
|
38
|
+
},
|
|
39
|
+
error: null,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
export const initialState = {
|
|
3
|
+
fetchState: 'Not-Started',
|
|
4
|
+
error: undefined,
|
|
5
|
+
approveRedirectUrl: undefined,
|
|
6
|
+
};
|
|
7
|
+
const zeniOAuthView = createSlice({
|
|
8
|
+
name: 'zeniOAuthView',
|
|
9
|
+
initialState,
|
|
10
|
+
reducers: {
|
|
11
|
+
approveOAuthConsent: {
|
|
12
|
+
prepare(userId, zeniSessionId, tenantId, clientId, redirectUri, codeChallenge, codeChallengeMethod, state, responseType) {
|
|
13
|
+
return {
|
|
14
|
+
payload: {
|
|
15
|
+
userId,
|
|
16
|
+
zeniSessionId,
|
|
17
|
+
tenantId,
|
|
18
|
+
clientId,
|
|
19
|
+
redirectUri,
|
|
20
|
+
codeChallenge,
|
|
21
|
+
codeChallengeMethod,
|
|
22
|
+
state,
|
|
23
|
+
responseType,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
reducer(draft) {
|
|
28
|
+
draft.fetchState = 'In-Progress';
|
|
29
|
+
draft.error = undefined;
|
|
30
|
+
draft.approveRedirectUrl = undefined;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
approveOAuthConsentSuccess(draft, action) {
|
|
34
|
+
draft.fetchState = 'Completed';
|
|
35
|
+
draft.error = undefined;
|
|
36
|
+
draft.approveRedirectUrl = action.payload.redirectUrl;
|
|
37
|
+
},
|
|
38
|
+
approveOAuthConsentFailure(draft, action) {
|
|
39
|
+
draft.fetchState = 'Error';
|
|
40
|
+
draft.error = action.payload;
|
|
41
|
+
draft.approveRedirectUrl = undefined;
|
|
42
|
+
},
|
|
43
|
+
clearZeniOAuthView() {
|
|
44
|
+
return initialState;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const { approveOAuthConsent, approveOAuthConsentSuccess, approveOAuthConsentFailure, clearZeniOAuthView, } = zeniOAuthView.actions;
|
|
49
|
+
export default zeniOAuthView.reducer;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const getZeniOAuthApproveFetchState = (state) => state.zeniOAuthViewState.fetchState;
|
|
2
|
+
export const getZeniOAuthApproveRedirectUrl = (state) => state.zeniOAuthViewState.approveRedirectUrl;
|
|
3
|
+
export const getZeniOAuthApproveError = (state) => state.zeniOAuthViewState.error?.message ?? null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -611,6 +611,10 @@ import { ZeniAccStatementsSelectorView, getZeniAccStatements } from './view/zeni
|
|
|
611
611
|
import { fetchZeniAccountsPromoCard } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
|
|
612
612
|
import { ZeniAccountsPromoCardReport, getZeniAccountsPromoCard } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector';
|
|
613
613
|
import { ZeniAccountsPromoCardState } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardState';
|
|
614
|
+
import { ApproveOAuthConsentPayload, approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuccess, clearZeniOAuthView } from './view/zeniOAuthView/zeniOAuthReducer';
|
|
615
|
+
import { OAuthParams, ParseOAuthParamsResult, parseOAuthParams } from './view/zeniOAuthView/zeniOAuthParamsParser';
|
|
616
|
+
import { getZeniOAuthApproveError, getZeniOAuthApproveFetchState, getZeniOAuthApproveRedirectUrl } from './view/zeniOAuthView/zeniOAuthSelector';
|
|
617
|
+
import { ZeniOAuthViewState } from './view/zeniOAuthView/zeniOAuthState';
|
|
614
618
|
import { RESTAPIEndpoints } from './zeniAPI';
|
|
615
619
|
import { Dayjs, ZeniDate, date, dateFromYearMonthDate, dateInLocal, dateLocal, dateNow, getBusinessDayOfDate, getLocalTimezone, getMinDate, getMonthIndex, setLocalTimezone, updateZeniDateLocaleID } from './zeniDayJS';
|
|
616
620
|
import { ZeniUrl, toZeniUrl, toZeniUrlWithoutBaseURL } from './zeniUrl';
|
|
@@ -856,6 +860,7 @@ export { CardPayment, CardPaymentViewState, SetupIntentData, CardPaymentSelector
|
|
|
856
860
|
export { getAuditReportGroupViewSelectorView, getAuditRuleGroupViewSelectorView, getUserFromAllUsers, AuditReportGroupSelectorView, AuditReportGroupViewSelectorView, AuditRuleGroupViewSelectorView, fetchAuditRuleGroupView, fetchAuditReportGroupView, saveReasonForAuditRule, AuditRuleGroup, AuditRuleGroupReport, AuditReportRule, AuditRuleEntityType, AuditRuleEntityIdType, AuditRuleBypassReason, clearAuditReportGroupViewByCompanyId, };
|
|
857
861
|
export { AuthenticationFeatureType, AuthenticationDetails, AuthenticationViewState, fetchCollaborationAuthToken, getAuthenticationView, };
|
|
858
862
|
export { ZeniAccountsPromoCardState, getZeniAccountsPromoCard, ZeniAccountsPromoCardReport, fetchZeniAccountsPromoCard, };
|
|
863
|
+
export { ApproveOAuthConsentPayload, OAuthParams, ParseOAuthParamsResult, ZeniOAuthViewState, approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuccess, clearZeniOAuthView, getZeniOAuthApproveError, getZeniOAuthApproveFetchState, getZeniOAuthApproveRedirectUrl, parseOAuthParams, };
|
|
859
864
|
export { ExternalNotificationData, NotificationGroup, NotificationActivityType, NotificationIdentifierType, NotificationUpdateValue, NotificationMode, NotificationStatus, Notification, NotificationWithAuthors, NotificationMetaData, NotificationEventData, NotificationActivity, NotificationUpdates, NotificationValueFormat, toNotificationModeStrict, updateCommentsNotifications, updateCommentsNotificationsStatuses, };
|
|
860
865
|
export { NotificationView, NotificationViewUIState, NotificationTabState, NotificationTabType, NotificationSubTabType, toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, fetchNotificationView, fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, updateNotificationViewAllNotificationsStatus, updateNotificationViewNotificationStatus, updateNotificationViewTabState, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewSubTab, updateNotificationViewUIState, getNotificationView, getExternalNotificationsForSelectedSubTab, getNotificationsForSelectedSubTab, };
|
|
861
866
|
export { pushToastNotification, ToastNotification, ToastNotificationPayload, getLastNotificationTime, getNotifications, };
|
package/lib/index.js
CHANGED
|
@@ -66,10 +66,11 @@ exports.toTimeSeriesDuration = exports.convertToTimeSeriesSelectionRange = expor
|
|
|
66
66
|
exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.clearSelectedJELinkRowIndex = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateExpenseAutomationJESchedulesUIState = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeJeAccountSettingsView = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.clearExpenseAutomationJEScheduleLocalData = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.aggregatedReportView = exports.fetchAggregatedReport = void 0;
|
|
67
67
|
exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = 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 = void 0;
|
|
68
68
|
exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = 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 = void 0;
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
69
|
+
exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = 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 = void 0;
|
|
70
|
+
exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = exports.toRecurringFrequency = exports.getRecurringEndDateFromCount = 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.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = void 0;
|
|
71
|
+
exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = 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.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = void 0;
|
|
72
|
+
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.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = 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.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = void 0;
|
|
73
|
+
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 = void 0;
|
|
73
74
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
74
75
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
75
76
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -2047,6 +2048,17 @@ const zeniAccountsPromoCardReducer_1 = require("./view/zeniAccountsPromoCard/zen
|
|
|
2047
2048
|
Object.defineProperty(exports, "fetchZeniAccountsPromoCard", { enumerable: true, get: function () { return zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard; } });
|
|
2048
2049
|
const zeniAccountsPromoCardSelector_1 = require("./view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector");
|
|
2049
2050
|
Object.defineProperty(exports, "getZeniAccountsPromoCard", { enumerable: true, get: function () { return zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard; } });
|
|
2051
|
+
const zeniOAuthReducer_1 = require("./view/zeniOAuthView/zeniOAuthReducer");
|
|
2052
|
+
Object.defineProperty(exports, "approveOAuthConsent", { enumerable: true, get: function () { return zeniOAuthReducer_1.approveOAuthConsent; } });
|
|
2053
|
+
Object.defineProperty(exports, "approveOAuthConsentFailure", { enumerable: true, get: function () { return zeniOAuthReducer_1.approveOAuthConsentFailure; } });
|
|
2054
|
+
Object.defineProperty(exports, "approveOAuthConsentSuccess", { enumerable: true, get: function () { return zeniOAuthReducer_1.approveOAuthConsentSuccess; } });
|
|
2055
|
+
Object.defineProperty(exports, "clearZeniOAuthView", { enumerable: true, get: function () { return zeniOAuthReducer_1.clearZeniOAuthView; } });
|
|
2056
|
+
const zeniOAuthParamsParser_1 = require("./view/zeniOAuthView/zeniOAuthParamsParser");
|
|
2057
|
+
Object.defineProperty(exports, "parseOAuthParams", { enumerable: true, get: function () { return zeniOAuthParamsParser_1.parseOAuthParams; } });
|
|
2058
|
+
const zeniOAuthSelector_1 = require("./view/zeniOAuthView/zeniOAuthSelector");
|
|
2059
|
+
Object.defineProperty(exports, "getZeniOAuthApproveError", { enumerable: true, get: function () { return zeniOAuthSelector_1.getZeniOAuthApproveError; } });
|
|
2060
|
+
Object.defineProperty(exports, "getZeniOAuthApproveFetchState", { enumerable: true, get: function () { return zeniOAuthSelector_1.getZeniOAuthApproveFetchState; } });
|
|
2061
|
+
Object.defineProperty(exports, "getZeniOAuthApproveRedirectUrl", { enumerable: true, get: function () { return zeniOAuthSelector_1.getZeniOAuthApproveRedirectUrl; } });
|
|
2050
2062
|
const zeniDayJS_1 = require("./zeniDayJS");
|
|
2051
2063
|
Object.defineProperty(exports, "Dayjs", { enumerable: true, get: function () { return zeniDayJS_1.Dayjs; } });
|
|
2052
2064
|
Object.defineProperty(exports, "zeniDate", { enumerable: true, get: function () { return zeniDayJS_1.date; } });
|
package/lib/reducer.d.ts
CHANGED
|
@@ -217,6 +217,7 @@ import { VendorTabViewState } from './view/vendorTabView/vendorTabViewState';
|
|
|
217
217
|
import { VendorTypeListState } from './view/vendorTypeList/vendorTypeListState';
|
|
218
218
|
import { ZeniAccStatementListState } from './view/zeniAccStatementList/zeniAccStatementList';
|
|
219
219
|
import { ZeniAccountsPromoCardState } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardState';
|
|
220
|
+
import { ZeniOAuthViewState } from './view/zeniOAuthView/zeniOAuthState';
|
|
220
221
|
type EntitiesState = {
|
|
221
222
|
accountGroupState: AccountGroupState;
|
|
222
223
|
accountingSummaryState: AccountingSummaryState;
|
|
@@ -440,6 +441,7 @@ type ViewsState = {
|
|
|
440
441
|
zeniAccountSetupViewState: ZeniAccountSetupViewState;
|
|
441
442
|
zeniAccountsPromoCardState: ZeniAccountsPromoCardState;
|
|
442
443
|
zeniAccStatementListState: ZeniAccStatementListState;
|
|
444
|
+
zeniOAuthViewState: ZeniOAuthViewState;
|
|
443
445
|
};
|
|
444
446
|
export type RootState = EntitiesState & ViewsState;
|
|
445
447
|
export declare const initialRootState: RootState;
|
|
@@ -597,6 +599,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
597
599
|
zeniAccountSetupViewState: ZeniAccountSetupViewState;
|
|
598
600
|
zeniAccStatementListState: ZeniAccStatementListState;
|
|
599
601
|
zeniAccountsPromoCardState: ZeniAccountsPromoCardState;
|
|
602
|
+
zeniOAuthViewState: ZeniOAuthViewState;
|
|
600
603
|
accountGroupState: AccountGroupState;
|
|
601
604
|
accountReconState: AccountReconState;
|
|
602
605
|
accountingSummaryState: AccountingSummaryState;
|
package/lib/reducer.js
CHANGED
|
@@ -258,6 +258,7 @@ const vendorTabViewReducer_1 = __importStar(require("./view/vendorTabView/vendor
|
|
|
258
258
|
const vendorTypeListReducer_1 = __importStar(require("./view/vendorTypeList/vendorTypeListReducer"));
|
|
259
259
|
const zeniAccStatementListReducer_1 = __importStar(require("./view/zeniAccStatementList/zeniAccStatementListReducer"));
|
|
260
260
|
const zeniAccountsPromoCardReducer_1 = __importStar(require("./view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer"));
|
|
261
|
+
const zeniOAuthReducer_1 = __importStar(require("./view/zeniOAuthView/zeniOAuthReducer"));
|
|
261
262
|
// Note: Please maintain strict alphabetical order
|
|
262
263
|
const initialEntitiesState = {
|
|
263
264
|
accountGroupState: accountGroupReducer_1.initialState,
|
|
@@ -483,6 +484,7 @@ const initialViewsState = {
|
|
|
483
484
|
zeniAccountSetupViewState: zeniAccountSetupViewReducer_1.initialState,
|
|
484
485
|
zeniAccStatementListState: zeniAccStatementListReducer_1.initialState,
|
|
485
486
|
zeniAccountsPromoCardState: zeniAccountsPromoCardReducer_1.initialState,
|
|
487
|
+
zeniOAuthViewState: zeniOAuthReducer_1.initialState,
|
|
486
488
|
};
|
|
487
489
|
exports.initialRootState = {
|
|
488
490
|
...initialEntitiesState,
|
|
@@ -714,6 +716,7 @@ const viewReducers = {
|
|
|
714
716
|
zeniAccountSetupViewState: zeniAccountSetupViewReducer_1.default,
|
|
715
717
|
zeniAccStatementListState: zeniAccStatementListReducer_1.default,
|
|
716
718
|
zeniAccountsPromoCardState: zeniAccountsPromoCardReducer_1.default,
|
|
719
|
+
zeniOAuthViewState: zeniOAuthReducer_1.default,
|
|
717
720
|
};
|
|
718
721
|
const reducers = (0, redux_1.combineReducers)({
|
|
719
722
|
...entityReducers,
|