@zeniai/client-epic-state 4.19.77-betaSS2 → 4.19.77-betaSS3

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.
Files changed (42) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +35 -0
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  3. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -1
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +13 -0
  6. package/lib/epic.d.ts +1 -5
  7. package/lib/epic.js +1 -5
  8. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  9. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  10. package/lib/esm/epic.js +1 -5
  11. package/lib/esm/index.js +0 -2
  12. package/lib/esm/reducer.js +0 -3
  13. package/lib/index.d.ts +2 -4
  14. package/lib/index.js +1 -20
  15. package/lib/reducer.d.ts +0 -3
  16. package/lib/reducer.js +0 -3
  17. package/package.json +28 -54
  18. package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +0 -1
  19. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +0 -113
  20. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -3
  21. package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -18
  22. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -16
  23. package/lib/esm/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.js +0 -16
  24. package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -23
  25. package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -19
  26. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  27. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -64
  28. package/lib/view/creditAgentView/creditAgentViewPayload.js +0 -2
  29. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +0 -11
  30. package/lib/view/creditAgentView/creditAgentViewReducer.js +0 -117
  31. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -17
  32. package/lib/view/creditAgentView/creditAgentViewSelector.js +0 -9
  33. package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -58
  34. package/lib/view/creditAgentView/creditAgentViewState.js +0 -21
  35. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +0 -12
  36. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -20
  37. package/lib/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.d.ts +0 -12
  38. package/lib/view/creditAgentView/epics/fetchTenantCreditScoreReportEpic.js +0 -20
  39. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +0 -12
  40. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -27
  41. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +0 -12
  42. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -23
package/lib/esm/index.js CHANGED
@@ -607,5 +607,3 @@ export { fetchTreasuryTaxLetterList } from './view/spendManagement/treasury/trea
607
607
  export { getTreasuryTaxLetters, } from './view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListSelector';
608
608
  export { fetchTransactionActivityLog } from './view/transactionActivityLogView/transactionActivityLogViewReducer';
609
609
  export { getTransactionActivityLogView, } from './view/transactionActivityLogView/transactionActivityLogViewSelector';
610
- export { fetchTenantCreditScoreReport, updateTenantCreditScoreReport, updateTenantCreditScoreReportFailure, scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronSuccess, scheduleTenantCreditScoreCronFailure, resetScheduleCronState, fetchCreditAgentMacro, updateCreditAgentMacro, updateCreditAgentMacroFailure, saveCreditAgentMacro, saveCreditAgentMacroSuccess, saveCreditAgentMacroFailure, resetSaveMacroState, } from './view/creditAgentView/creditAgentViewReducer';
611
- export { getCreditAgentReport, getCreditAgentMacro, getScheduleCronState, } from './view/creditAgentView/creditAgentViewSelector';
@@ -66,7 +66,6 @@ import accountMapping, { initialState as initialAccountMappingState, } from './v
66
66
  import addressView, { initialState as initialAddressViewState, } from './view/addressView/addressViewReducer';
67
67
  import aggregatedReport, { initialState as initialAggregatedReportViewState, } from './view/aiAgentPerformance/aggregatedReportViewReducer';
68
68
  import aiCfoView, { initialAiCfoViewState, } from './view/aiCfoView/aiCfoViewReducer';
69
- import creditAgentView, { initialState as initialCreditAgentViewState, } from './view/creditAgentView/creditAgentViewReducer';
70
69
  import apAgingDetail, { initialState as initialApAgingDetailState, } from './view/apAgingView/apAgingDetail/apAgingDetailReducer';
71
70
  import apAging, { initialState as initialApAgingState, } from './view/apAgingView/apAgingReport/apAgingReducer';
72
71
  import arAgingDetail, { initialState as initialArAgingDetailState, } from './view/arAgingView/arAgingDetail/arAgingDetailReducer';
