import { Schema } from '@livestore/utils/effect'; /** * Common sync message types shared between different transport modes (WS, HTTP, RPC) * * These are the canonical message definitions used across all transport implementations. */ export declare const SyncMetadata: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.SyncMetadata">; } & { /** ISO date format */ createdAt: typeof Schema.String; }>; export type SyncMetadata = typeof SyncMetadata.Type; export declare const PullRequest: Schema.Struct<{ /** Omitting the cursor will start from the beginning */ cursor: Schema.Option; eventSequenceNumber: Schema.BrandSchema, number, never>; }>>; }>; export type PullRequest = typeof PullRequest.Type; export declare const PullResponse: Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>; metadata: Schema.Option; } & { /** ISO date format */ createdAt: typeof Schema.String; }>>; }>>; pageInfo: Schema.Union<[Schema.TaggedStruct<"MoreUnknown", {}>, Schema.TaggedStruct<"MoreKnown", { remaining: typeof Schema.Number; }>, Schema.TaggedStruct<"NoMore", {}>]>; backendId: Schema.SchemaClass; }>; export declare const emptyPullResponse: (backendId: string) => { readonly backendId: string; readonly batch: readonly { readonly metadata: import("effect/Option").Option<{ readonly createdAt: string; readonly _tag: "SyncMessage.SyncMetadata"; }>; readonly eventEncoded: { readonly name: string; readonly args: any; readonly seqNum: number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">; readonly parentSeqNum: number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">; readonly clientId: string; readonly sessionId: string; }; }[]; readonly pageInfo: { readonly _tag: "MoreUnknown"; } | { readonly _tag: "MoreKnown"; readonly remaining: number; } | { readonly _tag: "NoMore"; }; }; export type PullResponse = typeof PullResponse.Type; export declare const PushRequest: Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>>; backendId: Schema.Option>; }>; export type PushRequest = typeof PushRequest.Type; export declare const PushAck: Schema.Struct<{}>; export type PushAck = typeof PushAck.Type; export declare const Ping: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Ping">; }>; export type Ping = typeof Ping.Type; export declare const Pong: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Pong">; }>; export type Pong = typeof Pong.Type; export declare const AdminResetRoomRequest: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomRequest">; } & { adminSecret: typeof Schema.String; }>; export type AdminResetRoomRequest = typeof AdminResetRoomRequest.Type; export declare const AdminResetRoomResponse: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomResponse">; }>; export type AdminResetRoomResponse = typeof AdminResetRoomResponse.Type; export declare const AdminInfoRequest: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoRequest">; } & { adminSecret: typeof Schema.String; }>; export type AdminInfoRequest = typeof AdminInfoRequest.Type; export declare const AdminInfoResponse: Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoResponse">; } & { info: Schema.Struct<{ durableObjectId: typeof Schema.String; }>; }>; export type AdminInfoResponse = typeof AdminInfoResponse.Type; export declare const BackendToClientMessage: Schema.Union<[Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>; metadata: Schema.Option; } & { /** ISO date format */ createdAt: typeof Schema.String; }>>; }>>; pageInfo: Schema.Union<[Schema.TaggedStruct<"MoreUnknown", {}>, Schema.TaggedStruct<"MoreKnown", { remaining: typeof Schema.Number; }>, Schema.TaggedStruct<"NoMore", {}>]>; backendId: Schema.SchemaClass; }>, Schema.Struct<{}>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Pong">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomResponse">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoResponse">; } & { info: Schema.Struct<{ durableObjectId: typeof Schema.String; }>; }>]>; export type BackendToClientMessage = typeof BackendToClientMessage.Type; export declare const ClientToBackendMessage: Schema.Union<[Schema.Struct<{ /** Omitting the cursor will start from the beginning */ cursor: Schema.Option; eventSequenceNumber: Schema.BrandSchema, number, never>; }>>; }>, Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>>; backendId: Schema.Option>; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Ping">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomRequest">; } & { adminSecret: typeof Schema.String; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoRequest">; } & { adminSecret: typeof Schema.String; }>]>; export type ClientToBackendMessage = typeof ClientToBackendMessage.Type; export declare const Message: Schema.Union<[Schema.Union<[Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>; metadata: Schema.Option; } & { /** ISO date format */ createdAt: typeof Schema.String; }>>; }>>; pageInfo: Schema.Union<[Schema.TaggedStruct<"MoreUnknown", {}>, Schema.TaggedStruct<"MoreKnown", { remaining: typeof Schema.Number; }>, Schema.TaggedStruct<"NoMore", {}>]>; backendId: Schema.SchemaClass; }>, Schema.Struct<{}>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Pong">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomResponse">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoResponse">; } & { info: Schema.Struct<{ durableObjectId: typeof Schema.String; }>; }>]>, Schema.Union<[Schema.Struct<{ /** Omitting the cursor will start from the beginning */ cursor: Schema.Option; eventSequenceNumber: Schema.BrandSchema, number, never>; }>>; }>, Schema.Struct<{ batch: Schema.Array$, number, never>; parentSeqNum: Schema.BrandSchema, number, never>; clientId: typeof Schema.String; sessionId: typeof Schema.String; }>>; backendId: Schema.Option>; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.Ping">; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminResetRoomRequest">; } & { adminSecret: typeof Schema.String; }>, Schema.Struct<{ _tag: Schema.tag<"SyncMessage.AdminInfoRequest">; } & { adminSecret: typeof Schema.String; }>]>]>; export type Message = typeof Message.Type; //# sourceMappingURL=sync-message-types.d.ts.map