import { BehaviorSubject, Subscription } from 'rxjs'; import { type Broker, type Instance } from '../apis'; export type BaseSessionOptions = { terminal_conn_mode?: 'proxy' | 'proxy-compatible' | 'direct'; user_id?: string; project_id?: string; is_cluster_node?: number; instance?: Instance; broker?: Broker; }; export type SessionOptions = { type: 'vnc' | 'lxc' | 'sol' | 'webssh' | 'webterm'; instance_id: string; zone: string; verification_method?: 0 | 1; username?: string; passwd?: string; key?: string; } & BaseSessionOptions; export type SessionState = SessionOptions & { status: 'connecting' | 'connected' | 'disconnected'; initialized?: boolean; lastError?: string; [key: string]: any; }; export declare function createSId(options: SessionOptions): string; export declare abstract class Session { options: SessionOptions; state$: BehaviorSubject; subscription: Subscription; sid: string; dom: HTMLElement; ops: Record; constructor(options: SessionOptions); update(newState: Partial): void; set(key: K, value: SessionState[K]): void; get(key: K): SessionState[K]; get type(): "vnc" | "lxc" | "sol" | "webssh" | "webterm"; get userId(): string | undefined; get initialized(): boolean | undefined; get status(): "connecting" | "connected" | "disconnected"; get lastError(): string | undefined; get instanceId(): string; get instanceName(): any; get platform(): any; get resizeMode(): any; abstract connect(): Promise; abstract disconnect(): Promise; invoke(name: string, ...args: any[]): void; restart(): Promise; protected isDomMounted(): boolean; protected getResource(): Promise<{ instance: any; broker: Broker; }>; protected createWsURL(broker: Broker, passwd?: string): string; init(): Promise; destroy(): Promise; } //# sourceMappingURL=common.d.ts.map