import { HttpHeaders, HttpMethod, HttpResponse } from '../http'; import { ConfigSchema, ConfigEndpoint, StreamingConnectionConfig } from '../config'; import { OMMResponse, RDPResponse, StreamConnection } from '../delivery/stream'; import { StateEvents, StateManager } from '../state'; import { DeepPartial } from '../deep-partial'; declare const EventReceived: 'eventReceived'; export declare const SessionEvent: { EventReceived: "eventReceived"; Error: "error"; StateChanged: "stateChanged"; }; export declare enum SessionEventCode { AuthenticationFailed = "authenticationFailed", AuthenticationSucceeded = "authenticationSucceeded", Reconnecting = "reconnecting", RefreshFailed = "refreshFailed", RefreshSucceeded = "refreshSucceeded" } export declare enum SessionState { Opened = "Opened", Closed = "Closed", Pending = "Pending" } export interface SessionRequiredParams { appKey: string; } export interface SessionRequestParams { method: HttpMethod; query?: {}; body?: {}; headers?: HttpHeaders; url: string; handleAutoRedirect?: boolean; } export interface SessionEvents extends StateEvents { [EventReceived]: (session: Session, event: SessionEventCode, err?: Error) => void; [SessionEvent.Error]: (error: Error, session: Session) => void; } export interface Session extends StateManager { readonly rdpUrlRoot?: string; isEndpointSupported: boolean; getOverriddenEndpoints(): DeepPartial; getOverriddenEndpoint(group: keyof ApiEndpoints, name: string): DeepPartial | undefined; sendRequest(sessionRequestParams: SessionRequestParams): Promise>; getOMMStreamConnection(api?: string, validateState?: boolean): Promise>; getRDPStreamConnection(api?: string, validateState?: boolean): Promise>; } export interface StreamingEndpoint { endpoint: string; port: string; location: string[]; dataFormat: string[]; provider: string; transport: string; locationId?: string; privateLink?: string; tier?: string; } export interface SessionStreamingEndpoints { services: StreamingEndpoint[]; } export interface SessionDefinition { getSession(): Session; } export type ApiEndpoints = ConfigSchema['apis']; export type ApiEndpoint = ConfigEndpoint | StreamingConnectionConfig; export interface DefaultSessionManager { getDefault(): Session; setDefault(session: Session | null): void; } export {};