@telnyx/webrtc 2.27.1-beta.4 → 2.27.2-beta.0
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.
- package/README.md +27 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.mjs +1 -1
- package/lib/src/Modules/Verto/messages/BaseMessage.d.ts +1 -0
- package/lib/src/Modules/Verto/messages/verto/AIConversationMessage.d.ts +6 -0
- package/lib/src/Modules/Verto/util/constants/errorCodes.d.ts +5 -3
- package/lib/src/Modules/Verto/util/constants/errors.d.ts +8 -1
- package/lib/src/Modules/Verto/util/constants/index.d.ts +2 -1
- package/lib/src/Modules/Verto/util/constants/warnings.d.ts +13 -6
- package/lib/src/Modules/Verto/util/interfaces.d.ts +1 -0
- package/lib/src/Modules/Verto/util/reconnect.d.ts +4 -2
- package/lib/src/Modules/Verto/webrtc/AIConversationTypes.d.ts +33 -0
- package/lib/src/Modules/Verto/webrtc/BaseCall.d.ts +4 -0
- package/lib/src/Modules/Verto/webrtc/Call.d.ts +2 -0
- package/lib/src/Modules/Verto/webrtc/MediaDeviceCollector.d.ts +11 -0
- package/lib/src/Modules/Verto/webrtc/VertoHandler.d.ts +1 -0
- package/lib/src/Modules/Verto/webrtc/constants.d.ts +1 -0
- package/lib/src/Modules/Verto/webrtc/helpers.d.ts +18 -3
- package/lib/src/Modules/Verto/webrtc/interfaces.d.ts +4 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/utils/interfaces.d.ts +1 -0
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ export declare const TELNYX_ERROR_CODES: {
|
|
|
21
21
|
readonly AUTHENTICATION_REQUIRED: 46003;
|
|
22
22
|
readonly ICE_RESTART_FAILED: 47001;
|
|
23
23
|
readonly NETWORK_OFFLINE: 48001;
|
|
24
|
+
readonly SESSION_NOT_REATTACHED: 48501;
|
|
24
25
|
readonly UNEXPECTED_ERROR: 49001;
|
|
25
26
|
};
|
|
26
27
|
export declare const TELNYX_WARNING_CODES: {
|
|
@@ -38,14 +39,15 @@ export declare const TELNYX_WARNING_CODES: {
|
|
|
38
39
|
readonly ONLY_HOST_ICE_CANDIDATES: 33005;
|
|
39
40
|
readonly ANSWER_WHILE_PEER_ACTIVE: 33006;
|
|
40
41
|
readonly ICE_CANDIDATE_PAIR_CHANGED: 33008;
|
|
42
|
+
readonly AUDIO_INPUT_DEVICE_CHANGE_SKIPPED: 33009;
|
|
41
43
|
readonly DUPLICATE_INBOUND_ANSWER: 33007;
|
|
42
44
|
readonly TOKEN_EXPIRING_SOON: 34001;
|
|
43
|
-
readonly
|
|
45
|
+
readonly UNKNOWN_REATTACHED_SESSION: 35002;
|
|
44
46
|
readonly SIGNALING_HEALTH_PROBE_TIMEOUT: 36001;
|
|
45
47
|
readonly SIGNALING_REQUEST_TIMEOUT: 36002;
|
|
46
48
|
readonly SIGNALING_RECOVERY_REQUIRED: 36003;
|
|
47
49
|
readonly MEDIA_RECOVERY_REQUIRED: 36004;
|
|
48
50
|
};
|
|
49
|
-
export declare const SDP_CREATE_OFFER_FAILED: 40001, SDP_CREATE_ANSWER_FAILED: 40002, SDP_SET_LOCAL_DESCRIPTION_FAILED: 40003, SDP_SET_REMOTE_DESCRIPTION_FAILED: 40004, SDP_SEND_FAILED: 40005, MEDIA_MICROPHONE_PERMISSION_DENIED: 42001, MEDIA_DEVICE_NOT_FOUND: 42002, MEDIA_GET_USER_MEDIA_FAILED: 42003, HOLD_FAILED: 44001, INVALID_CALL_PARAMETERS: 44002, BYE_SEND_FAILED: 44003, SUBSCRIBE_FAILED: 44004, PEER_CLOSED_DURING_INIT: 44005, WEBSOCKET_CONNECTION_FAILED: 45001, WEBSOCKET_ERROR: 45002, RECONNECTION_EXHAUSTED: 45003, GATEWAY_FAILED: 45004, LOGIN_FAILED: 46001, INVALID_CREDENTIALS: 46002, AUTHENTICATION_REQUIRED: 46003, ICE_RESTART_FAILED: 47001, NETWORK_OFFLINE: 48001, UNEXPECTED_ERROR: 49001;
|
|
50
|
-
export declare const HIGH_RTT: 31001, HIGH_JITTER: 31002, HIGH_PACKET_LOSS: 31003, LOW_MOS: 31004, LOW_LOCAL_AUDIO: 31005, LOW_BYTES_RECEIVED: 32001, LOW_BYTES_SENT: 32002, ICE_CONNECTIVITY_LOST: 33001, ICE_GATHERING_TIMEOUT: 33002, ICE_GATHERING_EMPTY: 33003, PEER_CONNECTION_FAILED: 33004, ONLY_HOST_ICE_CANDIDATES: 33005, ANSWER_WHILE_PEER_ACTIVE: 33006, ICE_CANDIDATE_PAIR_CHANGED: 33008, DUPLICATE_INBOUND_ANSWER: 33007, TOKEN_EXPIRING_SOON: 34001,
|
|
51
|
+
export declare const SDP_CREATE_OFFER_FAILED: 40001, SDP_CREATE_ANSWER_FAILED: 40002, SDP_SET_LOCAL_DESCRIPTION_FAILED: 40003, SDP_SET_REMOTE_DESCRIPTION_FAILED: 40004, SDP_SEND_FAILED: 40005, MEDIA_MICROPHONE_PERMISSION_DENIED: 42001, MEDIA_DEVICE_NOT_FOUND: 42002, MEDIA_GET_USER_MEDIA_FAILED: 42003, HOLD_FAILED: 44001, INVALID_CALL_PARAMETERS: 44002, BYE_SEND_FAILED: 44003, SUBSCRIBE_FAILED: 44004, PEER_CLOSED_DURING_INIT: 44005, WEBSOCKET_CONNECTION_FAILED: 45001, WEBSOCKET_ERROR: 45002, RECONNECTION_EXHAUSTED: 45003, GATEWAY_FAILED: 45004, LOGIN_FAILED: 46001, INVALID_CREDENTIALS: 46002, AUTHENTICATION_REQUIRED: 46003, ICE_RESTART_FAILED: 47001, NETWORK_OFFLINE: 48001, SESSION_NOT_REATTACHED: 48501, UNEXPECTED_ERROR: 49001;
|
|
52
|
+
export declare const HIGH_RTT: 31001, HIGH_JITTER: 31002, HIGH_PACKET_LOSS: 31003, LOW_MOS: 31004, LOW_LOCAL_AUDIO: 31005, LOW_BYTES_RECEIVED: 32001, LOW_BYTES_SENT: 32002, ICE_CONNECTIVITY_LOST: 33001, ICE_GATHERING_TIMEOUT: 33002, ICE_GATHERING_EMPTY: 33003, PEER_CONNECTION_FAILED: 33004, ONLY_HOST_ICE_CANDIDATES: 33005, ANSWER_WHILE_PEER_ACTIVE: 33006, ICE_CANDIDATE_PAIR_CHANGED: 33008, AUDIO_INPUT_DEVICE_CHANGE_SKIPPED: 33009, DUPLICATE_INBOUND_ANSWER: 33007, TOKEN_EXPIRING_SOON: 34001, UNKNOWN_REATTACHED_SESSION: 35002, SIGNALING_HEALTH_PROBE_TIMEOUT: 36001, SIGNALING_REQUEST_TIMEOUT: 36002, SIGNALING_RECOVERY_REQUIRED: 36003, MEDIA_RECOVERY_REQUIRED: 36004;
|
|
51
53
|
export declare const HAS_NON_HOST_ICE_CANDIDATE_REGEX: RegExp;
|
|
@@ -114,7 +114,7 @@ export declare const SDK_ERRORS: {
|
|
|
114
114
|
readonly 45004: {
|
|
115
115
|
readonly name: "GATEWAY_FAILED";
|
|
116
116
|
readonly message: "Gateway connection failed";
|
|
117
|
-
readonly description: "The upstream gateway reported a FAILED or
|
|
117
|
+
readonly description: "The upstream gateway reported a FAILED, FAIL_WAIT, or TIMEOUT state. The signaling server could not establish or maintain a connection to the gateway. When autoReconnect is disabled, this is immediately fatal. When enabled, the SDK will retry until RECONNECTION_EXHAUSTED.";
|
|
118
118
|
readonly causes: readonly ["Gateway down or unreachable", "Server-side infrastructure issue", "Network partition between signaling server and gateway"];
|
|
119
119
|
readonly solutions: readonly ["Wait for automatic reconnection (if autoReconnect is enabled)", "Call client.disconnect() and client.connect() to manually retry", "Check Telnyx service status"];
|
|
120
120
|
};
|
|
@@ -160,5 +160,12 @@ export declare const SDK_ERRORS: {
|
|
|
160
160
|
readonly causes: readonly ["Unknown or unhandled error condition"];
|
|
161
161
|
readonly solutions: readonly ["Check the originalError property for the underlying cause", "Report the issue if it persists"];
|
|
162
162
|
};
|
|
163
|
+
readonly 48501: {
|
|
164
|
+
readonly name: "SESSION_NOT_REATTACHED";
|
|
165
|
+
readonly message: "Active call lost after reconnect";
|
|
166
|
+
readonly description: "The WebSocket reconnected successfully but the server did not reattach the active call session. The server no longer knows about the call, so any subsequent call-control operation (hangup, hold, etc.) will fail with CALL_DOES_NOT_EXIST. The call is unrecoverable and must be terminated locally.";
|
|
167
|
+
readonly causes: readonly ["Server-side session expired during the disconnection window", "Reconnect token was invalidated", "Backend restarted or lost in-memory call state"];
|
|
168
|
+
readonly solutions: readonly ["Terminate the local call and notify the user", "Start a new call", "Investigate why the session was not preserved on the server"];
|
|
169
|
+
};
|
|
163
170
|
};
|
|
164
171
|
export declare type SdkErrorCode = keyof typeof SDK_ERRORS;
|
|
@@ -56,5 +56,6 @@ export declare enum SwEvent {
|
|
|
56
56
|
Calls = "telnyx.calls",
|
|
57
57
|
MediaError = "telnyx.rtc.mediaError",
|
|
58
58
|
PeerConnectionFailureError = "telnyx.rtc.peerConnectionFailureError",
|
|
59
|
-
PeerConnectionSignalingStateClosed = "telnyx.rtc.peerConnectionSignalingStateClosed"
|
|
59
|
+
PeerConnectionSignalingStateClosed = "telnyx.rtc.peerConnectionSignalingStateClosed",
|
|
60
|
+
AIConversationMessage = "telnyx.ai.conversation"
|
|
60
61
|
}
|
|
@@ -152,12 +152,19 @@ export declare const SDK_WARNINGS: {
|
|
|
152
152
|
readonly causes: readonly ["ICE connection state changed to failed", "RTCPeerConnection state changed to failed", "No RTP packets/bytes received while media should be active"];
|
|
153
153
|
readonly solutions: readonly ["The SDK will automatically attempt ICE restart", "Check network connectivity and ICE candidate availability", "Verify TURN server configuration"];
|
|
154
154
|
};
|
|
155
|
-
readonly
|
|
156
|
-
readonly name: "
|
|
157
|
-
readonly message: "
|
|
158
|
-
readonly description: "The
|
|
159
|
-
readonly causes: readonly ["
|
|
160
|
-
readonly solutions: readonly ["
|
|
155
|
+
readonly 33009: {
|
|
156
|
+
readonly name: "AUDIO_INPUT_DEVICE_CHANGE_SKIPPED";
|
|
157
|
+
readonly message: "Audio input device change skipped";
|
|
158
|
+
readonly description: "The SDK could not change the microphone because the active peer connection has no audio RTP sender to replace. The existing local media and mute state were left unchanged.";
|
|
159
|
+
readonly causes: readonly ["The call was created without an audio sender", "The peer connection was not ready when setAudioInDevice was called", "The call is already ending or the local media sender was removed"];
|
|
160
|
+
readonly solutions: readonly ["Retry after the call is active and local media is attached", "Verify the call was started with audio enabled", "Inspect call state and peer connection sender availability"];
|
|
161
|
+
};
|
|
162
|
+
readonly 35002: {
|
|
163
|
+
readonly name: "UNKNOWN_REATTACHED_SESSION";
|
|
164
|
+
readonly message: "Unknown reattach session after reconnect";
|
|
165
|
+
readonly description: "The WebSocket reconnected successfully and the server sent an Attach message for a session that does not match any active SDK call. The unknown Attach is ACK'd and ignored.";
|
|
166
|
+
readonly causes: readonly ["Server sent an Attach for a call that no longer exists in the SDK", "Multiple Attach messages arrived and only the first was recovered", "Race condition between reconnection and new inbound call"];
|
|
167
|
+
readonly solutions: readonly ["Check application logic for multiple simultaneous calls", "Inspect the Attach callID in the warning payload for details", "If a call should be active, start a new call manually"];
|
|
161
168
|
};
|
|
162
169
|
};
|
|
163
170
|
export declare type SdkWarningCode = keyof typeof SDK_WARNINGS;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export declare const RECONNECT_SESSION_ID_MAX_AGE_MS: number;
|
|
2
|
+
export declare function isReconnectSessionIdFresh(now?: number): boolean;
|
|
1
3
|
export declare function getReconnectToken(): string | null;
|
|
2
4
|
export declare function setReconnectToken(token: string): void;
|
|
3
|
-
export declare function getReconnectSessionId(): string | null;
|
|
4
|
-
export declare function setReconnectSessionId(sessionId: string): void;
|
|
5
|
+
export declare function getReconnectSessionId(now?: number): string | null;
|
|
6
|
+
export declare function setReconnectSessionId(sessionId: string, storedAt?: number): void;
|
|
5
7
|
export declare function clearReconnectToken(): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare type FunctionCallItem = {
|
|
2
|
+
type: 'function_call';
|
|
3
|
+
call_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
arguments: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type FunctionCallOutputItem = {
|
|
8
|
+
type: 'function_call_output';
|
|
9
|
+
call_id: string;
|
|
10
|
+
output: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type AIConversationFunctionCallParams = {
|
|
13
|
+
type: 'conversation.item.created';
|
|
14
|
+
item: FunctionCallItem;
|
|
15
|
+
};
|
|
16
|
+
export declare type AIConversationFunctionCallOutputParams = {
|
|
17
|
+
type: 'conversation.item.create';
|
|
18
|
+
item: FunctionCallOutputItem;
|
|
19
|
+
};
|
|
20
|
+
export declare type AIConversationParams = AIConversationFunctionCallParams | AIConversationFunctionCallOutputParams | {
|
|
21
|
+
type: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
export declare type IAIConversationMessageEvent = {
|
|
25
|
+
method: 'ai_conversation';
|
|
26
|
+
params: AIConversationParams;
|
|
27
|
+
voice_sdk_id?: string;
|
|
28
|
+
};
|
|
29
|
+
export declare type ISendAIConversationMessageOptions = {
|
|
30
|
+
item: FunctionCallOutputItem;
|
|
31
|
+
};
|
|
32
|
+
export declare function isFunctionCallParams(params: AIConversationParams): params is AIConversationFunctionCallParams;
|
|
33
|
+
export declare function isFunctionCallOutputParams(params: AIConversationParams): params is AIConversationFunctionCallOutputParams;
|
|
@@ -8,6 +8,7 @@ export default abstract class BaseCall implements IWebRTCCall {
|
|
|
8
8
|
protected session: BrowserSession;
|
|
9
9
|
private _webRTCStats;
|
|
10
10
|
private _callReportCollector;
|
|
11
|
+
private _mediaDeviceCollector;
|
|
11
12
|
id: string;
|
|
12
13
|
recoveredCallId: string;
|
|
13
14
|
state: string;
|
|
@@ -40,6 +41,7 @@ export default abstract class BaseCall implements IWebRTCCall {
|
|
|
40
41
|
private _isRemoteDescriptionSet;
|
|
41
42
|
private _signalingStateClosed;
|
|
42
43
|
private _creatingPeer;
|
|
44
|
+
private _desiredAudioMuted;
|
|
43
45
|
private _firstCandidateSent;
|
|
44
46
|
private _firstNonHostCandidateSent;
|
|
45
47
|
private _isRecovering;
|
|
@@ -57,6 +59,7 @@ export default abstract class BaseCall implements IWebRTCCall {
|
|
|
57
59
|
get remoteStream(): MediaStream;
|
|
58
60
|
get memberChannel(): string;
|
|
59
61
|
get isAudioMuted(): boolean;
|
|
62
|
+
private _getLocalAudioTrackId;
|
|
60
63
|
private _hasActiveUnmutedLocalAudioTrack;
|
|
61
64
|
shouldForceRelayCandidateForRecovery(): boolean;
|
|
62
65
|
invite(): Promise<void>;
|
|
@@ -74,6 +77,7 @@ export default abstract class BaseCall implements IWebRTCCall {
|
|
|
74
77
|
message(to: string, body: string): void;
|
|
75
78
|
muteAudio(): void;
|
|
76
79
|
unmuteAudio(): void;
|
|
80
|
+
_applyDesiredAudioMuteState(): void;
|
|
77
81
|
toggleAudioMute(): void;
|
|
78
82
|
setAudioInDevice(deviceId: string, muted?: boolean): Promise<void>;
|
|
79
83
|
muteVideo(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BaseCall from './BaseCall';
|
|
2
2
|
import { IVertoCallOptions } from './interfaces';
|
|
3
|
+
import type { FunctionCallOutputItem } from './AIConversationTypes';
|
|
3
4
|
export declare class Call extends BaseCall {
|
|
4
5
|
screenShare: Call;
|
|
5
6
|
private _statsInterval;
|
|
@@ -7,6 +8,7 @@ export declare class Call extends BaseCall {
|
|
|
7
8
|
startScreenShare(opts?: IVertoCallOptions): Promise<Call>;
|
|
8
9
|
stopScreenShare(): Promise<void>;
|
|
9
10
|
sendConversationMessage: (message: string, attachments?: string[]) => Promise<any>;
|
|
11
|
+
sendAIConversationMessage: (item: FunctionCallOutputItem) => void;
|
|
10
12
|
setAudioOutDevice(deviceId: string): Promise<boolean>;
|
|
11
13
|
protected _finalize(): void;
|
|
12
14
|
private _stats;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class MediaDeviceCollector {
|
|
2
|
+
private _rawDeviceCache;
|
|
3
|
+
private _deviceChangeHandler;
|
|
4
|
+
private _stopped;
|
|
5
|
+
logDevicesAtStart(): Promise<void>;
|
|
6
|
+
stop(): void;
|
|
7
|
+
private _enumerateAudioDevices;
|
|
8
|
+
private _startDeviceChangeListener;
|
|
9
|
+
private _removeDeviceChangeListener;
|
|
10
|
+
private _onDeviceChange;
|
|
11
|
+
}
|
|
@@ -9,9 +9,24 @@ declare function hasVideo(sdp: any): boolean;
|
|
|
9
9
|
declare const assureDeviceId: (id: string, label: string, kind: MediaDeviceInfo['kind']) => Promise<string>;
|
|
10
10
|
declare const removeUnsupportedConstraints: (constraints: MediaTrackConstraints) => void;
|
|
11
11
|
declare const checkDeviceIdConstraints: (id: string, label: string, kind: MediaDeviceInfo['kind'], constraints: MediaTrackConstraints) => Promise<MediaTrackConstraints>;
|
|
12
|
+
declare const getTrackDebugInfo: (track?: MediaStreamTrack | null) => {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
muted: boolean;
|
|
17
|
+
readyState: MediaStreamTrackState;
|
|
18
|
+
};
|
|
19
|
+
declare const getStreamTrackDebugInfo: (stream?: MediaStream | null) => {
|
|
20
|
+
id: string;
|
|
21
|
+
kind: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
muted: boolean;
|
|
24
|
+
readyState: MediaStreamTrackState;
|
|
25
|
+
}[];
|
|
12
26
|
declare const sdpStereoHack: (sdp: string) => string;
|
|
13
27
|
declare const sdpMediaOrderHack: (answer: string, localOffer: string) => string;
|
|
14
|
-
declare
|
|
28
|
+
declare type SubscribeResponse = Record<string, string[] | undefined>;
|
|
29
|
+
declare const checkSubscribeResponse: (response: SubscribeResponse, channel: string) => boolean;
|
|
15
30
|
declare type DestructuredResult = {
|
|
16
31
|
subscribed: string[];
|
|
17
32
|
alreadySubscribed: string[];
|
|
@@ -19,7 +34,7 @@ declare type DestructuredResult = {
|
|
|
19
34
|
unsubscribed: string[];
|
|
20
35
|
notSubscribed: string[];
|
|
21
36
|
};
|
|
22
|
-
declare const destructSubscribeResponse: (response:
|
|
37
|
+
declare const destructSubscribeResponse: (response: SubscribeResponse) => DestructuredResult;
|
|
23
38
|
declare const enableAudioTracks: (stream: MediaStream) => void;
|
|
24
39
|
declare const disableAudioTracks: (stream: MediaStream) => void;
|
|
25
40
|
declare const toggleAudioTracks: (stream: MediaStream) => void;
|
|
@@ -50,4 +65,4 @@ declare const getPreferredCodecs: (preferred_codecs?: RTCRtpCodecCapability[]) =
|
|
|
50
65
|
audioCodecs: RTCRtpCodecCapability[];
|
|
51
66
|
videoCodecs: RTCRtpCodecCapability[];
|
|
52
67
|
};
|
|
53
|
-
export { getUserMedia, getDevices, scanResolutions, getMediaConstraints, assureDeviceId, removeUnsupportedConstraints, checkDeviceIdConstraints, sdpStereoHack, sdpMediaOrderHack, sdpBitrateHack, sdpBitrateASHack, checkSubscribeResponse, destructSubscribeResponse, enableAudioTracks, disableAudioTracks, toggleAudioTracks, isAudioTrackEnabled, enableVideoTracks, disableVideoTracks, toggleVideoTracks, getBrowserInfo, getWebRTCInfo, getWebRTCSupportedBrowserList, createAudio, playAudio, stopAudio, hasVideo, getPreferredCodecs, isDeviceNotFoundError, getConstraintsWithoutDeviceId, };
|
|
68
|
+
export { getUserMedia, getDevices, scanResolutions, getMediaConstraints, assureDeviceId, removeUnsupportedConstraints, checkDeviceIdConstraints, sdpStereoHack, sdpMediaOrderHack, sdpBitrateHack, sdpBitrateASHack, checkSubscribeResponse, destructSubscribeResponse, enableAudioTracks, disableAudioTracks, toggleAudioTracks, isAudioTrackEnabled, enableVideoTracks, disableVideoTracks, toggleVideoTracks, getBrowserInfo, getWebRTCInfo, getWebRTCSupportedBrowserList, createAudio, playAudio, stopAudio, hasVideo, getPreferredCodecs, getTrackDebugInfo, getStreamTrackDebugInfo, isDeviceNotFoundError, getConstraintsWithoutDeviceId, };
|
|
@@ -70,6 +70,7 @@ export interface IVertoCallOptions {
|
|
|
70
70
|
trickleIce?: boolean;
|
|
71
71
|
keepConnectionAliveOnSocketClose?: boolean;
|
|
72
72
|
mutedMicOnStart?: boolean;
|
|
73
|
+
applyDesiredAudioMuteState?: () => void;
|
|
73
74
|
recoveredCallId?: string;
|
|
74
75
|
}
|
|
75
76
|
export interface IStatsBinding {
|
|
@@ -139,6 +140,9 @@ export interface IWebRTCCall {
|
|
|
139
140
|
stopScreenShare?: () => Promise<void>;
|
|
140
141
|
setAudioOutDevice?: (deviceId: string) => Promise<boolean>;
|
|
141
142
|
setSpeakerPhone?: (flag: boolean) => void;
|
|
143
|
+
sendConversationMessage?: (message: string, attachments?: string[]) => void;
|
|
144
|
+
sendAIConversationMessage?: (item: import('./AIConversationTypes').FunctionCallOutputItem) => void;
|
|
145
|
+
recordSessionWarning?: (code: string, name: string, message: string, activeCallIds?: string[]) => void;
|
|
142
146
|
}
|
|
143
147
|
export interface IWebRTCInfo {
|
|
144
148
|
browserInfo: any;
|
package/lib/src/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export { TELNYX_ERROR_CODES, TELNYX_WARNING_CODES, } from './Modules/Verto/util/
|
|
|
9
9
|
export type { ITelnyxError, ITelnyxMediaError, ITelnyxErrorEvent, ITelnyxMediaRecoveryErrorEvent, ITelnyxStandardErrorEvent, TelnyxMediaErrorCode, } from './Modules/Verto/util/errors';
|
|
10
10
|
export type { ITelnyxWarning, ITelnyxWarningEvent, } from './Modules/Verto/util/constants/warnings';
|
|
11
11
|
export * from './PreCallDiagnosis';
|
|
12
|
+
export type { FunctionCallItem, FunctionCallOutputItem, AIConversationParams, AIConversationFunctionCallParams, AIConversationFunctionCallOutputParams, IAIConversationMessageEvent, ISendAIConversationMessageOptions, } from './Modules/Verto/webrtc/AIConversationTypes';
|
|
13
|
+
export { isFunctionCallParams, isFunctionCallOutputParams, } from './Modules/Verto/webrtc/AIConversationTypes';
|