@vonage/client-sdk 1.2.0-alpha.1 → 1.2.0-alpha.11
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 +4 -1
- package/dist/client/VonageClient.d.ts +3 -1
- package/dist/client/index.cjs +26251 -33732
- package/dist/client/index.mjs +26251 -33733
- package/dist/kotlin/ConversationEvents.d.ts +11 -10
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +97 -79
- package/dist/lib/MediaClient.d.ts +1 -0
- package/dist/utils/ConnectivityManager.d.ts +11 -0
- package/dist/vonageClientSDK.js +29560 -38697
- package/dist/vonageClientSDK.min.js +1 -2
- package/dist/vonageClientSDK.min.mjs +1 -2
- package/dist/vonageClientSDK.mjs +29560 -38698
- package/package.json +2 -2
|
@@ -43,19 +43,20 @@ export type MemberLeftEvent = {
|
|
|
43
43
|
from: From;
|
|
44
44
|
} & vonage.MemberLeftEventJS;
|
|
45
45
|
/**
|
|
46
|
-
* A
|
|
46
|
+
* A CustomConversationEvent is a ConversationEvent with a type of 'custom'
|
|
47
47
|
*
|
|
48
|
-
* @property
|
|
49
|
-
* @property
|
|
50
|
-
* @property
|
|
51
|
-
* @property
|
|
52
|
-
* @property
|
|
48
|
+
* @property id the id property of the CustomConversationEvent
|
|
49
|
+
* @property timestamp the timestamp property of the CustomConversationEvent
|
|
50
|
+
* @property conversationId the conversationId property of the CustomConversationEvent
|
|
51
|
+
* @property from the from property of the CustomConversationEvent
|
|
52
|
+
* @property eventType the eventType property of the CustomConversationEvent
|
|
53
|
+
* @property body the body property of the CustomConversationEvent
|
|
53
54
|
* @interface
|
|
54
55
|
*/
|
|
55
|
-
export type
|
|
56
|
-
kind: '
|
|
56
|
+
export type CustomConversationEvent = {
|
|
57
|
+
kind: 'custom';
|
|
57
58
|
from: From;
|
|
58
|
-
} & vonage.
|
|
59
|
+
} & vonage.CustomConversationEventJS;
|
|
59
60
|
/**
|
|
60
61
|
* A TextMessageEvent is a ConversationEvent with a type of 'message:text'
|
|
61
62
|
*
|
|
@@ -182,4 +183,4 @@ export type TemplateMessageEvent = {
|
|
|
182
183
|
kind: 'message:template';
|
|
183
184
|
from: From;
|
|
184
185
|
} & vonage.TemplateMessageEventJS;
|
|
185
|
-
export type ConversationEvent = MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent |
|
|
186
|
+
export type ConversationEvent = MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | CustomConversationEvent | TextMessageEvent | CustomMessageEvent | AudioMessageEvent | VideoMessageEvent | ImageMessageEvent | FileMessageEvent | VCardMessageEvent | LocationMessageEvent | TemplateMessageEvent;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
type Nullable<T> = T | null | undefined
|
|
2
|
-
declare
|
|
3
|
-
type __doNotImplementIt = typeof __doNotImplementIt
|
|
4
|
-
export namespace vonage {
|
|
2
|
+
export declare namespace vonage {
|
|
5
3
|
interface CombinedEvents extends vonage.VoiceEvents, vonage.ChatEvents {
|
|
6
4
|
callInvite(callId: string, from: string, channelType: string): void;
|
|
7
5
|
callInviteCancel(callId: string, reason: vonage.CancelReasonJS): void;
|
|
@@ -11,13 +9,16 @@ export namespace vonage {
|
|
|
11
9
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
12
10
|
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
|
|
13
11
|
legStatusUpdate(callId: string, legId: string, status: vonage.LegStatusJS): void;
|
|
12
|
+
callMediaReconnecting(callId: string): void;
|
|
13
|
+
callMediaReconnection(callId: string): void;
|
|
14
|
+
callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
|
|
14
15
|
reconnecting(): void;
|
|
15
16
|
reconnection(): void;
|
|
16
17
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
17
18
|
conversationEvent(event: vonage.ConversationEventJS): void;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
export namespace vonage {
|
|
21
|
+
export declare namespace vonage {
|
|
21
22
|
class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS {
|
|
22
23
|
constructor(http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS);
|
|
23
24
|
get media(): vonage.MediaClientJS;
|
|
@@ -29,7 +30,7 @@ export namespace vonage {
|
|
|
29
30
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
30
31
|
leaveConversation(cid: string): Promise<any>;
|
|
31
32
|
deleteConversation(cid: string): Promise<any>;
|
|
32
|
-
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string
|
|
33
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData: boolean): Promise<vonage.ConversationsPageJS>;
|
|
33
34
|
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
34
35
|
getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
|
|
35
36
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
@@ -54,10 +55,10 @@ export namespace vonage {
|
|
|
54
55
|
enableEarmuff(callId: string): Promise<any>;
|
|
55
56
|
disableEarmuff(callId: string): Promise<any>;
|
|
56
57
|
sendDTMF(callId: string, digits: string): Promise<any>;
|
|
57
|
-
readonly
|
|
58
|
+
readonly __doNotUseOrImplementIt: vonage.IChatClientJS["__doNotUseOrImplementIt"] & vonage.IVoiceClientJS["__doNotUseOrImplementIt"];
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
export namespace vonage {
|
|
61
|
+
export declare namespace vonage {
|
|
61
62
|
class EventsPageJS {
|
|
62
63
|
private constructor();
|
|
63
64
|
get events(): Array<vonage.ConversationEventJS>;
|
|
@@ -65,24 +66,29 @@ export namespace vonage {
|
|
|
65
66
|
get nextCursor(): Nullable<string>;
|
|
66
67
|
}
|
|
67
68
|
interface FromJS {
|
|
68
|
-
readonly
|
|
69
|
+
readonly __doNotUseOrImplementIt: {
|
|
70
|
+
readonly "vonage.FromJS": unique symbol;
|
|
71
|
+
};
|
|
69
72
|
}
|
|
70
73
|
class EmbeddedInfoJS implements vonage.FromJS {
|
|
71
74
|
private constructor();
|
|
72
75
|
get kind(): string;
|
|
73
76
|
get memberId(): string;
|
|
74
77
|
get user(): vonage.UserJS;
|
|
75
|
-
readonly
|
|
78
|
+
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
76
79
|
}
|
|
77
80
|
const SystemJS: {
|
|
78
81
|
get kind(): string;
|
|
82
|
+
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
79
83
|
} & vonage.FromJS;
|
|
80
84
|
interface ConversationEventJS {
|
|
81
85
|
readonly id: Nullable<number>;
|
|
82
86
|
readonly timestamp: string;
|
|
83
87
|
readonly conversationId: string;
|
|
84
88
|
readonly from: Nullable<vonage.FromJS>;
|
|
85
|
-
readonly
|
|
89
|
+
readonly __doNotUseOrImplementIt: {
|
|
90
|
+
readonly "vonage.ConversationEventJS": unique symbol;
|
|
91
|
+
};
|
|
86
92
|
}
|
|
87
93
|
interface MemberEventJS extends vonage.ConversationEventJS {
|
|
88
94
|
readonly body: vonage.MemberEventBodyJS;
|
|
@@ -90,7 +96,9 @@ export namespace vonage {
|
|
|
90
96
|
readonly timestamp: string;
|
|
91
97
|
readonly conversationId: string;
|
|
92
98
|
readonly from: Nullable<vonage.FromJS>;
|
|
93
|
-
readonly
|
|
99
|
+
readonly __doNotUseOrImplementIt: {
|
|
100
|
+
readonly "vonage.MemberEventJS": unique symbol;
|
|
101
|
+
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
94
102
|
}
|
|
95
103
|
class MemberEventBodyJS {
|
|
96
104
|
private constructor();
|
|
@@ -104,7 +112,7 @@ export namespace vonage {
|
|
|
104
112
|
get conversationId(): string;
|
|
105
113
|
get from(): vonage.FromJS;
|
|
106
114
|
get body(): vonage.MemberEventBodyJS;
|
|
107
|
-
readonly
|
|
115
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
108
116
|
}
|
|
109
117
|
class MemberJoinedEventJS implements vonage.MemberEventJS {
|
|
110
118
|
private constructor();
|
|
@@ -113,7 +121,7 @@ export namespace vonage {
|
|
|
113
121
|
get conversationId(): string;
|
|
114
122
|
get from(): vonage.FromJS;
|
|
115
123
|
get body(): vonage.MemberEventBodyJS;
|
|
116
|
-
readonly
|
|
124
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
117
125
|
}
|
|
118
126
|
class MemberLeftEventJS implements vonage.MemberEventJS {
|
|
119
127
|
private constructor();
|
|
@@ -122,25 +130,28 @@ export namespace vonage {
|
|
|
122
130
|
get conversationId(): string;
|
|
123
131
|
get from(): vonage.FromJS;
|
|
124
132
|
get body(): vonage.MemberEventBodyJS;
|
|
125
|
-
readonly
|
|
133
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
126
134
|
}
|
|
127
|
-
class
|
|
135
|
+
class CustomConversationEventJS implements vonage.ConversationEventJS {
|
|
128
136
|
private constructor();
|
|
129
|
-
get
|
|
130
|
-
get id(): Nullable<number>;
|
|
137
|
+
get id(): number;
|
|
131
138
|
get timestamp(): string;
|
|
132
139
|
get conversationId(): string;
|
|
133
140
|
get from(): vonage.FromJS;
|
|
134
|
-
|
|
141
|
+
get eventType(): Nullable<string>;
|
|
142
|
+
get body(): string;
|
|
143
|
+
readonly __doNotUseOrImplementIt: vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
135
144
|
}
|
|
136
145
|
}
|
|
137
|
-
export namespace vonage {
|
|
146
|
+
export declare namespace vonage {
|
|
138
147
|
interface MessageEventJS extends vonage.ConversationEventJS {
|
|
139
148
|
readonly id: number;
|
|
140
149
|
readonly timestamp: string;
|
|
141
150
|
readonly conversationId: string;
|
|
142
151
|
readonly from: Nullable<vonage.FromJS>;
|
|
143
|
-
readonly
|
|
152
|
+
readonly __doNotUseOrImplementIt: {
|
|
153
|
+
readonly "vonage.MessageEventJS": unique symbol;
|
|
154
|
+
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
144
155
|
}
|
|
145
156
|
class TextMessageEventJS implements vonage.MessageEventJS {
|
|
146
157
|
private constructor();
|
|
@@ -149,7 +160,7 @@ export namespace vonage {
|
|
|
149
160
|
get conversationId(): string;
|
|
150
161
|
get from(): vonage.FromJS;
|
|
151
162
|
get body(): vonage.TextMessageEventJS.Body;
|
|
152
|
-
readonly
|
|
163
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
153
164
|
}
|
|
154
165
|
namespace TextMessageEventJS {
|
|
155
166
|
class Body {
|
|
@@ -164,7 +175,7 @@ export namespace vonage {
|
|
|
164
175
|
get conversationId(): string;
|
|
165
176
|
get from(): vonage.FromJS;
|
|
166
177
|
get body(): vonage.CustomMessageEventJS.Body;
|
|
167
|
-
readonly
|
|
178
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
168
179
|
}
|
|
169
180
|
namespace CustomMessageEventJS {
|
|
170
181
|
class Body {
|
|
@@ -179,7 +190,7 @@ export namespace vonage {
|
|
|
179
190
|
get conversationId(): string;
|
|
180
191
|
get from(): vonage.FromJS;
|
|
181
192
|
get body(): vonage.AudioMessageEventJS.Body;
|
|
182
|
-
readonly
|
|
193
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
183
194
|
}
|
|
184
195
|
namespace AudioMessageEventJS {
|
|
185
196
|
class Body {
|
|
@@ -194,7 +205,7 @@ export namespace vonage {
|
|
|
194
205
|
get conversationId(): string;
|
|
195
206
|
get from(): vonage.FromJS;
|
|
196
207
|
get body(): vonage.VideoMessageEventJS.Body;
|
|
197
|
-
readonly
|
|
208
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
198
209
|
}
|
|
199
210
|
namespace VideoMessageEventJS {
|
|
200
211
|
class Body {
|
|
@@ -209,7 +220,7 @@ export namespace vonage {
|
|
|
209
220
|
get conversationId(): string;
|
|
210
221
|
get from(): vonage.FromJS;
|
|
211
222
|
get body(): vonage.ImageMessageEventJS.Body;
|
|
212
|
-
readonly
|
|
223
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
213
224
|
}
|
|
214
225
|
namespace ImageMessageEventJS {
|
|
215
226
|
class Body {
|
|
@@ -224,7 +235,7 @@ export namespace vonage {
|
|
|
224
235
|
get conversationId(): string;
|
|
225
236
|
get from(): vonage.FromJS;
|
|
226
237
|
get body(): vonage.FileMessageEventJS.Body;
|
|
227
|
-
readonly
|
|
238
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
228
239
|
}
|
|
229
240
|
namespace FileMessageEventJS {
|
|
230
241
|
class Body {
|
|
@@ -239,7 +250,7 @@ export namespace vonage {
|
|
|
239
250
|
get conversationId(): string;
|
|
240
251
|
get from(): vonage.FromJS;
|
|
241
252
|
get body(): vonage.VCardMessageEventJS.Body;
|
|
242
|
-
readonly
|
|
253
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
243
254
|
}
|
|
244
255
|
namespace VCardMessageEventJS {
|
|
245
256
|
class Body {
|
|
@@ -254,7 +265,7 @@ export namespace vonage {
|
|
|
254
265
|
get conversationId(): string;
|
|
255
266
|
get from(): vonage.FromJS;
|
|
256
267
|
get body(): vonage.LocationMessageEventJS.Body;
|
|
257
|
-
readonly
|
|
268
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
258
269
|
}
|
|
259
270
|
namespace LocationMessageEventJS {
|
|
260
271
|
class Body {
|
|
@@ -276,14 +287,13 @@ export namespace vonage {
|
|
|
276
287
|
get conversationId(): string;
|
|
277
288
|
get from(): vonage.FromJS;
|
|
278
289
|
get body(): vonage.TemplateMessageEventJS.Body;
|
|
279
|
-
readonly
|
|
290
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
280
291
|
}
|
|
281
292
|
namespace TemplateMessageEventJS {
|
|
282
293
|
class Body {
|
|
283
294
|
private constructor();
|
|
284
295
|
get body(): any/* com.vonage.clientcore.core.api.models.TemplateMessageEvent.Body */;
|
|
285
296
|
get template(): vonage.TemplateMessageEventJS.TemplateObject;
|
|
286
|
-
component1(): any/* com.vonage.clientcore.core.api.models.TemplateMessageEvent.Body */;
|
|
287
297
|
copy(body?: any/* com.vonage.clientcore.core.api.models.TemplateMessageEvent.Body */): vonage.TemplateMessageEventJS.Body;
|
|
288
298
|
toString(): string;
|
|
289
299
|
hashCode(): number;
|
|
@@ -296,7 +306,7 @@ export namespace vonage {
|
|
|
296
306
|
}
|
|
297
307
|
}
|
|
298
308
|
}
|
|
299
|
-
export namespace vonage {
|
|
309
|
+
export declare namespace vonage {
|
|
300
310
|
abstract class PresentingOrderJS {
|
|
301
311
|
private constructor();
|
|
302
312
|
get corePresentingOrder(): any/* com.vonage.clientcore.core.api.models.PresentingOrder */;
|
|
@@ -510,7 +520,7 @@ export namespace vonage {
|
|
|
510
520
|
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
511
521
|
}
|
|
512
522
|
}
|
|
513
|
-
export namespace vonage {
|
|
523
|
+
export declare namespace vonage {
|
|
514
524
|
const CSErrorCodesJS: {
|
|
515
525
|
get CONVERSATION_DUPLICATE_NAME(): string;
|
|
516
526
|
get MEMBER_ALREADY_JOINED(): string;
|
|
@@ -541,7 +551,7 @@ export namespace vonage {
|
|
|
541
551
|
get TRANSPORT_CLOSED_DISCONNECT(): string;
|
|
542
552
|
};
|
|
543
553
|
}
|
|
544
|
-
export namespace vonage {
|
|
554
|
+
export declare namespace vonage {
|
|
545
555
|
class VonageErrorJS extends Error {
|
|
546
556
|
private constructor();
|
|
547
557
|
get type(): vonage.VonageErrorTypeJS;
|
|
@@ -576,7 +586,7 @@ export namespace vonage {
|
|
|
576
586
|
get ordinal(): 0 | 1 | 2 | 3 | 4;
|
|
577
587
|
}
|
|
578
588
|
}
|
|
579
|
-
export namespace vonage {
|
|
589
|
+
export declare namespace vonage {
|
|
580
590
|
interface ChatEvents extends vonage.CoreClientEvents {
|
|
581
591
|
conversationEvent(event: vonage.ConversationEventJS): void;
|
|
582
592
|
reconnecting(): void;
|
|
@@ -584,7 +594,7 @@ export namespace vonage {
|
|
|
584
594
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
585
595
|
}
|
|
586
596
|
}
|
|
587
|
-
export namespace vonage {
|
|
597
|
+
export declare namespace vonage {
|
|
588
598
|
interface IChatClientJS extends vonage.ICoreClientJS {
|
|
589
599
|
readonly core: any/* com.vonage.clientcore.core.CoreClient */;
|
|
590
600
|
createConversation(name: Nullable<string>, displayName: Nullable<string>): Promise<string>;
|
|
@@ -592,7 +602,7 @@ export namespace vonage {
|
|
|
592
602
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
593
603
|
leaveConversation(cid: string): Promise<any>;
|
|
594
604
|
deleteConversation(cid: string): Promise<any>;
|
|
595
|
-
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string
|
|
605
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData?: boolean): Promise<vonage.ConversationsPageJS>;
|
|
596
606
|
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
597
607
|
getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
|
|
598
608
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
@@ -604,17 +614,19 @@ export namespace vonage {
|
|
|
604
614
|
refreshSession(token: string): Promise<any>;
|
|
605
615
|
getConversation(conversationId: string): Promise<vonage.ConversationJS>;
|
|
606
616
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
607
|
-
readonly
|
|
617
|
+
readonly __doNotUseOrImplementIt: {
|
|
618
|
+
readonly "vonage.IChatClientJS": unique symbol;
|
|
619
|
+
} & vonage.ICoreClientJS["__doNotUseOrImplementIt"];
|
|
608
620
|
}
|
|
609
621
|
}
|
|
610
|
-
export namespace vonage {
|
|
622
|
+
export declare namespace vonage {
|
|
611
623
|
interface CoreClientEvents {
|
|
612
624
|
reconnecting(): void;
|
|
613
625
|
reconnection(): void;
|
|
614
626
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
615
627
|
}
|
|
616
628
|
}
|
|
617
|
-
export namespace vonage {
|
|
629
|
+
export declare namespace vonage {
|
|
618
630
|
abstract class CoreClientConfigRegionJS {
|
|
619
631
|
private constructor();
|
|
620
632
|
get coreRegion(): any/* com.vonage.clientcore.core.api.ClientConfigRegion */;
|
|
@@ -711,10 +723,12 @@ export namespace vonage {
|
|
|
711
723
|
refreshSession(token: string): Promise<any>;
|
|
712
724
|
getConversation(conversationId: string): Promise<vonage.ConversationJS>;
|
|
713
725
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
714
|
-
readonly
|
|
726
|
+
readonly __doNotUseOrImplementIt: {
|
|
727
|
+
readonly "vonage.ICoreClientJS": unique symbol;
|
|
728
|
+
};
|
|
715
729
|
}
|
|
716
730
|
}
|
|
717
|
-
export namespace vonage {
|
|
731
|
+
export declare namespace vonage {
|
|
718
732
|
interface VoiceEvents extends vonage.CoreClientEvents {
|
|
719
733
|
callInvite(callId: string, from: string, channelType: string): void;
|
|
720
734
|
callInviteCancel(callId: string, reason: vonage.CancelReasonJS): void;
|
|
@@ -724,20 +738,23 @@ export namespace vonage {
|
|
|
724
738
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
725
739
|
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
|
|
726
740
|
legStatusUpdate(callId: string, legId: string, status: vonage.LegStatusJS): void;
|
|
741
|
+
callMediaReconnecting(callId: string): void;
|
|
742
|
+
callMediaReconnection(callId: string): void;
|
|
743
|
+
callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
|
|
727
744
|
reconnecting(): void;
|
|
728
745
|
reconnection(): void;
|
|
729
746
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
730
747
|
}
|
|
731
748
|
interface CallSayParams {
|
|
732
749
|
readonly text: string;
|
|
733
|
-
readonly level
|
|
734
|
-
readonly loop
|
|
735
|
-
readonly queue
|
|
736
|
-
readonly voiceName
|
|
737
|
-
readonly ssml
|
|
750
|
+
readonly level?: Nullable<number>;
|
|
751
|
+
readonly loop?: Nullable<number>;
|
|
752
|
+
readonly queue?: Nullable<boolean>;
|
|
753
|
+
readonly voiceName?: Nullable<string>;
|
|
754
|
+
readonly ssml?: Nullable<boolean>;
|
|
738
755
|
}
|
|
739
756
|
}
|
|
740
|
-
export namespace vonage {
|
|
757
|
+
export declare namespace vonage {
|
|
741
758
|
abstract class LegStatusJS {
|
|
742
759
|
private constructor();
|
|
743
760
|
static get RINGING(): vonage.LegStatusJS & {
|
|
@@ -760,6 +777,20 @@ export namespace vonage {
|
|
|
760
777
|
getStatus(status: any/* com.vonage.clientcore.core.api.LegStatus */): vonage.LegStatusJS;
|
|
761
778
|
};
|
|
762
779
|
}
|
|
780
|
+
abstract class CallDisconnectReasonJS {
|
|
781
|
+
private constructor();
|
|
782
|
+
static get networkChange(): vonage.CallDisconnectReasonJS & {
|
|
783
|
+
get name(): "networkChange";
|
|
784
|
+
get ordinal(): 0;
|
|
785
|
+
};
|
|
786
|
+
static values(): Array<vonage.CallDisconnectReasonJS>;
|
|
787
|
+
static valueOf(value: string): vonage.CallDisconnectReasonJS;
|
|
788
|
+
get name(): "networkChange";
|
|
789
|
+
get ordinal(): 0;
|
|
790
|
+
static get Companion(): {
|
|
791
|
+
getReason(reason: any/* com.vonage.clientcore.core.api.CallDisconnectReason */): vonage.CallDisconnectReasonJS;
|
|
792
|
+
};
|
|
793
|
+
}
|
|
763
794
|
abstract class HangupReasonJS {
|
|
764
795
|
private constructor();
|
|
765
796
|
static get REMOTE_HANGUP(): vonage.HangupReasonJS & {
|
|
@@ -812,26 +843,26 @@ export namespace vonage {
|
|
|
812
843
|
refreshSession(token: string): Promise<any>;
|
|
813
844
|
getConversation(conversationId: string): Promise<vonage.ConversationJS>;
|
|
814
845
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
815
|
-
readonly
|
|
846
|
+
readonly __doNotUseOrImplementIt: {
|
|
847
|
+
readonly "vonage.IVoiceClientJS": unique symbol;
|
|
848
|
+
} & vonage.ICoreClientJS["__doNotUseOrImplementIt"];
|
|
816
849
|
}
|
|
817
850
|
class VoiceInviteFromInfoJS {
|
|
818
851
|
constructor(id: Nullable<string>, type: string);
|
|
819
852
|
get id(): Nullable<string>;
|
|
820
853
|
get type(): string;
|
|
821
|
-
component1(): Nullable<string>;
|
|
822
|
-
component2(): string;
|
|
823
854
|
copy(id?: Nullable<string>, type?: string): vonage.VoiceInviteFromInfoJS;
|
|
824
855
|
toString(): string;
|
|
825
856
|
hashCode(): number;
|
|
826
857
|
equals(other: Nullable<any>): boolean;
|
|
827
858
|
}
|
|
828
859
|
}
|
|
829
|
-
export namespace vonage {
|
|
860
|
+
export declare namespace vonage {
|
|
830
861
|
interface HttpClientJS {
|
|
831
862
|
request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<vonage.HttpClientErrorJS>, p1: Nullable<vonage.HttpClientResponseJS>) => void): void;
|
|
832
863
|
}
|
|
833
864
|
interface SocketClientJS {
|
|
834
|
-
delegate
|
|
865
|
+
delegate?: Nullable<vonage.SocketClientDelegateJS>;
|
|
835
866
|
emit(type: string, msg: Nullable<Json>, callback: (p0: Nullable<Error>, p1: Nullable<string>) => void): void;
|
|
836
867
|
connect(host: string, path: string, reconnectionAttempts: any/* kotlin.Number */, reconnectionDelay: any/* kotlin.Number */, randomizationFactor: any/* kotlin.Number */, query: string): void;
|
|
837
868
|
disconnect(): void;
|
|
@@ -843,7 +874,7 @@ export namespace vonage {
|
|
|
843
874
|
didReceiveNewSocketConnectionStatusEvent(type: string, reason: Nullable<string>, timestamp: any/* kotlin.Number */, retryNumber: Nullable<number>): void;
|
|
844
875
|
}
|
|
845
876
|
interface MediaClientJS {
|
|
846
|
-
delegate
|
|
877
|
+
delegate?: Nullable<vonage.MediaClientDelegateJS>;
|
|
847
878
|
enableMediaOutbound(closure: (p0: any, p1: Nullable<string>, p2: (p0: string) => void) => void): void;
|
|
848
879
|
enableMediaInbound(closure: (p0: any, p1: Nullable<string>) => void, offerSDP: string, rtcId: string): void;
|
|
849
880
|
processAnswer(id: string, sdp: string): void;
|
|
@@ -856,14 +887,13 @@ export namespace vonage {
|
|
|
856
887
|
interface MediaClientDelegateJS {
|
|
857
888
|
onRtcStats(rtcStats: vonage.RTCStatsJS): void;
|
|
858
889
|
onConnectionChange(id: string, status: string): void;
|
|
890
|
+
onNetworkChange(legId: string, status: string): void;
|
|
859
891
|
}
|
|
860
892
|
}
|
|
861
|
-
export namespace vonage {
|
|
893
|
+
export declare namespace vonage {
|
|
862
894
|
class HttpClientErrorJS extends Error {
|
|
863
895
|
constructor(message?: Nullable<string>, cause?: Nullable<Error>);
|
|
864
896
|
get coreError(): any/* com.vonage.clientcore.core.middlewares.http.HTTPClientError */;
|
|
865
|
-
component1(): Nullable<string>;
|
|
866
|
-
component2(): Nullable<Error>;
|
|
867
897
|
copy(message?: Nullable<string>, cause?: Nullable<Error>): vonage.HttpClientErrorJS;
|
|
868
898
|
toString(): string;
|
|
869
899
|
hashCode(): number;
|
|
@@ -873,8 +903,6 @@ export namespace vonage {
|
|
|
873
903
|
constructor(statusCode: number, body?: Nullable<string>);
|
|
874
904
|
get statusCode(): number;
|
|
875
905
|
get body(): Nullable<string>;
|
|
876
|
-
component1(): number;
|
|
877
|
-
component2(): Nullable<string>;
|
|
878
906
|
copy(statusCode?: number, body?: Nullable<string>): vonage.HttpClientResponseJS;
|
|
879
907
|
toString(): string;
|
|
880
908
|
hashCode(): number;
|
|
@@ -928,28 +956,18 @@ export namespace vonage {
|
|
|
928
956
|
equals(other: Nullable<any>): boolean;
|
|
929
957
|
}
|
|
930
958
|
class RTCStatsJS {
|
|
931
|
-
constructor(audioRecvPackets: any
|
|
932
|
-
get audioRecvPackets(): any
|
|
933
|
-
get audioRecvPacketsLost(): any
|
|
934
|
-
get audioRecvBytes(): any
|
|
935
|
-
get audioRecvJitter(): any
|
|
936
|
-
get audioSentPackets(): any
|
|
937
|
-
get audioSentBytes(): any
|
|
938
|
-
get audioSentPacketsLost(): any
|
|
939
|
-
get audioRtt(): any
|
|
940
|
-
get audioSentJitter(): any
|
|
959
|
+
constructor(audioRecvPackets: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvPacketsLost: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvBytes: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvJitter: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPackets: Nullable<any>/* Nullable<kotlin.Number> */, audioSentBytes: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPacketsLost: Nullable<any>/* Nullable<kotlin.Number> */, audioRtt: Nullable<any>/* Nullable<kotlin.Number> */, audioSentJitter: Nullable<any>/* Nullable<kotlin.Number> */, legId: string);
|
|
960
|
+
get audioRecvPackets(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
961
|
+
get audioRecvPacketsLost(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
962
|
+
get audioRecvBytes(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
963
|
+
get audioRecvJitter(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
964
|
+
get audioSentPackets(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
965
|
+
get audioSentBytes(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
966
|
+
get audioSentPacketsLost(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
967
|
+
get audioRtt(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
968
|
+
get audioSentJitter(): Nullable<any>/* Nullable<kotlin.Number> */;
|
|
941
969
|
get legId(): string;
|
|
942
|
-
|
|
943
|
-
component2(): any/* Nullable<kotlin.Number> */;
|
|
944
|
-
component3(): any/* Nullable<kotlin.Number> */;
|
|
945
|
-
component4(): any/* Nullable<kotlin.Number> */;
|
|
946
|
-
component5(): any/* Nullable<kotlin.Number> */;
|
|
947
|
-
component6(): any/* Nullable<kotlin.Number> */;
|
|
948
|
-
component7(): any/* Nullable<kotlin.Number> */;
|
|
949
|
-
component8(): any/* Nullable<kotlin.Number> */;
|
|
950
|
-
component9(): any/* Nullable<kotlin.Number> */;
|
|
951
|
-
component10(): string;
|
|
952
|
-
copy(audioRecvPackets?: any/* Nullable<kotlin.Number> */, audioRecvPacketsLost?: any/* Nullable<kotlin.Number> */, audioRecvBytes?: any/* Nullable<kotlin.Number> */, audioRecvJitter?: any/* Nullable<kotlin.Number> */, audioSentPackets?: any/* Nullable<kotlin.Number> */, audioSentBytes?: any/* Nullable<kotlin.Number> */, audioSentPacketsLost?: any/* Nullable<kotlin.Number> */, audioRtt?: any/* Nullable<kotlin.Number> */, audioSentJitter?: any/* Nullable<kotlin.Number> */, legId?: string): vonage.RTCStatsJS;
|
|
970
|
+
copy(audioRecvPackets?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvPacketsLost?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvBytes?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvJitter?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPackets?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentBytes?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPacketsLost?: Nullable<any>/* Nullable<kotlin.Number> */, audioRtt?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentJitter?: Nullable<any>/* Nullable<kotlin.Number> */, legId?: string): vonage.RTCStatsJS;
|
|
953
971
|
toString(): string;
|
|
954
972
|
hashCode(): number;
|
|
955
973
|
equals(other: Nullable<any>): boolean;
|
|
@@ -5,6 +5,7 @@ declare class MediaClient implements vonage.MediaClientJS {
|
|
|
5
5
|
private pcs;
|
|
6
6
|
private audio;
|
|
7
7
|
private intervalId;
|
|
8
|
+
private connectivityManager;
|
|
8
9
|
constructor();
|
|
9
10
|
enableRtcStatsCollection(interval: number, mediaId: string): void;
|
|
10
11
|
enableMediaInbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>) => void, offerSDP: string, rtcId: string): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js';
|
|
2
|
+
import vonage from '../utils/vonage';
|
|
3
|
+
export declare class ConnectivityManager {
|
|
4
|
+
private legId;
|
|
5
|
+
private isOnline;
|
|
6
|
+
private delegate;
|
|
7
|
+
handleNetworkChange(): void;
|
|
8
|
+
constructor();
|
|
9
|
+
setLegId(legId: string, delegate: KMPPackage.Nullable<vonage.MediaClientDelegateJS>): void;
|
|
10
|
+
unsetLegId(): void;
|
|
11
|
+
}
|