UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

38 lines (37 loc) 1.46 kB
import { TerminationCause } from "../session/TerminationCause"; import { SinchError } from "../SinchError"; import { Client, Body, Method, SymmetricKey } from "./models"; export declare enum HeaderBooleanValue { Yes = "yes", No = "no" } /** * Describes MXP Message structure */ export declare class Message { method: Method; sessionId: string; from: Client; body?: Body; values?: Record<string, string>; static readonly KEY_ICE_FAILURE = "iceFailed"; static readonly KEY_FAILURE_TERMINATION = "failureterm"; static readonly KEY_DENY_ALL = "denyall"; static readonly ERROR_JSON = "error_json"; static readonly MAX_ERROR_MESSAGE_JSON_LENGTH = 256; constructor(method: Method, sessionId: string, from: Client, body?: Body, values?: Record<string, string>); isMethod(method: Method): boolean; static tryExtractSessionKey(message: Message, out: (key: SymmetricKey) => void): boolean; getError(): SinchError | undefined; getSdp(): any; getIceCandidate(): any; getTerminationCause(): TerminationCause | undefined; isIceFailureFlagSet(): boolean; isFailureTermination(): boolean; getHeaderError(): SinchError | undefined; isDoNotDenyAllMessage(): boolean; stringifiedValues(): string; isAddressedToInstance(instanceId: string): boolean; static errorToJsonString(error: SinchError): string; static parseSinchErrorFromJson(data: string): SinchError | undefined; }