@telnyx/webrtc 2.25.11 → 2.25.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/lib/bundle.js +1 -1
  2. package/lib/bundle.mjs +1 -1
  3. package/lib/packages/js/src/Modules/Verto/webrtc/Peer.d.ts +1 -0
  4. package/package.json +1 -1
  5. package/lib/src/Modules/Verto/messages/BaseMessage.d.ts +0 -8
  6. package/lib/src/Modules/Verto/messages/Verto.d.ts +0 -38
  7. package/lib/src/Modules/Verto/messages/WebRTCStats.d.ts +0 -10
  8. package/lib/src/Modules/Verto/messages/verto/AnonymousLogin.d.ts +0 -14
  9. package/lib/src/Modules/Verto/messages/verto/BaseRequest.d.ts +0 -4
  10. package/lib/src/Modules/Verto/messages/verto/ConverstationMessage.d.ts +0 -5
  11. package/lib/src/Modules/Verto/messages/verto/Gateway.d.ts +0 -6
  12. package/lib/src/Modules/Verto/messages/verto/Login.d.ts +0 -6
  13. package/lib/src/Modules/Verto/messages/verto/Result.d.ts +0 -5
  14. package/lib/src/Modules/Verto/services/Handler.d.ts +0 -9
  15. package/lib/src/Modules/Verto/services/RegisterAgent.d.ts +0 -9
  16. package/lib/src/Modules/Verto/util/debug.d.ts +0 -7
  17. package/lib/src/Modules/Verto/util/helpers.d.ts +0 -36
  18. package/lib/src/Modules/Verto/util/logger.d.ts +0 -3
  19. package/lib/src/Modules/Verto/util/reconnect.d.ts +0 -3
  20. package/lib/src/Modules/Verto/util/webrtc/index.d.ts +0 -18
  21. package/lib/src/Modules/Verto/webrtc/Call.d.ts +0 -14
  22. package/lib/src/Modules/Verto/webrtc/ErrorResponse.d.ts +0 -6
  23. package/lib/src/Modules/Verto/webrtc/LayoutHandler.d.ts +0 -3
  24. package/lib/src/Modules/Verto/webrtc/helpers.d.ts +0 -45
  25. package/lib/src/PreCallDiagnosis.d.ts +0 -55
  26. package/lib/src/index.d.ts +0 -6
  27. package/lib/src/utils/mos.d.ts +0 -8
