@declarion/react 0.4.1 → 0.4.2

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.
@@ -49,6 +49,28 @@ export declare class ApiError extends Error {
49
49
  raw?: unknown;
50
50
  constructor(status: number, message: string, code: string, index?: number, raw?: unknown);
51
51
  }
52
+ /**
53
+ * Stable error codes for cursor-based list pagination. The server returns
54
+ * these on ValidationError{Field:"after"} when an `after` token cannot be
55
+ * resumed under current request conditions:
56
+ *
57
+ * - CURSOR_SEMANTICS_MISMATCH: the cursor was minted under different sort
58
+ * semantics (multi-column ordering, NULL placement). Server bumped its
59
+ * cursor format version since the cursor was issued.
60
+ * - CURSOR_LOCALE_CHANGED: the cursor was minted under one active locale
61
+ * and the request now carries a different one. Issued so multilang sort
62
+ * cannot silently re-order mid-pagination.
63
+ *
64
+ * UX contract for both: clear the `after` token and refetch page 1 under
65
+ * the current conditions. EntityClient.list does this transparently;
66
+ * direct apiFetch callers can recognise these codes to drive their own
67
+ * retry logic.
68
+ */
69
+ export declare const CURSOR_SEMANTICS_MISMATCH = "cursor_semantics_mismatch";
70
+ export declare const CURSOR_LOCALE_CHANGED = "cursor_locale_changed";
71
+ /** True if the error is a recoverable cursor-stale signal that warrants
72
+ * refetching page 1 instead of surfacing to the user. */
73
+ export declare function isCursorStaleError(err: unknown): boolean;
52
74
  export type TenantEnv = "production" | "staging" | "dev" | string;
53
75
  export interface Tenant {
54
76
  id: string;