@zeniai/client-epic-state 5.2.14 → 5.2.15

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 (132) hide show
  1. package/lib/entity/accountRecon/accountReconReducer.d.ts +2 -1
  2. package/lib/entity/accountRecon/accountReconReducer.js +22 -10
  3. package/lib/entity/accountRecon/accountReconSelector.d.ts +1 -0
  4. package/lib/entity/accountRecon/accountReconSelector.js +1 -0
  5. package/lib/entity/approvalRule/approvalRuleConflict.d.ts +13 -0
  6. package/lib/entity/approvalRule/approvalRuleConflict.js +16 -1
  7. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
  8. package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
  9. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +78 -1
  10. package/lib/entity/jeSchedules/jeSchedulesPayload.js +183 -4
  11. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
  12. package/lib/entity/jeSchedules/jeSchedulesReducer.js +30 -2
  13. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +11 -2
  14. package/lib/entity/jeSchedules/jeSchedulesSelector.js +38 -3
  15. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +123 -1
  16. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +24 -1
  17. package/lib/entity/jeSchedules/jeSchedulesTypes.js +96 -1
  18. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  19. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  20. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
  21. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  22. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
  23. package/lib/epic.d.ts +10 -1
  24. package/lib/epic.js +18 -0
  25. package/lib/esm/entity/accountRecon/accountReconReducer.js +22 -10
  26. package/lib/esm/entity/accountRecon/accountReconSelector.js +1 -0
  27. package/lib/esm/entity/approvalRule/approvalRuleConflict.js +16 -1
  28. package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
  29. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +183 -5
  30. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +30 -2
  31. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +36 -2
  32. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +86 -0
  33. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  34. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  35. package/lib/esm/epic.js +18 -0
  36. package/lib/esm/index.js +16 -10
  37. package/lib/esm/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +2 -2
  38. package/lib/esm/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.js +54 -0
  39. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +1 -1
  40. package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +3 -6
  41. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  42. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
  43. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +41 -5
  44. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +45 -0
  45. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
  46. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +104 -0
  47. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
  48. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +138 -0
  49. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +79 -0
  50. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +180 -0
  51. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +111 -0
  52. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +28 -0
  53. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
  54. package/lib/esm/view/expenseAutomationView/helpers/reconciliationHelpers.js +12 -0
  55. package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
  56. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +319 -29
  57. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +20 -2
  58. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
  59. package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
  60. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +106 -0
  61. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +327 -22
  62. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
  63. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  64. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
  65. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
  66. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +20 -1
  67. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +20 -1
  68. package/lib/index.d.ts +18 -13
  69. package/lib/index.js +92 -47
  70. package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.d.ts +10 -2
  71. package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +1 -1
  72. package/lib/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.d.ts +9 -0
  73. package/lib/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.js +58 -0
  74. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +1 -1
  75. package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +3 -6
  76. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  77. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
  78. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +3 -2
  79. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +39 -3
  80. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +21 -0
  81. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +49 -0
  82. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
  83. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +9 -0
  84. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +108 -0
  85. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
  86. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +29 -0
  87. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +9 -0
  88. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +142 -0
  89. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
  90. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +83 -0
  91. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +13 -0
  92. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +187 -0
  93. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +65 -0
  94. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +115 -0
  95. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
  96. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +32 -0
  97. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
  98. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
  99. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +6 -0
  100. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +13 -0
  101. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  102. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +86 -3
  103. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
  104. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +4 -0
  105. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +93 -12
  106. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +321 -29
  107. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
  108. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +6 -1
  109. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +22 -4
  110. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
  111. package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +1 -0
  112. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +42 -0
  113. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
  114. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +41 -7
  115. package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
  116. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +21 -0
  117. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +112 -0
  118. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +34 -0
  119. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +335 -21
  120. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
  121. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +83 -8
  122. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  123. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  124. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  125. package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
  126. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +4 -2
  127. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
  128. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +20 -1
  129. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +3 -0
  130. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +20 -1
  131. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +3 -0
  132. package/package.json +1 -1
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getJEScheduledTransactionByJEScheduleTransactionKey = exports.getJEAccruedScheduleByJEScheduleKey = void 0;
6
+ exports.getJEScheduledTransactionByJEScheduleTransactionKey = exports.getJEAccruedScheduleByJEScheduleKey = exports.getJEOneTimeAccrualByKey = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const amount_1 = require("../../commonStateTypes/amount");
9
9
  const accountSelector_1 = require("../account/accountSelector");
