import { BaseStateMachine } from '../../tools/BaseStateMachine'; import { EEvents, EState } from './constants'; import { TEvents } from '../events'; import { TConnectionConfig } from '../types'; import { TContext, TContextMap } from './types'; declare const connectionMachine: import('xstate').StateMachine<{ connectionConfiguration: undefined; } | { connectionConfiguration: undefined; } | { connectionConfiguration: TConnectionConfig; } | { connectionConfiguration: TConnectionConfig; } | { connectionConfiguration: TConnectionConfig; } | { connectionConfiguration: TConnectionConfig; } | { connectionConfiguration: TConnectionConfig; } | { connectionConfiguration: undefined; }, { type: EEvents.START_CONNECT; } | { type: EEvents.START_UA; configuration: TConnectionConfig; } | { type: EEvents.START_DISCONNECT; } | { type: EEvents.UA_CONNECTED; } | { type: EEvents.UA_CONNECTING; } | { type: EEvents.UA_REGISTERED; } | { type: EEvents.UA_UNREGISTERED; } | { type: EEvents.UA_DISCONNECTED; } | { type: EEvents.RESET; }, {}, never, { type: import("./constants").EAction.LOG_TRANSITION; params: { from: string; to: string; event: string; }; } | { type: import("./constants").EAction.LOG_STATE_CHANGE; params: { state: string; }; } | { type: import("./constants").EAction.SET_CONNECTION_CONFIGURATION; params: import('xstate').NonReducibleUnknown; } | { type: import("./constants").EAction.CLEAR_CONNECTION_CONFIGURATION; params: import('xstate').NonReducibleUnknown; }, { type: "canAutoEstablish"; params: unknown; }, never, EState, string, import('xstate').NonReducibleUnknown, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, { id: "connection"; states: { readonly "connection:idle": {}; readonly "connection:preparing": {}; readonly "connection:connecting": {}; readonly "connection:connected": {}; readonly "connection:registered": {}; readonly "connection:established": {}; readonly "connection:disconnecting": {}; readonly "connection:disconnected": {}; }; }>; export type TSnapshot = { value: EState.IDLE; context: TContextMap[EState.IDLE]; } | { value: EState.PREPARING; context: TContextMap[EState.PREPARING]; } | { value: EState.CONNECTING; context: TContextMap[EState.CONNECTING]; } | { value: EState.CONNECTED; context: TContextMap[EState.CONNECTED]; } | { value: EState.REGISTERED; context: TContextMap[EState.REGISTERED]; } | { value: EState.ESTABLISHED; context: TContextMap[EState.ESTABLISHED]; } | { value: EState.DISCONNECTING; context: TContextMap[EState.DISCONNECTING]; } | { value: EState.DISCONNECTED; context: TContextMap[EState.DISCONNECTED]; }; export declare class ConnectionStateMachine extends BaseStateMachine { private readonly events; private unsubscribeFromEvents?; constructor(events: TEvents); get isIdle(): boolean; get isPreparing(): boolean; get isConnecting(): boolean; get isConnected(): boolean; get isRegistered(): boolean; get isEstablished(): boolean; get isDisconnecting(): boolean; get isDisconnected(): boolean; get isPending(): boolean; get isPendingConnect(): boolean; get isPendingInitUa(): boolean; get isActiveConnection(): boolean; readonly toStartConnect: () => void; readonly toStartUa: (config: TConnectionConfig) => void; reset(): void; getConnectionConfiguration(): TConnectionConfig | undefined; isRegisterEnabled(): boolean; destroy(): void; private hasState; private sendEvent; private readonly toStartDisconnect; private readonly toConnecting; private readonly toConnected; private readonly toRegistered; private readonly toUnregistered; private readonly toDisconnected; private readonly toIdle; private subscribeToEvents; } export {};