Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / SnapshotMemo

Interface: SnapshotMemo

Defined in: flow/src/types.ts:37

Component identity / routing metadata embedded in the snapshot.

Properties

id

id: string

Defined in: flow/src/types.ts:38


name

name: string

Defined in: flow/src/types.ts:39


path

path: string

Defined in: flow/src/types.ts:40


children

children: string[]

Defined in: flow/src/types.ts:41


listeners?

optional listeners?: Record<string, string>

Defined in: flow/src/types.ts:43

On

listener map: eventName → methodName. Excluded from HMAC (server-derived).


slots?

optional slots?: Record<string, string>

Defined in: flow/src/types.ts:50

Named slot HTML passed down by the parent's template (slotName → html; the default slot is keyed "default"). Rendered in the parent's scope, then carried in the child's snapshot so the child can re-render its own actions with the slot content intact. Signed (server-generated, never trusted from the client).


presence?

optional presence?: object[]

Defined in: flow/src/types.ts:56

@presence props → their resolved channel, so the client subscribes to the right presence channel(s) and refreshes the member list on join/leave. Signed (the channel is server-resolved from the component, not trusted from the client).

prop

prop: string

channel

channel: string


shared?

optional shared?: object[]

Defined in: flow/src/types.ts:62

@shared props → their resolved channel, so the client subscribes and dispatches $shared (re-read the room store + re-render) when the channel signals a change. Signed (server-resolved from the component, not trusted from the client).

prop

prop: string

channel

channel: string


sub?

optional sub?: string

Defined in: flow/src/types.ts:74

The authenticated user this snapshot was issued to, or undefined when it was issued to an anonymous request. Signed, and checked on every hydrate.

The HMAC proves a snapshot has not been tampered with; it says nothing about who it belongs to. Without this binding, @locked accountId = 42 — documented as tamper-proof server-authoritative state — could be replayed verbatim by any other authenticated user who obtained a snapshot signed for someone else, with the framework's own signature vouching for it. Middleware still re-runs, so auth is re-checked; the data is what the snapshot says.


iat?

optional iat?: number

Defined in: flow/src/types.ts:79

Issue time, epoch seconds. Signed, and checked on every hydrate against SNAPSHOT_MAX_AGE_SECONDS so a captured snapshot is not valid indefinitely.