@@ -11,18 +11,35 @@ const classSelector_1 = require("../class/classSelector");
11
11
  const transactionSelector_1 = require("../transaction/transactionSelector");
12
12
  const userSelector_1 = require("../user/userSelector");
13
13
  const vendorSelector_1 = require("../vendor/vendorSelector");
14
+ // Takes the slice, not RootState: an accrual denormalizes its vendor, account and class names, so
15
+ // unlike getJEAccruedScheduleByJEScheduleKey this joins nothing.
16
+ //
17
+ // Spreads the stored entity rather than rebuilding it field by field. That is deliberate — the
18
+ // accrued joiner listed every field explicitly and silently dropped jeScheduleType, which made a
19
+ // whole tab render empty while its reducer test still passed. A spread cannot lose a field.
20
+ const getJEOneTimeAccrualByKey = (jeOneTimeAccrualKey, jeSchedulesState) => {
21
+ const accrual = (0, get_1.default)(jeSchedulesState.oneTimeAccrualsByKey, jeOneTimeAccrualKey);
22
+ if (accrual == null) {
23
+ return undefined;
24
+ }
25
+ return { ...accrual, jeOneTimeAccrualKey };
26
+ };
27
+ exports.getJEOneTimeAccrualByKey = getJEOneTimeAccrualByKey;
14
28
  const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
15
29
  const { jeSchedulesState, vendorState, accountState, userState, classState } = state;
16
30
  const JEAccruedScheduleState = (0, get_1.default)(jeSchedulesState.schedulesByAccruedJEScheduleKey, JEScheduleKey);
17
31
  if (JEAccruedScheduleState == null) {
18
32
  return undefined;
19
33
  }
20
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, memo, recurringAmount, createTime, otherAttributes, } = JEAccruedScheduleState;
34
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, memo, recurringAmount, createTime, otherAttributes, jeScheduleType, } = JEAccruedScheduleState;
21
35
  const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
22
36
  if (vendorDetails == null) {
23
37
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
24
38
  }
25
39
  const userDetails = updatedBy != null ? (0, userSelector_1.getUserByUserId)(userState, updatedBy) : undefined;
40
+ // Resolved the same way the prepaid / fixed joiner does. Without it every accrued row rendered a
41
+ // hyphen under "Created by", even though the payload carries created_by.
42
+ const createdByUserDetails = createdBy != null ? (0, userSelector_1.getUserByUserId)(userState, createdBy) : undefined;
26
43
  const accountCredit = jeCredit.accountId != null
27
44
  ? (0, accountSelector_1.getAccountBase)(accountState, jeCredit.accountId, 'account_list')
28
45
  : undefined;
@@ -41,14 +58,19 @@ const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
41
58
  reportId: 'class_list',
42
59
  })
43
60
  : undefined;
61
+ const postedCount = scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
62
+ const lifecycleTotal = period ?? scheduledJournalEntry.length;
44
63
  return {
45
64
  jeScheduleId,
46
65
  otherAttributes,
47
66
  vendor: vendorDetails,
48
67
  updatedByUser: userDetails,
68
+ createdByUser: createdByUserDetails,
49
69
  updatedAt,
50
70
  currencyCode,
51
71
  currencySymbol,
72
+ lifecycleTotal,
73
+ postedCount,
52
74
  jeCredit: {
53
75
  accountingClass: classCredit,
54
76
  account: accountCredit,
@@ -66,6 +88,7 @@ const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
66
88
  memo,
67
89
  createTime,
68
90
  recurringAmount,
91
+ jeScheduleType,
69
92
  jeAccruedScheduleKey: JEScheduleKey,
70
93
  balanceAsOfToday: balanceAsOfToday != null
71
94
  ? (0, amount_1.toAmount)(balanceAsOfToday, currencyCode, currencySymbol)
@@ -77,7 +100,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
77
100
  const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
78
101
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
79
102
  const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
80
- const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
103
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, createTime, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, recurringAmount, postedCount: postedCountFromServer, } = jeScheduleTransactionState;
81
104
  const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
82
105
  if (vendorDetails == null) {
83
106
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -106,14 +129,24 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
106
129
  reportId: 'class_list',
107
130
  })
