import * as v from '../../shared/src/valita.ts'; /** * After opening a websocket the client waits for a `connected` message * from the server. It then sends an `initConnection` message to the * server. The server waits for the `initConnection` message before * beginning to send pokes to the newly connected client, so as to avoid * syncing lots of queries which are no longer desired by the client. */ export declare const connectedBodySchema: v.ObjectType<{ wsid: v.Type; timestamp: v.Optional; }, undefined>; export declare const connectedMessageSchema: v.TupleType<[v.Type<"connected">, v.ObjectType<{ wsid: v.Type; timestamp: v.Optional; }, undefined>]>; declare const initConnectionBodySchema: v.ObjectType<{ desiredQueriesPatch: v.ArrayType; hash: v.Type; ttl: v.Optional; }, "ast" | "name" | "args"> & { ast: v.Optional; name: v.Optional; args: v.Optional; }, undefined>, v.ObjectType<{ op: v.Type<"del">; hash: v.Type; }, undefined>, v.ObjectType<{ op: v.Type<"clear">; }, undefined>]>>; clientSchema: v.Optional<{ tables: Record; }>; }>; deleted: v.Optional<{ readonly clientIDs?: readonly string[] | undefined; readonly clientGroupIDs?: readonly string[] | undefined; }>; userPushURL: v.Optional; userQueryURL: v.Optional; /** * `activeClients` is an optional array of client IDs that are currently active * in the client group. This is used to inform the server about the clients * that are currently active (aka running, aka alive), so it can inactive * queries from inactive clients. */ activeClients: v.Optional; }, undefined>; export declare const initConnectionMessageSchema: v.TupleType<[v.Type<"initConnection">, v.ObjectType<{ desiredQueriesPatch: v.ArrayType; hash: v.Type; ttl: v.Optional; }, "ast" | "name" | "args"> & { ast: v.Optional; name: v.Optional; args: v.Optional; }, undefined>, v.ObjectType<{ op: v.Type<"del">; hash: v.Type; }, undefined>, v.ObjectType<{ op: v.Type<"clear">; }, undefined>]>>; clientSchema: v.Optional<{ tables: Record; }>; }>; deleted: v.Optional<{ readonly clientIDs?: readonly string[] | undefined; readonly clientGroupIDs?: readonly string[] | undefined; }>; userPushURL: v.Optional; userQueryURL: v.Optional; /** * `activeClients` is an optional array of client IDs that are currently active * in the client group. This is used to inform the server about the clients * that are currently active (aka running, aka alive), so it can inactive * queries from inactive clients. */ activeClients: v.Optional; }, undefined>]>; export type ConnectedBody = v.Infer; export type ConnectedMessage = v.Infer; export type InitConnectionBody = v.Infer; export type InitConnectionMessage = v.Infer; export declare function encodeSecProtocols(initConnectionMessage: InitConnectionMessage | undefined, authToken: string | undefined, challengeToken?: string | undefined): string; export declare function decodeSecProtocols(secProtocol: string): { initConnectionMessage: InitConnectionMessage | undefined; authToken: string | undefined; challengeToken: string | undefined; }; export {}; //# sourceMappingURL=connect.d.ts.map