@robosystems/client 1.3.0 → 1.4.1

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.
@@ -97,7 +97,17 @@ export interface InitializeLedgerResult {
97
97
  }
98
98
  export interface ClosePeriodResult {
99
99
  period: string;
100
+ /**
101
+ * Total drafts the close moved to posted, across both post paths. A close
102
+ * that published everything to QuickBooks used to report 0 here, because
103
+ * the pre-publish step promotes each draft before the local bulk
104
+ * transition counts it; both paths are summed now.
105
+ */
100
106
  entriesPosted: number;
107
+ /** Drafts published to QuickBooks by the close's pre-publish step. */
108
+ entriesPublishedToQb: number;
109
+ /** Drafts posted by the local bulk transition (never reach QuickBooks). */
110
+ entriesPostedLocally: number;
101
111
  targetAutoAdvanced: boolean;
102
112
  fiscalCalendar: LedgerFiscalCalendar;
103
113
  /**
@@ -152,6 +162,13 @@ export interface InitializeLedgerOptions {
152
162
  export interface ClosePeriodOptions {
153
163
  note?: string | null;
154
164
  allowStaleSync?: boolean;
165
+ /**
166
+ * Close despite matured obligations that were never drafted, knowingly
167
+ * omitting those adjusting entries. Prefer re-running promotion with
168
+ * handler dispatch, or voiding the obligations. The override is recorded
169
+ * in the close audit note.
170
+ */
171
+ allowStrandedObligations?: boolean;
155
172
  }
