@declarion/react 0.12.4 → 0.15.0

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.
@@ -68,6 +68,13 @@ export declare class ApiError extends Error {
68
68
  */
69
69
  export declare const CURSOR_SEMANTICS_MISMATCH = "cursor_semantics_mismatch";
70
70
  export declare const CURSOR_LOCALE_CHANGED = "cursor_locale_changed";
71
+ /**
72
+ * A cross-store (Postgres-hot / ClickHouse-cold) archive cursor that the server
73
+ * could not decode for this read - a malformed token, a tenant/entity mismatch,
74
+ * or a retired bespoke-archive cursor minted before the native-cursor release.
75
+ * Same recovery contract as the other two: drop `after`, refetch window 1.
76
+ */
77
+ export declare const ARCHIVE_CURSOR_INVALID = "archive_cursor_invalid";
71
78
  /** True if the error is a recoverable cursor-stale signal that warrants
72
79
  * refetching page 1 instead of surfacing to the user. */
73
80
  export declare function isCursorStaleError(err: unknown): boolean;
@@ -271,6 +278,13 @@ export interface V2Meta {
271
278
  limit: number;
272
279
  has_more: boolean;
273
280
  cursor?: string;
281
+ /** How `total` was produced: "exact" or "estimated". Absent when no count
282
+ * was requested. A cross-store cursor total is always "estimated". */
283
+ count_mode?: string;
284
+ /** True when a count WAS requested but abandoned because the cold-tier count
285
+ * would exceed the interactive scan bound (BC4b). The data window still
286
+ * loaded; render NO total ("~N") - distinct from a real `total: 0`. */
287
+ count_unknown?: boolean;
274
288
  }
275
289
  /**
276
290
  * Refs map: keyed by entity code (or $-prefixed virtual entity code),
@@ -316,6 +330,16 @@ export interface V2ListParams {
316
330
  limit?: number;
317
331
  after?: string;
318
332
  include_deleted?: boolean;
333
+ /** Request the (estimated) total alongside the window (`?count=with`). The
334
+ * cursor UI sends this on the FIRST window only; later windows omit it. */
335
+ count?: boolean;
336
+ /** Screen code, so the server applies that screen's `fixed_filters` (a
337
+ * cursor list of a `fixed_filters` view, e.g. the audit auth-log, needs
338
+ * the same server-side prefilter the offset list gets). */
339
+ screen?: string;
340
+ /** Return display-bounded (truncated) values for list cells, matching the
341
+ * offset list's `preview: true`. */
342
+ preview?: boolean;
319
343
  }
320
344
  /** Per-field resolved display unit codes. */
321
345
  export type Units = Record<string, string>;
@@ -363,6 +363,16 @@ export interface Entity {
363
363
  * docs/plans/2026-05-18-declarative-row-count.md.
364
364
  */
365
365
  count?: "exact" | "estimated";
366
+ /**
367
+ * Computed (server-side, never author-set) pagination mode the generated
368
+ * admin list MUST use: "offset" (numbered pages) or "cursor" (keyset /
369
+ * infinite scroll). "cursor" iff the entity declares `persistence.archive`
370
+ * AND the deployment has ClickHouse wired at boot - a cross-store hot+cold
371
+ * read cannot offset-paginate. Absent means "offset" (every plain Postgres /
372
+ * ClickHouse-only / ClickHouse-disabled-archive entity). The SDK branches the
373
+ * list UI on this. See docs/plans/2026-06-20-cross-store-list-cursor-pagination.md.
374
+ */
375
+ list_pagination?: "offset" | "cursor";
366
376
  }
367
377
  export interface ExportConfig {
368
378
  enabled?: boolean;
@@ -11,7 +11,7 @@ var c = class extends Error {
11
11
  }
12
12
  }, l = "cursor_semantics_mismatch", u = "cursor_locale_changed";
13
13
  function d(e) {
14
- return e instanceof c && (e.code === "cursor_semantics_mismatch" || e.code === "cursor_locale_changed");
14
+ return e instanceof c && (e.code === "cursor_semantics_mismatch" || e.code === "cursor_locale_changed" || e.code === "archive_cursor_invalid");
15
15
  }
16
16
  //#endregion
17
17
  //#region src/api/auth-redirect.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.12.4",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",