Skip to content

Encoded

const Encoded: Schema.Struct<{ args: typeof Schema.Any; clientId: typeof Schema.String; name: typeof Schema.String; parentSeqNum: Schema.BrandSchema<number & Brand, number, never>; seqNum: Schema.BrandSchema<number & Brand, number, never>; sessionId: typeof Schema.String; }>

Defined in: packages/@livestore/common/dist/schema/LiveStoreEvent/global.d.ts:17

Effect Schema for global events with integer sequence numbers.

const event: LiveStoreEvent.Global.Encoded = {
name: 'todoCreated-v1',
args: { id: 'abc', text: 'Buy milk' },
seqNum: 5, // This event's position in the global log
parentSeqNum: 4, // Points to the previous event
clientId: 'client-xyz',
sessionId: 'session-123'
}