156
173
  export interface CreateScheduleOptions {
157
174
  name: string;
@@ -579,12 +579,15 @@ class LedgerClient {
579
579
  period,
580
580
  note: options?.note ?? null,
581
581
  allow_stale_sync: options?.allowStaleSync,
582
+ allow_stranded_obligations: options?.allowStrandedObligations,
582
583
  };
583
584
  const envelope = await this.callOperation('Close period', (0, sdk_gen_1.closePeriod)({ path: { graph_id: graphId }, body }));
584
585
  const raw = envelope.result;
585
586
  return {
586
587
  period: raw.period,
587
588
  entriesPosted: raw.entries_posted ?? 0,
589
+ entriesPublishedToQb: raw.entries_published_to_qb ?? 0,
590
+ entriesPostedLocally: raw.entries_posted_locally ?? 0,
588
591
  targetAutoAdvanced: raw.target_auto_advanced ?? false,
589
592
  fiscalCalendar: rawFiscalCalendarToCamel(raw.fiscal_calendar),
590
593
  ruleSummary: raw.rule_summary ?? null,
@@ -1079,6 +1082,14 @@ class LedgerClient {
1079
1082
  }
1080
1083
  exports.LedgerClient = LedgerClient;
1081
1084
  // ── Module-private conversion helpers ─────────────────────────────────
1085
+ function rawObligationDetailToCamel(raw) {
1086
+ return {
1087
+ eventId: raw.event_id,
1088
+ scheduleId: raw.schedule_id ?? null,
1089
+ scheduleName: raw.schedule_name ?? null,
1090
+ period: raw.period,
1091
+ };
1092
+ }
1082
1093
  function rawFiscalCalendarToCamel(raw) {
1083
1094
  return {
1084
1095
  graphId: raw.graph_id,
@@ -1089,6 +1100,12 @@ function rawFiscalCalendarToCamel(raw) {
1089
1100
  catchUpSequence: raw.catch_up_sequence ?? [],
1090
1101
  closeableNow: raw.closeable_now ?? false,
1091
1102
  blockers: raw.blockers ?? [],
1103
+ pendingObligationCount: raw.pending_obligation_count ?? 0,
1104
+ pendingObligationSample: (raw.pending_obligation_sample ?? []).map(rawObligationDetailToCamel),
1105
+ earliestPendingPeriod: raw.earliest_pending_period ?? null,
1106
+ strandedObligationCount: raw.stranded_obligation_count ?? 0,
1107
+ strandedObligationSample: (raw.stranded_obligation_sample ?? []).map(rawObligationDetailToCamel),
1108
+ syncStaleDays: raw.sync_stale_days ?? null,
1092
1109
  lastCloseAt: raw.last_close_at ?? null,
1093
1110
  initializedAt: raw.initialized_at ?? null,
1094
1111
  lastSyncAt: raw.last_sync_at ?? null,
@@ -345,6 +345,13 @@ export interface CreateReportOptions {
345
345
  // consumers; for simple ack/ack-with-id payloads we keep the raw shape.
346
346
 
347
347
  /** Snake-case shape returned in envelope.result for fiscal calendar writes. */
348
+ interface RawObligationDetail {
349
+ event_id: string
350
+ schedule_id?: string | null
351
+ schedule_name?: string | null
352
+ period: string
353
+ }
354
+
348
355
  interface RawFiscalCalendar {
349
356
  graph_id: string
350
357
  fiscal_year_start_month: number
@@ -354,6 +361,15 @@ interface RawFiscalCalendar {
354
361
  catch_up_sequence: string[]
355
362
  closeable_now: boolean
356
363
  blockers: string[]
364
+ // Detail for actionable blockers — the API populates each only when its
365
+ // corresponding code is in `blockers`, so a caller can name which
366
+ // schedules hold the close rather than just that something does.
367
+ pending_obligation_count?: number
368
+ pending_obligation_sample?: RawObligationDetail[]
369
+ earliest_pending_period?: string | null
370
+ stranded_obligation_count?: number
371
+ stranded_obligation_sample?: RawObligationDetail[]
372
+ sync_stale_days?: number | null
357
373
  last_close_at: string | null
358
374
  initialized_at: string | null
359
375
  last_sync_at: string | null
@@ -375,6 +391,8 @@ interface RawInitializeLedgerResult {
375
391
  interface RawClosePeriodResult {
376
392
  period: string
377
393
  entries_posted: number
394
+ entries_published_to_qb?: number
395
+ entries_posted_locally?: number
378
396
  target_auto_advanced: boolean
379
397
  fiscal_calendar: RawFiscalCalendar
380
398
  // §3.8 — auto-run rules on close. `null` when no schedules with facts
@@ -404,7 +422,17 @@ export interface InitializeLedgerResult {
404
422
 
405
423
  export interface ClosePeriodResult {
406
424
  period: string
425
+ /**
426
+ * Total drafts the close moved to posted, across both post paths. A close
427
+ * that published everything to QuickBooks used to report 0 here, because
428
+ * the pre-publish step promotes each draft before the local bulk
429
+ * transition counts it; both paths are summed now.
430
+ */
407
431
  entriesPosted: number
432
+ /** Drafts published to QuickBooks by the close's pre-publish step. */
433
+ entriesPublishedToQb: number
434
+ /** Drafts posted by the local bulk transition (never reach QuickBooks). */
435
+ entriesPostedLocally: number
408
436
  targetAutoAdvanced: boolean
409
437
  fiscalCalendar: LedgerFiscalCalendar
410
438
  /**
@@ -466,6 +494,13 @@ export interface InitializeLedgerOptions {
466
494
  export interface ClosePeriodOptions {
467
495
  note?: string | null
468
496
  allowStaleSync?: boolean
497
+ /**
498
+ * Close despite matured obligations that were never drafted, knowingly
499
+ * omitting those adjusting entries. Prefer re-running promotion with
500
+ * handler dispatch, or voiding the obligations. The override is recorded
501
+ * in the close audit note.
502
+ */
503
+ allowStrandedObligations?: boolean
469
504
  }
470
505
 
471
506
  export interface CreateScheduleOptions {
@@ -1603,6 +1638,7 @@ export class LedgerClient {
1603
1638
  period,
1604
1639
  note: options?.note ?? null,
1605
1640
  allow_stale_sync: options?.allowStaleSync,
1641
+ allow_stranded_obligations: options?.allowStrandedObligations,
1606
1642
  }
1607
1643
  const envelope = await this.callOperation(
1608
1644
  'Close period',
@@ -1612,6 +1648,8 @@ export class LedgerClient {
1612
1648
  return {
1613
1649
  period: raw.period,
1614
1650
  entriesPosted: raw.entries_posted ?? 0,
1651
+ entriesPublishedToQb: raw.entries_published_to_qb ?? 0,
1652
+ entriesPostedLocally: raw.entries_posted_locally ?? 0,
1615
1653
  targetAutoAdvanced: raw.target_auto_advanced ?? false,
1616
1654
  fiscalCalendar: rawFiscalCalendarToCamel(raw.fiscal_calendar),
1617
1655
  ruleSummary: raw.rule_summary ?? null,
@@ -2363,6 +2401,15 @@ export class LedgerClient {
2363
2401
 
2364
2402
  // ── Module-private conversion helpers ─────────────────────────────────
2365
2403
 
2404
+ function rawObligationDetailToCamel(raw: RawObligationDetail) {
2405
+ return {
2406
+ eventId: raw.event_id,
2407
+ scheduleId: raw.schedule_id ?? null,
2408
+ scheduleName: raw.schedule_name ?? null,
2409
+ period: raw.period,
2410
+ }
2411
+ }
2412
+
2366
2413
  function rawFiscalCalendarToCamel(raw: RawFiscalCalendar): LedgerFiscalCalendar {
2367
2414
  return {
2368
2415
  graphId: raw.graph_id,
@@ -2373,6 +2420,14 @@ function rawFiscalCalendarToCamel(raw: RawFiscalCalendar): LedgerFiscalCalendar
2373
2420
  catchUpSequence: raw.catch_up_sequence ?? [],
2374
2421
  closeableNow: raw.closeable_now ?? false,
2375
2422
  blockers: raw.blockers ?? [],
2423
+ pendingObligationCount: raw.pending_obligation_count ?? 0,
2424
+ pendingObligationSample: (raw.pending_obligation_sample ?? []).map(rawObligationDetailToCamel),
2425
+ earliestPendingPeriod: raw.earliest_pending_period ?? null,
2426
+ strandedObligationCount: raw.stranded_obligation_count ?? 0,
2427
+ strandedObligationSample: (raw.stranded_obligation_sample ?? []).map(
2428
+ rawObligationDetailToCamel
2429
+ ),
2430
+ syncStaleDays: raw.sync_stale_days ?? null,
2376
2431
  lastCloseAt: raw.last_close_at ?? null,
2377
2432
  initializedAt: raw.initialized_at ?? null,
2378
2433
  lastSyncAt: raw.last_sync_at ?? null,
@@ -317,10 +317,10 @@ export type EventBlock = {
317
317
  externalId: Maybe<Scalars['String']['output']>;
318
318
  externalUrl: Maybe<Scalars['String']['output']>;
319
319
  id: Scalars['String']['output'];
320
+ isReconcilingItem: Scalars['Boolean']['output'];
320
321
  metadata: Scalars['JSON']['output'];
321
322
  obligatedByEventId: Maybe<Scalars['String']['output']>;
322
323
  occurredAt: Scalars['DateTime']['output'];
323
- payloadDrift: Scalars['Boolean']['output'];
324
324
  replacedByEventId: Maybe<Scalars['String']['output']>;
325
325
  replacesEventId: Maybe<Scalars['String']['output']>;
326
326
  resourceElementId: Maybe<Scalars['String']['output']>;
@@ -1620,9 +1620,9 @@ export type QueryEventBlocksArgs = {
1620
1620
  agentId?: InputMaybe<Scalars['String']['input']>;
1621
1621
  eventCategory?: InputMaybe<Scalars['String']['input']>;
1622
1622
  eventType?: InputMaybe<Scalars['String']['input']>;
1623
+ isReconcilingItem?: InputMaybe<Scalars['Boolean']['input']>;
1623
1624
  limit?: InputMaybe<Scalars['Int']['input']>;
1624
1625
  offset?: InputMaybe<Scalars['Int']['input']>;
1625
- payloadDrift?: InputMaybe<Scalars['Boolean']['input']>;
1626
1626
  source?: InputMaybe<Scalars['String']['input']>;
1627
1627
  status?: InputMaybe<Scalars['String']['input']>;
1628
1628
  };
@@ -2771,9 +2771,25 @@ export type GetLedgerFiscalCalendarQuery = {
2771
2771
  catchUpSequence: Array<string>;
2772
2772
  closeableNow: boolean;
2773
2773
  blockers: Array<string>;
2774
+ pendingObligationCount: number;
2775
+ earliestPendingPeriod: string | null;
2776
+ strandedObligationCount: number;
2777
+ syncStaleDays: number | null;
2774
2778
  lastCloseAt: any | null;
2775
2779
  initializedAt: any | null;
2776
2780
  lastSyncAt: any | null;
2781
+ pendingObligationSample: Array<{
2782
+ eventId: string;
2783
+ scheduleId: string | null;
2784
+ scheduleName: string | null;
2785
+ period: string;
2786
+ }>;
2787
+ strandedObligationSample: Array<{
2788
+ eventId: string;
2789
+ scheduleId: string | null;
2790
+ scheduleName: string | null;
2791
+ period: string;
2792
+ }>;
2777
2793
  periods: Array<{
2778
2794
  name: string;
2779
2795
  startDate: any;
@@ -1621,6 +1621,36 @@ exports.GetLedgerFiscalCalendarDocument = {
1621
1621
  { kind: 'Field', name: { kind: 'Name', value: 'catchUpSequence' } },
1622
1622
  { kind: 'Field', name: { kind: 'Name', value: 'closeableNow' } },
1623
1623
  { kind: 'Field', name: { kind: 'Name', value: 'blockers' } },
1624
+ { kind: 'Field', name: { kind: 'Name', value: 'pendingObligationCount' } },
1625
+ {
1626
+ kind: 'Field',
1627
+ name: { kind: 'Name', value: 'pendingObligationSample' },
1628
+ selectionSet: {
1629
+ kind: 'SelectionSet',
1630
+ selections: [
1631
+ { kind: 'Field', name: { kind: 'Name', value: 'eventId' } },
1632
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleId' } },
1633
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleName' } },
1634
+ { kind: 'Field', name: { kind: 'Name', value: 'period' } },
1635
+ ],
1636
+ },
1637
+ },
1638
+ { kind: 'Field', name: { kind: 'Name', value: 'earliestPendingPeriod' } },
1639
+ { kind: 'Field', name: { kind: 'Name', value: 'strandedObligationCount' } },
1640
+ {
1641
+ kind: 'Field',
1642
+ name: { kind: 'Name', value: 'strandedObligationSample' },
1643
+ selectionSet: {
1644
+ kind: 'SelectionSet',
1645
+ selections: [
1646
+ { kind: 'Field', name: { kind: 'Name', value: 'eventId' } },
1647
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleId' } },
1648
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleName' } },
1649
+ { kind: 'Field', name: { kind: 'Name', value: 'period' } },
1650
+ ],
1651
+ },
1652
+ },
1653
+ { kind: 'Field', name: { kind: 'Name', value: 'syncStaleDays' } },
1624
1654
  { kind: 'Field', name: { kind: 'Name', value: 'lastCloseAt' } },
1625
1655
  { kind: 'Field', name: { kind: 'Name', value: 'initializedAt' } },
1626
1656
  { kind: 'Field', name: { kind: 'Name', value: 'lastSyncAt' } },
@@ -301,10 +301,10 @@ export type EventBlock = {
301
301
  externalId: Maybe<Scalars['String']['output']>
302
302
  externalUrl: Maybe<Scalars['String']['output']>
303
303
  id: Scalars['String']['output']
304
+ isReconcilingItem: Scalars['Boolean']['output']
304
305
  metadata: Scalars['JSON']['output']
305
306
  obligatedByEventId: Maybe<Scalars['String']['output']>
306
307
  occurredAt: Scalars['DateTime']['output']
307
- payloadDrift: Scalars['Boolean']['output']
308
308
  replacedByEventId: Maybe<Scalars['String']['output']>
309
309
  replacesEventId: Maybe<Scalars['String']['output']>
310
310
  resourceElementId: Maybe<Scalars['String']['output']>
@@ -1680,9 +1680,9 @@ export type QueryEventBlocksArgs = {
1680
1680
  agentId?: InputMaybe<Scalars['String']['input']>
1681
1681
  eventCategory?: InputMaybe<Scalars['String']['input']>
1682
1682
  eventType?: InputMaybe<Scalars['String']['input']>
1683
+ isReconcilingItem?: InputMaybe<Scalars['Boolean']['input']>
1683
1684
  limit?: InputMaybe<Scalars['Int']['input']>
1684
1685
  offset?: InputMaybe<Scalars['Int']['input']>
1685
- payloadDrift?: InputMaybe<Scalars['Boolean']['input']>
1686
1686
  source?: InputMaybe<Scalars['String']['input']>
1687
1687
  status?: InputMaybe<Scalars['String']['input']>
1688
1688
  }
@@ -2896,9 +2896,25 @@ export type GetLedgerFiscalCalendarQuery = {
2896
2896
  catchUpSequence: Array<string>
2897
2897
  closeableNow: boolean
2898
2898
  blockers: Array<string>
2899
+ pendingObligationCount: number
2900
+ earliestPendingPeriod: string | null
2901
+ strandedObligationCount: number
2902
+ syncStaleDays: number | null
2899
2903
  lastCloseAt: any | null
2900
2904
  initializedAt: any | null
2901
2905
  lastSyncAt: any | null
2906
+ pendingObligationSample: Array<{
2907
+ eventId: string
2908
+ scheduleId: string | null
2909
+ scheduleName: string | null
2910
+ period: string
2911
+ }>
2912
+ strandedObligationSample: Array<{
2913
+ eventId: string
2914
+ scheduleId: string | null
2915
+ scheduleName: string | null
2916
+ period: string
2917
+ }>
2902
2918
  periods: Array<{
2903
2919
  name: string
2904
2920
  startDate: any
@@ -5857,6 +5873,36 @@ export const GetLedgerFiscalCalendarDocument = {
5857
5873
  { kind: 'Field', name: { kind: 'Name', value: 'catchUpSequence' } },
5858
5874
  { kind: 'Field', name: { kind: 'Name', value: 'closeableNow' } },
5859
5875
  { kind: 'Field', name: { kind: 'Name', value: 'blockers' } },
5876
+ { kind: 'Field', name: { kind: 'Name', value: 'pendingObligationCount' } },
5877
+ {
5878
+ kind: 'Field',
5879
+ name: { kind: 'Name', value: 'pendingObligationSample' },
5880
+ selectionSet: {
5881
+ kind: 'SelectionSet',
5882
+ selections: [
5883
+ { kind: 'Field', name: { kind: 'Name', value: 'eventId' } },
5884
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleId' } },
5885
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleName' } },
5886
+ { kind: 'Field', name: { kind: 'Name', value: 'period' } },
5887
+ ],
5888
+ },
5889
+ },
5890
+ { kind: 'Field', name: { kind: 'Name', value: 'earliestPendingPeriod' } },
5891
+ { kind: 'Field', name: { kind: 'Name', value: 'strandedObligationCount' } },
5892
+ {
5893
+ kind: 'Field',
5894
+ name: { kind: 'Name', value: 'strandedObligationSample' },
5895
+ selectionSet: {
5896
+ kind: 'SelectionSet',
5897
+ selections: [
5898
+ { kind: 'Field', name: { kind: 'Name', value: 'eventId' } },
5899
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleId' } },
5900
+ { kind: 'Field', name: { kind: 'Name', value: 'scheduleName' } },
5901
+ { kind: 'Field', name: { kind: 'Name', value: 'period' } },
5902
+ ],
5903
+ },
5904
+ },
5905
+ { kind: 'Field', name: { kind: 'Name', value: 'syncStaleDays' } },
5860
5906
  { kind: 'Field', name: { kind: 'Name', value: 'lastCloseAt' } },
5861
5907
  { kind: 'Field', name: { kind: 'Name', value: 'initializedAt' } },
5862
5908
  { kind: 'Field', name: { kind: 'Name', value: 'lastSyncAt' } },
@@ -4,5 +4,12 @@
4
4
  * The resolver blends extensions-DB data (calendar + periods) with a
5
5
  * platform-DB lookup for QB sync state (last_sync_at). Clients use
6
6
  * `closeableNow` + `blockers` as the close gate.
7
+ *
8
+ * The obligation and staleness detail fields populate only when their
9
+ * corresponding blocker code is present, so a UI can name *which* schedules
10
+ * are holding the close instead of just reporting that something is. They
11
+ * are selected unconditionally here — the resolver returns 0 / [] / null
12
+ * when the blocker isn't active, which costs nothing and keeps the document
13
+ * free of a second round trip for the case that matters most.
7
14
  */
8
15
  export declare const GET_FISCAL_CALENDAR: string;
@@ -8,6 +8,13 @@ const graphql_request_1 = require("graphql-request");
8
8
  * The resolver blends extensions-DB data (calendar + periods) with a
9
9
  * platform-DB lookup for QB sync state (last_sync_at). Clients use
10
10
  * `closeableNow` + `blockers` as the close gate.
11
+ *
12
+ * The obligation and staleness detail fields populate only when their
13
+ * corresponding blocker code is present, so a UI can name *which* schedules
14
+ * are holding the close instead of just reporting that something is. They
15
+ * are selected unconditionally here — the resolver returns 0 / [] / null
16
+ * when the blocker isn't active, which costs nothing and keeps the document
17
+ * free of a second round trip for the case that matters most.
11
18
  */
12
19
  exports.GET_FISCAL_CALENDAR = (0, graphql_request_1.gql) `
13
20
  query GetLedgerFiscalCalendar {
@@ -20,6 +27,22 @@ exports.GET_FISCAL_CALENDAR = (0, graphql_request_1.gql) `
20
27
  catchUpSequence
21
28
  closeableNow
22
29
  blockers
30
+ pendingObligationCount
31
+ pendingObligationSample {
32
+ eventId
33
+ scheduleId
34
+ scheduleName
35
+ period
36
+ }
37
+ earliestPendingPeriod
38
+ strandedObligationCount
39
+ strandedObligationSample {
40
+ eventId
41
+ scheduleId
42
+ scheduleName
43
+ period
44
+ }
45
+ syncStaleDays
23
46
  lastCloseAt
24
47
  initializedAt
25
48
  lastSyncAt
@@ -6,6 +6,13 @@ import { gql } from 'graphql-request'
6
6
  * The resolver blends extensions-DB data (calendar + periods) with a
7
7
  * platform-DB lookup for QB sync state (last_sync_at). Clients use
8
8
  * `closeableNow` + `blockers` as the close gate.
9
+ *
10
+ * The obligation and staleness detail fields populate only when their
11
+ * corresponding blocker code is present, so a UI can name *which* schedules
12
+ * are holding the close instead of just reporting that something is. They
13
+ * are selected unconditionally here — the resolver returns 0 / [] / null
14
+ * when the blocker isn't active, which costs nothing and keeps the document
15
+ * free of a second round trip for the case that matters most.
9
16
  */
10
17
  export const GET_FISCAL_CALENDAR = gql`
11
18
  query GetLedgerFiscalCalendar {
@@ -18,6 +25,22 @@ export const GET_FISCAL_CALENDAR = gql`
18
25
  catchUpSequence
19
26
  closeableNow
20
27
  blockers
28
+ pendingObligationCount
29
+ pendingObligationSample {
30
+ eventId
31
+ scheduleId
32
+ scheduleName
33
+ period
34
+ }
35
+ earliestPendingPeriod
36
+ strandedObligationCount
37
+ strandedObligationSample {
38
+ eventId
39
+ scheduleId
40
+ scheduleName
41
+ period
42
+ }
43
+ syncStaleDays
21
44
  lastCloseAt
22
45
  initializedAt
23
46
  lastSyncAt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosystems/client",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "description": "TypeScript client library for RoboSystems Financial Knowledge Graph API",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -4804,11 +4804,11 @@ export type EventBlockEnvelope = {
4804
4804
  [key: string]: unknown;
4805
4805
  };
4806
4806
  /**
4807
- * Payload Drift
4807
+ * Is Reconciling Item
4808
4808
  *
4809
- * True when a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`. Drifted events need operator reconciliation — the local books no longer mirror the source.
4809
+ * True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.
4810
4810
  */
4811
- payload_drift?: boolean;
4811
+ is_reconciling_item?: boolean;
4812
4812
  /**
4813
4813
  * Dimension Ids
4814
4814
  *
@@ -7032,7 +7032,7 @@ export type InstanceUsage = {
7032
7032
  /**
7033
7033
  * Usage Percentage
7034
7034
  *
7035
- * Storage usage as percentage of limit (e.g. 105.2)
7035
+ * Storage usage as percentage of limit (e.g. 105.2). Derived from the enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than total_storage_gb/limit_gb while a blue-green rebuild is in flight.
7036
7036
  */
7037
7037
  usage_percentage?: number | null;
7038
7038
  /**
@@ -7050,7 +7050,7 @@ export type InstanceUsage = {
7050
7050
  /**
7051
7051
  * Items
7052
7052
  *
7053
- * Itemized storage by type — graph, memory, subgraph, vectors, staging. Sums to total_storage_gb.
7053
+ * Itemized storage by type — graph, memory, subgraph, vectors, staging, transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the type to sum when reconciling against the subgraph list.
7054
7054
  */
7055
7055
  items?: Array<StorageItem>;
7056
7056
  };
@@ -8018,6 +8018,12 @@ export type ListSubgraphsResponse = {
8018
8018
  * Maximum allowed subgraphs for this tier (None = unlimited)
8019
8019
  */
8020
8020
  max_subgraphs?: number | null;
8021
+ /**
8022
+ * Total Size Bytes
8023
+ *
8024
+ * Combined on-disk footprint of all subgraphs in bytes
8025
+ */
8026
+ total_size_bytes?: number | null;
8021
8027
  /**
8022
8028
  * Total Size Mb
8023
8029
  *
@@ -13680,7 +13686,7 @@ export type StorageItem = {
13680
13686
  /**
13681
13687
  * Type
13682
13688
  *
13683
- * One of: graph, memory, subgraph, vectors, staging
13689
+ * One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a `{parent}_*` database, vector index, or staging file with no row in the graph registry — reclaimable leftover of a deleted subgraph)
13684
13690
  */
13685
13691
  type: string;
13686
13692
  /**
@@ -13932,6 +13938,12 @@ export type SubgraphResponse = {
13932
13938
  * When the subgraph was last updated
13933
13939
  */
13934
13940
  updated_at: string;
13941
+ /**
13942
+ * Size Bytes
13943
+ *
13944
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
13945
+ */
13946
+ size_bytes?: number | null;
13935
13947
  /**
13936
13948
  * Size Mb
13937
13949
  *
@@ -13999,10 +14011,16 @@ export type SubgraphSummary = {
13999
14011
  * Current status
14000
14012
  */
14001
14013
  status: string;
14014
+ /**
14015
+ * Size Bytes
14016
+ *
14017
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14018
+ */
14019
+ size_bytes?: number | null;
14002
14020
  /**
14003
14021
  * Size Mb
14004
14022
  *
14005
- * Size in megabytes
14023
+ * Same footprint in megabytes. Derived from size_bytes; kept for callers that render MB directly.
14006
14024
  */
14007
14025
  size_mb?: number | null;
14008
14026
  /**
package/sdk/types.gen.ts CHANGED
@@ -4929,11 +4929,11 @@ export type EventBlockEnvelope = {
4929
4929
  [key: string]: unknown;
4930
4930
  };
4931
4931
  /**
4932
- * Payload Drift
4932
+ * Is Reconciling Item
4933
4933
  *
4934
- * True when a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`. Drifted events need operator reconciliation — the local books no longer mirror the source.
4934
+ * True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.
4935
4935
  */
4936
- payload_drift?: boolean;
4936
+ is_reconciling_item?: boolean;
4937
4937
  /**
4938
4938
  * Dimension Ids
4939
4939
  *
@@ -7204,7 +7204,7 @@ export type InstanceUsage = {
7204
7204
  /**
7205
7205
  * Usage Percentage
7206
7206
  *
7207
- * Storage usage as percentage of limit (e.g. 105.2)
7207
+ * Storage usage as percentage of limit (e.g. 105.2). Derived from the enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than total_storage_gb/limit_gb while a blue-green rebuild is in flight.
7208
7208
  */
7209
7209
  usage_percentage?: number | null;
7210
7210
  /**
@@ -7222,7 +7222,7 @@ export type InstanceUsage = {
7222
7222
  /**
7223
7223
  * Items
7224
7224
  *
7225
- * Itemized storage by type — graph, memory, subgraph, vectors, staging. Sums to total_storage_gb.
7225
+ * Itemized storage by type — graph, memory, subgraph, vectors, staging, transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the type to sum when reconciling against the subgraph list.
7226
7226
  */
7227
7227
  items?: Array<StorageItem>;
7228
7228
  };
@@ -8208,6 +8208,12 @@ export type ListSubgraphsResponse = {
8208
8208
  * Maximum allowed subgraphs for this tier (None = unlimited)
8209
8209
  */
8210
8210
  max_subgraphs?: number | null;
8211
+ /**
8212
+ * Total Size Bytes
8213
+ *
8214
+ * Combined on-disk footprint of all subgraphs in bytes
8215
+ */
8216
+ total_size_bytes?: number | null;
8211
8217
  /**
8212
8218
  * Total Size Mb
8213
8219
  *
@@ -14020,7 +14026,7 @@ export type StorageItem = {
14020
14026
  /**
14021
14027
  * Type
14022
14028
  *
14023
- * One of: graph, memory, subgraph, vectors, staging
14029
+ * One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a `{parent}_*` database, vector index, or staging file with no row in the graph registry — reclaimable leftover of a deleted subgraph)
14024
14030
  */
14025
14031
  type: string;
14026
14032
  /**
@@ -14278,6 +14284,12 @@ export type SubgraphResponse = {
14278
14284
  * When the subgraph was last updated
14279
14285
  */
14280
14286
  updated_at: string;
14287
+ /**
14288
+ * Size Bytes
14289
+ *
14290
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14291
+ */
14292
+ size_bytes?: number | null;
14281
14293
  /**
14282
14294
  * Size Mb
14283
14295
  *
@@ -14346,10 +14358,16 @@ export type SubgraphSummary = {
14346
14358
  * Current status
14347
14359
  */
14348
14360
  status: string;
14361
+ /**
14362
+ * Size Bytes
14363
+ *
14364
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14365
+ */
14366
+ size_bytes?: number | null;
14349
14367
  /**
14350
14368
  * Size Mb
14351
14369
  *
14352
- * Size in megabytes
14370
+ * Same footprint in megabytes. Derived from size_bytes; kept for callers that render MB directly.
14353
14371
  */
14354
14372
  size_mb?: number | null;
14355
14373
  /**
package/types.gen.d.ts CHANGED
@@ -4804,11 +4804,11 @@ export type EventBlockEnvelope = {
4804
4804
  [key: string]: unknown;
4805
4805
  };
4806
4806
  /**
4807
- * Payload Drift
4807
+ * Is Reconciling Item
4808
4808
  *
4809
- * True when a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`. Drifted events need operator reconciliation — the local books no longer mirror the source.
4809
+ * True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.
4810
4810
  */
4811
- payload_drift?: boolean;
4811
+ is_reconciling_item?: boolean;
4812
4812
  /**
4813
4813
  * Dimension Ids
4814
4814
  *
@@ -7032,7 +7032,7 @@ export type InstanceUsage = {
7032
7032
  /**
7033
7033
  * Usage Percentage
7034
7034
  *
7035
- * Storage usage as percentage of limit (e.g. 105.2)
7035
+ * Storage usage as percentage of limit (e.g. 105.2). Derived from the enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than total_storage_gb/limit_gb while a blue-green rebuild is in flight.
7036
7036
  */
7037
7037
  usage_percentage?: number | null;
7038
7038
  /**
@@ -7050,7 +7050,7 @@ export type InstanceUsage = {
7050
7050
  /**
7051
7051
  * Items
7052
7052
  *
7053
- * Itemized storage by type — graph, memory, subgraph, vectors, staging. Sums to total_storage_gb.
7053
+ * Itemized storage by type — graph, memory, subgraph, vectors, staging, transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the type to sum when reconciling against the subgraph list.
7054
7054
  */
7055
7055
  items?: Array<StorageItem>;
7056
7056
  };
@@ -8018,6 +8018,12 @@ export type ListSubgraphsResponse = {
8018
8018
  * Maximum allowed subgraphs for this tier (None = unlimited)
8019
8019
  */
8020
8020
  max_subgraphs?: number | null;
8021
+ /**
8022
+ * Total Size Bytes
8023
+ *
8024
+ * Combined on-disk footprint of all subgraphs in bytes
8025
+ */
8026
+ total_size_bytes?: number | null;
8021
8027
  /**
8022
8028
  * Total Size Mb
8023
8029
  *
@@ -13680,7 +13686,7 @@ export type StorageItem = {
13680
13686
  /**
13681
13687
  * Type
13682
13688
  *
13683
- * One of: graph, memory, subgraph, vectors, staging
13689
+ * One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a `{parent}_*` database, vector index, or staging file with no row in the graph registry — reclaimable leftover of a deleted subgraph)
13684
13690
  */
13685
13691
  type: string;
13686
13692
  /**
@@ -13932,6 +13938,12 @@ export type SubgraphResponse = {
13932
13938
  * When the subgraph was last updated
13933
13939
  */
13934
13940
  updated_at: string;
13941
+ /**
13942
+ * Size Bytes
13943
+ *
13944
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
13945
+ */
13946
+ size_bytes?: number | null;
13935
13947
  /**
13936
13948
  * Size Mb
13937
13949
  *
@@ -13999,10 +14011,16 @@ export type SubgraphSummary = {
13999
14011
  * Current status
14000
14012
  */
14001
14013
  status: string;
14014
+ /**
14015
+ * Size Bytes
14016
+ *
14017
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14018
+ */
14019
+ size_bytes?: number | null;
14002
14020
  /**
14003
14021
  * Size Mb
14004
14022
  *
14005
- * Size in megabytes
14023
+ * Same footprint in megabytes. Derived from size_bytes; kept for callers that render MB directly.
14006
14024
  */
14007
14025
  size_mb?: number | null;
14008
14026
  /**
package/types.gen.ts CHANGED
@@ -4929,11 +4929,11 @@ export type EventBlockEnvelope = {
4929
4929
  [key: string]: unknown;
4930
4930
  };
4931
4931
  /**
4932
- * Payload Drift
4932
+ * Is Reconciling Item
4933
4933
  *
4934
- * True when a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`. Drifted events need operator reconciliation — the local books no longer mirror the source.
4934
+ * True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.
4935
4935
  */
4936
- payload_drift?: boolean;
4936
+ is_reconciling_item?: boolean;
4937
4937
  /**
4938
4938
  * Dimension Ids
4939
4939
  *
@@ -7204,7 +7204,7 @@ export type InstanceUsage = {
7204
7204
  /**
7205
7205
  * Usage Percentage
7206
7206
  *
7207
- * Storage usage as percentage of limit (e.g. 105.2)
7207
+ * Storage usage as percentage of limit (e.g. 105.2). Derived from the enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than total_storage_gb/limit_gb while a blue-green rebuild is in flight.
7208
7208
  */
7209
7209
  usage_percentage?: number | null;
7210
7210
  /**
@@ -7222,7 +7222,7 @@ export type InstanceUsage = {
7222
7222
  /**
7223
7223
  * Items
7224
7224
  *
7225
- * Itemized storage by type — graph, memory, subgraph, vectors, staging. Sums to total_storage_gb.
7225
+ * Itemized storage by type — graph, memory, subgraph, vectors, staging, transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the type to sum when reconciling against the subgraph list.
7226
7226
  */
7227
7227
  items?: Array<StorageItem>;
7228
7228
  };
@@ -8208,6 +8208,12 @@ export type ListSubgraphsResponse = {
8208
8208
  * Maximum allowed subgraphs for this tier (None = unlimited)
8209
8209
  */
8210
8210
  max_subgraphs?: number | null;
8211
+ /**
8212
+ * Total Size Bytes
8213
+ *
8214
+ * Combined on-disk footprint of all subgraphs in bytes
8215
+ */
8216
+ total_size_bytes?: number | null;
8211
8217
  /**
8212
8218
  * Total Size Mb
8213
8219
  *
@@ -14020,7 +14026,7 @@ export type StorageItem = {
14020
14026
  /**
14021
14027
  * Type
14022
14028
  *
14023
- * One of: graph, memory, subgraph, vectors, staging
14029
+ * One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a `{parent}_*` database, vector index, or staging file with no row in the graph registry — reclaimable leftover of a deleted subgraph)
14024
14030
  */
14025
14031
  type: string;
14026
14032
  /**
@@ -14278,6 +14284,12 @@ export type SubgraphResponse = {
14278
14284
  * When the subgraph was last updated
14279
14285
  */
14280
14286
  updated_at: string;
14287
+ /**
14288
+ * Size Bytes
14289
+ *
14290
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14291
+ */
14292
+ size_bytes?: number | null;
14281
14293
  /**
14282
14294
  * Size Mb
14283
14295
  *
@@ -14346,10 +14358,16 @@ export type SubgraphSummary = {
14346
14358
  * Current status
14347
14359
  */
14348
14360
  status: string;
14361
+ /**
14362
+ * Size Bytes
14363
+ *
14364
+ * On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale.
14365
+ */
14366
+ size_bytes?: number | null;
14349
14367
  /**
14350
14368
  * Size Mb
14351
14369
  *
14352
- * Size in megabytes
14370
+ * Same footprint in megabytes. Derived from size_bytes; kept for callers that render MB directly.
14353
14371
  */
14354
14372
  size_mb?: number | null;
14355
14373
  /**