108
131
  : undefined;
132
+ // The expense-automation response carries no scheduled journal entries for these rows, so the
133
+ // filter below counts an empty array and every schedule reported 0 posted. Prefer the count the
134
+ // server derives, and keep the filter for callers that do have entries (the detail page, and
135
+ // failed postings, which come with theirs).
136
+ const postedCount = postedCountFromServer ??
137
+ scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
138
+ const lifecycleTotal = period ?? scheduledJournalEntry.length;
109
139
  return {
110
140
  jeScheduleId,
111
141
  jeScheduleType,
142
+ recurringAmount,
112
143
  jeScheduleTransactionKey: jeScheduleTransactionKey,
113
144
  vendor: vendorDetails,
114
145
  updatedByUser: userDetails,
115
146
  updatedAt: updatedAt,
116
147
  period,
148
+ lifecycleTotal,
149
+ postedCount,
117
150
  balanceAsOfToday: balanceAsOfToday != null
118
151
  ? (0, amount_1.toAmount)(balanceAsOfToday, currencyCode, currencySymbol)
119
152
  : undefined,
@@ -136,7 +169,9 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
136
169
  },
137
170
  scheduledJournalEntry,
138
171
  aiSummaries,
172
+ confidenceScore,
139
173
  createdByUser: createdByUserDetails,
174
+ createTime,
140
175
  recommendations,
141
176
  };
142
177
  };
@@ -2,8 +2,9 @@ import { Amount } from '../../commonStateTypes/amount';
2
2
  import { ID } from '../../commonStateTypes/common';
3
3
  import { ScheduleDaysOfMonth } from '../../commonStateTypes/timePeriod';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
+ import { ZeniUrl as Url } from '../../zeniUrl';
5
6
  import { TransactionID } from '../transaction/stateTypes/transactionID';
