@vonage/client-sdk 1.2.1 → 1.3.0-alpha.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/dist/client/VonageClient.d.ts +31 -20
- package/dist/client/index.cjs +13945 -11919
- package/dist/client/index.mjs +13943 -11920
- package/dist/coreExtend.d.ts +7 -3
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +99 -25
- package/dist/lib/MediaClient.d.ts +1 -0
- package/dist/utils/ClientConfig.d.ts +23 -14
- package/dist/utils/JsonUtils.d.ts +9 -0
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/logging.d.ts +29 -1
- package/dist/vonageClientSDK.js +13745 -11745
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +13743 -11746
- package/package.json +1 -1
- package/dist/global.d.ts +0 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
|
-
import { Conversation, ConversationsPage, Member, MembersPage, PresentingOrder, OrderBy, ClientInitConfigObject, ClientConfigObject } from '../utils';
|
|
2
|
+
import { Conversation, ConversationsPage, Member, MembersPage, PresentingOrder, OrderBy, ClientInitConfigObject, ClientConfigObject, Json, CustomData } from '../utils';
|
|
3
|
+
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
3
4
|
import { ConversationEvent, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
4
5
|
/**
|
|
5
6
|
* The Vonage Client SDK for JS/TS provides a simple interface
|
|
@@ -37,14 +38,11 @@ export type CallSayParams = Partial<vonage.CallSayParams> & {
|
|
|
37
38
|
};
|
|
38
39
|
export type CallDisconnectReason = vonage.CallDisconnectReasonJS;
|
|
39
40
|
export declare const CallDisconnectReason: typeof vonage.CallDisconnectReasonJS;
|
|
40
|
-
type
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* @param level - The logging level to set.
|
|
46
|
-
*/
|
|
47
|
-
export declare const setVonageClientLoggingLevel: typeof vonage.setDefaultLoggingLevel;
|
|
41
|
+
export type RtcStats = vonage.RTCStatsJS;
|
|
42
|
+
export type CreateConversationParameters = Omit<vonage.CreateConversationParametersJS, 'ttl' | 'customData'> & {
|
|
43
|
+
ttl?: Nullable<number>;
|
|
44
|
+
customData?: Nullable<CustomData>;
|
|
45
|
+
};
|
|
48
46
|
/**
|
|
49
47
|
* VonageClient is the main entry point for the Vonage Client SDK.
|
|
50
48
|
*
|
|
@@ -72,7 +70,7 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
72
70
|
* Register a callback for an event.
|
|
73
71
|
*
|
|
74
72
|
* @example
|
|
75
|
-
* [[include:
|
|
73
|
+
* [[include: snippet_OnConversationEventListener.txt]]
|
|
76
74
|
*
|
|
77
75
|
* @param event - the event to register for (e.g. 'legStatusUpdate')
|
|
78
76
|
* @param callback - the callback to register for the event
|
|
@@ -99,7 +97,7 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
99
97
|
* Clear all callbacks for an event.
|
|
100
98
|
*
|
|
101
99
|
* @example
|
|
102
|
-
* [[include:
|
|
100
|
+
* [[include: snippet_ClearCallbacks.txt]]
|
|
103
101
|
*
|
|
104
102
|
* @param event - the event to unregister from (e.g. 'legStatusUpdate')
|
|
105
103
|
* @returns void
|
|
@@ -154,7 +152,7 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
154
152
|
* Hangup a call.
|
|
155
153
|
*
|
|
156
154
|
* @example
|
|
157
|
-
* [[include:
|
|
155
|
+
* [[include: snippet_Hangup.txt]]
|
|
158
156
|
*
|
|
159
157
|
* @group Voice
|
|
160
158
|
* @param callId - the `callId` of the call to hangup
|
|
@@ -176,7 +174,7 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
176
174
|
* Sends a TTS message to the Call
|
|
177
175
|
*
|
|
178
176
|
* @example
|
|
179
|
-
* [[include:
|
|
177
|
+
* [[include: snippet_Say.txt]]
|
|
180
178
|
*
|
|
181
179
|
* @group Voice
|
|
182
180
|
* @param callId - the `callId` of the call to send the message to
|
|
@@ -242,11 +240,11 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
242
240
|
*
|
|
243
241
|
* @group Chat
|
|
244
242
|
* @beta
|
|
245
|
-
* @param
|
|
246
|
-
*
|
|
243
|
+
* @param parameters - A [CreateConversationParameters] object containing the parameters for the creation request.
|
|
244
|
+
*
|
|
247
245
|
* @returns the `cid` of the conversation
|
|
248
246
|
*/
|
|
249
|
-
createConversation(
|
|
247
|
+
createConversation(parameters?: Nullable<CreateConversationParameters>): Promise<string>;
|
|
250
248
|
/**
|
|
251
249
|
* Get a Conversation
|
|
252
250
|
*
|
|
@@ -331,7 +329,20 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
331
329
|
* @param customData - the body of the message
|
|
332
330
|
* @returns the `timestamp` of the message
|
|
333
331
|
*/
|
|
334
|
-
sendMessageCustomEvent(id: string, customData:
|
|
332
|
+
sendMessageCustomEvent(id: string, customData: CustomData): Promise<string>;
|
|
333
|
+
/**
|
|
334
|
+
* Send a Image message to a Conversation.
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* [[include: snippet_SendImageMessage.txt]]
|
|
338
|
+
*
|
|
339
|
+
* @group Chat
|
|
340
|
+
* @beta
|
|
341
|
+
* @param id - the Conversation's id
|
|
342
|
+
* @param imageUrl - the url of the image resource.
|
|
343
|
+
* @returns the `timestamp` of the message
|
|
344
|
+
*/
|
|
345
|
+
sendMessageImageEvent(id: string, imageUrl: URL): Promise<string>;
|
|
335
346
|
/**
|
|
336
347
|
* Send an ephemeral event to a Conversation
|
|
337
348
|
*
|
|
@@ -341,15 +352,15 @@ export declare class VonageClient extends vonage.CombinedClientJS {
|
|
|
341
352
|
* @group Chat
|
|
342
353
|
* @beta
|
|
343
354
|
* @param id - the Conversation's id
|
|
344
|
-
* @param
|
|
355
|
+
* @param customData - the body of the event
|
|
345
356
|
* @returns the `timestamp` of the message
|
|
346
357
|
*/
|
|
347
|
-
sendEphemeralEvent(id: string,
|
|
358
|
+
sendEphemeralEvent(id: string, customData: CustomData): Promise<string>;
|
|
348
359
|
/**
|
|
349
360
|
* Delete an Event in a Conversation
|
|
350
361
|
*
|
|
351
362
|
* @example
|
|
352
|
-
* [[include:
|
|
363
|
+
* [[include:snippet_DeleteEvent.txt]]
|
|
353
364
|
*
|
|
354
365
|
* @group Chat
|
|
355
366
|
* @beta
|