type ObjectKey = string | number | symbol; type EmptyObject = Record; /** * Type that represents an object which keys are strings and values are of unknown type. */ export type UnknownObject = Record; type UUID = string; type Int64 = string; type MessagingUserId = Int64 | number; type UserName = string; type ApplicationName = string; type AccountName = string; type MessagingUserName = `${UserName}@${ApplicationName}.${AccountName}` | string; type EndpointId = string; type TrackId = string; type MediaId = string; type BaseMediaKind = "audio" | "video"; type SipHeaders = Record; type Type = string; type SubType = string; type CommonMIMEType = `${Type}/${SubType}`; type MIMEType = T; /** * Enum that represents video codec types. */ export declare enum VideoCodec { /** * Call or conference is set to prioritize the VP8 video codec. */ VP8 = "video/VP8", /** * Call or conference is set to prioritize the H.264 video codec. */ H264 = "video/H264", /** * Video codec for a call or conference is chosen automatically. */ Auto = "auto" } /** * Callback function to be triggered when a value has changed. The return value will be ignored * * @param newValue New value of the observable property. * @param oldValue Previous value of the observable property. * * @interface * @folder Watchable */ export type OnValueChangeCallback = (newValue: T, oldValue: T) => unknown | Promise; /** * @interface * @folder Watchable */ export type UnwatchFunction = () => void; /** * @folder Watchable */ export interface WatchOptions { /** * Whether the callback should be called only once. The default value is false. */ once?: boolean; /** * A function that returns a boolean to determine if the callback should be called. * The guard not set by default. * * @since 5.1.0 */ guard?: (newValue: T, oldValue: T) => boolean; /** * Whether the callback should be removed after calling the clear method. The default value is true. */ clearable?: boolean; /** * An AbortSignal. The watch callback will be removed when the abort() method of the AbortController which owns the AbortSignal is called. * See [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for details. * * @since 5.1.0 */ signal?: AbortSignal; /** * Whether the callback should be called immediately after being added. The default value is false. * * @since 5.1.0 */ immediate?: boolean; } /** * Basic WebSDK reactive type for immutable structures and primitives. * It uses strict equality check to determine if the `value` has changed. * The value can be set and read any time. * @folder Watchable */ export interface Watchable { /** * Current value of the observable property. */ value: T; /** * Previous value of the observable property. */ get oldValue(): T; /** * Subscribes to the value changes. * * When the value is changed, the [Core.Watchable.OnValueChangeCallback] callback is triggered. * * Returns [Core.Watchable.UnwatchFunction], to unwatch observable value changes. * * @param onValueChangeCallback Observer to be triggered when the value is changed * @param options Options */ watch: (onValueChangeCallback: OnValueChangeCallback, options?: WatchOptions) => UnwatchFunction; /** * Stops triggering the specified callback on the value change. * * @param onValueChangeCallback Observer that should not be triggered anymore */ unwatch: (onValueChangeCallback: OnValueChangeCallback) => void; /** * Clears all observers for this watchable excluding the ones created with [Core.Watchable.WatchOptions.clearable]: false. */ clear: () => void; /** * Locks the watchable from mutations. The value becomes readonly. * @hidden */ lock: (key: string) => void; /** * Unlocks the watchable. The value becomes mutable again. * @hidden */ unlock: (key: string) => void; } /** * Basic WebSDK reactive type for immutable structures and primitives, the same as [Core.Watchable], but with readonly values. * Setting a new value is ignored without any error, with only a warn message in the console. * @folder Watchable */ export interface ReadonlyWatchable extends Watchable { } /** * @hidden * for QA purposes only */ export declare const watchableConfig: { qaIgnoreKeyOnUnlock: boolean; }; /** * @hidden */ export declare const createWatchable: (value: T) => Watchable; /** * @hidden */ export declare const createReadonlyWatchable: (value: T, key: string) => ReadonlyWatchable; interface BaseBusEvent { name: string; } /** * Interface that specifies characteristics about the event listener */ export interface ListenerOptions { /** * Whether a listener should be invoked at most once after being added. * The default value is false. */ once?: boolean; /** * A function that returns a boolean to determine if the listener should be called. * The guard not set by default. * * @since 5.1.0 */ guard?: (event: Extract) => boolean; /** * An AbortSignal. The listener will be removed when the abort() method of the AbortController which owns the AbortSignal is called. * See [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for details. * * @since 5.1.0 */ signal?: AbortSignal; } type Listener = (event: Extract) => void | Promise; type AddEventListener = (event: EventName, listener: Listener, options?: ListenerOptions) => void; type RemoveEventListener = (event: EventName, listener: Listener) => void; declare enum StreamEvent { /** * Triggered when a stream has ended. * * Listener is called with [Stream.Events.StreamEnded] and payload: * @cast Stream.Events.StreamEndedPayload */ Ended = "ENDED" } interface BaseStreamEvent extends BaseBusEvent { name: Name; payload: Payload; } interface StreamEndedPayload { /** * Stream id */ streamId: Stream["id"]; } type StreamEnded = BaseStreamEvent; type AnyStreamEvent = StreamEnded; declare enum StreamType { /** * Audio stream type. */ Audio = "audio", /** * Video stream type. */ Video = "video", /** * Screen sharing video stream type. */ ScreenVideo = "screen_video", /** * Screen sharing audio stream type. */ ScreenAudio = "screen_audio" } type StreamSource = "local" | "remote"; interface StreamInfo { id: string; source: StreamSource; type: StreamType; trackId?: string; deviceId?: string; } interface Stream { /** * Stream id. */ readonly id: string; /** * Stream source type. */ readonly source: StreamSource; /** * Stream type. */ get type(): StreamType; /** * [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack) object. */ get track(): MediaStreamTrack; /** * [MediaStream](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream) object. */ get sourceStream(): MediaStream; /** * @hidden */ get info(): StreamInfo; /** * @reinterpret Stream.DocStreamAddEventListener */ addEventListener: AddEventListener; /** * @reinterpret Stream.DocStreamAddEventListener */ removeEventListener: RemoveEventListener; } declare enum ContainerEvent { ModuleRegistered = "MODULE_REGISTERED" } interface ModuleRegisteredEvent extends BaseBusEvent { name: ContainerEvent.ModuleRegistered; token: Token; } type ContainerEvents = ModuleRegisteredEvent; interface Container { readonly key: string; registerModule: (module: ModuleLoader) => void; registerModules: (modules: ModuleLoader[]) => void; getModule(token: Token, required?: false): Module | undefined; getModule(token: Token, required: true): Module; getModuleAsync: (token: Token) => Promise; addEventListener: AddEventListener; removeEventListener: RemoveEventListener; } interface Token { name: string; module?: ModuleType; } interface InitModuleOptions { container: Container; key: string; } interface ModuleLoader { token: Token; options: Options; required: Token[]; setup: (initOptions: InitModuleOptions) => ModuleType; } type ModuleFactory = Options extends EmptyObject ? () => ModuleLoader : (options: Options) => ModuleLoader; interface BaseModule { /** * @hidden */ container: Container; } declare class BaseModuleImpl implements BaseModule { /** * @hidden */ container: Container; /** * @hidden */ constructor(initOptions: InitModuleOptions); } /** * Thrown if a module is initialized out of the SDK container via the direct instantiation with the `new` operator. * * @folder SharedErrors * @hideconstructor */ export declare class ModuleInitOutOfContainer extends WebSDKError { constructor(); } declare enum EventType { id = "id", lastReceivedMessage = "lastrx", acknowledge = "ack", message = "msg", close = "close", error = "error" } interface BaseEvent { type: EventType; seq?: number; } interface MsgCommand> extends BaseEvent { type: EventType.message; payload: Message; } /** * Enum that describes the log levels. * * @folder Logger */ export declare enum LogLevel { /** * Debug, info, error, and warning log messages are enabled. */ Debug = "Debug", /** * Info, error, and warning log messages are enabled. */ Info = "Info", /** * Error and warning log messages are enabled. */ Warning = "Warning", /** * Only error messages are enabled. */ Error = "Error" } /** * @hidden */ export interface LogOptions { /** * Log level */ level?: LogLevel; scope: string; } /** * Interface that represents extra information for a log message. * * @folder Logger */ export interface LogRecordExtraData extends Required { /** * Log message sequence number. */ sequenceNumber: number; /** * Timestamp of the log message. */ time: string; /** * Log message id. */ traceId: string; /** * Log message prefix. */ prefix?: string | null; } /** * @hidden */ export type ShortLogFunction = (...message: unknown[]) => void; /** * @hidden */ export type ScopedLogger = Record<"info" | "debug" | "warn" | "error", ShortLogFunction>; /** * Interface that represents a log message and extra data. * * @folder Logger */ export interface LogCallBackProps { /** * Log message. */ fullMessage: string; /** * Log message. */ message: unknown[]; /** * Extra information. */ extraData: LogRecordExtraData; } /** * Type that represents a callback function to receive the log messages. * * @interface * @folder Logger */ export type LogCallbackFunction = (props: LogCallBackProps) => void | Promise; /** * Enum that describes the time formats for the log messages. * * @folder Logger */ export declare enum TimeFormat { /** * Unix timestamp. */ Timestamp = "TIMESTAMP", /** * ISO 8601 standard timestamp */ ISO = "ISO" } /** * Logger options. * * @folder Logger */ export interface LoggerOptions { /** * Log level. The default value is Info. */ logLevel?: LogLevel; /** * Whether logs should be printed to the browser console. The default value is true. */ enableConsoleLogger?: boolean; /** * Log level for the callback function. The default value is Info. */ callbackLogLevel?: LogLevel; /** * Whether a timestamp is included to a log message. The default value is true. */ withTime?: boolean; /** * Timestamp format. The default value is ISO. */ timeFormat?: TimeFormat; /** * Callback function to receive the log messages. */ onLogCallback?: LogCallbackFunction | null; /** * Log message prefix. Helps to distinguish Web SDK logs from other logs in the console. The default value is 'WEBSDK'. */ prefix?: string | null; } /** * @hidden */ export interface Logger extends BaseModule { log: (options: LogOptions, ...message: unknown[]) => void; createScopedLogger: (scope: string) => ScopedLogger; } /** * @hidden */ export declare const loggerToken: Token; /** * @hidden */ export declare const LoggerLoader: ModuleFactory; /** * Options to log in with a password. */ export interface PasswordLoginOptions { /** * Full user name, including app and account name, e.g., someuser@someapp.youraccount.voximplant.com. */ username: string; /** * User password. */ password: string; /** * Optional device (browser) identifier. * * If a web application is going to authenticate with a renewable tokens via [Core.Client.loginAccessToken], * it is required to provide this identifier. */ deviceToken?: string; } /** * Options to log in with a one-time key. */ export interface OneTimeKeyLoginOptions { /** * Full user name, including app and account name, e.g., someuser@someapp.youraccount.voximplant.com. */ username: string; /** * Hash that has been generated via the following formula: `MD5(oneTimeKey+"|"+MD5(user+":voximplant.com:"+password))`. */ hash: string; /** * Optional device (browser) identifier. * * If a web application is going to authenticate with a renewable tokens via [Core.Client.loginAccessToken], * it is required to provide this identifier. */ deviceToken?: string; } /** * Options to request a one-time key. */ export interface RequestOneTimeKeyOptions { /** * Full user name, including app and account name, e.g., someuser@someapp.youraccount.voximplant.com. */ username: string; } /** * Options to log in with an access token. */ export interface AccessTokenLoginOptions { /** * Full user name, including app and account name, e.g., someuser@someapp.youraccount.voximplant.com. */ username: string; /** * Access token. * * It is obtained either from [Core.LoginResult.loginTokens], or via [Core.Client.refreshTokens]. */ accessToken: string; /** * Device (browser) identifier. * * Should be the same as the identifier provided for [Core.Client.login] or [Core.Client.loginOneTimeKey]. */ deviceToken: string; } /** * Options to refresh tokens. */ export interface RefreshTokenOptions { /** * Full user name, including app and account name, e.g., someuser@someapp.youraccount.voximplant.com. */ username: string; /** * Refresh token obtained from [Core.LoginResult.loginTokens]. */ refreshToken: string; /** * Device (browser) identifier. * * Should be the same as the identifier provided for [Core.Client.login] or [Core.Client.loginOneTimeKey]. */ deviceToken: string; } /** * Auth parameters that can be used to log in via an access token. */ export interface LoginTokens { /** * Time in seconds for the access token to expire. */ accessExpire: number; /** * Access token that can be used before accessExpire. */ accessToken: string; /** * Time in seconds for the refresh token to expire. */ refreshExpire: number; /** * Refresh token that can be used one time before refreshExpire. */ refreshToken: string; } /** * Interface that is provided when the login process is completed successfully. */ export interface LoginResult { /** * Display name of the logged in user. */ displayName?: string; /** * Auth parameters that can be used to log in via an access token. */ loginTokens?: LoginTokens; } /** * @hidden */ export declare enum LoginState { NotLoggedIn = "NOT_LOGGED_IN", LoggingIn = "LOGGING_IN", LoggedIn = "LOGGED_IN" } /** * @hidden */ export interface Login extends BaseModule { state: Watchable; username: Watchable; login: (options: PasswordLoginOptions) => Promise; loginOneTimeKey: (options: OneTimeKeyLoginOptions) => Promise; loginAccessToken: (options: AccessTokenLoginOptions) => Promise; requestOneTimeKey: (options: RequestOneTimeKeyOptions) => Promise; refreshTokens: (options: RefreshTokenOptions) => Promise; } /** * @hidden */ export declare const loginToken: Token; /** * @hidden */ export declare enum LoginErrorCode { InvalidPassword = 401, MauAccessDenied = 402, AccountFrozen = 403, InvalidUsername = 404, Timeout = 408, InvalidState = 491, InternalError = 500, NetworkIssues = 503, TokenExpired = 701 } /** * @hidden */ export declare const LoginLoader: ModuleFactory; /** * Error object that is the base for all login errors. * * @folder LoginErrors * @hideconstructor */ export declare class LoginError extends WebSDKError { } /** * Thrown if a login has failed due to a timeout. * * @folder LoginErrors * @hideconstructor */ export declare class LoginTimeoutError extends LoginError { constructor(); } /** * Thrown if a login has failed due to an invalid client state. * * @folder LoginErrors * @hideconstructor */ export declare class LoginInvalidStateError extends LoginError { constructor(reason?: string); } /** * Thrown on the attempt to log in with an incorrect password. * * @folder LoginErrors * @hideconstructor */ export declare class LoginInvalidPasswordError extends LoginError { constructor(); } /** * Thrown if Monthly Active Users (MAU) limit is reached. Payment is required. * * @folder LoginErrors * @hideconstructor */ export declare class LoginMauAccessDeniedError extends LoginError { constructor(); } /** * Thrown if the Voximplant account is frozen. * * @folder LoginErrors * @hideconstructor */ export declare class LoginAccountFrozenError extends LoginError { constructor(); } /** * Thrown on the attempt to log in with an incorrect username. * * @folder LoginErrors * @hideconstructor */ export declare class LoginInvalidUserError extends LoginError { constructor(); } /** * Thrown if an internal error has occurred. * * @folder LoginErrors * @hideconstructor */ export declare class LoginInternalError extends LoginError { constructor(description?: string); } /** * Thrown if the connection to the Voximplant Cloud is closed due to network issues. * * @folder LoginErrors * @hideconstructor */ export declare class LoginNetworkIssuesError extends LoginError { constructor(); } /** * Thrown if an access or refresh token has expired. * * @folder LoginErrors * @hideconstructor */ export declare class LoginTokenExpiredError extends LoginError { constructor(); } /** * @hidden */ export declare const getErrorByCode: (code: LoginErrorCode, reason?: string) => LoginError; type LoginIncomingMsgNames = "loginSuccessful" | "loginFailed" | "refreshOauthTokenSuccessful" | "refreshOauthTokenFailed"; type LoginOutgoingMsgNames = "login" | "loginUsingOneTimeKey" | "loginGenerateOneTimeKey" | "refreshOauthToken"; interface LoginGenerateOneTimeKeyParams { username: string; } type LoginGenerateOneTimeKey = BaseInternalRPCMsg<"loginGenerateOneTimeKey", LoginGenerateOneTimeKeyParams>; interface LoginPasswordParams { username: string; password: string; options: { credentialType: "md5"; deviceToken?: string; }; } interface LoginOtkParams { username: string; hash: string; options: { deviceToken?: string; }; } type Login$1 = BaseInternalRPCMsg<"login", LoginPasswordParams | LoginAccessTokenParams>; interface LoginAccessTokenParams { username: string; options: { accessToken: string; deviceToken?: string; }; } type loginUsingOneTimeKey = BaseInternalRPCMsg<"loginUsingOneTimeKey", LoginOtkParams>; interface LoginSuccessfulParams { displayName: string; params: { OAuth: LoginTokens; connectionId: string; iceConfig: RTCConfiguration; }; } type LoginSuccessful = BaseInternalRPCMsg<"loginSuccessful", LoginSuccessfulParams>; interface LoginFailedParams { code: number; extra: string; } type LoginFailed = BaseInternalRPCMsg<"loginFailed", LoginFailedParams>; interface RefreshOauthTokenParams { username: string; options: { refreshToken: string; deviceToken: string; }; } type RefreshOauthToken = BaseInternalRPCMsg<"refreshOauthToken", RefreshOauthTokenParams>; interface RefreshOauthTokenSuccessfulParams { OAuth: LoginTokens; } type RefreshOauthTokenSuccessful = BaseInternalRPCMsg<"refreshOauthTokenSuccessful", RefreshOauthTokenSuccessfulParams>; interface RefreshOauthTokenFailedParams { code: number; } type RefreshOauthTokenFailed = BaseInternalRPCMsg<"refreshOauthTokenFailed", RefreshOauthTokenFailedParams>; type AnyLoginIncomingMsg = LoginSuccessful | LoginFailed | RefreshOauthTokenSuccessful | RefreshOauthTokenFailed; type AnyLoginOutgoingMsg = Login$1 | loginUsingOneTimeKey | LoginGenerateOneTimeKey | RefreshOauthToken; declare enum TransportCloseCodes { Normal = 1000, /** * Internal ws error code. Should be fired only by server or websocket */ CloseAbnormal = 1006, WrongSeq = 4001, ServerError = 4002, ClientError = 4003, Timeout = 4004, NotConnected = 4005 } /** * Thrown if start/stop sending a stream or replace a stream in a call or conference has failed. * * @folder SharedErrors * @hideconstructor */ export declare class StreamUpdateFailedError extends WebSDKError { constructor(action: "add" | "remove" | "replace", streamType: StreamType); } type Mids = Record; declare global { interface Navigator { getBattery?: () => Promise; } } interface BatteryManager extends EventTarget { level: number; charging: boolean; chargingTime: number; dischargingTime: number; } type MediaEventIncomingMsgNames = "handleReInvite" | "handleSIPInfo" | "handleAcceptReinvite" | "handleRejectReinvite"; type MediaEventOutgoingMsgNames = "AcceptReInvite" | "sendSIPInfo" | "ReInvite"; type EndpointType = "call"; interface ReInviteCause { id: EndpointId; displayName: string; username: string; place: number; sipURI: string; event: MIMEType; } interface EndpointInfo { mids: Mids; tracks: Record; place: number; type: EndpointType; } interface ReInviteScheme { conferenceCall: boolean; politeIndex: number; endpoints: Record; reinviteCauses: ReInviteCause[]; } type ReInviteSchemeWithOptionalCauses = ReInviteScheme & { reinviteCauses?: ReInviteCause[]; }; interface HandleReInviteParams { id: string; headers: SipHeaders; sdp: string; scheme: ReInviteScheme; } type HandleReInvite = BaseInternalRPCMsg<"handleReInvite", HandleReInviteParams>; interface HandleAcceptReinviteParams { id: string; headers: SipHeaders; sdp: string; scheme: ReInviteScheme; } type HandleAcceptReinvite = BaseInternalRPCMsg<"handleAcceptReinvite", HandleAcceptReinviteParams>; interface HandleRejectReinviteParams { id: string; headers: SipHeaders; sdp: string; } type HandleRejectReinvite = BaseInternalRPCMsg<"handleRejectReinvite", HandleRejectReinviteParams>; interface AcceptReInviteParams { id: string; headers: SipHeaders; sdp: string; midData: { mids: Record; }; } type AcceptReInvite = BaseInternalRPCMsg<"AcceptReInvite", AcceptReInviteParams>; interface ReInviteParams { id: string; headers: SipHeaders; sdp: string; extraData: { mids: Record; iceRestart?: boolean; }; } type ReInvite = BaseInternalRPCMsg<"ReInvite", ReInviteParams>; interface SIPInfoParams { id: string; mimeType: MIMEType; body: string; headers: SipHeaders; } type SendSIPInfo = BaseInternalRPCMsg<"sendSIPInfo", SIPInfoParams>; type HandleSIPInfo = BaseInternalRPCMsg<"handleSIPInfo", SIPInfoParams>; type AnyMediaIncomingMsg = HandleReInvite | HandleSIPInfo | HandleAcceptReinvite | HandleRejectReinvite; type AnyMediaOutgoingMsg = AcceptReInvite | SendSIPInfo | ReInvite; type ConferenceIncomingMsgNames = "handleConnectionConnected" | "handleConnectionFailed" | "handleConnectionDisconnected"; type ConferenceOutgoingMsgName = "callConference" | "disconnectCall"; interface CallConferenceParams { id: string; number: string; headers: Record; sdp: string; midData: { mids: Record; }; isVideo: boolean; } interface ConnectionConnectedHeaders { "VI-Call-ID": string; "VI-Session-ID": string; [otherHeaderKey: string]: string; } interface HandleConnectionConnectedParams { id: string; headers: ConnectionConnectedHeaders; sdp: string; endpointName: string[]; scheme: Partial; } interface HandleConnectionDisconnectedParams { id: string; headers: Record; params: { answeredElsewhere: boolean; }; } interface HandleConnectionFailedParams { id: string; code: number; reason: string; headers: Record; } type HandleConnectionConnected = BaseInternalRPCMsg<"handleConnectionConnected", HandleConnectionConnectedParams>; type HandleConnectionDisconnected = BaseInternalRPCMsg<"handleConnectionDisconnected", HandleConnectionDisconnectedParams>; type HandleConnectionFailed = BaseInternalRPCMsg<"handleConnectionFailed", HandleConnectionFailedParams>; type CallConference = BaseInternalRPCMsg<"callConference", CallConferenceParams>; interface DisconnectCallParams { id: string; headers: Record; } type DisconnectCall = BaseInternalRPCMsg<"disconnectCall", DisconnectCallParams>; type AnyConferenceIncomingMsg = HandleConnectionConnected | HandleConnectionDisconnected | HandleConnectionFailed; type AnyConferenceOutgoingMsg = CallConference | DisconnectCall; type CallIncomingMsgNames = "handleConnectionConnected" | "handleConnectionFailed" | "handleConnectionDisconnected" | "handleRingOut" | "startEarlyMedia" | "stopRinging" | "handleIncomingConnection" | "onICEConfig" | "handleTransferStarted" | "handleTransferComplete" | "handleTransferFailed"; type CallOutgoingMsgName = "createCall" | "disconnectCall" | "rejectCall" | "confirmIncomingConnection" | "acceptCall" | "transferCall"; interface HandleRingOutParams { id: string; } type HandleRingOut = BaseInternalRPCMsg<"handleRingOut", HandleRingOutParams>; interface StartEarlyMediaParams { id: string; headers: SipHeaders; sdp: string; scheme: ReInviteSchemeWithOptionalCauses; } type StartEarlyMedia = BaseInternalRPCMsg<"startEarlyMedia", StartEarlyMediaParams>; interface StopRingingParams { id: string; } type StopRinging = BaseInternalRPCMsg<"stopRinging", StopRingingParams>; interface ReInviteDescription { mids: Record; } interface CreateCallParams { number: string; isVideo: boolean; id: string; headers: Record; sdp: string; reInviteDescription: ReInviteDescription; } type CreateCall = BaseInternalRPCMsg<"createCall", CreateCallParams>; interface ConfirmIncomingConnectionParams { id: string; } type ConfirmIncomingConnection = BaseInternalRPCMsg<"confirmIncomingConnection", ConfirmIncomingConnectionParams>; interface AcceptCallParams { id: string; headers: Record; sdp: string; reInviteDescription: ReInviteDescription; } type AcceptCall = BaseInternalRPCMsg<"acceptCall", AcceptCallParams>; interface RejectCallParams { id: string; considerForking: boolean; headers: Record; } type RejectCall = BaseInternalRPCMsg<"rejectCall", RejectCallParams>; interface TransferCallParams { call1Id: string; call2Id: string; } type TransferCall = BaseInternalRPCMsg<"transferCall", TransferCallParams>; type HandleTransferStarted = BaseInternalRPCMsg<"handleTransferStarted">; interface HandleTransferCompleteParams { id: string; } type HandleTransferComplete = BaseInternalRPCMsg<"handleTransferComplete", HandleTransferCompleteParams>; interface HandleTransferFailedParams { id: string; } type HandleTransferFailed = BaseInternalRPCMsg<"handleTransferFailed", HandleTransferFailedParams>; interface HandleIncomingConnectionParams { id: string; callerId: string; displayName: string; headers: Record; sdp: string; scheme: ReInviteSchemeWithOptionalCauses; } type HandleIncomingConnection = BaseInternalRPCMsg<"handleIncomingConnection", HandleIncomingConnectionParams>; interface OnICEConfigParams { id: string; config: RTCIceServer[]; } type OnICEConfig = BaseInternalRPCMsg<"onICEConfig", OnICEConfigParams>; type AnyCallIncomingMsg = HandleRingOut | HandleIncomingConnection | StartEarlyMedia | StopRinging | OnICEConfig | HandleTransferStarted | HandleTransferComplete | HandleTransferFailed; type AnyCallOutgoingMsg = CreateCall | RejectCall | ConfirmIncomingConnection | AcceptCall | TransferCall; type SmartQueueIncomingMsgNames = "onACDStatus" | "SQMessagingStatusUpdated" | "onSQStatusError"; type SmartQueueOutgoingMsgName = "getOperatorACDStatus" | "getOperatorMessagingStatus" | "setOperatorACDStatus" | "setOperatorMessagingStatus"; interface getOperatorACDStatusParams { requestId: string; } type getOperatorACDStatus = BaseInternalRPCMsg<"getOperatorACDStatus", getOperatorACDStatusParams>; interface getOperatorMessagingStatusParams { requestId: string; } type getOperatorMessagingStatus = BaseInternalRPCMsg<"getOperatorMessagingStatus", getOperatorMessagingStatusParams>; interface onACDStatusParams { connectionId: string; status: string; requestId: string; description: string; } type onACDStatus = BaseInternalRPCMsg<"onACDStatus", onACDStatusParams>; interface SQMessagingStatusUpdatedParams { connectionId: string; status: string; requestId: string; description: string; } type SQMessagingStatusUpdated = BaseInternalRPCMsg<"SQMessagingStatusUpdated", SQMessagingStatusUpdatedParams>; interface onSQStatusErrorParams { connectionId: string; requestId: string; code: number; description: string; } type onSQStatusError = BaseInternalRPCMsg<"onSQStatusError", onSQStatusErrorParams>; interface setOperatorACDStatusParams { status: string; requestId: string; permanent: boolean; } type setOperatorACDStatus = BaseInternalRPCMsg<"setOperatorACDStatus", setOperatorACDStatusParams>; interface setOperatorMessagingStatusParams { status: string; requestId: string; permanent: boolean; } type setOperatorMessagingStatus = BaseInternalRPCMsg<"setOperatorMessagingStatus", setOperatorMessagingStatusParams>; type AnySmartQueueIncomingMsg = onACDStatus | SQMessagingStatusUpdated | onSQStatusError; type AnySmartQueueOutgoingMsg = getOperatorACDStatus | getOperatorMessagingStatus | setOperatorACDStatus | setOperatorMessagingStatus; type PushServiceIncomingMsgNames = "registerPushTokenResult" | "unregisterPushTokenResult"; type PushServiceOutgoingMsgName = "registerPushToken" | "unregisterPushToken" | "pushFeedback"; interface RegisterPushTokenParams { token: string; bundle: string; requestId: string; } type RegisterPushToken = BaseInternalRPCMsg<"registerPushToken", RegisterPushTokenParams>; interface UnregisterPushTokenParams { token: string; bundle: string; requestId: string; } type UnregisterPushToken = BaseInternalRPCMsg<"unregisterPushToken", UnregisterPushTokenParams>; type PushFeedbackParams = Record; type PushFeedback = BaseInternalRPCMsg<"pushFeedback", PushFeedbackParams>; interface RegisterPushTokenResultParams { msg: string; params: string; status: "OK" | "ERROR"; token: string; } type RegisterPushTokenResult = BaseInternalRPCMsg<"registerPushTokenResult", RegisterPushTokenResultParams>; interface UnregisterPushTokenResultParams { msg: string; params: string; status: "OK" | "ERROR"; token: string; } type UnregisterPushTokenResult = BaseInternalRPCMsg<"unregisterPushTokenResult", UnregisterPushTokenResultParams>; type AnyPushServiceIncomingMsg = RegisterPushTokenResult | UnregisterPushTokenResult; type AnyPushServiceOutgoingMsg = RegisterPushToken | UnregisterPushToken | PushFeedback; type BaseInternalRPCMsg> = MsgCommand<{ kind: "rpc"; name: Name; params: Params; }>; type BaseIncomingRPCMsgNames = "__pong" | "__createConnection"; type BaseOutgoingRPCMsgNames = "__ping"; type AnyIncomingRPCMsgNames = BaseIncomingRPCMsgNames | LoginIncomingMsgNames | ConferenceIncomingMsgNames | CallIncomingMsgNames | MediaEventIncomingMsgNames | SmartQueueIncomingMsgNames | PushServiceIncomingMsgNames; type AnyOutgoingRPCMsgNames = BaseOutgoingRPCMsgNames | LoginOutgoingMsgNames | ConferenceOutgoingMsgName | CallOutgoingMsgName | MediaEventOutgoingMsgNames | SmartQueueOutgoingMsgName | PushServiceOutgoingMsgName; type AnyRPCMsgNames = AnyIncomingRPCMsgNames | AnyOutgoingRPCMsgNames; type Ping = BaseInternalRPCMsg<"__ping", EmptyObject>; type Pong = BaseInternalRPCMsg<"__pong", EmptyObject>; type CreateConnection = BaseInternalRPCMsg<"__createConnection", EmptyObject>; type AnyBaseIncomingRPC = Pong | CreateConnection; type AnyBaseOutgoingRPC = Ping; type BaseOutgoingMessagingAction = MsgCommand<{ kind: "messaging"; service: "chat"; event: ActionName; payload: Payload; request_uuid: UUID; }>; type BaseIncomingMessagingEvent = MsgCommand<{ kind?: "messaging"; service: "chat"; event: Name; payload: Payload; request_uuid: UUID; to: MessagingUserName; toId: MessagingUserId[]; version: string; connid?: string | null; }>; type UnknownOutgoingMessagingAction = BaseOutgoingMessagingAction; type UnknownIncomingMessagingEvent = BaseIncomingMessagingEvent; type AnyOutgoingRPCMsg = AnyBaseOutgoingRPC | AnyLoginOutgoingMsg | AnyConferenceOutgoingMsg | AnyCallOutgoingMsg | AnyMediaOutgoingMsg | AnySmartQueueOutgoingMsg | AnyPushServiceOutgoingMsg; type AnyOutgoingMessage = AnyOutgoingRPCMsg | UnknownOutgoingMessagingAction; type AnyOutgoingMessagePayload = AnyOutgoingMessage["payload"]; type AnyIncomingRPCMsg = AnyBaseIncomingRPC | AnyLoginIncomingMsg | AnyConferenceIncomingMsg | AnyCallIncomingMsg | AnyMediaIncomingMsg | AnySmartQueueIncomingMsg | AnyPushServiceIncomingMsg; type AnyIncomingMessage = AnyIncomingRPCMsg | UnknownIncomingMessagingEvent; type AnyMessage = AnyOutgoingMessage | AnyIncomingMessage; /** * Connection options. */ export interface ConnectionOptions { /** * * Array of the media gateway servers for connection. The default value is an empty array. */ servers?: string[]; /** * Whether the SDK should try to reconnect to the Voximplant Cloud if the connection has been lost for some reason. * The default value is true. */ autoReconnect?: boolean; /** * Node the Voximplant account belongs to. * * Find more information about [Core.ConnectionNode] in the [getting started guide](/docs/getting-started/platform/web). */ node: ConnectionNode; } /** * @hidden */ export interface ConnectionEventAwaiter { resolver: (value: unknown) => void; value: unknown; timeout: number; } /** * @hidden */ export interface Connection extends BaseModule { node: ConnectionNode; servers: string[]; autoReconnect: boolean; state: ReadonlyWatchable; iceConfig: Watchable; connect: (options: ConnectionOptions) => Promise; disconnect: (code?: TransportCloseCodes, reason?: string) => Promise; sendMessage: (message: AnyOutgoingMessagePayload) => void; subscribeMessage: (message: MessageName, callback: (message: Extract) => void | Promise) => void; unsubscribeMessage: (messageName: MessageName, subscriber: (message: Extract) => void | Promise) => void; registerMessageAwaiter: (messageName: MessageName, timeout: number, scope?: RegisterMessageAwaiterScope) => { promise: Promise | Error>; unregister: () => void; }; onIncomingMessagingEvent?: ((message: UnknownIncomingMessagingEvent) => void | Promise) | null; } /** * @hidden */ export declare const connectionToken: Token; /** * Enum that contains the nodes the Voximplant account may belong to. * * You can find more information about nodes in the [getting started](/docs/getting-started/platform/web) section. */ export declare enum ConnectionNode { NODE_1 = "NODE_1", NODE_2 = "NODE_2", NODE_3 = "NODE_3", NODE_4 = "NODE_4", NODE_5 = "NODE_5", NODE_6 = "NODE_6", NODE_7 = "NODE_7", NODE_8 = "NODE_8", NODE_9 = "NODE_9", NODE_10 = "NODE_10", NODE_11 = "NODE_11", /** * @since 5.1.0 */ NODE_12 = "NODE_12", /** * @since 5.2.0 */ NODE_13 = "NODE_13" } declare enum ConnectionState { Disconnecting = "DISCONNECTING", Disconnected = "DISCONNECTED", Connecting = "CONNECTING", Connected = "CONNECTED", Reconnecting = "RECONNECTING" } type RegisterMessageAwaiterScope = "rpc" | "messaging"; declare const WEB_SDK_ERROR_SYMBOL: unique symbol; /** * Base Web SDK error. Any other SDK error extends it. * @folder SharedErrors * @hideconstructor */ export declare class WebSDKError extends Error { /** * @hidden */ [WEB_SDK_ERROR_SYMBOL]?: boolean; /** * Because of using class in different modules (bundled js files) need to override instanceof operator - * different physical instances of the class in different modules should be treated as the same class * @hidden */ static [Symbol.hasInstance](instance: unknown): instance is WebSDKError; } declare const DEPENDENCY_MISSING_ERROR_SYMBOL: unique symbol; /** * Thrown on the attempt to register a module without registering its dependencies. * * @folder SharedErrors * @hideconstructor */ export declare class DependencyMissingError extends WebSDKError { /** * @hidden */ [DEPENDENCY_MISSING_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is DependencyMissingError; constructor(missingModuleName: string); } declare const INVALID_MIME_TYPE_ERROR_SYMBOL: unique symbol; /** * Thrown if the [Call.Call.sendInfo] method is called with an incorrect MIME type. * * @folder SharedErrors * @hideconstructor */ export declare class InvalidMimeTypeError extends WebSDKError { /** * @hidden */ [INVALID_MIME_TYPE_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is InvalidMimeTypeError; constructor(); } declare const INVALID_ARGUMENTS_ERROR_SYMBOL: unique symbol; /** * Thrown if one or multiple arguments passed the SDK API are not considered valid. * * @folder SharedErrors * @hideconstructor */ export declare class InvalidArgumentsError extends WebSDKError { /** * @hidden */ [INVALID_ARGUMENTS_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is InvalidArgumentsError; constructor(message?: string); } declare const AUTHENTICATION_ERROR_SYMBOL: unique symbol; /** * @folder SharedErrors * @hideconstructor */ export declare class AuthenticationError extends WebSDKError { /** * @hidden */ [AUTHENTICATION_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is AuthenticationError; constructor(message?: string); } declare const REQUIRED_PARAMETER_ERROR_SYMBOL: unique symbol; /** * @folder SharedErrors * @hideconstructor */ export declare class RequiredParameterError extends WebSDKError { /** * @hidden */ [REQUIRED_PARAMETER_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is RequiredParameterError; constructor(parameters: string[]); } declare const AUDIO_STREAM_IS_REQUIRED_ERROR_SYMBOL: unique symbol; /** * Thrown if a call or a conference has started without an audio stream. * * @folder SharedErrors * @hideconstructor */ export declare class AudioStreamRequiredError extends WebSDKError { /** * @hidden */ [AUDIO_STREAM_IS_REQUIRED_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is AudioStreamRequiredError; constructor(); } declare const INACTIVE_STREAM_ERROR_SYMBOL: unique symbol; /** * Thrown on the attempt to start sending a [MediaStream](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream) that is not active. * * @folder SharedErrors * @hideconstructor */ export declare class InactiveStreamError extends WebSDKError { /** * @hidden */ [INACTIVE_STREAM_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is InactiveStreamError; constructor(id: string); } declare const STREAM_TYPE_MISMATCH_ERROR_SYMBOL: unique symbol; /** * Thrown on the attempt to start, stop, or replace a stream in a call or conference with a screen sharing stream. * * @folder SharedErrors * @hideconstructor */ export declare class StreamTypeMismatchError extends WebSDKError { /** * @hidden */ [STREAM_TYPE_MISMATCH_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is StreamTypeMismatchError; constructor(streamType: StreamType, allowedTypes: StreamType[]); } declare const STREAM_NOT_SENDING_ERROR_SYMBOL: unique symbol; /** * Thrown on the attempt to stop sending a stream that is not currently sending in a call or conference. * * @folder SharedErrors * @hideconstructor */ export declare class StreamNotSendingError extends WebSDKError { /** * @hidden */ [STREAM_NOT_SENDING_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is StreamNotSendingError; constructor(stream?: Stream); } declare const STREAM_ALREADY_SENDING_ERROR_SYMBOL: unique symbol; /** * Thrown on the attempt to start sending audio or video stream that is already sending in a call or conference. * * @folder SharedErrors * @hideconstructor */ export declare class StreamAlreadySendingError extends WebSDKError { /** * @hidden */ [STREAM_ALREADY_SENDING_ERROR_SYMBOL]?: boolean; /** * @hidden */ [Symbol.hasInstance](instance: unknown): instance is StreamAlreadySendingError; constructor(stream?: Stream); } /** * Thrown if an internal error has occurred. * * @folder Errors * @hideconstructor */ export declare class CoreInternalError extends WebSDKError { constructor(reason?: string); } /** * Thrown on the attempt to create the [Core.Core] instance with the "new" operator. * * @folder Errors * @hideconstructor */ export declare class InitializationError extends WebSDKError { constructor(); } /** * SDK initialization options. */ export interface CoreInitOptions { /** * Logger options. */ logger?: LoggerOptions; } /** * @hidden */ export declare const ConnectionLoader: ModuleFactory; /** * @hidden */ export declare class ConnectionImpl extends BaseModuleImpl implements Connection { node: ConnectionNode; servers: string[]; autoReconnect: boolean; state: ReadonlyWatchable; iceConfig: Watchable; closeCode: TransportCloseCodes | null; onIncomingMessagingEvent?: ((message: UnknownIncomingMessagingEvent) => void | Promise) | null; private readonly logger; private currentTransportHost; private currentConnectionId; private localClock; private remoteClock; private readonly lastAcknoladgedByRemote; private transport; private readonly messagePool; private readonly awaiters; private readonly messageSubscribers; private reconnectingPromise; private connectionPromise; private readonly connectionPromiseStatus; private connectionPromiseRejector; private readonly pinger; private disconnectPromise; private disconnectPromiseResolver; private lastAckClockSend; constructor(initOptions: InitModuleOptions); connect(options: ConnectionOptions): Promise; disconnect(code?: TransportCloseCodes, reason?: string): Promise; resolveDisconnectRoutine(): Promise; disconnectRoutine(code?: TransportCloseCodes, reason?: string): Promise; sendMessage(message: AnyOutgoingMessagePayload): void; subscribeMessage(message: MessageName, callback: (message: Extract) => void | Promise): void; unsubscribeMessage(messageName: MessageName, subscriber: (message: Extract) => void | Promise): void; registerMessageAwaiter(messageName: MessageName, timeout: number, scope?: RegisterMessageAwaiterScope): { promise: Promise | Error>; unregister: () => void; }; private initStateWatcher; private lastConnectTraceId; private connectRoutine; private clearTransport; private sendCommand; private requestSocketFromBalancer; private logTransportMessage; private transportMessageHandler; private transportCloseHandler; private createTransport; /** * @description creates promise to await event with path and options.value on it. * Resolves with error on options.timeout. Never throw error/rejects due possible side effects with * unhandled exceptions routine * @param path path to value to watch. Leave options.value === undefined if no need value check, only key needed * @param options * @return Full event message or Error on timeout * @private * @hidden */ private registerAwaiter; private resolveAwaiters; private validateSeq; private checkConnectionId; private processError; /** * @description clear all unprocessed by remote messages * @param seq * @private */ private processAck; private validateConnectionId; private processLastRx; private sendACK; private forceSendAck; private sendACKRoutine; private processMsg; private notifySubscribers; private prepareIncomingMsg; private attemptReconnect; private untilAcknowledged; private reconnect; private resetConnectionState; } /** * Error object that is the base for all connection errors. * * @folder ConnectionErrors * @hideconstructor */ export declare class ConnectionError extends WebSDKError { } /** * Thrown if the connection to the Voximplant Cloud has not completed in time. * * @folder ConnectionErrors * @hideconstructor */ export declare class ConnectionTimeoutError extends ConnectionError { constructor(reason?: string); } /** * Thrown if an internal error has occurred. * * @folder ConnectionErrors * @hideconstructor */ export declare class ConnectionInternalError extends ConnectionError { constructor(reason?: string); } /** * Thrown if the connection to the Voximplant Cloud is closed due to network issues. * * @folder ConnectionErrors * @hideconstructor */ export declare class ConnectionNetworkError extends ConnectionError { constructor(reason?: string); } /** * Thrown if the connection to the Voximplant Cloud is closed because the [Core.Client.disconnect] API is called. * * @folder ConnectionErrors * @hideconstructor */ export declare class ConnectionInterruptedError extends ConnectionError { constructor(reason?: string); } /** * @folder Events */ export declare enum ClientEvent { /** * Triggered if the connection to the Voximplant Cloud has been closed. * @cast Core.Events.ClientDisconnectedPayload */ Disconnected = "DISCONNECTED" } /** * @internal */ export interface BaseClientEvent extends BaseBusEvent { name: Name; payload: Payload; } /** * Enum that contains reasons why the connection to the Voximplant Cloud has been closed, * provided by the [Core.Events.ClientEvent.Disconnected] event. * * @folder Events */ export declare enum ClientDisconnectReason { /** * Connection to the Voximplant Cloud has been closed by the [Core.Client.disconnect] method call. */ UserInitiated = "USER_INITIATED", /** * Connection to the Voximplant Cloud has been closed due to network issues. */ ConnectionLost = "CONNECTION_LOST" } /** * @folder Events */ export interface ClientDisconnectedPayload { /** * Disconnect reason. */ reason: ClientDisconnectReason; } /** * @folder Events * @interface */ export type ClientDisconnected = BaseClientEvent; /** * @folder Events */ export type AnyClientEvent = ClientDisconnected; /** * Enum that contains the client states. */ export declare enum ClientState { /** * Client is currently disconnected. */ Disconnected = "DISCONNECTED", /** * Client is currently disconnecting. */ Disconnecting = "DISCONNECTING", /** * Client is currently connecting. */ Connecting = "CONNECTING", /** * Client is currently connected. */ Connected = "CONNECTED", /** * Client is currently logging in. */ LoggingIn = "LOGGING_IN", /** * Client is currently logged in. */ LoggedIn = "LOGGED_IN", /** * Client is currently reconnecting. */ Reconnecting = "RECONNECTING" } /** * Registers a handler for the specified event. * * One event can have more than one handler; handlers are executed in order of their registration. * @interface * @internal */ export type DocClientAddEventListener = ( /** * Event name */ eventName: ClientEvent, /** * Handler function that is triggered when an event of the specified type occurs */ listener: (event: AnyClientEvent) => void | Promise, /** * Object that specifies characteristics about the event listener */ options: ListenerOptions) => void; /** * Removes a previously registered handler for the specified event. * * @interface * @internal */ export type DocClientRemoveEventListener = ( /** * Event name */ eventName: ClientEvent, /** * Handler function to remove from the event target */ listener: (event: AnyClientEvent) => void | Promise) => void; /** * Interface that provides API to connect and log in to the Voximplant Cloud. */ export interface Client extends BaseModule { /** * Watchable property that allows getting the current client state and observe its changes. */ state: ReadonlyWatchable; /** * Connects to the Voximplant Cloud. * * Returns a promise that is resolved when the connection to the Voximplant Cloud is established. * @param options Connect options * @throws One of [Core.ConnectionErrors] */ connect: (options: ConnectionOptions) => Promise; /** * Disconnects from the Voximplant Cloud. * * Returns a promise that is resolved when the connection to the Voximplant Cloud is closed. */ disconnect: () => Promise; /** * Logs in a user with a password to the Voximplant Cloud. * * Returns a promise that is resolved to a [Core.LoginResult] object. * * @param options Options to log in with a password * @throws One of [Core.LoginErrors] */ login: (options: PasswordLoginOptions) => Promise; /** * Logs in a user with a one-time key to the Voximplant Cloud. * * Returns a promise that is resolved to a [Core.LoginResult] object. * * @param options Options to log in with a one-time key * @throws One of [Core.LoginErrors] */ loginOneTimeKey: (options: OneTimeKeyLoginOptions) => Promise; /** * Logs in a user with an access token to the Voximplant Cloud. * * Returns a promise that is resolved to a [Core.LoginResult] object. * * @param options Options to log in with an access token * @throws One of [Core.LoginErrors] */ loginAccessToken: (options: AccessTokenLoginOptions) => Promise; /** * Generates a one-time login key to use in the automated login process. * * For additional information please see the [guide](/docs/guides/sdk/authorization-onetimekey). * * Returns a promise that is resolved to a string that represents the one-time key. * * @param options Options to request a one-time key * @throws One of [Core.LoginErrors] */ requestOneTimeKey: (options: RequestOneTimeKeyOptions) => Promise; /** * Performs a refresh of login tokens required for [Core.Client.loginAccessToken]. * * Returns a promise that is resolved to a [Core.LoginTokens] object. * * @param options Options to refresh tokens * @throws One of [Core.LoginErrors] */ refreshTokens: (options: RefreshTokenOptions) => Promise; /** * @reinterpret Core.DocClientAddEventListener */ addEventListener: AddEventListener; /** * @reinterpret Core.DocClientRemoveEventListener */ removeEventListener: RemoveEventListener; } /** * @hidden */ export declare const clientToken: Token; /** * @hidden */ export declare const ClientLoader: ModuleFactory; export declare class Core { private static instance?; private readonly container; /** * Registers the SDK modules in the WebSDK container. * * It is allowed to call this method multiple times and register the modules as needed. * * Modules cannot be obtained and used until they are successfully registered. * * After calling this method, all specified modules are initialized and available via [Core.Core.getModule] or [Core.Core.getModuleAsync]. * * @see [Conference.ConferenceLoader], [Call.CallLoader], [SmartQueue.SmartQueueLoader], [Messaging.MessagingLoader], * [Stream.StreamLoader], [NoiseSuppressionBalanced.NoiseSuppressionBalancedLoader], [NoiseSuppressionAggressive.NoiseSuppressionAggressiveLoader] * @throws [Core.SharedErrors.DependencyMissingError] */ registerModules: (modules: ModuleLoader[]) => void; /** * Returns a registered module by its token synchronously. * * If no module is registered with the specified token, returns undefined. * * @see [Conference.ConferenceManager], [Call.CallManager], [SmartQueue.SmartQueue], [Messaging.Messaging], * [Stream.StreamModule], [NoiseSuppressionBalanced.NoiseSuppressionBalanced], [NoiseSuppressionAggressive.NoiseSuppressionAggressive] */ getModule: ( /** * Module token * * @see [Conference.conferenceToken], [Call.callToken], [SmartQueue.smartQueueToken], [Messaging.messagingToken], * [Stream.streamToken], [NoiseSuppressionBalanced.noiseSuppressionBalancedToken], [NoiseSuppressionAggressive.noiseSuppressionAggressiveToken] */ token: Token) => Module | undefined; /** * Returns a registered module by its token. * * If a module with the specified token is registered, returns it immediately. * * If a module with the specified token is not registered, returns a promise that is resolved/rejected only after * the module registration is complete. * * @see [Conference.ConferenceManager], [Call.CallManager], [SmartQueue.SmartQueue], [Messaging.Messaging], [Stream.StreamModule], * [NoiseSuppressionBalanced.NoiseSuppressionBalanced], [NoiseSuppressionAggressive.NoiseSuppressionAggressive] * @throws [Core.Errors.CoreInternalError] if a module registration has failed after this method call */ getModuleAsync: ( /** * Module token * * @see [Conference.conferenceToken], [Call.callToken], [SmartQueue.smartQueueToken], [Messaging.messagingToken], * [Stream.streamToken], [NoiseSuppressionBalanced.noiseSuppressionBalancedToken], [NoiseSuppressionAggressive.noiseSuppressionAggressiveToken] */ token: Token) => Promise; /** * Client instance. */ client: Client; private logger; private constructor(); /** * Initializes the SDK and returns an instance. * * If the SDK is already initialized, returns the previously created instance without applying the new options. * * @param options Initialization options */ static init(options?: CoreInitOptions): Core; private logVoximplantInfo; } export {};