@nivaro/react 0.1.268 → 0.1.270

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.
package/dist/index.d.ts CHANGED
@@ -421,6 +421,20 @@ declare interface BulkTarget {
421
421
  id: string | number;
422
422
  }
423
423
 
424
+ /**
425
+ * "Updated 3m ago · Refresh" for a cached figure.
426
+ *
427
+ * A cache the viewer cannot see is a number they cannot trust: without this
428
+ * a report served from Redis is indistinguishable from one just computed.
429
+ * Renders nothing for an uncached query — there is nothing to disclose.
430
+ */
431
+ export declare function CacheStamp({ envelope, onRefresh, refreshing, className }: {
432
+ envelope: CustomQueryEnvelope | undefined;
433
+ onRefresh?: () => void;
434
+ refreshing?: boolean;
435
+ className?: string;
436
+ }): JSX.Element | null;
437
+
424
438
  export declare function canOpenCatalogItem(collection: string | null | undefined): boolean;
425
439
 
426
440
  export declare function canOpenChatRoom(): boolean;
@@ -1005,6 +1019,21 @@ export declare function CustomActionButtons({ collection, itemId, draft }: {
1005
1019
  draft: Record<string, unknown>;
1006
1020
  }): JSX.Element | null;
1007
1021
 
1022
+ /**
1023
+ * The envelope `POST /custom-queries/:slug/execute` returns. Older servers
1024
+ * answer with `data`/`cached` only, so every cache field is optional and the
1025
+ * stamp simply renders nothing when they are absent.
1026
+ */
1027
+ declare interface CustomQueryEnvelope {
1028
+ data: Array<Record<string, unknown>>;
1029
+ cached?: boolean;
1030
+ cached_at?: string | null;
1031
+ age_seconds?: number | null;
1032
+ expires_in_seconds?: number | null;
1033
+ cache_ttl?: number | null;
1034
+ executed_at?: string | null;
1035
+ }
1036
+
1008
1037
  /** `nivaro_users.preferences.custom_status` — free text + emoji beside the
1009
1038
  * presence state, self-clearing at `expires_at`. */
1010
1039
  export declare type CustomStatus = {
@@ -4282,6 +4311,14 @@ declare interface ReviewListConfig {
4282
4311
  aggregate_sum?: string | null;
4283
4312
  aggregate_sum_format?: ReviewListColumnFormat | null;
4284
4313
  group_meta?: Array<string | ReviewListColumnSpec>;
4314
+ /** Order groups by a field instead of by key — the most pressing first
4315
+ * (`{field: 'due_date', direction: 'asc'}` puts the soonest due on top).
4316
+ * A group sorts on its EARLIEST value, since one late line makes the
4317
+ * whole invoice late. Groups missing the field keep the key order, last. */
4318
+ group_sort?: {
4319
+ field: string;
4320
+ direction?: 'asc' | 'desc';
4321
+ };
4285
4322
  line_columns?: Array<string | ReviewListColumnSpec>;
4286
4323
  status: {
4287
4324
  field: string;