@zeniai/client-epic-state 4.19.77-betaML99 → 4.19.77-betaSS2
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/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/esm/epic.js +5 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +1 -0
- package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +113 -0
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +3 -0
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +18 -0
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +16 -0
- package/lib/esm/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.js +16 -0
- package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +23 -0
- package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +19 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.js +20 -1
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +64 -0
- package/lib/view/creditAgentView/creditAgentViewPayload.js +2 -0
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +11 -0
- package/lib/view/creditAgentView/creditAgentViewReducer.js +117 -0
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +17 -0
- package/lib/view/creditAgentView/creditAgentViewSelector.js +9 -0
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +58 -0
- package/lib/view/creditAgentView/creditAgentViewState.js +21 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +12 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +20 -0
- package/lib/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.d.ts +12 -0
- package/lib/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.js +20 -0
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +12 -0
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +27 -0
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +12 -0
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +23 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/package.json +54 -28
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
4
|
+
import { scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronFailure, scheduleTenantCreditScoreCronSuccess, } from '../creditAgentViewReducer';
|
|
5
|
+
export const scheduleTenantCreditScoreCronEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(scheduleTenantCreditScoreCron.match), switchMap((action) => {
|
|
6
|
+
const { tenantId } = action.payload;
|
|
7
|
+
const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/crons/cards/tenant-credit-score`;
|
|
8
|
+
const body = tenantId != null ? { tenant_id: tenantId } : {};
|
|
9
|
+
return zeniAPI
|
|
10
|
+
.postAndGetJSON(url, body)
|
|
11
|
+
.pipe(mergeMap((response) => {
|
|
12
|
+
if (isSuccessResponse(response)) {
|
|
13
|
+
return of(scheduleTenantCreditScoreCronSuccess());
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return of(scheduleTenantCreditScoreCronFailure(response.status));
|
|
17
|
+
}
|
|
18
|
+
}), catchError((error) => of(scheduleTenantCreditScoreCronFailure(createZeniAPIStatus('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
|
|
19
|
+
}));
|
package/lib/index.d.ts
CHANGED
|
@@ -867,3 +867,6 @@ export { TreasuryTransactionStatus } from './view/spendManagement/treasury/treas
|
|
|
867
867
|
export type { TransactionActivityLog } from './entity/transactionActivityLog/transactionActivityLogState';
|
|
868
868
|
export { fetchTransactionActivityLog } from './view/transactionActivityLogView/transactionActivityLogViewReducer';
|
|
869
869
|
export { TransactionActivityLogViewSelectorView, getTransactionActivityLogView, } from './view/transactionActivityLogView/transactionActivityLogViewSelector';
|
|
870
|
+
export { fetchTenantCreditScoreReport, updateTenantCreditScoreReport, updateTenantCreditScoreReportFailure, scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronSuccess, scheduleTenantCreditScoreCronFailure, resetScheduleCronState, fetchCreditAgentMacro, updateCreditAgentMacro, updateCreditAgentMacroFailure, saveCreditAgentMacro, saveCreditAgentMacroSuccess, saveCreditAgentMacroFailure, resetSaveMacroState, } from './view/creditAgentView/creditAgentViewReducer';
|
|
871
|
+
export { getCreditAgentReport, getCreditAgentMacro, getScheduleCronState, } from './view/creditAgentView/creditAgentViewSelector';
|
|
872
|
+
export type { TenantCreditScoreRow, CreditAgentMacro, CreditAgentViewState, } from './view/creditAgentView/creditAgentViewState';
|
package/lib/index.js
CHANGED
|
@@ -67,7 +67,7 @@ exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState
|
|
|
67
67
|
exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = 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.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = void 0;
|
|
68
68
|
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.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 = exports.toNotificationTabTypeStrict = void 0;
|
|
69
69
|
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.getAiCfoView = 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.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = void 0;
|
|
70
|
-
exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = 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 = void 0;
|
|
70
|
+
exports.getScheduleCronState = exports.getCreditAgentMacro = exports.getCreditAgentReport = exports.resetSaveMacroState = exports.saveCreditAgentMacroFailure = exports.saveCreditAgentMacroSuccess = exports.saveCreditAgentMacro = exports.updateCreditAgentMacroFailure = exports.updateCreditAgentMacro = exports.fetchCreditAgentMacro = exports.resetScheduleCronState = exports.scheduleTenantCreditScoreCronFailure = exports.scheduleTenantCreditScoreCronSuccess = exports.scheduleTenantCreditScoreCron = exports.updateTenantCreditScoreReportFailure = exports.updateTenantCreditScoreReport = exports.fetchTenantCreditScoreReport = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = 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 = void 0;
|
|
71
71
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
72
72
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
73
73
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -2063,3 +2063,22 @@ var transactionActivityLogViewReducer_1 = require("./view/transactionActivityLog
|
|
|
2063
2063
|
Object.defineProperty(exports, "fetchTransactionActivityLog", { enumerable: true, get: function () { return transactionActivityLogViewReducer_1.fetchTransactionActivityLog; } });
|
|
2064
2064
|
var transactionActivityLogViewSelector_1 = require("./view/transactionActivityLogView/transactionActivityLogViewSelector");
|
|
2065
2065
|
Object.defineProperty(exports, "getTransactionActivityLogView", { enumerable: true, get: function () { return transactionActivityLogViewSelector_1.getTransactionActivityLogView; } });
|
|
2066
|
+
var creditAgentViewReducer_1 = require("./view/creditAgentView/creditAgentViewReducer");
|
|
2067
|
+
Object.defineProperty(exports, "fetchTenantCreditScoreReport", { enumerable: true, get: function () { return creditAgentViewReducer_1.fetchTenantCreditScoreReport; } });
|
|
2068
|
+
Object.defineProperty(exports, "updateTenantCreditScoreReport", { enumerable: true, get: function () { return creditAgentViewReducer_1.updateTenantCreditScoreReport; } });
|
|
2069
|
+
Object.defineProperty(exports, "updateTenantCreditScoreReportFailure", { enumerable: true, get: function () { return creditAgentViewReducer_1.updateTenantCreditScoreReportFailure; } });
|
|
2070
|
+
Object.defineProperty(exports, "scheduleTenantCreditScoreCron", { enumerable: true, get: function () { return creditAgentViewReducer_1.scheduleTenantCreditScoreCron; } });
|
|
2071
|
+
Object.defineProperty(exports, "scheduleTenantCreditScoreCronSuccess", { enumerable: true, get: function () { return creditAgentViewReducer_1.scheduleTenantCreditScoreCronSuccess; } });
|
|
2072
|
+
Object.defineProperty(exports, "scheduleTenantCreditScoreCronFailure", { enumerable: true, get: function () { return creditAgentViewReducer_1.scheduleTenantCreditScoreCronFailure; } });
|
|
2073
|
+
Object.defineProperty(exports, "resetScheduleCronState", { enumerable: true, get: function () { return creditAgentViewReducer_1.resetScheduleCronState; } });
|
|
2074
|
+
Object.defineProperty(exports, "fetchCreditAgentMacro", { enumerable: true, get: function () { return creditAgentViewReducer_1.fetchCreditAgentMacro; } });
|
|
2075
|
+
Object.defineProperty(exports, "updateCreditAgentMacro", { enumerable: true, get: function () { return creditAgentViewReducer_1.updateCreditAgentMacro; } });
|
|
2076
|
+
Object.defineProperty(exports, "updateCreditAgentMacroFailure", { enumerable: true, get: function () { return creditAgentViewReducer_1.updateCreditAgentMacroFailure; } });
|
|
2077
|
+
Object.defineProperty(exports, "saveCreditAgentMacro", { enumerable: true, get: function () { return creditAgentViewReducer_1.saveCreditAgentMacro; } });
|
|
2078
|
+
Object.defineProperty(exports, "saveCreditAgentMacroSuccess", { enumerable: true, get: function () { return creditAgentViewReducer_1.saveCreditAgentMacroSuccess; } });
|
|
2079
|
+
Object.defineProperty(exports, "saveCreditAgentMacroFailure", { enumerable: true, get: function () { return creditAgentViewReducer_1.saveCreditAgentMacroFailure; } });
|
|
2080
|
+
Object.defineProperty(exports, "resetSaveMacroState", { enumerable: true, get: function () { return creditAgentViewReducer_1.resetSaveMacroState; } });
|
|
2081
|
+
var creditAgentViewSelector_1 = require("./view/creditAgentView/creditAgentViewSelector");
|
|
2082
|
+
Object.defineProperty(exports, "getCreditAgentReport", { enumerable: true, get: function () { return creditAgentViewSelector_1.getCreditAgentReport; } });
|
|
2083
|
+
Object.defineProperty(exports, "getCreditAgentMacro", { enumerable: true, get: function () { return creditAgentViewSelector_1.getCreditAgentMacro; } });
|
|
2084
|
+
Object.defineProperty(exports, "getScheduleCronState", { enumerable: true, get: function () { return creditAgentViewSelector_1.getScheduleCronState; } });
|
package/lib/reducer.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ import { AccountMappingState } from './view/accountMappingView/accountMappingSta
|
|
|
65
65
|
import { AddressViewState } from './view/addressView/addressViewState';
|
|
66
66
|
import { AggregatedReportViewState } from './view/aiAgentPerformance/aggregatedReportViewReducer';
|
|
67
67
|
import { AiCfoViewState } from './view/aiCfoView/aiCfoViewState';
|
|
68
|
+
import { CreditAgentViewState } from './view/creditAgentView/creditAgentViewState';
|
|
68
69
|
import { ApAgingDetailState } from './view/apAgingView/apAgingDetail/apAgingDetailState';
|
|
69
70
|
import { ApAgingState } from './view/apAgingView/apAgingReport/apAgingState';
|
|
70
71
|
import { ArAgingDetailState } from './view/arAgingView/arAgingDetail/arAgingDetailState';
|
|
@@ -320,6 +321,7 @@ type ViewsState = {
|
|
|
320
321
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
321
322
|
companyViewState: CompanyViewState;
|
|
322
323
|
countryListState: CountryListState;
|
|
324
|
+
creditAgentViewState: CreditAgentViewState;
|
|
323
325
|
dashboardLayoutState: DashboardLayoutState;
|
|
324
326
|
dashboardState: DashboardState;
|
|
325
327
|
depositAccountListState: DepositAccountListState;
|
|
@@ -470,6 +472,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
470
472
|
companyMonthEndReportViewState: CompanyMonthEndReportViewState;
|
|
471
473
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
472
474
|
companyViewState: CompanyViewState;
|
|
475
|
+
creditAgentViewState: CreditAgentViewState;
|
|
473
476
|
countryListState: CountryListState;
|
|
474
477
|
dashboardState: DashboardState;
|
|
475
478
|
dashboardLayoutState: DashboardLayoutState;
|
package/lib/reducer.js
CHANGED
|
@@ -105,6 +105,7 @@ const accountMappingReducer_1 = __importStar(require("./view/accountMappingView/
|
|
|
105
105
|
const addressViewReducer_1 = __importStar(require("./view/addressView/addressViewReducer"));
|
|
106
106
|
const aggregatedReportViewReducer_1 = __importStar(require("./view/aiAgentPerformance/aggregatedReportViewReducer"));
|
|
107
107
|
const aiCfoViewReducer_1 = __importStar(require("./view/aiCfoView/aiCfoViewReducer"));
|
|
108
|
+
const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
|
|
108
109
|
const apAgingDetailReducer_1 = __importStar(require("./view/apAgingView/apAgingDetail/apAgingDetailReducer"));
|
|
109
110
|
const apAgingReducer_1 = __importStar(require("./view/apAgingView/apAgingReport/apAgingReducer"));
|
|
110
111
|
const arAgingDetailReducer_1 = __importStar(require("./view/arAgingView/arAgingDetail/arAgingDetailReducer"));
|
|
@@ -362,6 +363,7 @@ const initialViewsState = {
|
|
|
362
363
|
companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.initialState,
|
|
363
364
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
|
|
364
365
|
companyViewState: companyViewReducer_1.initialState,
|
|
366
|
+
creditAgentViewState: creditAgentViewReducer_1.initialState,
|
|
365
367
|
countryListState: countryListReducer_1.initialState,
|
|
366
368
|
dashboardLayoutState: dashboardLayoutReducer_1.initialState,
|
|
367
369
|
dashboardState: dashboardReducer_1.initialState,
|
|
@@ -583,6 +585,7 @@ const viewReducers = {
|
|
|
583
585
|
companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.default,
|
|
584
586
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
|
|
585
587
|
companyViewState: companyViewReducer_1.default,
|
|
588
|
+
creditAgentViewState: creditAgentViewReducer_1.default,
|
|
586
589
|
countryListState: countryListReducer_1.default,
|
|
587
590
|
dashboardState: dashboardReducer_1.default,
|
|
588
591
|
dashboardLayoutState: dashboardLayoutReducer_1.default,
|