@zeniai/client-epic-state 5.2.11-betaRD3 → 5.2.11-betaRD5

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.
@@ -19,14 +19,25 @@ export interface JEScheduleAISummaryFieldPayload {
19
19
  cot?: string[];
20
20
  predicted_value?: number | string;
21
21
  }
22
+ /** The whole-recommendation summary. Carries narrative only -- no predicted value, no confidence. */
23
+ export interface JEScheduleSummaryPayload {
24
+ confidence?: number;
25
+ cot?: string[];
26
+ reasoning?: string;
27
+ reasoning_long?: string;
28
+ }
22
29
  export interface JEScheduleAISummariesPayload {
23
30
  credit_account?: JEScheduleAISummaryFieldPayload;
24
31
  credit_accounting_class?: JEScheduleAISummaryFieldPayload;
25
32
  debit_account?: JEScheduleAISummaryFieldPayload;
26
33
  debit_accounting_class?: JEScheduleAISummaryFieldPayload;
34
+ end_date?: JEScheduleAISummaryFieldPayload;
27
35
  period?: JEScheduleAISummaryFieldPayload;
28
36
  posting_date?: JEScheduleAISummaryFieldPayload;
37
+ posting_start_date?: JEScheduleAISummaryFieldPayload;
38
+ schedule_summary?: JEScheduleSummaryPayload;
29
39
  schedule_type?: JEScheduleAISummaryFieldPayload;
40
+ starting_month?: JEScheduleAISummaryFieldPayload;
30
41
  }
31
42
  export interface JEScheduleRecommendationsPayload {
32
43
  credit_account_confidence?: number;
@@ -215,6 +215,43 @@ function toJEScheduleAISummaries(payload) {
215
215
  : undefined,
216
216
  };
217
217
  }
218
+ if (payload.starting_month != null) {
219
+ result.startingMonth = {
220
+ confidence: payload.starting_month.confidence,
221
+ reasoning: payload.starting_month.reasoning,
222
+ cot: Array.isArray(payload.starting_month.cot)
223
+ ? payload.starting_month.cot
224
+ : undefined,
225
+ };
226
+ }
227
+ if (payload.end_date != null) {
228
+ result.endDate = {
229
+ confidence: payload.end_date.confidence,
230
+ reasoning: payload.end_date.reasoning,
231
+ cot: Array.isArray(payload.end_date.cot)
232
+ ? payload.end_date.cot
233
+ : undefined,
234
+ };
235
+ }
236
+ if (payload.posting_start_date != null) {
237
+ result.postingStartDate = {
238
+ confidence: payload.posting_start_date.confidence,
239
+ reasoning: payload.posting_start_date.reasoning,
240
+ cot: Array.isArray(payload.posting_start_date.cot)
241
+ ? payload.posting_start_date.cot
242
+ : undefined,
243
+ };
244
+ }
245
+ if (payload.schedule_summary != null) {
246
+ result.scheduleSummary = {
247
+ confidence: payload.schedule_summary.confidence,
248
+ reasoning: payload.schedule_summary.reasoning,
249
+ reasoningLong: payload.schedule_summary.reasoning_long,
250
+ cot: Array.isArray(payload.schedule_summary.cot)
251
+ ? payload.schedule_summary.cot
252
+ : undefined,
253
+ };
254
+ }
218
255
  return Object.keys(result).length > 0 ? result : undefined;
219
256
  }
220
257
  function toJEScheduleRecommendations(payload) {
@@ -19,14 +19,32 @@ export interface JEScheduleFieldRecommendation {
19
19
  reasoning: string;
20
20
  cot?: string[];
21
21
  }
22
+ /**
23
+ * The agent's summary of the whole recommendation, as opposed to one field of it.
24
+ *
25
+ * `confidence` is mapped but not yet produced: the schedule's own `confidence_score` column arrives
26
+ * null on every agent-written schedule, and agent-je's ScheduleSummary currently carries narrative
27
+ * only. Whichever of the two the backend starts populating, the UI picks it up without a change
28
+ * here -- and until one of them does, the popover shows no confidence rather than a made-up one.
29
+ */
30
+ export interface JEScheduleSummary {
31
+ confidence?: number;
32
+ cot?: string[];
33
+ reasoning?: string;
34
+ reasoningLong?: string;
35
+ }
22
36
  export interface JEScheduleAISummaries {
23
37
  creditAccount?: JEScheduleFieldRecommendation;
24
38
  creditClass?: JEScheduleFieldRecommendation;
25
39
  debitAccount?: JEScheduleFieldRecommendation;
26
40
  debitClass?: JEScheduleFieldRecommendation;
41
+ endDate?: JEScheduleFieldRecommendation;
27
42
  period?: JEScheduleFieldRecommendation;
28
43
  postingDate?: JEScheduleFieldRecommendation;
44
+ postingStartDate?: JEScheduleFieldRecommendation;
45
+ scheduleSummary?: JEScheduleSummary;
29
46
  scheduleType?: JEScheduleFieldRecommendation;
47
+ startingMonth?: JEScheduleFieldRecommendation;
30
48
  }
31
49
  export interface JEScheduleRecommendations {
32
50
  creditAccountConfidence?: number;
@@ -204,6 +204,43 @@ function toJEScheduleAISummaries(payload) {
204
204
  : undefined,
205
205
  };
206
206
  }
207
+ if (payload.starting_month != null) {
208
+ result.startingMonth = {
209
+ confidence: payload.starting_month.confidence,
210
+ reasoning: payload.starting_month.reasoning,
211
+ cot: Array.isArray(payload.starting_month.cot)
212
+ ? payload.starting_month.cot
213
+ : undefined,
214
+ };
215
+ }
216
+ if (payload.end_date != null) {
217
+ result.endDate = {
218
+ confidence: payload.end_date.confidence,
219
+ reasoning: payload.end_date.reasoning,
220
+ cot: Array.isArray(payload.end_date.cot)
221
+ ? payload.end_date.cot
222
+ : undefined,
223
+ };
224
+ }
225
+ if (payload.posting_start_date != null) {
226
+ result.postingStartDate = {
227
+ confidence: payload.posting_start_date.confidence,
228
+ reasoning: payload.posting_start_date.reasoning,
229
+ cot: Array.isArray(payload.posting_start_date.cot)
230
+ ? payload.posting_start_date.cot
231
+ : undefined,
232
+ };
233
+ }
234
+ if (payload.schedule_summary != null) {
235
+ result.scheduleSummary = {
236
+ confidence: payload.schedule_summary.confidence,
237
+ reasoning: payload.schedule_summary.reasoning,
238
+ reasoningLong: payload.schedule_summary.reasoning_long,
239
+ cot: Array.isArray(payload.schedule_summary.cot)
240
+ ? payload.schedule_summary.cot
241
+ : undefined,
242
+ };
243
+ }
207
244
  return Object.keys(result).length > 0 ? result : undefined;
208
245
  }
