Encoded
constEncoded:Schema.Struct<{args: typeofSchema.Any;clientId: typeofSchema.String;name: typeofSchema.String;parentSeqNum:Schema.Struct<{client:Schema.BrandSchema<number&Brand,number,never>;global:Schema.BrandSchema<number&Brand,number,never>;rebaseGeneration: typeofSchema.Int; }> &object;seqNum:Schema.Struct<{client:Schema.BrandSchema<number&Brand,number,never>;global:Schema.BrandSchema<number&Brand,number,never>;rebaseGeneration: typeofSchema.Int; }> &object;sessionId: typeofSchema.String; }>
Defined in: packages/@livestore/common/dist/schema/LiveStoreEvent/client.d.ts:49
Effect Schema for client events with encoded args.
Example
Section titled “Example”// Confirmed event (client=0)const event: LiveStoreEvent.Client.Encoded = { name: 'todoCreated-v1', args: { id: 'abc', text: 'Buy milk' }, seqNum: { global: 5, client: 0, rebaseGeneration: 0 }, parentSeqNum: { global: 4, client: 0, rebaseGeneration: 0 }, clientId: 'client-xyz', sessionId: 'session-123'}
// Pending local event (client=1, not yet synced)const pending: LiveStoreEvent.Client.Encoded = { ...event, seqNum: { global: 5, client: 1, rebaseGeneration: 0 }, // e5.1}