State Schema

Defining typed state schemas for @durable-streams/state. createStateSchema() with CollectionDefinition (schema, type, primaryKey), Standard Schema validators (Zod, Valibot, ArkType), event helpers insert/update/delete/upsert, ChangeEvent and ControlEvent types, State Protocol operations, transaction IDs (txid) for write confirmation. Load when defining entity types, choosing a schema validator, or creating typed change events.

durable-streams b959bfe 6.2 KB Updated

File contents

durable-streams/durable-streams/tree/main/packages/state/skills/state-schema commit b959bfe9d7

Frequently asked questions

npx skillmds@latest add durable-streams/state-schema