209
246
  function toJEScheduleRecommendations(payload) {
package/lib/index.d.ts CHANGED
@@ -108,7 +108,7 @@ import { TrendChangeType } from './entity/insights/insightPayload';
108
108
  import { Insight } from './entity/insights/insightState';
109
109
  import { InsightSummary } from './entity/insights/insightSummary';
110
110
  import { JEAccruedSchedule, JEOneTimeAccrual, JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
111
- import { JEOneTimeAccrualAiSuggestion, JEOneTimeAccrualBillingPattern, JEOneTimeAccrualMonthlyTotal, JEOneTimeAccrualProfileSnapshot, JEScheduleAISummaries, JEScheduleFieldRecommendation } from './entity/jeSchedules/jeSchedulesState';
111
+ import { JEOneTimeAccrualAiSuggestion, JEOneTimeAccrualBillingPattern, JEOneTimeAccrualMonthlyTotal, JEOneTimeAccrualProfileSnapshot, JEScheduleAISummaries, JEScheduleFieldRecommendation, JEScheduleSummary } from './entity/jeSchedules/jeSchedulesState';
112
112
  import { ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS, ALL_ONE_TIME_ACCRUAL_REVERT_REASONS, ALL_SCHEDULES_TYPES, JEOneTimeAccrualKey, JEScheduleIgnoreReasonType, JEScheduleKey, JEScheduleRevertReasonType, JEScheduleTransactionKey, JournalEntryErrorCodeType, OneTimeAccrualIgnoreReasonType, OneTimeAccrualRevertReasonType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTransactionID, ScheduleTypes, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
113
113
  import { Merchant } from './entity/merchant/merchant';
114
114
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthCloseCheckMetrics, MonthCloseCheckProgressJson, MonthEndAuditSummary, MonthEndCloseCheck, MonthEndCloseCheckFrequency } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
@@ -940,7 +940,7 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
940
940
  export { LinkBillExpenseKey };
941
941
  export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearJeSearchTransactionsForNewSchedule, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeNewSchedule, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, resetJeNewScheduleLocalData, retryExpenseAutomationJESchedule, saveJeNewSchedule, saveJeNewScheduleFailure, saveJeNewScheduleSuccess, searchJeTransactionsForNewSchedule, searchJeTransactionsForNewScheduleFailure, searchJeTransactionsForNewScheduleSuccess, updateExpenseAutomationJESchedulesUIState, updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
942
942
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
943
- export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS, ALL_ONE_TIME_ACCRUAL_REVERT_REASONS, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, JEOneTimeAccrual, JEOneTimeAccrualAiSuggestion, JEOneTimeAccrualBillingPattern, JEOneTimeAccrualMonthlyTotal, JEOneTimeAccrualProfileSnapshot, JEOneTimeAccrualKey, JEScheduleAISummaries, 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, JEScheduleIgnoreReasonType, JEScheduleRevertReasonType, JournalEntryErrorCodeType, OneTimeAccrualIgnoreReasonType, OneTimeAccrualRevertReasonType, 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, };
943
+ export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS, ALL_ONE_TIME_ACCRUAL_REVERT_REASONS, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, JEOneTimeAccrual, JEOneTimeAccrualAiSuggestion, JEOneTimeAccrualBillingPattern, JEOneTimeAccrualMonthlyTotal, JEOneTimeAccrualProfileSnapshot, JEOneTimeAccrualKey, JEScheduleAISummaries, JEScheduleFieldRecommendation, JEScheduleSummary, 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, JEScheduleIgnoreReasonType, JEScheduleRevertReasonType, JournalEntryErrorCodeType, OneTimeAccrualIgnoreReasonType, OneTimeAccrualRevertReasonType, 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, };
944
944
  export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
945
945
  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, };
946
946
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, GlobalMerchantViewSelectorView, GlobalMerchantViewState, NewGlobalMerchantData, NewGlobalMerchantCurrentSelection, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.11-betaRD3",
3
+ "version": "5.2.11-betaRD5",
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",