Skip to content

Encoded

const Encoded: Schema.Struct<{ args: Schema.Any; clientId: Schema.String; name: Schema.String; parentSeqNum: Schema.brand<Schema.Int, "GlobalEventSequenceNumber">; seqNum: Schema.brand<Schema.Int, "GlobalEventSequenceNumber">; sessionId: 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'
}