type Nullable = T | null | undefined declare const __doNotImplementIt: unique symbol type __doNotImplementIt = typeof __doNotImplementIt export namespace com.cpaasapi.sdk.api { class CPaaSResult { private constructor(); get value(): Nullable; get isSuccess(): boolean; get isFailure(): boolean; static get Companion(): { success(value: T): com.cpaasapi.sdk.api.CPaaSResult; failure(exception: TException): com.cpaasapi.sdk.api.CPaaSResult; }; fold(onSuccess: (p0: T) => void, onFailure: (p0: TException) => void): Nullable; onSuccess(action: (p0: T) => void): com.cpaasapi.sdk.api.CPaaSResult; onFailure(action: (p0: TException) => void): com.cpaasapi.sdk.api.CPaaSResult; } namespace CPaaSResult { class Failure { constructor(exception: TException); get exception(): TException; equals(other: Nullable): boolean; hashCode(): number; toString(): string; } } } export namespace com.cpaasapi.sdk.api { interface CPaaSServiceEvents { onRinging(): void; onConnected(): void; onConnectedFailure(reason: com.cpaasapi.sdk.api.CPaaSReason): void; onCallEnd(reason: com.cpaasapi.sdk.api.CPaaSReason): void; onReconnecting(reason: com.cpaasapi.sdk.api.CPaaSReason): void; readonly __doNotUseIt: __doNotImplementIt; } abstract class CPaaSReason { private constructor(); static get BUSY(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "BUSY"; get ordinal(): 0; }; static get REJECT(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "REJECT"; get ordinal(): 1; }; static get BAD_REQUEST(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "BAD_REQUEST"; get ordinal(): 2; }; static get UNAUTHORIZED(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "UNAUTHORIZED"; get ordinal(): 3; }; static get NOT_FOUND(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "NOT_FOUND"; get ordinal(): 4; }; static get GONE(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "GONE"; get ordinal(): 5; }; static get TIME_OUT(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "TIME_OUT"; get ordinal(): 6; }; static get RTP_LOST(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "RTP_LOST"; get ordinal(): 7; }; static get NETWORK(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "NETWORK"; get ordinal(): 8; }; static get BY_USER(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "BY_USER"; get ordinal(): 9; }; static get BY_SERVER(): com.cpaasapi.sdk.api.CPaaSReason & { get name(): "BY_SERVER"; get ordinal(): 10; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.api.CPaaSReason; get name(): "BUSY" | "REJECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "NOT_FOUND" | "GONE" | "TIME_OUT" | "RTP_LOST" | "NETWORK" | "BY_USER" | "BY_SERVER"; get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; } abstract class CPaaSParticipantEvent { private constructor(); static get NEW_DATA(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "NEW_DATA"; get ordinal(): 0; }; static get JOIN(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "JOIN"; get ordinal(): 1; }; static get LEAVE(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "LEAVE"; get ordinal(): 2; }; static get SPEAKERS(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "SPEAKERS"; get ordinal(): 3; }; static get MUTE(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "MUTE"; get ordinal(): 4; }; static get UNMUTE(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "UNMUTE"; get ordinal(): 5; }; static get HOLD(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "HOLD"; get ordinal(): 6; }; static get RESUME(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "RESUME"; get ordinal(): 7; }; static get DISPLAY_NAME_UPDATE(): com.cpaasapi.sdk.api.CPaaSParticipantEvent & { get name(): "DISPLAY_NAME_UPDATE"; get ordinal(): 8; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.api.CPaaSParticipantEvent; get name(): "NEW_DATA" | "JOIN" | "LEAVE" | "SPEAKERS" | "MUTE" | "UNMUTE" | "HOLD" | "RESUME" | "DISPLAY_NAME_UPDATE"; get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; } } export namespace com.cpaasapi.sdk.api.video { interface CPaaSRoom { eventListener: Nullable; getCallId(): string; isMute(): boolean; exit(): void; mute(completion: (p0: boolean) => void): void; unMute(completion: (p0: boolean) => void): void; getCandidateTypeData(): string; sendLocalCamera(completion: (p0: any/* Nullable */) => void): void; inactivateLocalCamera(completion: (p0: any/* Nullable */) => void): void; getMyOwnParticipant(): Nullable; getActiveParticipantById(pId: string): Nullable; getParticipantsOrder(): any/* kotlin.collections.List */; getVideoElements(completion: (p0: com.cpaasapi.sdk.api.CPaaSResult) => void): void; readonly __doNotUseIt: __doNotImplementIt; } } export namespace com.cpaasapi.sdk.api.video { interface CPaaSVideoEvents extends com.cpaasapi.sdk.api.CPaaSServiceEvents { onParticipantEvent(event: com.cpaasapi.sdk.api.CPaaSParticipantEvent, pIds: any/* kotlin.collections.List */): void; onVideo(pid: string, event: com.cpaasapi.sdk.api.video.VideoEvent, trackWrapper: com.cpaasapi.sdk.api.video.TrackWrapper): void; onRinging(): void; onConnected(): void; onConnectedFailure(reason: com.cpaasapi.sdk.api.CPaaSReason): void; onCallEnd(reason: com.cpaasapi.sdk.api.CPaaSReason): void; onReconnecting(reason: com.cpaasapi.sdk.api.CPaaSReason): void; readonly __doNotUseIt: __doNotImplementIt; } } export namespace com.cpaasapi.sdk.api.video { abstract class VideoEvent { private constructor(); static get ATTACH(): com.cpaasapi.sdk.api.video.VideoEvent & { get name(): "ATTACH"; get ordinal(): 0; }; static get DETACH(): com.cpaasapi.sdk.api.video.VideoEvent & { get name(): "DETACH"; get ordinal(): 1; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.api.video.VideoEvent; get name(): "ATTACH" | "DETACH"; get ordinal(): 0 | 1; } } export namespace com.cpaasapi.sdk.data { class CPaaSAPISettings { constructor(customDomain: string, accountSid: string, authToken: string, appSid: string, clientId: string, PNSToken: string, baseURL: string, videoCodec: com.cpaasapi.sdk.data.VideoCodec); get customDomain(): string; get accountSid(): string; get authToken(): string; get appSid(): string; get clientId(): string; get PNSToken(): string; get baseURL(): string; get videoCodec(): com.cpaasapi.sdk.data.VideoCodec; component1(): string; component2(): string; component3(): string; component4(): string; component5(): string; component6(): string; component7(): string; component8(): com.cpaasapi.sdk.data.VideoCodec; copy(customDomain?: string, accountSid?: string, authToken?: string, appSid?: string, clientId?: string, PNSToken?: string, baseURL?: string, videoCodec?: com.cpaasapi.sdk.data.VideoCodec): com.cpaasapi.sdk.data.CPaaSAPISettings; toString(): string; hashCode(): number; equals(other: Nullable): boolean; } abstract class VideoCodec { private constructor(); static get H264(): com.cpaasapi.sdk.data.VideoCodec & { get name(): "H264"; get ordinal(): 0; }; static get VP8(): com.cpaasapi.sdk.data.VideoCodec & { get name(): "VP8"; get ordinal(): 1; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.data.VideoCodec; get name(): "H264" | "VP8"; get ordinal(): 0 | 1; } } export namespace com.cpaasapi.sdk.data { class CallInfo { constructor(callId: string, sourceId: string, destinationId: string); get callId(): string; get sourceId(): string; get destinationId(): string; component1(): string; component2(): string; component3(): string; copy(callId?: string, sourceId?: string, destinationId?: string): com.cpaasapi.sdk.data.CallInfo; toString(): string; hashCode(): number; equals(other: Nullable): boolean; } } export namespace com.cpaasapi.sdk.data { class CallOptions { constructor(audio: boolean, destination: Nullable); get audio(): boolean; get destination(): Nullable; } class RoomOptions { constructor(audio: com.cpaasapi.sdk.data.AudioStatus, video: boolean, displayName: string, destination: Nullable); get audio(): com.cpaasapi.sdk.data.AudioStatus; get video(): boolean; get displayName(): string; get destination(): Nullable; } abstract class ServiceType { private constructor(); static get VOICE(): com.cpaasapi.sdk.data.ServiceType & { get name(): "VOICE"; get ordinal(): 0; }; static get VIDEO(): com.cpaasapi.sdk.data.ServiceType & { get name(): "VIDEO"; get ordinal(): 1; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.data.ServiceType; get name(): "VOICE" | "VIDEO"; get ordinal(): 0 | 1; } } export namespace com.cpaasapi.sdk.data { class MediaStatus { constructor(audio: com.cpaasapi.sdk.data.AudioStatus, hold: boolean, video: boolean); get audio(): com.cpaasapi.sdk.data.AudioStatus; set audio(value: com.cpaasapi.sdk.data.AudioStatus); get hold(): boolean; set hold(value: boolean); get video(): boolean; set video(value: boolean); static get Companion(): { serializer(): any/* kotlinx.serialization.KSerializer */; }; static get $serializer(): { } & any/* kotlinx.serialization.internal.GeneratedSerializer */; component1(): com.cpaasapi.sdk.data.AudioStatus; component2(): boolean; component3(): boolean; copy(audio?: com.cpaasapi.sdk.data.AudioStatus, hold?: boolean, video?: boolean): com.cpaasapi.sdk.data.MediaStatus; toString(): string; hashCode(): number; equals(other: Nullable): boolean; static MediaStatus_init_$Create$(seen1: number, audio: Nullable, hold: boolean, video: boolean, serializationConstructorMarker: any/* Nullable */): com.cpaasapi.sdk.data.MediaStatus; } abstract class AudioStatus { private constructor(); static get On(): com.cpaasapi.sdk.data.AudioStatus & { get name(): "On"; get ordinal(): 0; }; static get Off(): com.cpaasapi.sdk.data.AudioStatus & { get name(): "Off"; get ordinal(): 1; }; static get Disable(): com.cpaasapi.sdk.data.AudioStatus & { get name(): "Disable"; get ordinal(): 2; }; static get Companion(): { serializer(): any/* kotlinx.serialization.KSerializer */; }; static get $serializer(): { } & any/* kotlinx.serialization.internal.GeneratedSerializer */; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.data.AudioStatus; get name(): "On" | "Off" | "Disable"; get ordinal(): 0 | 1 | 2; } } export namespace com.cpaasapi.sdk.data { class Participant { constructor(pId: string, displayName: string, deviceType: com.cpaasapi.sdk.data.PlatformName, mediaStatus: com.cpaasapi.sdk.data.MediaStatus, position: number, userId: string, myOwn: boolean); get pId(): string; get displayName(): string; set displayName(value: string); get deviceType(): com.cpaasapi.sdk.data.PlatformName; get mediaStatus(): com.cpaasapi.sdk.data.MediaStatus; get position(): number; set position(value: number); get userId(): string; get myOwn(): boolean; set myOwn(value: boolean); isMute(): boolean; component1(): string; component2(): string; component3(): com.cpaasapi.sdk.data.PlatformName; component4(): com.cpaasapi.sdk.data.MediaStatus; component5(): number; component6(): string; component7(): boolean; copy(pId?: string, displayName?: string, deviceType?: com.cpaasapi.sdk.data.PlatformName, mediaStatus?: com.cpaasapi.sdk.data.MediaStatus, position?: number, userId?: string, myOwn?: boolean): com.cpaasapi.sdk.data.Participant; toString(): string; hashCode(): number; equals(other: Nullable): boolean; } } export namespace com.cpaasapi.sdk.data { abstract class PlatformName { private constructor(); static get ANDROID(): com.cpaasapi.sdk.data.PlatformName & { get name(): "ANDROID"; get ordinal(): 0; }; static get IOS(): com.cpaasapi.sdk.data.PlatformName & { get name(): "IOS"; get ordinal(): 1; }; static get WEB_BROWSER(): com.cpaasapi.sdk.data.PlatformName & { get name(): "WEB_BROWSER"; get ordinal(): 2; }; static get WEB_DESKTOP(): com.cpaasapi.sdk.data.PlatformName & { get name(): "WEB_DESKTOP"; get ordinal(): 3; }; static values(): Array; static valueOf(value: string): com.cpaasapi.sdk.data.PlatformName; get name(): "ANDROID" | "IOS" | "WEB_BROWSER" | "WEB_DESKTOP"; get ordinal(): 0 | 1 | 2 | 3; } } export class CPaaSEvents { private constructor(); addListener(eventName: string, callback: (p0: any) => any): void; } export const voice: typeof cpaas.data.Voice; export const video: typeof cpaas.data.Video; export const cpaasActions: { setConsoleLogOutput(enabled: boolean): void; register(settings: cpaas.data.JsSettings): Promise; logout(): void; getLayoutRootElement(): void; exportLogs(): Promise; }; export namespace com.cpaasapi.sdk.api.video { class TrackWrapper { constructor(stream: MediaStream); get stream(): MediaStream; } } export namespace com.cpaasapi.sdk.api.video { class VideoElementsProvider { constructor(stream: MediaStream); get stream(): MediaStream; } } export namespace cpaas.data { abstract class CPaaSCallBase { get onRinging(): cpaas.events.OnRinging; get onConnected(): cpaas.events.OnConnected; get onConnectionFailure(): cpaas.events.OnConnectionFailure; get onCallEnd(): cpaas.events.OnCallEnd; get onReconnecting(): cpaas.events.OnReconnecting; get active(): boolean; set active(value: boolean); get isMute(): boolean; get callId(): Nullable; get destinationId(): Nullable; end(): void; mute(): Promise; unmute(): Promise; protected registerEvents(call: cpaas.data.CPaaSCallBase): void; } } export namespace cpaas.data { abstract class CPaaSRoomBase { get onVideoRinging(): cpaas.events.OnVideoRinging; get onVideoConnected(): cpaas.events.OnVideoConnected; get onVideoConnectionFailure(): cpaas.events.OnVideoConnectionFailure; get onVideoCallEnd(): cpaas.events.OnVideoCallEnd; get onVideoReconnecting(): cpaas.events.OnVideoReconnecting; get onRemoteVideoStarted(): cpaas.events.OnRemoteVideoStarted; get onRemoteVideoStopped(): cpaas.events.OnRemoteVideoStopped; get onParticipant(): cpaas.events.OnParticipant; get active(): boolean; set active(value: boolean); get isMute(): boolean; get callId(): Nullable; exit(): void; mute(): Promise; unmute(): Promise; } } export namespace cpaas.data { class CPaasCall extends cpaas.data.CPaaSCallBase { private constructor(); end(): void; mute(): Promise; unmute(): Promise; } } export namespace cpaas.data { class JSConnectResult { constructor(room: com.cpaasapi.sdk.api.video.CPaaSRoom); get onParticipant(): cpaas.events.OnParticipant; get onVideo(): cpaas.events.OnVideo; mute(): Promise; unmute(): Promise; end(): void; copy(room?: com.cpaasapi.sdk.api.video.CPaaSRoom): cpaas.data.JSConnectResult; toString(): string; hashCode(): number; equals(other: Nullable): boolean; } } export namespace cpaas.data { interface JsSettings { customDomain: Nullable; accountSid: Nullable; authToken: Nullable; appSid: Nullable; clientId: Nullable; pnsToken: Nullable; baseUrl: Nullable; } interface JsCallOptions { audio: boolean; destination: Nullable; } interface JsRoomOptions { audio: com.cpaasapi.sdk.data.AudioStatus; readonly video: boolean; readonly displayName: string; } } export namespace cpaas.data { abstract class CPaaSParticipantEvent { private constructor(); static get NEW_DATA(): cpaas.data.CPaaSParticipantEvent & { get name(): "NEW_DATA"; get ordinal(): 0; }; static get JOIN(): cpaas.data.CPaaSParticipantEvent & { get name(): "JOIN"; get ordinal(): 1; }; static get LEAVE(): cpaas.data.CPaaSParticipantEvent & { get name(): "LEAVE"; get ordinal(): 2; }; static get SPEAKERS(): cpaas.data.CPaaSParticipantEvent & { get name(): "SPEAKERS"; get ordinal(): 3; }; static get MUTE(): cpaas.data.CPaaSParticipantEvent & { get name(): "MUTE"; get ordinal(): 4; }; static get UNMUTE(): cpaas.data.CPaaSParticipantEvent & { get name(): "UNMUTE"; get ordinal(): 5; }; static get HOLD(): cpaas.data.CPaaSParticipantEvent & { get name(): "HOLD"; get ordinal(): 6; }; static get RESUME(): cpaas.data.CPaaSParticipantEvent & { get name(): "RESUME"; get ordinal(): 7; }; static get DISPLAY_NAME_UPDATE(): cpaas.data.CPaaSParticipantEvent & { get name(): "DISPLAY_NAME_UPDATE"; get ordinal(): 8; }; static values(): Array; static valueOf(value: string): cpaas.data.CPaaSParticipantEvent; get name(): "NEW_DATA" | "JOIN" | "LEAVE" | "SPEAKERS" | "MUTE" | "UNMUTE" | "HOLD" | "RESUME" | "DISPLAY_NAME_UPDATE"; get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; } } export namespace cpaas.data { const Video: { get room(): Nullable; set room(value: Nullable); get className(): string; create(): Promise; sendLocalVideo(): Promise; disconnectLocalVideo(): Promise; connect(callId: string, invitedParticipants: Nullable>, roomOptions: cpaas.data.JsRoomOptions): Promise; reject(callId: string): void; getExistingRoom(callId: string): Nullable; updateLayoutStructure(callId: string, maxLowQualityItems: number, maxMediumQualityItems: number, maxHighQualityItems: number): void; }; } export namespace cpaas.data { abstract class VideoEvent { private constructor(); static get ATTACH(): cpaas.data.VideoEvent & { get name(): "ATTACH"; get ordinal(): 0; }; static get DETACH(): cpaas.data.VideoEvent & { get name(): "DETACH"; get ordinal(): 1; }; static values(): Array; static valueOf(value: string): cpaas.data.VideoEvent; get name(): "ATTACH" | "DETACH"; get ordinal(): 0 | 1; } } export namespace cpaas.data { const Voice: { get className(): string; create(): Promise; connect(callId: string, callOptions: cpaas.data.JsCallOptions): Promise; reject(callId: string): void; getExistingCall(callId: string): Nullable; }; } export namespace cpaas.events { abstract class Event { constructor(); addEventListener(observer: (p0: T) => void): void; } abstract class EventArgs { constructor(); } } export namespace cpaas.events { class EmptyEvent extends cpaas.events.EventArgs { constructor(call: cpaas.data.CPaaSCallBase); get call(): cpaas.data.CPaaSCallBase; } } export namespace cpaas.events { class OnRemoteVideoStartedEventArgs extends cpaas.events.EventArgs { constructor(remoteVideoProvider: any/* com.cpaasapi.sdk.api.video.IRemoteVideoProvider */); } class OnRemoteVideoStoppedEventArgs extends cpaas.events.EventArgs { constructor(remoteVideoProvider: any/* com.cpaasapi.sdk.api.video.IRemoteVideoProvider */); } class OnVideoRingingEventArgs extends cpaas.events.EventArgs { constructor(room: cpaas.data.CPaaSRoomBase); } class OnVideoConnectedEventArgs extends cpaas.events.EventArgs { constructor(room: cpaas.data.CPaaSRoomBase); } class VideoCallStateEventArgs extends cpaas.events.EventArgs { constructor(room: cpaas.data.CPaaSRoomBase, reason: com.cpaasapi.sdk.api.CPaaSReason); get reason(): com.cpaasapi.sdk.api.CPaaSReason; } class OnParticipantEventArgs extends cpaas.events.EventArgs { constructor(event: cpaas.data.CPaaSParticipantEvent, participants: Array); get event(): cpaas.data.CPaaSParticipantEvent; get participants(): Array; } class OnVideoEventArgs extends cpaas.events.EventArgs { constructor(participantId: string, event: cpaas.data.VideoEvent, stream: Nullable); get participantId(): string; get event(): cpaas.data.VideoEvent; get stream(): Nullable; } } export namespace cpaas.events { class OnRemoteVideoStarted extends cpaas.events.Event { constructor(); } class OnRemoteVideoStopped extends cpaas.events.Event { constructor(); } class OnVideoRinging extends cpaas.events.Event { constructor(); } class OnVideoConnected extends cpaas.events.Event { constructor(); } class OnVideoCallEnd extends cpaas.events.Event { constructor(); } class OnVideoConnectionFailure extends cpaas.events.Event { constructor(); } class OnVideoReconnecting extends cpaas.events.Event { constructor(); } class OnParticipant extends cpaas.events.Event { constructor(); } class OnVideo extends cpaas.events.Event { constructor(); } } export namespace cpaas.events { class IncomingCallEventArgs extends cpaas.events.EventArgs { constructor(callId: string, callerId: string, serviceType: com.cpaasapi.sdk.data.ServiceType); get callId(): string; get callerId(): string; get serviceType(): com.cpaasapi.sdk.data.ServiceType; } class CallStateEventArgs extends cpaas.events.EventArgs { constructor(call: cpaas.data.CPaaSCallBase, reason: Nullable); get call(): cpaas.data.CPaaSCallBase; get reason(): Nullable; } class RemoteVideoEndedEventArgs extends cpaas.events.EventArgs { constructor(call: cpaas.data.CPaaSCallBase, detach: () => void); get call(): cpaas.data.CPaaSCallBase; get detach(): () => void; } class RemoteVideoStartedEventArgs extends cpaas.events.EventArgs { constructor(call: cpaas.data.CPaaSCallBase, attach: (p0: string) => Promise); get call(): cpaas.data.CPaaSCallBase; get attach(): (p0: string) => Promise; } } export namespace cpaas.events { class OnIncomingCall extends cpaas.events.Event { constructor(); } class OnRinging extends cpaas.events.Event { constructor(); } class OnConnected extends cpaas.events.Event { constructor(); } class OnConnectionFailure extends cpaas.events.Event { constructor(); } class OnCallEnd extends cpaas.events.Event { constructor(); } class OnReconnecting extends cpaas.events.Event { constructor(); } } export as namespace cpaas_api;