import { MessageClient, SubscriptionConfig } from "./MessageClient.js"; import { Logger } from "../../util/Logger.js"; import { ServerConnection } from "./ServerConnection.js"; import { ChannelListener } from "./ChannelListener.js"; import { ServiceNowInstance } from "../ServiceNowInstance.js"; export declare class AMBClient { _clientSubscriptions: any; _logger: Logger; _ambClient: MessageClient; _serverConnection: ServerConnection; initiatedConnection: boolean; private _instance; private _authenticated; constructor(clientSubscriptions: any, instance?: ServiceNowInstance); /** * Authenticate and obtain session cookies from ServiceNow * This must be called before connect() to ensure valid session cookies */ authenticate(): Promise; /** * Extract instance URL from session or credential */ private extractInstanceUrl; /** * Extract cookies from cookie store and format for WebSocket headers */ private extractCookiesFromStore; /** * Check if the client has been authenticated */ isAuthenticated(): boolean; getServerConnection(): ServerConnection; connect(): void; abort(): void; disconnect(): void; getConnectionState(): string; getState(): string; getClientId(): string; getChannel(channelName: string, subscriptionConfig: any): ChannelListener; getChannel0(channelName: string, subscriptionCallback: Function): ChannelListener; /** * Creates a channel with a properly encoded name required for Record Watcher. Returns a channel listener. * * @param {string} table * @param {string} query * @param {string} actionPrefix * @param {Object<*>} subscriptionConfig * @param {Object<*>} windowContext * @returns {*|amb.ChannelListener} */ getRecordWatcherChannel(table: string, query: string, actionPrefix: string | null, subscriptionConfig: SubscriptionConfig): ChannelListener; registerExtension(/*String*/ extensionName: string, /*Object*/ extension: any): void; unregisterExtension(extensionName: string): void; batch(block: Function): void; subscribeToEvent(event: string, callback: Function): number; unsubscribeFromEvent(id: number, windowContext: any): void; isLoggedIn(): boolean; getConnectionEvents(): any; getEvents(): any; reestablishSession(): void; loginComplete(): void; getChannels(): any; extendSession(): void; getTokenManagementExtension(): import("./TokenManagementExtension.js").TokenManagementExtension; onProcessEnd(...args: any[]): void; }