@@ -324,7 +323,6 @@ const initialViewsState = {
324
323
  companyMonthEndReportViewState: initialCompanyMonthEndReportViewState,
325
324
  companyTaskManagerViewState: initialCompanyTaskManagerViewState,
326
325
  companyViewState: initialCompanyViewState,
327
- creditAgentViewState: initialCreditAgentViewState,
328
326
  countryListState: initialCountryListState,
329
327
  dashboardLayoutState: initialDashboardLayoutState,
330
328
  dashboardState: initialDashboardState,
@@ -546,7 +544,6 @@ const viewReducers = {
546
544
  companyMonthEndReportViewState: companyMonthEndReportView,
547
545
  companyTaskManagerViewState: companyTaskManagerView,
548
546
  companyViewState: companyView,
549
- creditAgentViewState: creditAgentView,
550
547
  countryListState: countryList,
551
548
  dashboardState: dashboard,
552
549
  dashboardLayoutState: dashboardLayout,
package/lib/index.d.ts CHANGED
@@ -91,6 +91,7 @@ import { TrendChangeType } from './entity/insights/insightPayload';
91
91
  import { Insight } from './entity/insights/insightState';
92
92
  import { InsightSummary } from './entity/insights/insightSummary';
93
93
  import { JEAccruedSchedule, JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
94
+ import { JEScheduleAIRecommendations, JEScheduleFieldRecommendation } from './entity/jeSchedules/jeSchedulesState';
94
95
  import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
95
96
  import { Merchant } from './entity/merchant/merchant';
96
97
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthCloseCheckMetrics, MonthEndAuditSummary, MonthEndCloseCheck, MonthEndCloseCheckFrequency } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
@@ -823,7 +824,7 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
823
824
  export { LinkBillExpenseKey };
824
825
  export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
825
826
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
826
- export { JEScheduleKey, JEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
827
+ export { JEScheduleKey, JEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, JEScheduleAIRecommendations, JEScheduleFieldRecommendation, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
827
828
  export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
828
829
  export { ReviewStatus, VendorTransactionAttachment, VendorTransactionAttachmentPayload, VendorFirstReviewViewSelectorView, VendorFirstReviewViewLocalData, VendorFirstReviewSelectorView, VendorFirstReviewSelectorAttachmentView, VendorFirstReviewViewUIState, VendorFirstReviewViewColumnKey, GlobalMerchantAutoCompleteView, VendorReviewRowCurrentSelection, toVendorFirstReviewViewColumnKeyType, RecommendedNonExistingGlobalMerchant, getGlobalMerchantAutoCompleteResults, VendorReviewRecommendationViewState, GlobalMerchantType, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, GlobalVendorReviewRowCurrentSelection, FirstReviewPageCurrentSelectionByColumn, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, FirstReviewVendorDetailSelectorView, VendorViewLocalData, };
829
830
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, GlobalMerchantViewSelectorView, GlobalMerchantViewState, NewGlobalMerchantData, NewGlobalMerchantCurrentSelection, };
@@ -867,6 +868,3 @@ export { TreasuryTransactionStatus } from './view/spendManagement/treasury/treas
867
868
  export type { TransactionActivityLog } from './entity/transactionActivityLog/transactionActivityLogState';
868
869
  export { fetchTransactionActivityLog } from './view/transactionActivityLogView/transactionActivityLogViewReducer';
869
870
  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.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;
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;
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,22 +2063,3 @@ 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,7 +65,6 @@ 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';
69
68
  import { ApAgingDetailState } from './view/apAgingView/apAgingDetail/apAgingDetailState';
70
69
  import { ApAgingState } from './view/apAgingView/apAgingReport/apAgingState';
71
70
  import { ArAgingDetailState } from './view/arAgingView/arAgingDetail/arAgingDetailState';
@@ -321,7 +320,6 @@ type ViewsState = {
321
320
  companyTaskManagerViewState: CompanyTaskManagerViewState;
322
321
  companyViewState: CompanyViewState;
323
322
  countryListState: CountryListState;
324
- creditAgentViewState: CreditAgentViewState;
325
323
  dashboardLayoutState: DashboardLayoutState;
326
324
  dashboardState: DashboardState;
327
325
  depositAccountListState: DepositAccountListState;
@@ -472,7 +470,6 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
472
470
  companyMonthEndReportViewState: CompanyMonthEndReportViewState;
473
471
  companyTaskManagerViewState: CompanyTaskManagerViewState;
474
472
  companyViewState: CompanyViewState;
475
- creditAgentViewState: CreditAgentViewState;
476
473
  countryListState: CountryListState;
477
474
  dashboardState: DashboardState;
478
475
  dashboardLayoutState: DashboardLayoutState;
package/lib/reducer.js CHANGED
@@ -105,7 +105,6 @@ 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"));
109
108
  const apAgingDetailReducer_1 = __importStar(require("./view/apAgingView/apAgingDetail/apAgingDetailReducer"));
110
109
  const apAgingReducer_1 = __importStar(require("./view/apAgingView/apAgingReport/apAgingReducer"));
111
110
  const arAgingDetailReducer_1 = __importStar(require("./view/arAgingView/arAgingDetail/arAgingDetailReducer"));
@@ -363,7 +362,6 @@ const initialViewsState = {
363
362
  companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.initialState,
364
363
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
365
364
  companyViewState: companyViewReducer_1.initialState,
366
- creditAgentViewState: creditAgentViewReducer_1.initialState,
367
365
  countryListState: countryListReducer_1.initialState,
368
366
  dashboardLayoutState: dashboardLayoutReducer_1.initialState,
369
367
  dashboardState: dashboardReducer_1.initialState,
@@ -585,7 +583,6 @@ const viewReducers = {
585
583
  companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.default,
586
584
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
587
585
  companyViewState: companyViewReducer_1.default,
588
- creditAgentViewState: creditAgentViewReducer_1.default,
589
586
  countryListState: countryListReducer_1.default,
590
587
  dashboardState: dashboardReducer_1.default,
591
588
  dashboardLayoutState: dashboardLayoutReducer_1.default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.77-betaSS2",
3
+ "version": "4.19.77-betaSS3",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -33,34 +33,6 @@
33
33
  "require": "./lib/view/*.js"
34
34
  }
35
35
  },
36
- "scripts": {
37
- "clean": "rimraf lib",
38
- "test:typecheck": "echo 'Typechecking test files...' && time tsc -p tsconfig.typecheck.json",
39
- "test": "pnpm test:typecheck && vitest run --typecheck",
40
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
41
- "find-dead-code": "ts-prune | grep -v '(used in module)'",
42
- "find-unused-exports": "ts-unused-exports ./tsconfig.json",
43
- "circular-dependency": "npx madge --circular --extensions ts ./src",
44
- "build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint...' && eslint . --ext .js,.jsx,.ts,.tsx\" \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
45
- "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
46
- "only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
47
- "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
48
- "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
49
- "check-version": "node ./scripts/check_version.js",
50
- "prepublishOnly": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm run check-version && pnpm clean && pnpm build",
51
- "version": "git add -A src",
52
- "postversion": "git push && git push --tags",
53
- "check-dependencies": "node ./scripts/check_dependencies.js",
54
- "clean-overrides": "node ./scripts/clean_overrides.js",
55
- "create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
56
- "bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
57
- "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
58
- "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
59
- "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
60
- "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
61
- "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
62
- "test:file": "scripts/test-file.sh"
63
- },
64
36
  "files": [
65
37
  "lib/**/*"
66
38
  ],
@@ -131,29 +103,31 @@
131
103
  "dayjs": "^1.10.7",
132
104
  "url-parse": "^1.5.10"
133
105
  },
134
- "pnpm": {
135
- "overrides": {
136
- "@babel/helpers": ">=7.26.10",
137
- "@babel/runtime": ">=7.26.10",
138
- "@babel/traverse": ">=7.23.2",
139
- "@eslint/eslintrc>ajv": ">=6.14.0 <7",
140
- "@eslint/plugin-kit": ">=0.3.4",
141
- "@modelcontextprotocol/sdk": ">=1.25.2",
142
- "ajv": ">=8.18.0",
143
- "body-parser": ">=2.2.1",
144
- "brace-expansion": ">=5.0.2",
145
- "cross-spawn": ">=7.0.5",
146
- "eslint>ajv": ">=6.14.0 <7",
147
- "flatted": ">=3.4.0",
148
- "glob": ">=11.1.0",
149
- "hono": ">=4.11.4",
150
- "immutable": ">=4.3.8 <5",
151
- "js-yaml": ">=4.1.1",
152
- "minimatch": ">=10.2.3",
153
- "qs": "^6.14.1",
154
- "rollup": ">=4.59.0",
155
- "tough-cookie": "=4.1.3",
156
- "vite": "^7.1.12"
157
- }
106
+ "scripts": {
107
+ "clean": "rimraf lib",
108
+ "test:typecheck": "echo 'Typechecking test files...' && time tsc -p tsconfig.typecheck.json",
109
+ "test": "pnpm test:typecheck && vitest run --typecheck",
110
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
111
+ "find-dead-code": "ts-prune | grep -v '(used in module)'",
112
+ "find-unused-exports": "ts-unused-exports ./tsconfig.json",
113
+ "circular-dependency": "npx madge --circular --extensions ts ./src",
114
+ "build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint...' && eslint . --ext .js,.jsx,.ts,.tsx\" \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
115
+ "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
116
+ "only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
117
+ "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
118
+ "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
119
+ "check-version": "node ./scripts/check_version.js",
120
+ "version": "git add -A src",
121
+ "postversion": "git push && git push --tags",
122
+ "check-dependencies": "node ./scripts/check_dependencies.js",
123
+ "clean-overrides": "node ./scripts/clean_overrides.js",
124
+ "create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
125
+ "bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
126
+ "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
127
+ "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
128
+ "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
129
+ "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
130
+ "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
131
+ "test:file": "scripts/test-file.sh"
158
132
  }
159
- }
133
+ }
@@ -1,113 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- import { initialCreditAgentViewState, } from './creditAgentViewState';
3
- const creditAgentView = createSlice({
4
- name: 'creditAgentView',
5
- initialState: initialCreditAgentViewState,
6
- reducers: {
7
- fetchTenantCreditScoreReport(draft) {
8
- draft.report.fetchState = 'In-Progress';
9
- draft.report.error = undefined;
10
- },
11
- updateTenantCreditScoreReport(draft, action) {
12
- draft.report.fetchState = 'Completed';
13
- draft.report.error = undefined;
14
- draft.report.rows = action.payload.report.map((row) => ({
15
- customerName: row.customer_name,
16
- totalCashBalance: row.total_cash_balance,
17
- totalCardBalance: row.total_card_balance,
18
- cards: row.cards,
19
- controllerName: row.controller_name,
20
- period: row.period,
21
- runway: row.runway,
22
- burnRateMonthly: row.burn_rate_monthly,
23
- healthMonitorScore: row.health_monitor_score,
24
- creditScore: row.credit_score,
25
- confidence: row.confidence,
26
- creditAmount: row.credit_amount,
27
- creditLimit: row.credit_limit,
28
- conservativeLimitRationale: row.conservative_limit_rationale,
29
- liberalCreditLimit: row.liberal_credit_limit,
30
- liberalLimitRationale: row.liberal_limit_rationale,
31
- pros: row.pros,
32
- cons: row.cons,
33
- reasoning: row.reasoning,
34
- goingConcernAnalysis: row.going_concern_analysis,
35
- keyRatios: row.key_ratios,
36
- runDate: row.run_date,
37
- status: row.status,
38
- }));
39
- draft.report.count = action.payload.count;
40
- },
41
- updateTenantCreditScoreReportFailure(draft, action) {
42
- draft.report.fetchState = 'Error';
43
- draft.report.error = action.payload;
44
- },
45
- scheduleTenantCreditScoreCron(draft,
46
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
47
- _action) {
48
- draft.scheduleCron.fetchState = 'In-Progress';
49
- draft.scheduleCron.error = undefined;
50
- },
51
- scheduleTenantCreditScoreCronSuccess(draft) {
52
- draft.scheduleCron.fetchState = 'Completed';
53
- draft.scheduleCron.error = undefined;
54
- },
55
- scheduleTenantCreditScoreCronFailure(draft, action) {
56
- draft.scheduleCron.fetchState = 'Error';
57
- draft.scheduleCron.error = action.payload;
58
- },
59
- resetScheduleCronState(draft) {
60
- draft.scheduleCron.fetchState = 'Not-Started';
61
- draft.scheduleCron.error = undefined;
62
- },
63
- fetchCreditAgentMacro(draft) {
64
- draft.macro.fetchState = 'In-Progress';
65
- draft.macro.error = undefined;
66
- },
67
- updateCreditAgentMacro(draft, action) {
68
- draft.macro.fetchState = 'Completed';
69
- draft.macro.error = undefined;
70
- draft.macro.data = mapMacroPayload(action.payload);
71
- },
72
- updateCreditAgentMacroFailure(draft, action) {
73
- draft.macro.fetchState = 'Error';
74
- draft.macro.error = action.payload;
75
- },
76
- saveCreditAgentMacro(draft,
77
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
78
- _action) {
79
- draft.macro.updateState = 'In-Progress';
80
- draft.macro.error = undefined;
81
- },
82
- saveCreditAgentMacroSuccess(draft, action) {
83
- draft.macro.updateState = 'Completed';
84
- draft.macro.error = undefined;
85
- draft.macro.data = mapMacroPayload(action.payload);
86
- },
87
- saveCreditAgentMacroFailure(draft, action) {
88
- draft.macro.updateState = 'Error';
89
- draft.macro.error = action.payload;
90
- },
91
- resetSaveMacroState(draft) {
92
- draft.macro.updateState = 'Not-Started';
93
- draft.macro.error = undefined;
94
- },
95
- },
96
- });
97
- function mapMacroPayload(payload) {
98
- return {
99
- macroId: payload.macro_id,
100
- version: payload.version,
101
- isLatest: payload.is_latest,
102
- isActive: payload.is_active,
103
- name: payload.name,
104
- description: payload.description,
105
- instructions: payload.instructions,
106
- tenantId: payload.tenant_id,
107
- createdAt: payload.created_at,
108
- updatedAt: payload.updated_at,
109
- };
110
- }
111
- export const { fetchTenantCreditScoreReport, updateTenantCreditScoreReport, updateTenantCreditScoreReportFailure, scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronSuccess, scheduleTenantCreditScoreCronFailure, resetScheduleCronState, fetchCreditAgentMacro, updateCreditAgentMacro, updateCreditAgentMacroFailure, saveCreditAgentMacro, saveCreditAgentMacroSuccess, saveCreditAgentMacroFailure, resetSaveMacroState, } = creditAgentView.actions;
112
- export { initialCreditAgentViewState as initialState };
113
- export default creditAgentView.reducer;
@@ -1,3 +0,0 @@
1
- export const getCreditAgentReport = (state) => state.creditAgentViewState.report;
2
- export const getCreditAgentMacro = (state) => state.creditAgentViewState.macro;
3
- export const getScheduleCronState = (state) => state.creditAgentViewState.scheduleCron;
@@ -1,18 +0,0 @@
1
- export const initialCreditAgentViewState = {
2
- report: {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- rows: [],
6
- count: 0,
7
- },
8
- scheduleCron: {
9
- fetchState: 'Not-Started',
10
- error: undefined,
11
- },
12
- macro: {
13
- fetchState: 'Not-Started',
14
- updateState: 'Not-Started',
15
- error: undefined,
16
- data: null,
17
- },
18
- };
@@ -1,16 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
- import { fetchCreditAgentMacro, updateCreditAgentMacro, updateCreditAgentMacroFailure, } from '../creditAgentViewReducer';
5
- export const fetchCreditAgentMacroEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCreditAgentMacro.match), switchMap(() => {
6
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
7
- return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
8
- if (isSuccessResponse(response)) {
9
- return of(updateCreditAgentMacro(response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
10
- ));
11
- }
12
- else {
13
- return of(updateCreditAgentMacroFailure(response.status));
14
- }
15
- }), catchError((error) => of(updateCreditAgentMacroFailure(createZeniAPIStatus('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
16
- }));
@@ -1,16 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
- import { fetchTenantCreditScoreReport, updateTenantCreditScoreReport, updateTenantCreditScoreReportFailure, } from '../creditAgentViewReducer';
5
- export const fetchTenantCreditScoreReportEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchTenantCreditScoreReport.match), switchMap(() => {
6
- const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/admin/tenant-credit-score-report`;
7
- return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
8
- if (isSuccessResponse(response)) {
9
- return of(updateTenantCreditScoreReport(response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
10
- ));
11
- }
12
- else {
13
- return of(updateTenantCreditScoreReportFailure(response.status));
14
- }
15
- }), catchError((error) => of(updateTenantCreditScoreReportFailure(createZeniAPIStatus('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
16
- }));
@@ -1,23 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
- import { saveCreditAgentMacro, saveCreditAgentMacroFailure, saveCreditAgentMacroSuccess, } from '../creditAgentViewReducer';
5
- export const saveCreditAgentMacroEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveCreditAgentMacro.match), switchMap((action) => {
6
- const { instructions } = action.payload;
7
- const existingMacro = state$.value.creditAgentViewState.macro.data;
8
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
9
- const body = {
10
- instructions,
11
- name: existingMacro?.name ?? 'credit-agent',
12
- description: existingMacro?.description ?? '',
13
- };
14
- return zeniAPI.putAndGetJSON(url, body).pipe(mergeMap((response) => {
15
- if (isSuccessResponse(response)) {
16
- return of(saveCreditAgentMacroSuccess(response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
17
- ));
18
- }
19
- else {
20
- return of(saveCreditAgentMacroFailure(response.status));
21
- }
22
- }), catchError((error) => of(saveCreditAgentMacroFailure(createZeniAPIStatus('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
23
- }));
@@ -1,19 +0,0 @@
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
- }));