6
- import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
7
+ import { JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, OneTimeAccrualAutomationTierType, OneTimeAccrualOriginType, OneTimeAccrualReversalPolicyType, OneTimeAccrualReversalTriggerType, OneTimeAccrualStatusCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
7
8
  export interface ScheduleStatus {
8
9
  code: ScheduleStatusCodeType;
9
10
  label: string;
@@ -18,14 +19,32 @@ export interface JEScheduleFieldRecommendation {
18
19
  reasoning: string;
19
20
  cot?: string[];
20
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
+ }
21
36
  export interface JEScheduleAISummaries {
22
37
  creditAccount?: JEScheduleFieldRecommendation;
23
38
  creditClass?: JEScheduleFieldRecommendation;
24
39
  debitAccount?: JEScheduleFieldRecommendation;
25
40
  debitClass?: JEScheduleFieldRecommendation;
41
+ endDate?: JEScheduleFieldRecommendation;
26
42
  period?: JEScheduleFieldRecommendation;
27
43
  postingDate?: JEScheduleFieldRecommendation;
44
+ postingStartDate?: JEScheduleFieldRecommendation;
45
+ scheduleSummary?: JEScheduleSummary;
28
46
  scheduleType?: JEScheduleFieldRecommendation;
47
+ startingMonth?: JEScheduleFieldRecommendation;
29
48
  }
30
49
  export interface JEScheduleRecommendations {
31
50
  creditAccountConfidence?: number;
@@ -94,14 +113,18 @@ export interface JEScheduledTransactionState {
94
113
  vendorId: ID;
95
114
  aiSummaries?: JEScheduleAISummaries;
96
115
  balanceAsOfToday?: number;
116
+ confidenceScore?: number;
97
117
  createdByUserID?: ID;
118
+ createTime?: ZeniDate;
98
119
  dayOfPostingDate?: ScheduleDaysOfMonth;
99
120
  endDate?: ZeniDate;
100
121
  jeScheduleId?: ID;
101
122
  jeScheduleType?: ScheduleTypes;
102
123
  lastDayOfMonth?: boolean;
103
124
  period?: number;
125
+ postedCount?: number;
104
126
  recommendations?: JEScheduleRecommendations;
127
+ recurringAmount?: Amount;
105
128
  startDate?: ZeniDate;
106
129
  updatedAt?: ZeniDate;
107
130
  updatedByUserID?: ID;
@@ -112,7 +135,106 @@ export interface JEAccruedScheduledTransactionState extends Omit<JEScheduledTran
112
135
  memo: string;
113
136
  recurringAmount: Amount;
114
137
  }
138
+ /**
139
+ * What a human can change on a draft accrual before posting it.
140
+ *
141
+ * Deliberately not the whole accrual: posting date is derived server-side from the service month,
142
+ * and vendor / service month are identity -- agent-je rejects a promote whose body disagrees with
143
+ * the stored draft on either.
144
+ */
145
+ export interface OneTimeAccrualEdits {
146
+ expectedReversalDate?: ZeniDate;
147
+ jeCreditAccountId?: ID;
148
+ jeDebitAccountId?: ID;
149
+ jeDebitAccountingClassId?: ID;
150
+ jeDebitAccountingClassName?: string;
151
+ memo?: string;
152
+ /**
153
+ * The Auto Reversal toggle, modelled as the same boolean the New form and the create payload use
154
+ * rather than a policy string: `reverse_next_month` alone decides the policy server-side, and
155
+ * sending both would be two sources of truth for one control.
156
+ */
157
+ reverseNextMonth?: boolean;
158
+ }
159
+ export interface JEOneTimeAccrualCreator {
160
+ userId: ID;
161
+ email?: string;
162
+ firstName?: string;
163
+ lastName?: string;
164
+ photo?: Url;
165
+ }
166
+ /**
167
+ * One month of a vendor's billed history, taken from profile_snapshot. Kept as an ordered array
168
+ * rather than the payload's map because the months are not contiguous — a vendor that skipped a
169
+ * month has no entry — so consumers must not derive the sequence themselves.
170
+ */
171
+ export interface JEOneTimeAccrualMonthlyTotal {
172
+ amount: Amount;
173
+ month: string;
174
+ }
175
+ export interface JEOneTimeAccrualBillingPattern {
176
+ avgAmount?: Amount;
177
+ billingLagDays?: number;
178
+ consistencyScore?: number;
179
+ frequency?: string;
180
+ lastBillAmount?: Amount;
181
+ lastBillDate?: ZeniDate;
182
+ monthsOfHistory?: number;
183
+ typicalBillDay?: number;
184
+ }
185
+ /**
186
+ * The vendor profile the AI used to decide this accrual. Absent on human-created accruals, so every
187
+ * card built from it has to be omitted rather than rendered empty.
188
+ */
189
+ export interface JEOneTimeAccrualProfileSnapshot {
190
+ monthlyTotals: JEOneTimeAccrualMonthlyTotal[];
191
+ billingPattern?: JEOneTimeAccrualBillingPattern;
192
+ }
193
+ /** What the AI originally suggested, frozen at draft time. */
194
+ export interface JEOneTimeAccrualAiSuggestion {
195
+ estimatedAmount?: Amount;
196
+ jeCreditAccountName?: string;
197
+ jeDebitAccountName?: string;
198
+ memo?: string;
199
+ }
200
+ export interface JEOneTimeAccrualState {
201
+ accrualId: ID;
202
+ accrualStatus: OneTimeAccrualStatusCodeType;
203
+ estimatedAmount: Amount;
204
+ /**
205
+ * Ignoring an accrual sets this flag and leaves the status on `draft`, so the status alone cannot
206
+ * tell an ignored row from an actionable one.
207
+ */
208
+ isIgnored: boolean;
209
+ memo: string;
210
+ origin: OneTimeAccrualOriginType;
211
+ reversalPolicy: OneTimeAccrualReversalPolicyType;
212
+ serviceMonth: string;
213
+ vendorId: ID;
214
+ vendorName: string;
215
+ actualPostDate?: ZeniDate;
216
+ actualReversalPostDate?: ZeniDate;
217
+ aiSuggestion?: JEOneTimeAccrualAiSuggestion;
218
+ automationTier?: OneTimeAccrualAutomationTierType;
219
+ createdBy?: JEOneTimeAccrualCreator;
220
+ expectedReversalDate?: ZeniDate;
221
+ jeCreditAccountId?: ID;
222
+ jeCreditAccountingClassId?: ID;
223
+ jeCreditAccountingClassName?: string;
224
+ jeCreditAccountName?: string;
225
+ jeDebitAccountId?: ID;
226
+ jeDebitAccountingClassId?: ID;
227
+ jeDebitAccountingClassName?: string;
228
+ jeDebitAccountName?: string;
229
+ postingDate?: ZeniDate;
230
+ profileSnapshot?: JEOneTimeAccrualProfileSnapshot;
231
+ reversalTransactionId?: ID;
232
+ reversalTrigger?: OneTimeAccrualReversalTriggerType;
233
+ transactionId?: ID;
234
+ transactionIntegrationId?: ID;
235
+ }
115
236
  export interface JESchedulesState {
237
+ oneTimeAccrualsByKey: Record<JEOneTimeAccrualKey, JEOneTimeAccrualState>;
116
238
  schedulesByAccruedJEScheduleKey: Record<JEScheduleKey, JEAccruedScheduledTransactionState>;
117
239
  schedulesByTransactionKey: Record<JEScheduleTransactionKey, JEScheduledTransactionState>;
118
240
  }
@@ -1,11 +1,12 @@
1
1
  import { TransactionID } from '../transaction/stateTypes/transactionID';
2
- import { generateJEScheduleKey } from './jeScheduleHelper';
2
+ import { generateJEOneTimeAccrualKey, generateJEScheduleKey } from './jeScheduleHelper';
3
3
  export interface ScheduleTransactionID extends TransactionID {
4
4
  lineId: string;
5
5
  }
6
6
  export declare const getJEScheduleTransactionKey: (scheduleTransactionId: ScheduleTransactionID) => `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
7
7
  export type JEScheduleTransactionKey = ReturnType<typeof getJEScheduleTransactionKey>;
8
8
  export type JEScheduleKey = ReturnType<typeof generateJEScheduleKey>;
9
+ export type JEOneTimeAccrualKey = ReturnType<typeof generateJEOneTimeAccrualKey>;
9
10
  export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_assets", "accrued_expenses", "deferred_revenue"];
10
11
  export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
11
12
  export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
@@ -14,5 +15,27 @@ export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "unkno
14
15
  export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
15
16
  export declare const toScheduleStatusCodeType: (v: string) => "completed" | "draft" | "new" | "ongoing" | "marked_as_completed";
16
17
  export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
18
+ export declare const toOneTimeAccrualStatusCodeType: (v: string) => "draft" | "posted" | "posting" | "posting_blocked" | "reversing" | "reversed" | "reverted";
19
+ export type OneTimeAccrualStatusCodeType = ReturnType<typeof toOneTimeAccrualStatusCodeType>;
20
+ export declare const toOneTimeAccrualOriginType: (v: string) => "agent" | "human";
21
+ export type OneTimeAccrualOriginType = ReturnType<typeof toOneTimeAccrualOriginType>;
22
+ export declare const toOneTimeAccrualAutomationTierType: (v: string) => "auto" | "draft" | "manual";
23
+ export type OneTimeAccrualAutomationTierType = ReturnType<typeof toOneTimeAccrualAutomationTierType>;
24
+ export declare const toOneTimeAccrualReversalPolicyType: (v: string) => "on_bill_match" | "scheduled_date";
25
+ export type OneTimeAccrualReversalPolicyType = ReturnType<typeof toOneTimeAccrualReversalPolicyType>;
26
+ export declare const toOneTimeAccrualReversalTriggerType: (v?: string) => "scheduled_date" | "bill_match" | "manual_reverse" | undefined;
27
+ export type OneTimeAccrualReversalTriggerType = ReturnType<typeof toOneTimeAccrualReversalTriggerType>;
28
+ export declare const toOneTimeAccrualIgnoreReasonType: (v: string) => "paused" | "no_activity" | "too_small" | "need_invoice" | "other_ignore";
29
+ export type OneTimeAccrualIgnoreReasonType = ReturnType<typeof toOneTimeAccrualIgnoreReasonType>;
30
+ export declare const ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS: readonly OneTimeAccrualIgnoreReasonType[];
31
+ export declare const toJEScheduleIgnoreReasonType: (v: string) => "other_ignore" | "not_needed" | "wrong_account" | "duplicate" | "already_handled";
32
+ export type JEScheduleIgnoreReasonType = ReturnType<typeof toJEScheduleIgnoreReasonType>;
33
+ export declare const ALL_JE_SCHEDULE_IGNORE_REASONS: readonly JEScheduleIgnoreReasonType[];
34
+ export declare const toJEScheduleRevertReasonType: (v: string) => "duplicate" | "amount_off" | "wrong_period" | "created_by_mistake" | "other_revert";
35
+ export type JEScheduleRevertReasonType = ReturnType<typeof toJEScheduleRevertReasonType>;
36
+ export declare const ALL_JE_SCHEDULE_REVERT_REASONS: readonly JEScheduleRevertReasonType[];
37
+ export declare const toOneTimeAccrualRevertReasonType: (v: string) => "duplicate" | "amount_off" | "wrong_period" | "other_revert" | "not_accrual";
38
+ export type OneTimeAccrualRevertReasonType = ReturnType<typeof toOneTimeAccrualRevertReasonType>;
39
+ export declare const ALL_ONE_TIME_ACCRUAL_REVERT_REASONS: readonly OneTimeAccrualRevertReasonType[];
17
40
  export declare const toJournalEntryErrorCodeType: (v: string) => "vendor_deleted" | "debit_category_deleted" | "credit_category_deleted" | "qbo_error" | "qbo_authorization_error" | "qbo_invalid_company_status_error" | "qbo_book_close_date_error";
18
41
  export type JournalEntryErrorCodeType = ReturnType<typeof toJournalEntryErrorCodeType>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = void 0;
3
+ exports.toJournalEntryErrorCodeType = exports.ALL_ONE_TIME_ACCRUAL_REVERT_REASONS = exports.toOneTimeAccrualRevertReasonType = exports.ALL_JE_SCHEDULE_REVERT_REASONS = exports.toJEScheduleRevertReasonType = exports.ALL_JE_SCHEDULE_IGNORE_REASONS = exports.toJEScheduleIgnoreReasonType = exports.ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS = exports.toOneTimeAccrualIgnoreReasonType = exports.toOneTimeAccrualReversalTriggerType = exports.toOneTimeAccrualReversalPolicyType = exports.toOneTimeAccrualAutomationTierType = exports.toOneTimeAccrualOriginType = exports.toOneTimeAccrualStatusCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = void 0;
4
4
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
5
  const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
6
6
  exports.getJEScheduleTransactionKey = getJEScheduleTransactionKey;
@@ -32,6 +32,101 @@ const SCHEDULE_STATUS_CODE = [
32
32
  ];
33
33
  const toScheduleStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, SCHEDULE_STATUS_CODE);
34
34
  exports.toScheduleStatusCodeType = toScheduleStatusCodeType;
35
+ // One-time accruals come from agent-je's Mongo `accruals` collection, not the JE schedule
36
+ // datastore, so they carry their own status vocabulary rather than SCHEDULE_STATUS_CODE.
37
+ // `posting` and `reversing` are transient claims held while a JE posts.
38
+ /**
39
+ * Mirrors agent-je's own status constants. `reverted` is the terminal state a manual revert writes
40
+ * alongside is_deleted; without it stringToUnion logs an error and passes the raw string through.
41
+ *
42
+ * There is deliberately no `ignored` member -- ignoring an accrual sets the `is_ignored` flag and
43
+ * leaves the status on `draft`.
44
+ */
45
+ const ONE_TIME_ACCRUAL_STATUS_CODE = [
46
+ 'draft',
47
+ 'posting',
48
+ 'posted',
49
+ 'posting_blocked',
50
+ 'reversing',
51
+ 'reversed',
52
+ 'reverted',
53
+ ];
54
+ const toOneTimeAccrualStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_STATUS_CODE);
55
+ exports.toOneTimeAccrualStatusCodeType = toOneTimeAccrualStatusCodeType;
56
+ // Who created the accrual. This — not the creator's email — is the authoritative
57
+ // AI-vs-manual signal for the Method column.
58
+ const ONE_TIME_ACCRUAL_ORIGIN = ['agent', 'human'];
59
+ const toOneTimeAccrualOriginType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_ORIGIN);
60
+ exports.toOneTimeAccrualOriginType = toOneTimeAccrualOriginType;
61
+ const ONE_TIME_ACCRUAL_AUTOMATION_TIER = ['manual', 'draft', 'auto'];
62
+ const toOneTimeAccrualAutomationTierType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_AUTOMATION_TIER);
63
+ exports.toOneTimeAccrualAutomationTierType = toOneTimeAccrualAutomationTierType;
64
+ // How the accrual is allowed to reverse. The two are exclusive: a scheduled row reverses on
65
+ // expectedReversalDate and bills never drive it; an on_bill_match row reverses only when a bill
66
+ // is matched, which is why its lifecycle reads "Reverses on match" rather than showing a date.
67
+ const ONE_TIME_ACCRUAL_REVERSAL_POLICY = [
68
+ 'on_bill_match',
69
+ 'scheduled_date',
70
+ ];
71
+ const toOneTimeAccrualReversalPolicyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_REVERSAL_POLICY);
72
+ exports.toOneTimeAccrualReversalPolicyType = toOneTimeAccrualReversalPolicyType;
73
+ // What actually caused a reverse. Distinct from a *revert*, which soft-deletes the row and
74
+ // never sets this.
75
+ const ONE_TIME_ACCRUAL_REVERSAL_TRIGGER = [
76
+ 'bill_match',
77
+ 'scheduled_date',
78
+ 'manual_reverse',
79
+ ];
80
+ const toOneTimeAccrualReversalTriggerType = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', ONE_TIME_ACCRUAL_REVERSAL_TRIGGER);
81
+ exports.toOneTimeAccrualReversalTriggerType = toOneTimeAccrualReversalTriggerType;
82
+ // Why a human told the AI Accountant not to accrue this month. The gateway validates against
83
+ // exactly this set, so it is a union rather than a free-text string.
84
+ const ONE_TIME_ACCRUAL_IGNORE_REASON = [
85
+ 'no_activity',
86
+ 'paused',
87
+ 'too_small',
88
+ 'need_invoice',
89
+ 'other_ignore',
90
+ ];
91
+ const toOneTimeAccrualIgnoreReasonType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_IGNORE_REASON);
92
+ exports.toOneTimeAccrualIgnoreReasonType = toOneTimeAccrualIgnoreReasonType;
93
+ exports.ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS = ONE_TIME_ACCRUAL_IGNORE_REASON;
94
+ // Why a recommended prepaid / fixed-asset schedule is being dismissed. A different set from the
95
+ // accrual ignore reasons: the gateway validates each against its own list.
96
+ const JE_SCHEDULE_IGNORE_REASON = [
97
+ 'not_needed',
98
+ 'wrong_account',
99
+ 'duplicate',
100
+ 'already_handled',
101
+ 'other_ignore',
102
+ ];
103
+ const toJEScheduleIgnoreReasonType = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_IGNORE_REASON);
104
+ exports.toJEScheduleIgnoreReasonType = toJEScheduleIgnoreReasonType;
105
+ exports.ALL_JE_SCHEDULE_IGNORE_REASONS = JE_SCHEDULE_IGNORE_REASON;
106
+ // Why a posted prepaid / fixed-asset schedule is being undone. Note `not_accrual` is accrual-only
107
+ // and rejected here, and `created_by_mistake` is schedule-only.
108
+ const JE_SCHEDULE_REVERT_REASON = [
109
+ 'amount_off',
110
+ 'wrong_period',
111
+ 'duplicate',
112
+ 'created_by_mistake',
113
+ 'other_revert',
114
+ ];
115
+ const toJEScheduleRevertReasonType = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_REVERT_REASON);
116
+ exports.toJEScheduleRevertReasonType = toJEScheduleRevertReasonType;
117
+ exports.ALL_JE_SCHEDULE_REVERT_REASONS = JE_SCHEDULE_REVERT_REASON;
118
+ // Why a posted accrual is being undone. A disjoint set from the ignore reasons — the gateway
119
+ // validates each action against its own list and rejects the other's values.
120
+ const ONE_TIME_ACCRUAL_REVERT_REASON = [
121
+ 'amount_off',
122
+ 'wrong_period',
123
+ 'not_accrual',
124
+ 'duplicate',
125
+ 'other_revert',
126
+ ];
127
+ const toOneTimeAccrualRevertReasonType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_REVERT_REASON);
128
+ exports.toOneTimeAccrualRevertReasonType = toOneTimeAccrualRevertReasonType;
129
+ exports.ALL_ONE_TIME_ACCRUAL_REVERT_REASONS = ONE_TIME_ACCRUAL_REVERT_REASON;
35
130
  const JOURNAL_ENTRY_ERROR_CODE = [
36
131
  'vendor_deleted',
37
132
  'debit_category_deleted',
@@ -1,4 +1,4 @@
1
- export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
1
+ export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
2
2
  export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
3
3
  export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
4
4
  export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
@@ -119,6 +119,9 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
119
119
  'save_schedule',
120
120
  'delete_schedule',
121
121
  'ignore_schedule',
122
+ 'revert_schedule',
123
+ 'ignore_accrual',
124
+ 'revert_accrual',
122
125
  'save_task_detail',
123
126
  'fetch_task_detail',
124
127
  'delete_task',
@@ -12,5 +12,7 @@ export interface ScheduleTransactionPayload extends TransactionIDPayload, Omit<A
12
12
  labels?: string[];
13
13
  sync_token?: number;
14
14
  transaction_description?: string | null;
15
+ vendor_id?: string | null;
16
+ vendor_name?: string | null;
15
17
  }
16
18
  export declare const toScheduleTransaction: (payload: ScheduleTransactionPayload, currency_code: string, currency_symbol: string) => ScheduleTransaction;
@@ -33,6 +33,8 @@ const toScheduleTransaction = (payload, currency_code, currency_symbol) => {
33
33
  currencySymbol: currency_symbol,
34
34
  },
35
35
  description: payload.transaction_description ?? undefined,
36
+ vendorId: payload.vendor_id ?? undefined,
37
+ vendorName: payload.vendor_name ?? undefined,
36
38
  };
37
39
  };
38
40
  exports.toScheduleTransaction = toScheduleTransaction;
@@ -10,4 +10,6 @@ export interface ScheduleTransaction extends BaseTransaction {
10
10
  thirdPartyTransactionId: ID;
11
11
  classBase?: ClassBase;
12
12
  description?: string;
13
+ vendorId?: ID;
14
+ vendorName?: string;
13
15
  }