import StateStore from '../state-store'; import BaseService from './base-service'; export declare const enum RequestType { REGISTER = "register", UNREGISTER = "unregister", REBIND_CONTEXT_ID = "rebindContextId", REQUEST_LOGIN = "requestLogin", FINISH_LOGIN_REQUEST = "finishLoginRequest", UPDATE_LOGGED_IN_USER_INFO = "updateLoggedInUserInfo", UPDATE_IS_SESSION_OPEN = "updateIsSessionOpen", UPDATE_SESSION_ID = "updateSessionId", UPDATE_SERVER_ID = "updateServerId", UPDATE_LAST_REQUEST_DATE = "updateLastRequestDate", CONNECT = "connect", SEND_DATA = "sendData" } export declare const enum NotificationType { UPDATE_LOGGED_IN_USER_INFO = "updateLoggedInUserInfo", UPDATE_IS_SESSION_OPEN = "updateIsSessionOpen", UPDATE_SESSION_ID = "updateSessionId", UPDATE_SERVER_ID = "updateServerId", UPDATE_LAST_REQUEST_DATE = "updateLastRequestDate", WEBSOCKET_CONNECTING = "websocketConnecting", WEBSOCKET_CONNECTED = "websocketConnected", WEBSOCKET_CLOSED = "websocketClosed", WEBSOCKET_MESSAGE_RECEIVED = "websocketMessageReceived" } export declare type Request = { id?: number; type: RequestType; data?: any; }; export declare type Response = { requestId: number; data?: any; error?: Error; }; export declare type Notification = { type: NotificationType; data?: any; }; export default class SharedContextService extends BaseService { private readonly _sharedContextWorker; private readonly _port; private _globalId; private readonly _pendingRequests; private readonly _registerRequest; private requestSeq; private readonly _listeners; constructor(stateStore: StateStore); addNotificationListener(type: NotificationType, listener: (notification: Notification) => void): void; request(request: Request): Promise; private _resolveRequest; private _handleNotification; close(): Promise; onDisconnected(error?: Error): void; } //# sourceMappingURL=shared-context-service.d.ts.map