import type { AgentAttachParams, AgentAttachResult, ApplyParams, ApplyResult, DeleteParams, DeleteResult, GetParams, GetResult, InitializeParams, InitializeResult, LogsParams, LogsResult, PlanParams, PlanResult, ResubmitParams, ResubmitResult, RetryParams, RetryResult, StopParams, StopResult, UpdateParams, UpdateResult, WatchParams } from './generated/protocol.js'; import { Connection } from './connection.js'; import type { CallOptions } from './connection.js'; import type { WebSocketLike } from './socket.js'; import { AgentAttachSubscriptionStream, LogsSubscriptionStream } from './subscriptions.js'; import type { WatchSubscription } from './subscriptions.js'; export type { WatchSubscription } from './subscriptions.js'; export interface WebSocketFactoryOptions { readonly headers?: Readonly>; } export interface ConnectOptions { readonly protocols?: string | readonly string[]; readonly webSocketFactory?: (url: string, protocols?: string | readonly string[], options?: WebSocketFactoryOptions) => WebSocketLike | Promise; readonly signal?: AbortSignal; readonly initialize?: InitializeParams; readonly headers?: Readonly>; } export interface LogsSubscription { readonly result: LogsResult; readonly stream: LogsSubscriptionStream; } export interface AgentAttachSubscription { readonly result: AgentAttachResult; readonly stream: AgentAttachSubscriptionStream; } export interface CoherentWatchSubscription extends WatchSubscription { readonly snapshot: GetResult; } export interface ConnectInitializedResult { readonly connection: Connection; readonly client: ClusterClient; readonly initializeResult: InitializeResult; } export declare class ClusterClient { readonly connection: Connection; constructor(connection: Connection); initialize(params?: InitializeParams, options?: CallOptions): Promise; plan(params: PlanParams, options?: CallOptions): Promise; apply(params: ApplyParams, options?: CallOptions): Promise; update(params: UpdateParams, options?: CallOptions): Promise; stop(params: StopParams, options?: CallOptions): Promise; retry(params: RetryParams, options?: CallOptions): Promise; resubmit(params: ResubmitParams, options?: CallOptions): Promise; delete(params: DeleteParams, options?: CallOptions): Promise; get(params?: GetParams, options?: CallOptions): Promise; watch(params?: WatchParams, options?: CallOptions): Promise; watchColdStart(params?: Omit, options?: CallOptions): Promise; logs(params?: LogsParams, options?: CallOptions): Promise; agentAttach(params: AgentAttachParams, options?: CallOptions): Promise; } export declare function connect(url: string, options?: ConnectOptions): Promise; export declare function connectInitialized(url: string, options?: ConnectOptions): Promise;