@zeniai/client-epic-state 5.1.72-betaRD1 → 5.1.72-betaRD2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,8 +29,13 @@ export const isAiAccountantSchedule = (schedule) => schedule.createdByUser?.emai
29
29
  schedule.createdByUser?.email === BOT_EMAIL;
30
30
  // Accrued schedules are structurally distinct — no baseTransaction, carrying recurringAmount and
31
31
  // memo in its place — so anything reading baseTransaction has to branch on this first.
32
+ //
33
+ // Discriminates on jeAccruedScheduleKey, which only JEAccruedSchedule carries. jeScheduleType
34
+ // cannot be used: it is a data field present on BOTH row shapes, so an accrued-typed row that
35
+ // arrived through the prepaid/fixed DTO (failed_je_postings, legacy fetches) would be
36
+ // misclassified and then crash on recurringAmount / jeAccruedScheduleKey.
32
37
  export function isAccruedScheduleRow(schedule) {
33
- return schedule.jeScheduleType === 'accrued_expenses';
38
+ return 'jeAccruedScheduleKey' in schedule;
34
39
  }
35
40
  function getScheduleAmount(schedule) {
36
41
  if (isAccruedScheduleRow(schedule)) {