@almadar/ui 3.2.0 → 3.2.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.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
import type { BusEvent, BusEventSource,
|
|
12
|
+
import type { BusEvent, BusEventSource, EventPayload } from '@almadar/core';
|
|
13
13
|
export type CheckStatus = "pass" | "fail" | "pending" | "warn";
|
|
14
14
|
export interface VerificationCheck {
|
|
15
15
|
id: string;
|
|
@@ -81,11 +81,17 @@ export interface TraitStateSnapshot {
|
|
|
81
81
|
/** Declared event keys for this trait (non-empty for healthy trait refs). */
|
|
82
82
|
events: string[];
|
|
83
83
|
/**
|
|
84
|
-
* Entity data keyed by entity name.
|
|
85
|
-
*
|
|
86
|
-
*
|
|
84
|
+
* Entity data keyed by entity name. Matches the wire shape that flows
|
|
85
|
+
* from `EventResponse.data` into the trait reducer: every row carries
|
|
86
|
+
* an `id` (string on the client, string-or-number across the wire).
|
|
87
|
+
* Rows may carry additional fields from the entity's declared schema;
|
|
88
|
+
* consumers that need the full shape cast down to the generated entity
|
|
89
|
+
* type (e.g. `data['CartItem'] as CartItem[]`). Snapshot-on-read;
|
|
90
|
+
* mutating the returned arrays does not affect the live reducer.
|
|
87
91
|
*/
|
|
88
|
-
data: Record<string,
|
|
92
|
+
data: Record<string, Array<{
|
|
93
|
+
id: string | number;
|
|
94
|
+
}>>;
|
|
89
95
|
/** Payload of the last event the state machine processed, if any. */
|
|
90
96
|
lastPayload?: EventPayload;
|
|
91
97
|
/**
|