@@ -1,38 +0,0 @@
1
- import BaseRequest from './verto/BaseRequest';
2
- import { Login } from './verto/Login';
3
- import { Result } from './verto/Result';
4
- import { VertoMethod } from '../webrtc/constants';
5
- declare class Invite extends BaseRequest {
6
- toString(): VertoMethod;
7
- }
8
- declare class Answer extends BaseRequest {
9
- toString(): VertoMethod;
10
- }
11
- declare class Attach extends BaseRequest {
12
- toString(): VertoMethod;
13
- }
14
- declare class Bye extends BaseRequest {
15
- toString(): VertoMethod;
16
- }
17
- declare class Candidate extends BaseRequest {
18
- toString(): VertoMethod;
19
- }
20
- declare class EndOfCandidates extends BaseRequest {
21
- toString(): VertoMethod;
22
- }
23
- declare class Modify extends BaseRequest {
24
- toString(): VertoMethod;
25
- }
26
- declare class Info extends BaseRequest {
27
- toString(): VertoMethod;
28
- }
29
- declare class Broadcast extends BaseRequest {
30
- toString(): VertoMethod;
31
- }
32
- declare class Subscribe extends BaseRequest {
33
- toString(): VertoMethod;
34
- }
35
- declare class Unsubscribe extends BaseRequest {
36
- toString(): VertoMethod;
37
- }
38
- export { Login, Invite, Answer, Attach, Bye, Candidate, EndOfCandidates, Modify, Info, Broadcast, Subscribe, Unsubscribe, Result, };
@@ -1,10 +0,0 @@
1
- import BaseMessage from './BaseMessage';
2
- export declare class DebugReportStartMessage extends BaseMessage {
3
- constructor(id: string);
4
- }
5
- export declare class DebugReportStopMessage extends BaseMessage {
6
- constructor(id: string);
7
- }
8
- export declare class DebugReportDataMessage extends BaseMessage {
9
- constructor(id: string, data: any);
10
- }
@@ -1,14 +0,0 @@
1
- import BaseRequest from './BaseRequest';
2
- declare type AnonymousLoginConstructorParams = {
3
- target_id: string;
4
- target_type: string;
5
- target_version_id?: string;
6
- sessionId?: string;
7
- userVariables?: Object;
8
- reconnection?: boolean;
9
- };
10
- declare class AnonymousLogin extends BaseRequest {
11
- method: string;
12
- constructor(payload: AnonymousLoginConstructorParams);
13
- }
14
- export { AnonymousLogin };
@@ -1,4 +0,0 @@
1
- import BaseMessage from '../BaseMessage';
2
- export default abstract class BaseRequest extends BaseMessage {
3
- constructor(params?: any);
4
- }
@@ -1,5 +0,0 @@
1
- import BaseMessage from '../BaseMessage';
2
- declare class ConversationMessage extends BaseMessage {
3
- constructor(message: string, attachments?: string[]);
4
- }
5
- export { ConversationMessage };
@@ -1,6 +0,0 @@
1
- import BaseRequest from './BaseRequest';
2
- declare class Gateway extends BaseRequest {
3
- method: string;
4
- constructor(voice_sdk_id?: string | null);
5
- }
6
- export { Gateway };
@@ -1,6 +0,0 @@
1
- import BaseRequest from './BaseRequest';
2
- declare class Login extends BaseRequest {
3
- method: string;
4
- constructor(login: string, passwd: string, login_token: string, sessionid: string, userVariables: Object, reconnection: boolean);
5
- }
6
- export { Login };
@@ -1,5 +0,0 @@
1
- import BaseRequest from './BaseRequest';
2
- declare class Result extends BaseRequest {
3
- constructor(id: number, method: string);
4
- }
5
- export { Result };
@@ -1,9 +0,0 @@
1
- declare const isQueued: (event: string, uniqueId?: string) => boolean;
2
- declare const queueLength: (event: string, uniqueId?: string) => number;
3
- declare const register: (event: string, callback: Function, uniqueId?: string) => void;
4
- declare const registerOnce: (event: string, callback: Function, uniqueId?: string) => void;
5
- declare const deRegister: (event: string, callback?: Function | null, uniqueId?: string) => boolean;
6
- declare const trigger: (event: string, data: any, uniqueId?: string, globalPropagation?: boolean) => boolean;
7
- declare const deRegisterAll: (event: string) => void;
8
- declare const clearQueue: () => void;
9
- export { trigger, register, registerOnce, deRegister, deRegisterAll, isQueued, queueLength, clearQueue, };
@@ -1,9 +0,0 @@
1
- import BaseSession from '../BaseSession';
2
- export declare class RegisterAgent {
3
- private session;
4
- private gatewayStateTask;
5
- private pendingRequestId;
6
- constructor(session: BaseSession);
7
- onSocketMessage: (response: any) => Promise<void>;
8
- getIsRegistered: () => Promise<boolean>;
9
- }
@@ -1,7 +0,0 @@
1
- import BrowserSession from '../BrowserSession';
2
- export declare function saveToFile(data: any, filename: string): void;
3
- export declare type WebRTCStatsReporter = {
4
- start: (peerConnection: RTCPeerConnection, peerId: string, connectionId: string) => Promise<void>;
5
- stop: (debugOutput: string) => Promise<void>;
6
- };
7
- export declare function createWebRTCStatsReporter(session: BrowserSession): WebRTCStatsReporter;
@@ -1,36 +0,0 @@
1
- import { IMessageRPC, IVertoOptions } from './interfaces';
2
- import { GatewayStateType } from '../webrtc/constants';
3
- export declare const deepCopy: (obj: Object) => any;
4
- export declare const objEmpty: (obj: Object) => boolean;
5
- export declare const mutateStorageKey: (key: string) => string;
6
- export declare const mutateLiveArrayData: (data: any) => {
7
- participantId: number;
8
- participantNumber: any;
9
- participantName: any;
10
- codec: any;
11
- media: {};
12
- participantData: any;
13
- };
14
- export declare const safeParseJson: (value: string) => string | Object;
15
- export declare const isDefined: (variable: any) => boolean;
16
- export declare const isFunction: (variable: any) => boolean;
17
- export declare const findElementByType: (tag: HTMLMediaElement | string | Function) => HTMLMediaElement;
18
- export declare const checkWebSocketHost: (host: string) => string;
19
- export declare const destructResponse: (response: any, nodeId?: string) => {
20
- [key: string]: any;
21
- };
22
- export declare const randomInt: (min: number, max: number) => number;
23
- export declare const isValidLoginOptions: ({ login, passwd, password, login_token, }: IVertoOptions) => boolean;
24
- export declare const isValidAnonymousLoginOptions: ({ anonymous_login, }: IVertoOptions) => boolean;
25
- export declare const getGatewayState: (msg: IMessageRPC) => GatewayStateType | '';
26
- export declare type DeferredPromise<T> = {
27
- promise: Promise<T>;
28
- resolve: (value: T | PromiseLike<T>) => void;
29
- reject: (reason?: any) => void;
30
- };
31
- declare type DeferredPromiseOptions = {
32
- debounceTime?: number;
33
- };
34
- export declare function deferredPromise<T>({ debounceTime, }: DeferredPromiseOptions): DeferredPromise<T>;
35
- export declare const debounce: (func: Function, wait: number) => (...args: any) => void;
36
- export {};
@@ -1,3 +0,0 @@
1
- import log from 'loglevel';
2
- declare const logger: log.Logger;
3
- export default logger;
@@ -1,3 +0,0 @@
1
- export declare function getReconnectToken(): string | null;
2
- export declare function setReconnectToken(token: string): void;
3
- export declare function clearReconnectToken(): void;
@@ -1,18 +0,0 @@
1
- /// <reference types="webrtc" />
2
- declare const RTCPeerConnection: (config: RTCPeerConnectionConfig) => RTCPeerConnection;
3
- declare const getUserMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream>;
4
- declare const getDisplayMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream>;
5
- declare const enumerateDevices: () => Promise<MediaDeviceInfo[]>;
6
- declare const enumerateDevicesByKind: (filterByKind?: string) => Promise<MediaDeviceInfo[]>;
7
- declare const getSupportedConstraints: () => MediaTrackSupportedConstraints;
8
- declare const streamIsValid: (stream: MediaStream) => boolean;
9
- declare const attachMediaStream: (tag: any, stream: MediaStream) => void;
10
- declare const detachMediaStream: (tag: any) => void;
11
- declare const muteMediaElement: (tag: any) => void;
12
- declare const unmuteMediaElement: (tag: any) => void;
13
- declare const toggleMuteMediaElement: (tag: any) => void;
14
- declare const setMediaElementSinkId: (tag: any, deviceId: string) => Promise<boolean>;
15
- declare const sdpToJsonHack: (sdp: any) => any;
16
- declare const stopTrack: (track: MediaStreamTrack) => void;
17
- declare const stopStream: (stream: MediaStream) => void;
18
- export { RTCPeerConnection, getUserMedia, getDisplayMedia, enumerateDevices, enumerateDevicesByKind, getSupportedConstraints, streamIsValid, attachMediaStream, detachMediaStream, sdpToJsonHack, stopStream, stopTrack, muteMediaElement, unmuteMediaElement, toggleMuteMediaElement, setMediaElementSinkId, };
@@ -1,14 +0,0 @@
1
- import BaseCall from './BaseCall';
2
- import { IVertoCallOptions } from './interfaces';
3
- export declare class Call extends BaseCall {
4
- screenShare: Call;
5
- private _statsInterval;
6
- hangup(params?: any, execute?: boolean): void;
7
- startScreenShare(opts?: IVertoCallOptions): Promise<Call>;
8
- stopScreenShare(): void;
9
- sendConversationMessage: (message: string, attachments?: string[]) => Promise<any>;
10
- setAudioOutDevice(deviceId: string): Promise<boolean>;
11
- protected _finalize(): void;
12
- private _stats;
13
- }
14
- export default Call;
@@ -1,6 +0,0 @@
1
- declare class ErrorResponse {
2
- private code?;
3
- private message;
4
- constructor(message: string, code?: string);
5
- }
6
- export { ErrorResponse };
@@ -1,3 +0,0 @@
1
- import BrowserSession from '../BrowserSession';
2
- declare const MCULayoutEventHandler: (session: BrowserSession, eventData: any) => void;
3
- export { MCULayoutEventHandler };
@@ -1,45 +0,0 @@
1
- import { IVertoCallOptions, IWebRTCSupportedBrowser, IWebRTCInfo, IAudio } from './interfaces';
2
- declare const getUserMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream | null>;
3
- declare const getDevices: (kind?: MediaDeviceKind | undefined, fullList?: boolean) => Promise<MediaDeviceInfo[]>;
4
- declare const scanResolutions: (deviceId: string) => Promise<any[]>;
5
- declare const getMediaConstraints: (options: IVertoCallOptions) => Promise<MediaStreamConstraints>;
6
- declare const assureDeviceId: (id: string, label: string, kind: MediaDeviceInfo['kind']) => Promise<string>;
7
- declare const removeUnsupportedConstraints: (constraints: MediaTrackConstraints) => void;
8
- declare const checkDeviceIdConstraints: (id: string, label: string, kind: MediaDeviceInfo['kind'], constraints: MediaTrackConstraints) => Promise<MediaTrackConstraints>;
9
- declare const sdpStereoHack: (sdp: string) => string;
10
- declare const sdpMediaOrderHack: (answer: string, localOffer: string) => string;
11
- declare const checkSubscribeResponse: (response: any, channel: string) => boolean;
12
- declare type DestructuredResult = {
13
- subscribed: string[];
14
- alreadySubscribed: string[];
15
- unauthorized: string[];
16
- unsubscribed: string[];
17
- notSubscribed: string[];
18
- };
19
- declare const destructSubscribeResponse: (response: any) => DestructuredResult;
20
- declare const enableAudioTracks: (stream: MediaStream) => void;
21
- declare const disableAudioTracks: (stream: MediaStream) => void;
22
- declare const toggleAudioTracks: (stream: MediaStream) => void;
23
- declare const enableVideoTracks: (stream: MediaStream) => void;
24
- declare const disableVideoTracks: (stream: MediaStream) => void;
25
- declare const toggleVideoTracks: (stream: MediaStream) => void;
26
- declare const sdpBitrateHack: (sdp: string, max: number, min: number, start: number) => string;
27
- declare const sdpBitrateASHack: (sdp: string, bandwidthKbps: number) => string;
28
- declare function getBrowserInfo(): {
29
- browserInfo: string;
30
- name: string;
31
- version: number;
32
- supportAudio: boolean;
33
- supportVideo: boolean;
34
- };
35
- declare function getWebRTCInfo(): IWebRTCInfo;
36
- export declare enum SUPPORTED_WEBRTC {
37
- not_supported = "not supported",
38
- full = "full",
39
- partial = "partial"
40
- }
41
- declare function getWebRTCSupportedBrowserList(): Array<IWebRTCSupportedBrowser>;
42
- declare function createAudio(file: any, id: any): IAudio | null;
43
- declare function playAudio(audioElement: IAudio): void;
44
- declare function stopAudio(audioElement: IAudio): void;
45
- export { getUserMedia, getDevices, scanResolutions, getMediaConstraints, assureDeviceId, removeUnsupportedConstraints, checkDeviceIdConstraints, sdpStereoHack, sdpMediaOrderHack, sdpBitrateHack, sdpBitrateASHack, checkSubscribeResponse, destructSubscribeResponse, enableAudioTracks, disableAudioTracks, toggleAudioTracks, enableVideoTracks, disableVideoTracks, toggleVideoTracks, getBrowserInfo, getWebRTCInfo, getWebRTCSupportedBrowserList, createAudio, playAudio, stopAudio, };
@@ -1,55 +0,0 @@
1
- import { Quality } from './utils/mos';
2
- export interface TelnyxIDs {
3
- telnyxCallControlId?: string;
4
- telnyxSessionId?: string;
5
- telnyxLegId?: string;
6
- }
7
- export interface RTCIceCandidateStats {
8
- address: RTCIceCandidate['address'];
9
- candidateType: RTCIceCandidate['type'];
10
- deleted: boolean;
11
- id: string;
12
- port: RTCIceCandidate['port'];
13
- priority: RTCIceCandidate['priority'];
14
- protocol: RTCIceCandidate['protocol'];
15
- relayProtocol?: 'tcp' | 'udp' | 'tls';
16
- timestamp: DOMHighResTimeStamp;
17
- transportId: string;
18
- type: string;
19
- url: string;
20
- }
21
- export interface MinMaxAverage {
22
- min: number;
23
- max: number;
24
- average: number;
25
- }
26
- export interface Report {
27
- iceCandidateStats: RTCIceCandidateStats[];
28
- iceCandidatePairStats: RTCIceCandidatePairStats;
29
- summaryStats: {
30
- jitter: MinMaxAverage;
31
- rtt: MinMaxAverage;
32
- mos: number;
33
- quality: Quality;
34
- };
35
- sessionStats: {
36
- packetsReceived: number;
37
- packetsLost: number;
38
- packetsSent: number;
39
- bytesSent: number;
40
- bytesReceived: number;
41
- };
42
- }
43
- export interface PreCallDiagnosisOptions {
44
- texMLApplicationNumber: string;
45
- credentials: {
46
- login?: string;
47
- password?: string;
48
- loginToken?: string;
49
- };
50
- }
51
- export declare class PreCallDiagnosis {
52
- static run(options: PreCallDiagnosisOptions): Promise<Report>;
53
- private static mapReport;
54
- getTelnyxIds(): TelnyxIDs;
55
- }
@@ -1,6 +0,0 @@
1
- import TelnyxRTC from './TelnyxRTC';
2
- import { IClientOptions, ICallOptions, ICredentials, INotification } from './utils/interfaces';
3
- import { SwEvent } from './Modules/Verto/util/constants';
4
- import Call from './Modules/Verto/webrtc/Call';
5
- export { Call, TelnyxRTC, IClientOptions, ICallOptions, ICredentials, INotification, SwEvent, };
6
- export * from './PreCallDiagnosis';
@@ -1,8 +0,0 @@
1
- export declare function calculateMOS(data: {
2
- jitter: number;
3
- rtt: number;
4
- packetsReceived: number;
5
- packetsLost: number;
6
- }): number;
7
- export declare type Quality = 'excellent' | 'good' | 'fair' | 'poor' | 'bad';
8
- export declare function getQuality(mos: number): Quality | null;