@vonage/client-sdk 1.2.0-alpha.9 → 1.2.0-rc.1
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 -107
- package/dist/client/VonageClient.d.ts +62 -26
- package/dist/client/index.cjs +15271 -12515
- package/dist/client/index.mjs +15268 -12515
- package/dist/coreExtend.d.ts +16 -6
- package/dist/kotlin/JsUnions.d.ts +251 -0
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +221 -84
- package/dist/lib/MediaClient.d.ts +1 -0
- package/dist/utils/ClientConfig.d.ts +26 -1
- package/dist/utils/ConnectivityManager.d.ts +11 -0
- package/dist/utils/ConversationModels.d.ts +2 -0
- package/dist/utils/index.d.ts +3 -3
- package/dist/vonageClientSDK.js +18510 -19444
- package/dist/vonageClientSDK.min.js +1 -2
- package/dist/vonageClientSDK.min.mjs +1 -2
- package/dist/vonageClientSDK.mjs +18507 -19444
- package/package.json +3 -3
- package/snippet.js +9 -1
- package/dist/kotlin/ConversationEvents.d.ts +0 -171
- package/dist/kotlin/From.d.ts +0 -26
- package/dist/utils/ConversationMessageModels.d.ts +0 -5
|
@@ -9,6 +9,9 @@ export declare namespace vonage {
|
|
|
9
9
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
10
10
|
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
|
|
11
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;
|
|
12
15
|
reconnecting(): void;
|
|
13
16
|
reconnection(): void;
|
|
14
17
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
@@ -27,13 +30,15 @@ export declare namespace vonage {
|
|
|
27
30
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
28
31
|
leaveConversation(cid: string): Promise<any>;
|
|
29
32
|
deleteConversation(cid: string): Promise<any>;
|
|
30
|
-
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData: boolean): Promise<vonage.ConversationsPageJS>;
|
|
33
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData: boolean, orderBy: Nullable<vonage.OrderByJS>): Promise<vonage.ConversationsPageJS>;
|
|
31
34
|
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
32
35
|
getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
|
|
33
36
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
sendMessageTextEvent(cid: string, text: string): Promise<string>;
|
|
38
|
+
sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
|
|
39
|
+
sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
|
|
40
|
+
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
41
|
+
setConfig(config: vonage.ConfigObjectJS): void;
|
|
37
42
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
38
43
|
deleteSession(): Promise<any>;
|
|
39
44
|
refreshSession(token: string): Promise<any>;
|
|
@@ -58,7 +63,7 @@ export declare namespace vonage {
|
|
|
58
63
|
export declare namespace vonage {
|
|
59
64
|
class EventsPageJS {
|
|
60
65
|
private constructor();
|
|
61
|
-
get events(): Array<vonage.
|
|
66
|
+
get events(): Array<vonage.PersistentConversationEventJS>;
|
|
62
67
|
get previousCursor(): Nullable<string>;
|
|
63
68
|
get nextCursor(): Nullable<string>;
|
|
64
69
|
}
|
|
@@ -70,194 +75,261 @@ export declare namespace vonage {
|
|
|
70
75
|
class EmbeddedInfoJS implements vonage.FromJS {
|
|
71
76
|
private constructor();
|
|
72
77
|
get kind(): string;
|
|
73
|
-
get memberId(): string
|
|
78
|
+
get memberId(): Nullable<string>;
|
|
74
79
|
get user(): vonage.UserJS;
|
|
75
80
|
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
76
81
|
}
|
|
77
82
|
const SystemJS: {
|
|
78
83
|
get kind(): string;
|
|
84
|
+
toString(): string;
|
|
85
|
+
hashCode(): number;
|
|
86
|
+
equals(other: Nullable<any>): boolean;
|
|
79
87
|
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
80
88
|
} & vonage.FromJS;
|
|
81
89
|
interface ConversationEventJS {
|
|
82
|
-
readonly
|
|
90
|
+
readonly kind: string;
|
|
83
91
|
readonly timestamp: string;
|
|
84
92
|
readonly conversationId: string;
|
|
85
|
-
readonly from:
|
|
93
|
+
readonly from: vonage.FromJS;
|
|
86
94
|
readonly __doNotUseOrImplementIt: {
|
|
87
95
|
readonly "vonage.ConversationEventJS": unique symbol;
|
|
88
96
|
};
|
|
89
97
|
}
|
|
90
|
-
interface
|
|
91
|
-
readonly
|
|
92
|
-
readonly id: Nullable<number>;
|
|
98
|
+
interface NonPersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
99
|
+
readonly kind: string;
|
|
93
100
|
readonly timestamp: string;
|
|
94
101
|
readonly conversationId: string;
|
|
95
|
-
readonly from:
|
|
102
|
+
readonly from: vonage.FromJS;
|
|
96
103
|
readonly __doNotUseOrImplementIt: {
|
|
97
|
-
readonly "vonage.
|
|
104
|
+
readonly "vonage.NonPersistentConversationEventJS": unique symbol;
|
|
98
105
|
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
99
106
|
}
|
|
107
|
+
interface PersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
108
|
+
readonly id: number;
|
|
109
|
+
readonly kind: string;
|
|
110
|
+
readonly timestamp: string;
|
|
111
|
+
readonly conversationId: string;
|
|
112
|
+
readonly from: vonage.FromJS;
|
|
113
|
+
readonly __doNotUseOrImplementIt: {
|
|
114
|
+
readonly "vonage.PersistentConversationEventJS": unique symbol;
|
|
115
|
+
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
116
|
+
}
|
|
117
|
+
interface MemberEventJS {
|
|
118
|
+
readonly body: vonage.MemberEventBodyJS;
|
|
119
|
+
readonly __doNotUseOrImplementIt: {
|
|
120
|
+
readonly "vonage.MemberEventJS": unique symbol;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
100
123
|
class MemberEventBodyJS {
|
|
101
124
|
private constructor();
|
|
102
125
|
get memberId(): string;
|
|
103
126
|
get user(): vonage.UserJS;
|
|
104
127
|
}
|
|
105
|
-
class MemberInvitedEventJS implements vonage.MemberEventJS {
|
|
128
|
+
class MemberInvitedEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
|
|
106
129
|
private constructor();
|
|
130
|
+
get kind(): string;
|
|
107
131
|
get id(): number;
|
|
108
132
|
get timestamp(): string;
|
|
109
133
|
get conversationId(): string;
|
|
110
134
|
get from(): vonage.FromJS;
|
|
111
135
|
get body(): vonage.MemberEventBodyJS;
|
|
112
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
136
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
113
137
|
}
|
|
114
|
-
class MemberJoinedEventJS implements vonage.MemberEventJS {
|
|
138
|
+
class MemberJoinedEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
|
|
115
139
|
private constructor();
|
|
140
|
+
get kind(): string;
|
|
116
141
|
get id(): number;
|
|
117
142
|
get timestamp(): string;
|
|
118
143
|
get conversationId(): string;
|
|
119
144
|
get from(): vonage.FromJS;
|
|
120
145
|
get body(): vonage.MemberEventBodyJS;
|
|
121
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
146
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
122
147
|
}
|
|
123
|
-
class MemberLeftEventJS implements vonage.MemberEventJS {
|
|
148
|
+
class MemberLeftEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
|
|
124
149
|
private constructor();
|
|
150
|
+
get kind(): string;
|
|
125
151
|
get id(): number;
|
|
126
152
|
get timestamp(): string;
|
|
127
153
|
get conversationId(): string;
|
|
128
154
|
get from(): vonage.FromJS;
|
|
129
155
|
get body(): vonage.MemberEventBodyJS;
|
|
130
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
|
|
156
|
+
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
157
|
+
}
|
|
158
|
+
class CustomConversationEventJS implements vonage.PersistentConversationEventJS {
|
|
159
|
+
private constructor();
|
|
160
|
+
get kind(): string;
|
|
161
|
+
get id(): number;
|
|
162
|
+
get timestamp(): string;
|
|
163
|
+
get conversationId(): string;
|
|
164
|
+
get from(): vonage.FromJS;
|
|
165
|
+
get eventType(): Nullable<string>;
|
|
166
|
+
get body(): string;
|
|
167
|
+
readonly __doNotUseOrImplementIt: vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
168
|
+
}
|
|
169
|
+
class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS {
|
|
170
|
+
private constructor();
|
|
171
|
+
get kind(): string;
|
|
172
|
+
get timestamp(): string;
|
|
173
|
+
get conversationId(): string;
|
|
174
|
+
get from(): vonage.FromJS;
|
|
175
|
+
get body(): string;
|
|
176
|
+
readonly __doNotUseOrImplementIt: vonage.NonPersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
131
177
|
}
|
|
132
178
|
}
|
|
133
179
|
export declare namespace vonage {
|
|
134
|
-
interface MessageEventJS
|
|
135
|
-
readonly id: number;
|
|
136
|
-
readonly timestamp: string;
|
|
137
|
-
readonly conversationId: string;
|
|
138
|
-
readonly from: Nullable<vonage.FromJS>;
|
|
180
|
+
interface MessageEventJS {
|
|
139
181
|
readonly __doNotUseOrImplementIt: {
|
|
140
182
|
readonly "vonage.MessageEventJS": unique symbol;
|
|
141
|
-
}
|
|
183
|
+
};
|
|
142
184
|
}
|
|
143
|
-
|
|
185
|
+
interface MessageEventBodyJS {
|
|
186
|
+
readonly deleted: Nullable<string>;
|
|
187
|
+
readonly __doNotUseOrImplementIt: {
|
|
188
|
+
readonly "vonage.MessageEventBodyJS": unique symbol;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
class MessageTextEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
144
192
|
private constructor();
|
|
193
|
+
get kind(): string;
|
|
145
194
|
get id(): number;
|
|
146
195
|
get timestamp(): string;
|
|
147
196
|
get conversationId(): string;
|
|
148
197
|
get from(): vonage.FromJS;
|
|
149
|
-
get body(): vonage.
|
|
150
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
198
|
+
get body(): vonage.MessageTextEventJS.Body;
|
|
199
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
151
200
|
}
|
|
152
|
-
namespace
|
|
153
|
-
class Body {
|
|
201
|
+
namespace MessageTextEventJS {
|
|
202
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
154
203
|
private constructor();
|
|
155
204
|
get text(): string;
|
|
205
|
+
get deleted(): Nullable<string>;
|
|
206
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
156
207
|
}
|
|
157
208
|
}
|
|
158
|
-
class
|
|
209
|
+
class MessageCustomEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
159
210
|
private constructor();
|
|
211
|
+
get kind(): string;
|
|
160
212
|
get id(): number;
|
|
161
213
|
get timestamp(): string;
|
|
162
214
|
get conversationId(): string;
|
|
163
215
|
get from(): vonage.FromJS;
|
|
164
|
-
get body(): vonage.
|
|
165
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
216
|
+
get body(): vonage.MessageCustomEventJS.Body;
|
|
217
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
166
218
|
}
|
|
167
|
-
namespace
|
|
168
|
-
class Body {
|
|
219
|
+
namespace MessageCustomEventJS {
|
|
220
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
169
221
|
private constructor();
|
|
170
222
|
get customData(): string;
|
|
223
|
+
get deleted(): Nullable<string>;
|
|
224
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
171
225
|
}
|
|
172
226
|
}
|
|
173
|
-
class
|
|
227
|
+
class MessageAudioEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
174
228
|
private constructor();
|
|
229
|
+
get kind(): string;
|
|
175
230
|
get id(): number;
|
|
176
231
|
get timestamp(): string;
|
|
177
232
|
get conversationId(): string;
|
|
178
233
|
get from(): vonage.FromJS;
|
|
179
|
-
get body(): vonage.
|
|
180
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
234
|
+
get body(): vonage.MessageAudioEventJS.Body;
|
|
235
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
181
236
|
}
|
|
182
|
-
namespace
|
|
183
|
-
class Body {
|
|
237
|
+
namespace MessageAudioEventJS {
|
|
238
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
184
239
|
private constructor();
|
|
185
240
|
get audioUrl(): string;
|
|
241
|
+
get deleted(): Nullable<string>;
|
|
242
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
186
243
|
}
|
|
187
244
|
}
|
|
188
|
-
class
|
|
245
|
+
class MessageVideoEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
189
246
|
private constructor();
|
|
247
|
+
get kind(): string;
|
|
190
248
|
get id(): number;
|
|
191
249
|
get timestamp(): string;
|
|
192
250
|
get conversationId(): string;
|
|
193
251
|
get from(): vonage.FromJS;
|
|
194
|
-
get body(): vonage.
|
|
195
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
252
|
+
get body(): vonage.MessageVideoEventJS.Body;
|
|
253
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
196
254
|
}
|
|
197
|
-
namespace
|
|
198
|
-
class Body {
|
|
255
|
+
namespace MessageVideoEventJS {
|
|
256
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
199
257
|
private constructor();
|
|
200
258
|
get videoUrl(): string;
|
|
259
|
+
get deleted(): Nullable<string>;
|
|
260
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
201
261
|
}
|
|
202
262
|
}
|
|
203
|
-
class
|
|
263
|
+
class MessageImageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
204
264
|
private constructor();
|
|
265
|
+
get kind(): string;
|
|
205
266
|
get id(): number;
|
|
206
267
|
get timestamp(): string;
|
|
207
268
|
get conversationId(): string;
|
|
208
269
|
get from(): vonage.FromJS;
|
|
209
|
-
get body(): vonage.
|
|
210
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
270
|
+
get body(): vonage.MessageImageEventJS.Body;
|
|
271
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
211
272
|
}
|
|
212
|
-
namespace
|
|
213
|
-
class Body {
|
|
273
|
+
namespace MessageImageEventJS {
|
|
274
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
214
275
|
private constructor();
|
|
215
276
|
get imageUrl(): string;
|
|
277
|
+
get deleted(): Nullable<string>;
|
|
278
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
216
279
|
}
|
|
217
280
|
}
|
|
218
|
-
class
|
|
281
|
+
class MessageFileEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
219
282
|
private constructor();
|
|
283
|
+
get kind(): string;
|
|
220
284
|
get id(): number;
|
|
221
285
|
get timestamp(): string;
|
|
222
286
|
get conversationId(): string;
|
|
223
287
|
get from(): vonage.FromJS;
|
|
224
|
-
get body(): vonage.
|
|
225
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
288
|
+
get body(): vonage.MessageFileEventJS.Body;
|
|
289
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
226
290
|
}
|
|
227
|
-
namespace
|
|
228
|
-
class Body {
|
|
291
|
+
namespace MessageFileEventJS {
|
|
292
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
229
293
|
private constructor();
|
|
230
294
|
get fileUrl(): string;
|
|
295
|
+
get deleted(): Nullable<string>;
|
|
296
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
231
297
|
}
|
|
232
298
|
}
|
|
233
|
-
class
|
|
299
|
+
class MessageVCardEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
234
300
|
private constructor();
|
|
301
|
+
get kind(): string;
|
|
235
302
|
get id(): number;
|
|
236
303
|
get timestamp(): string;
|
|
237
304
|
get conversationId(): string;
|
|
238
305
|
get from(): vonage.FromJS;
|
|
239
|
-
get body(): vonage.
|
|
240
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
306
|
+
get body(): vonage.MessageVCardEventJS.Body;
|
|
307
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
241
308
|
}
|
|
242
|
-
namespace
|
|
243
|
-
class Body {
|
|
309
|
+
namespace MessageVCardEventJS {
|
|
310
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
244
311
|
private constructor();
|
|
245
312
|
get vcardUrl(): string;
|
|
313
|
+
get deleted(): Nullable<string>;
|
|
314
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
246
315
|
}
|
|
247
316
|
}
|
|
248
|
-
class
|
|
317
|
+
class MessageLocationEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
249
318
|
private constructor();
|
|
319
|
+
get kind(): string;
|
|
250
320
|
get id(): number;
|
|
251
321
|
get timestamp(): string;
|
|
252
322
|
get conversationId(): string;
|
|
253
323
|
get from(): vonage.FromJS;
|
|
254
|
-
get body(): vonage.
|
|
255
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
324
|
+
get body(): vonage.MessageLocationEventJS.Body;
|
|
325
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
256
326
|
}
|
|
257
|
-
namespace
|
|
258
|
-
class Body {
|
|
327
|
+
namespace MessageLocationEventJS {
|
|
328
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
259
329
|
private constructor();
|
|
260
|
-
get location(): vonage.
|
|
330
|
+
get location(): vonage.MessageLocationEventJS.Location;
|
|
331
|
+
get deleted(): Nullable<string>;
|
|
332
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
261
333
|
}
|
|
262
334
|
class Location {
|
|
263
335
|
private constructor();
|
|
@@ -267,30 +339,39 @@ export declare namespace vonage {
|
|
|
267
339
|
get address(): Nullable<string>;
|
|
268
340
|
}
|
|
269
341
|
}
|
|
270
|
-
class
|
|
342
|
+
class MessageTemplateEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
271
343
|
private constructor();
|
|
344
|
+
get kind(): string;
|
|
272
345
|
get id(): number;
|
|
273
346
|
get timestamp(): string;
|
|
274
347
|
get conversationId(): string;
|
|
275
348
|
get from(): vonage.FromJS;
|
|
276
|
-
get body(): vonage.
|
|
277
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
|
|
349
|
+
get body(): vonage.MessageTemplateEventJS.Body;
|
|
350
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
278
351
|
}
|
|
279
|
-
namespace
|
|
280
|
-
class Body {
|
|
352
|
+
namespace MessageTemplateEventJS {
|
|
353
|
+
class Body implements vonage.MessageEventBodyJS {
|
|
281
354
|
private constructor();
|
|
282
|
-
get body(): any/* com.vonage.clientcore.core.api.models.
|
|
283
|
-
get template(): vonage.
|
|
284
|
-
|
|
355
|
+
get body(): any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */;
|
|
356
|
+
get template(): vonage.MessageTemplateEventJS.TemplateObject;
|
|
357
|
+
get whatsapp(): vonage.MessageTemplateEventJS.WhatsappObject;
|
|
358
|
+
get deleted(): Nullable<string>;
|
|
359
|
+
copy(body?: any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */): vonage.MessageTemplateEventJS.Body;
|
|
285
360
|
toString(): string;
|
|
286
361
|
hashCode(): number;
|
|
287
362
|
equals(other: Nullable<any>): boolean;
|
|
363
|
+
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
288
364
|
}
|
|
289
365
|
class TemplateObject {
|
|
290
366
|
private constructor();
|
|
291
367
|
get name(): string;
|
|
292
368
|
get parameters(): Nullable<Array<string>>;
|
|
293
369
|
}
|
|
370
|
+
class WhatsappObject {
|
|
371
|
+
private constructor();
|
|
372
|
+
get policy(): string;
|
|
373
|
+
get locale(): string;
|
|
374
|
+
}
|
|
294
375
|
}
|
|
295
376
|
}
|
|
296
377
|
export declare namespace vonage {
|
|
@@ -310,6 +391,22 @@ export declare namespace vonage {
|
|
|
310
391
|
get name(): "ASC" | "DESC";
|
|
311
392
|
get ordinal(): 0 | 1;
|
|
312
393
|
}
|
|
394
|
+
abstract class OrderByJS {
|
|
395
|
+
private constructor();
|
|
396
|
+
get coreOrderBy(): any/* com.vonage.clientcore.core.api.models.OrderBy */;
|
|
397
|
+
static get CREATED(): vonage.OrderByJS & {
|
|
398
|
+
get name(): "CREATED";
|
|
399
|
+
get ordinal(): 0;
|
|
400
|
+
};
|
|
401
|
+
static get CUSTOM_SORT_KEY(): vonage.OrderByJS & {
|
|
402
|
+
get name(): "CUSTOM_SORT_KEY";
|
|
403
|
+
get ordinal(): 1;
|
|
404
|
+
};
|
|
405
|
+
static values(): Array<vonage.OrderByJS>;
|
|
406
|
+
static valueOf(value: string): vonage.OrderByJS;
|
|
407
|
+
get name(): "CREATED" | "CUSTOM_SORT_KEY";
|
|
408
|
+
get ordinal(): 0 | 1;
|
|
409
|
+
}
|
|
313
410
|
class ConversationJS {
|
|
314
411
|
private constructor();
|
|
315
412
|
get id(): string;
|
|
@@ -321,6 +418,7 @@ export declare namespace vonage {
|
|
|
321
418
|
get imageUrl(): Nullable<string>;
|
|
322
419
|
get state(): Nullable<vonage.ConversationStateJS>;
|
|
323
420
|
get customData(): Nullable<string>;
|
|
421
|
+
get customSortKey(): Nullable<string>;
|
|
324
422
|
}
|
|
325
423
|
abstract class ConversationStateJS {
|
|
326
424
|
private constructor();
|
|
@@ -589,13 +687,15 @@ export declare namespace vonage {
|
|
|
589
687
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
590
688
|
leaveConversation(cid: string): Promise<any>;
|
|
591
689
|
deleteConversation(cid: string): Promise<any>;
|
|
592
|
-
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData?: boolean): Promise<vonage.ConversationsPageJS>;
|
|
690
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData?: boolean, orderBy?: Nullable<vonage.OrderByJS>): Promise<vonage.ConversationsPageJS>;
|
|
593
691
|
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
594
692
|
getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
|
|
595
693
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
694
|
+
sendMessageTextEvent(cid: string, text: string): Promise<string>;
|
|
695
|
+
sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
|
|
696
|
+
sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
|
|
697
|
+
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
698
|
+
setConfig(config: vonage.ConfigObjectJS): void;
|
|
599
699
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
600
700
|
deleteSession(): Promise<any>;
|
|
601
701
|
refreshSession(token: string): Promise<any>;
|
|
@@ -612,6 +712,21 @@ export declare namespace vonage {
|
|
|
612
712
|
reconnection(): void;
|
|
613
713
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
614
714
|
}
|
|
715
|
+
interface ConfigObjectJS {
|
|
716
|
+
readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
|
|
717
|
+
readonly apiUrl?: Nullable<string>;
|
|
718
|
+
readonly websocketUrl?: Nullable<string>;
|
|
719
|
+
readonly websocketPath?: Nullable<string>;
|
|
720
|
+
readonly autoMediaReoffer?: Nullable<boolean>;
|
|
721
|
+
}
|
|
722
|
+
interface InitConfigObjectJS extends vonage.ConfigObjectJS {
|
|
723
|
+
readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
|
|
724
|
+
readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
|
|
725
|
+
readonly apiUrl?: Nullable<string>;
|
|
726
|
+
readonly websocketUrl?: Nullable<string>;
|
|
727
|
+
readonly websocketPath?: Nullable<string>;
|
|
728
|
+
readonly autoMediaReoffer?: Nullable<boolean>;
|
|
729
|
+
}
|
|
615
730
|
}
|
|
616
731
|
export declare namespace vonage {
|
|
617
732
|
abstract class CoreClientConfigRegionJS {
|
|
@@ -634,8 +749,9 @@ export declare namespace vonage {
|
|
|
634
749
|
get name(): "AP" | "EU" | "US";
|
|
635
750
|
get ordinal(): 0 | 1 | 2;
|
|
636
751
|
}
|
|
637
|
-
class CoreClientConfigJS {
|
|
638
|
-
constructor(region
|
|
752
|
+
class CoreClientConfigJS implements vonage.ConfigObjectJS {
|
|
753
|
+
constructor(region?: vonage.CoreClientConfigRegionJS);
|
|
754
|
+
get region(): vonage.CoreClientConfigRegionJS;
|
|
639
755
|
get apiUrl(): string;
|
|
640
756
|
set apiUrl(value: string);
|
|
641
757
|
get websocketUrl(): string;
|
|
@@ -644,8 +760,11 @@ export declare namespace vonage {
|
|
|
644
760
|
set websocketPath(value: string);
|
|
645
761
|
get autoMediaReoffer(): boolean;
|
|
646
762
|
set autoMediaReoffer(value: boolean);
|
|
647
|
-
|
|
648
|
-
|
|
763
|
+
}
|
|
764
|
+
class CoreClientInitConfigJS extends vonage.CoreClientConfigJS implements vonage.InitConfigObjectJS {
|
|
765
|
+
constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
|
|
766
|
+
get loggingLevel(): vonage.LoggingLevelJS;
|
|
767
|
+
set loggingLevel(value: vonage.LoggingLevelJS);
|
|
649
768
|
}
|
|
650
769
|
abstract class LoggingLevelJS /* implements com.vonage.clientcore.core.api.ILoggingLevel */ {
|
|
651
770
|
private constructor();
|
|
@@ -704,7 +823,7 @@ export declare namespace vonage {
|
|
|
704
823
|
function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void;
|
|
705
824
|
interface ICoreClientJS {
|
|
706
825
|
readonly core: any/* com.vonage.clientcore.core.CoreClient */;
|
|
707
|
-
setConfig(config: vonage.
|
|
826
|
+
setConfig(config: vonage.ConfigObjectJS): void;
|
|
708
827
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
709
828
|
deleteSession(): Promise<any>;
|
|
710
829
|
refreshSession(token: string): Promise<any>;
|
|
@@ -725,6 +844,9 @@ export declare namespace vonage {
|
|
|
725
844
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
726
845
|
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
|
|
727
846
|
legStatusUpdate(callId: string, legId: string, status: vonage.LegStatusJS): void;
|
|
847
|
+
callMediaReconnecting(callId: string): void;
|
|
848
|
+
callMediaReconnection(callId: string): void;
|
|
849
|
+
callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
|
|
728
850
|
reconnecting(): void;
|
|
729
851
|
reconnection(): void;
|
|
730
852
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
@@ -761,6 +883,20 @@ export declare namespace vonage {
|
|
|
761
883
|
getStatus(status: any/* com.vonage.clientcore.core.api.LegStatus */): vonage.LegStatusJS;
|
|
762
884
|
};
|
|
763
885
|
}
|
|
886
|
+
abstract class CallDisconnectReasonJS {
|
|
887
|
+
private constructor();
|
|
888
|
+
static get networkChange(): vonage.CallDisconnectReasonJS & {
|
|
889
|
+
get name(): "networkChange";
|
|
890
|
+
get ordinal(): 0;
|
|
891
|
+
};
|
|
892
|
+
static values(): Array<vonage.CallDisconnectReasonJS>;
|
|
893
|
+
static valueOf(value: string): vonage.CallDisconnectReasonJS;
|
|
894
|
+
get name(): "networkChange";
|
|
895
|
+
get ordinal(): 0;
|
|
896
|
+
static get Companion(): {
|
|
897
|
+
getReason(reason: any/* com.vonage.clientcore.core.api.CallDisconnectReason */): vonage.CallDisconnectReasonJS;
|
|
898
|
+
};
|
|
899
|
+
}
|
|
764
900
|
abstract class HangupReasonJS {
|
|
765
901
|
private constructor();
|
|
766
902
|
static get REMOTE_HANGUP(): vonage.HangupReasonJS & {
|
|
@@ -807,7 +943,7 @@ export declare namespace vonage {
|
|
|
807
943
|
enableEarmuff(callId: string): Promise<any>;
|
|
808
944
|
disableEarmuff(callId: string): Promise<any>;
|
|
809
945
|
sendDTMF(callId: string, digits: string): Promise<any>;
|
|
810
|
-
setConfig(config: vonage.
|
|
946
|
+
setConfig(config: vonage.ConfigObjectJS): void;
|
|
811
947
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
812
948
|
deleteSession(): Promise<any>;
|
|
813
949
|
refreshSession(token: string): Promise<any>;
|
|
@@ -857,6 +993,7 @@ export declare namespace vonage {
|
|
|
857
993
|
interface MediaClientDelegateJS {
|
|
858
994
|
onRtcStats(rtcStats: vonage.RTCStatsJS): void;
|
|
859
995
|
onConnectionChange(id: string, status: string): void;
|
|
996
|
+
onNetworkChange(legId: string, status: string): void;
|
|
860
997
|
}
|
|
861
998
|
}
|
|
862
999
|
export declare namespace vonage {
|
|
@@ -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>;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
1
2
|
import vonage from '../utils/vonage';
|
|
2
3
|
export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
|
|
4
|
+
export type ClientConfigObject = ConfigObjectJS;
|
|
5
|
+
export type ClientInitConfigObject = InitConfigObjectJS;
|
|
6
|
+
export interface ConfigObjectJS {
|
|
7
|
+
region?: Nullable<vonage.CoreClientConfigRegionJS>;
|
|
8
|
+
apiUrl?: Nullable<string>;
|
|
9
|
+
websocketUrl?: Nullable<string>;
|
|
10
|
+
websocketPath?: Nullable<string>;
|
|
11
|
+
autoMediaReoffer?: Nullable<boolean>;
|
|
12
|
+
}
|
|
13
|
+
export interface InitConfigObjectJS extends ConfigObjectJS {
|
|
14
|
+
loggingLevel?: Nullable<vonage.LoggingLevelJS>;
|
|
15
|
+
}
|
|
3
16
|
/**
|
|
4
17
|
* Represents the configuration object for the client.
|
|
5
18
|
*
|
|
@@ -13,10 +26,22 @@ export declare class ClientConfig extends vonage.CoreClientConfigJS {
|
|
|
13
26
|
/**
|
|
14
27
|
* Constructs a new instance of the class.
|
|
15
28
|
*
|
|
16
|
-
* @param
|
|
29
|
+
* @param region The region where the API and WebSocket URLs should be configured.
|
|
17
30
|
* Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific).
|
|
18
31
|
* The URLs will be automatically set based on the selected region.
|
|
19
32
|
* Defaults to "US" if no region is specified.
|
|
20
33
|
*/
|
|
21
34
|
constructor(region?: vonage.CoreClientConfigRegionJS);
|
|
22
35
|
}
|
|
36
|
+
export declare class ClientInitConfig extends vonage.CoreClientInitConfigJS {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new instance of the class.
|
|
39
|
+
*
|
|
40
|
+
* @param loggingLevel The logging level to set for the SDK. Default is Error.
|
|
41
|
+
* @param region The region where the API and WebSocket URLs should be configured.
|
|
42
|
+
* Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific).
|
|
43
|
+
* The URLs will be automatically set based on the selected region.
|
|
44
|
+
* Defaults to "US" if no region is specified.
|
|
45
|
+
*/
|
|
46
|
+
constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
|
|
47
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -12,3 +12,5 @@ export type ChannelType = vonage.ChannelTypeJS;
|
|
|
12
12
|
export declare const ChannelType: typeof vonage.ChannelTypeJS;
|
|
13
13
|
export type PresentingOrder = vonage.PresentingOrderJS;
|
|
14
14
|
export declare const PresentingOrder: typeof vonage.PresentingOrderJS;
|
|
15
|
+
export type OrderBy = vonage.OrderByJS;
|
|
16
|
+
export declare const OrderBy: typeof vonage.OrderByJS;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './ClientConfig';
|
|
2
|
+
export * from './logging';
|
|
3
3
|
export * from './ConversationModels';
|
|
4
|
-
export * from '../kotlin/
|
|
4
|
+
export * from '../kotlin/JsUnions';
|
|
5
5
|
export * from './ErrorModels';
|