@vonage/client-sdk 1.4.0-snapshot.112.0 → 1.4.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/api_docs/ts/assets/navigation.js +1 -1
- package/api_docs/ts/assets/search.js +1 -1
- package/api_docs/ts/classes/ClientConfig.html +2 -1
- package/api_docs/ts/classes/VonageClient.html +12 -6
- package/api_docs/ts/enums/OrderBy.html +2 -0
- package/api_docs/ts/enums/PresentingOrder.html +8 -0
- package/api_docs/ts/interfaces/ConversationProperties.html +3 -3
- package/api_docs/ts/interfaces/CustomConversationEvent.html +3 -3
- package/api_docs/ts/interfaces/GetCallLegsParameters.html +8 -0
- package/api_docs/ts/interfaces/GetConversationEventsParameters.html +2 -2
- package/api_docs/ts/interfaces/GetConversationMembersParameters.html +2 -2
- package/api_docs/ts/interfaces/GetConversationsParameters.html +3 -3
- package/api_docs/ts/interfaces/Leg.html +4 -3
- package/api_docs/ts/interfaces/LegsPage.html +8 -0
- package/api_docs/ts/interfaces/MessageCustomEventBody.html +2 -2
- package/api_docs/ts/interfaces/User.html +3 -3
- package/api_docs/ts/modules.html +5 -3
- package/dist/client/VonageClient.d.ts +14 -1
- package/dist/client/index.cjs +15781 -14665
- package/dist/client/index.mjs +15781 -14665
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +32 -4
- package/dist/lib/MediaClient.d.ts +2 -0
- package/dist/utils/ConversationModels.d.ts +14 -0
- package/dist/utils/RequestParameterModels.d.ts +43 -7
- package/dist/utils/jsEnumToVonageObject.d.ts +10 -0
- package/dist/vonageClientSDK.js +15614 -14445
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +15614 -14445
- package/package.json +2 -2
- package/api_docs/ts/types/OrderBy.html +0 -2
- package/api_docs/ts/types/PresentingOrder.html +0 -2
|
@@ -58,6 +58,7 @@ export declare namespace vonage {
|
|
|
58
58
|
serverCall(context: Nullable<Json>): Promise<string>;
|
|
59
59
|
reconnectCall(legId: string): Promise<any>;
|
|
60
60
|
getLeg(legId: string): Promise<vonage.LegJS>;
|
|
61
|
+
getCallLegs(callId: string, parameters: Nullable<vonage.GetCallLegsParametersJS>): Promise<vonage.LegsPageJS>;
|
|
61
62
|
answer(callId: string): Promise<any>;
|
|
62
63
|
reject(callId: string): Promise<any>;
|
|
63
64
|
hangup(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
|
|
@@ -140,7 +141,7 @@ export declare namespace vonage {
|
|
|
140
141
|
get conversationId(): string;
|
|
141
142
|
get from(): vonage.FromJS;
|
|
142
143
|
get eventType(): Nullable<string>;
|
|
143
|
-
get body():
|
|
144
|
+
get body(): any;
|
|
144
145
|
}
|
|
145
146
|
class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
146
147
|
private constructor();
|
|
@@ -209,7 +210,7 @@ export declare namespace vonage {
|
|
|
209
210
|
namespace MessageCustomEventJS {
|
|
210
211
|
class MessageCustomEventBody implements vonage.MessageEventBodyJS {
|
|
211
212
|
private constructor();
|
|
212
|
-
get customData():
|
|
213
|
+
get customData(): any;
|
|
213
214
|
get deleted(): Nullable<string>;
|
|
214
215
|
}
|
|
215
216
|
}
|
|
@@ -399,7 +400,7 @@ export declare namespace vonage {
|
|
|
399
400
|
private constructor();
|
|
400
401
|
get ttl(): Nullable<number>;
|
|
401
402
|
get customSortKey(): Nullable<string>;
|
|
402
|
-
get customData():
|
|
403
|
+
get customData(): any;
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
406
|
const ConversationStateJS: {
|
|
@@ -459,7 +460,7 @@ export declare namespace vonage {
|
|
|
459
460
|
get channels(): Nullable<vonage.UserChannelsJS>;
|
|
460
461
|
get timestamp(): Nullable<vonage.UserTimestampJS>;
|
|
461
462
|
get imageUrl(): Nullable<string>;
|
|
462
|
-
get customData():
|
|
463
|
+
get customData(): any;
|
|
463
464
|
}
|
|
464
465
|
class UserTimestampJS {
|
|
465
466
|
private constructor();
|
|
@@ -498,6 +499,15 @@ export declare namespace vonage {
|
|
|
498
499
|
get user(): Nullable<string>;
|
|
499
500
|
get number(): Nullable<string>;
|
|
500
501
|
}
|
|
502
|
+
class MediaStateJS {
|
|
503
|
+
private constructor();
|
|
504
|
+
get mute(): Nullable<boolean>;
|
|
505
|
+
get earmuff(): Nullable<boolean>;
|
|
506
|
+
get play_stream(): Nullable<boolean>;
|
|
507
|
+
get recording(): Nullable<boolean>;
|
|
508
|
+
get transcribing(): Nullable<boolean>;
|
|
509
|
+
get tts(): Nullable<boolean>;
|
|
510
|
+
}
|
|
501
511
|
class LegJS {
|
|
502
512
|
private constructor();
|
|
503
513
|
get id(): string;
|
|
@@ -509,6 +519,13 @@ export declare namespace vonage {
|
|
|
509
519
|
get endTime(): string;
|
|
510
520
|
get from(): vonage.LegChannelJS;
|
|
511
521
|
get to(): vonage.LegChannelJS;
|
|
522
|
+
get mediaState(): Nullable<vonage.MediaStateJS>;
|
|
523
|
+
}
|
|
524
|
+
class LegsPageJS {
|
|
525
|
+
private constructor();
|
|
526
|
+
get legs(): Array<vonage.LegJS>;
|
|
527
|
+
get previousCursor(): Nullable<string>;
|
|
528
|
+
get nextCursor(): Nullable<string>;
|
|
512
529
|
}
|
|
513
530
|
abstract class ChannelTypeJS {
|
|
514
531
|
private constructor();
|
|
@@ -689,6 +706,7 @@ export declare namespace vonage {
|
|
|
689
706
|
readonly websocketPath?: Nullable<string>;
|
|
690
707
|
readonly rtcStatsTelemetry?: Nullable<boolean>;
|
|
691
708
|
readonly autoReconnectMedia?: Nullable<boolean>;
|
|
709
|
+
readonly noiseSuppression?: Nullable<boolean>;
|
|
692
710
|
}
|
|
693
711
|
interface InitConfigObjectJS extends vonage.ConfigObjectJS {
|
|
694
712
|
readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
|
|
@@ -700,6 +718,7 @@ export declare namespace vonage {
|
|
|
700
718
|
readonly websocketPath?: Nullable<string>;
|
|
701
719
|
readonly rtcStatsTelemetry?: Nullable<boolean>;
|
|
702
720
|
readonly autoReconnectMedia?: Nullable<boolean>;
|
|
721
|
+
readonly noiseSuppression?: Nullable<boolean>;
|
|
703
722
|
}
|
|
704
723
|
}
|
|
705
724
|
export declare namespace vonage {
|
|
@@ -737,6 +756,7 @@ export declare namespace vonage {
|
|
|
737
756
|
set rtcStatsTelemetry(value: boolean);
|
|
738
757
|
get autoReconnectMedia(): boolean;
|
|
739
758
|
set autoReconnectMedia(value: boolean);
|
|
759
|
+
get noiseSuppression(): boolean;
|
|
740
760
|
}
|
|
741
761
|
class TopicJS {
|
|
742
762
|
constructor(name: string, tag: string);
|
|
@@ -938,6 +958,7 @@ export declare namespace vonage {
|
|
|
938
958
|
serverCall(context: Nullable<Json>): Promise<string>;
|
|
939
959
|
reconnectCall(legId: string): Promise<any>;
|
|
940
960
|
getLeg(legId: string): Promise<vonage.LegJS>;
|
|
961
|
+
getCallLegs(callId: string, parameters: Nullable<vonage.GetCallLegsParametersJS>): Promise<vonage.LegsPageJS>;
|
|
941
962
|
answer(callId: string): Promise<any>;
|
|
942
963
|
reject(callId: string): Promise<any>;
|
|
943
964
|
hangup(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
|
|
@@ -992,6 +1013,8 @@ export declare namespace vonage {
|
|
|
992
1013
|
unmute(id: string): void;
|
|
993
1014
|
getPeerConnection(id: string): any;
|
|
994
1015
|
enableRtcStatsCollection(interval: any/* kotlin.Number */, mediaId: string): void;
|
|
1016
|
+
enableNoiseSuppression(id: string): void;
|
|
1017
|
+
disableNoiseSuppression(id: string): void;
|
|
995
1018
|
}
|
|
996
1019
|
interface MediaClientDelegateJS {
|
|
997
1020
|
onRtcStats(rtcStats: vonage.RTCStatsJS, legId: string): void;
|
|
@@ -1119,6 +1142,11 @@ export declare namespace vonage {
|
|
|
1119
1142
|
readonly pageSize?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1120
1143
|
readonly cursor?: Nullable<string>;
|
|
1121
1144
|
}
|
|
1145
|
+
interface GetCallLegsParametersJS {
|
|
1146
|
+
readonly order?: Nullable<vonage.PresentingOrderJS>;
|
|
1147
|
+
readonly pageSize?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1148
|
+
readonly cursor?: Nullable<string>;
|
|
1149
|
+
}
|
|
1122
1150
|
}
|
|
1123
1151
|
export declare namespace vonage.utils {
|
|
1124
1152
|
abstract class OptionJS<T> {
|
|
@@ -17,5 +17,7 @@ declare class MediaClient implements vonage.MediaClientJS {
|
|
|
17
17
|
processAnswer(id: string, sdp: string): void;
|
|
18
18
|
disableMedia(id: string): void;
|
|
19
19
|
private setMediaTracksEnabled;
|
|
20
|
+
disableNoiseSuppression(id: string): void;
|
|
21
|
+
enableNoiseSuppression(id: string): void;
|
|
20
22
|
}
|
|
21
23
|
export default MediaClient;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
2
|
import { ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
3
|
+
import { Leg } from '../client';
|
|
3
4
|
/**
|
|
4
5
|
* Represents a conversation
|
|
5
6
|
*
|
|
@@ -46,6 +47,19 @@ export type ConversationProperties = vonage.ConversationJS.Properties;
|
|
|
46
47
|
export type ConversationsPage = vonage.ConversationsPageJS & {
|
|
47
48
|
conversations: Conversation[];
|
|
48
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Represents a page of legs
|
|
52
|
+
*
|
|
53
|
+
* @beta
|
|
54
|
+
* @property legs The legs in the page
|
|
55
|
+
* @property previousCursor The cursor to fetch the previous page
|
|
56
|
+
* @property nextCursor The cursor to fetch the next page
|
|
57
|
+
* @interface
|
|
58
|
+
* @group Voice
|
|
59
|
+
*/
|
|
60
|
+
export type LegsPage = vonage.LegsPageJS & {
|
|
61
|
+
legs: Leg[];
|
|
62
|
+
};
|
|
49
63
|
/**
|
|
50
64
|
* Represents a page of conversation events
|
|
51
65
|
*
|
|
@@ -32,8 +32,10 @@ export type CreateConversationParameters = Omit<vonage.CreateConversationParamet
|
|
|
32
32
|
* @interface
|
|
33
33
|
* @group Chat
|
|
34
34
|
*/
|
|
35
|
-
export type GetConversationsParameters = Omit<vonage.GetConversationsParametersJS, 'pageSize'> & {
|
|
35
|
+
export type GetConversationsParameters = Omit<vonage.GetConversationsParametersJS, 'pageSize' | 'order' | 'orderBy'> & {
|
|
36
36
|
pageSize?: Nullable<number>;
|
|
37
|
+
order?: Nullable<PresentingOrder>;
|
|
38
|
+
orderBy?: Nullable<OrderBy>;
|
|
37
39
|
};
|
|
38
40
|
/**
|
|
39
41
|
* Parameters object for {@link VonageClient.getConversationEvents}
|
|
@@ -48,9 +50,10 @@ export type GetConversationsParameters = Omit<vonage.GetConversationsParametersJ
|
|
|
48
50
|
* @interface
|
|
49
51
|
* @group Chat
|
|
50
52
|
*/
|
|
51
|
-
export type GetConversationEventsParameters = Omit<vonage.GetConversationEventsParametersJS, 'pageSize' | 'startId'> & {
|
|
53
|
+
export type GetConversationEventsParameters = Omit<vonage.GetConversationEventsParametersJS, 'pageSize' | 'startId' | 'order'> & {
|
|
52
54
|
pageSize?: Nullable<number>;
|
|
53
55
|
startId?: Nullable<number>;
|
|
56
|
+
order?: Nullable<PresentingOrder>;
|
|
54
57
|
};
|
|
55
58
|
/**
|
|
56
59
|
* Parameters object for {@link VonageClient.getConversationMembers}
|
|
@@ -62,7 +65,22 @@ export type GetConversationEventsParameters = Omit<vonage.GetConversationEventsP
|
|
|
62
65
|
* @interface
|
|
63
66
|
* @group Chat
|
|
64
67
|
*/
|
|
65
|
-
export type GetConversationMembersParameters = Omit<vonage.GetConversationMembersParametersJS, 'pageSize'> & {
|
|
68
|
+
export type GetConversationMembersParameters = Omit<vonage.GetConversationMembersParametersJS, 'pageSize' | 'order'> & {
|
|
69
|
+
pageSize?: Nullable<number>;
|
|
70
|
+
order?: Nullable<PresentingOrder>;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Parameters object for {@link VonageClient.getCallLegs}
|
|
74
|
+
*
|
|
75
|
+
* @beta
|
|
76
|
+
* @property order The order in which call legs are presented, default is {@link PresentingOrder.ASC}.
|
|
77
|
+
* @property pageSize The maximum number of legs to retrieve per request, default is 10.
|
|
78
|
+
* @property cursor The cursor indicating the starting point for pagination, default is the first page.
|
|
79
|
+
* @interface
|
|
80
|
+
* @group Voice
|
|
81
|
+
*/
|
|
82
|
+
export type GetCallLegsParameters = Omit<vonage.GetCallLegsParametersJS, 'pageSize' | 'order'> & {
|
|
83
|
+
order?: Nullable<PresentingOrder>;
|
|
66
84
|
pageSize?: Nullable<number>;
|
|
67
85
|
};
|
|
68
86
|
/**
|
|
@@ -96,13 +114,31 @@ export interface UpdateConversationParameters {
|
|
|
96
114
|
* @beta
|
|
97
115
|
* @group Chat
|
|
98
116
|
*/
|
|
99
|
-
export type PresentingOrder = vonage.PresentingOrderJS;
|
|
100
|
-
|
|
117
|
+
export type PresentingOrder = Lowercase<typeof vonage.PresentingOrderJS.prototype.name> | vonage.PresentingOrderJS;
|
|
118
|
+
/**
|
|
119
|
+
* The order in which paginated objects are presented.
|
|
120
|
+
* @beta
|
|
121
|
+
* @group Chat
|
|
122
|
+
* @enum
|
|
123
|
+
* @property ASC Ascending order
|
|
124
|
+
* @property DESC Descending order
|
|
125
|
+
*/
|
|
126
|
+
export declare const PresentingOrder: {
|
|
127
|
+
[prop in typeof vonage.PresentingOrderJS.prototype.name]: Lowercase<prop>;
|
|
128
|
+
};
|
|
101
129
|
/**
|
|
102
130
|
* The sorting strategy used for paginated objects.
|
|
103
131
|
*
|
|
104
132
|
* @beta
|
|
105
133
|
* @group Chat
|
|
106
134
|
*/
|
|
107
|
-
export type OrderBy = vonage.OrderByJS;
|
|
108
|
-
|
|
135
|
+
export type OrderBy = Lowercase<typeof vonage.OrderByJS.prototype.name> | vonage.OrderByJS;
|
|
136
|
+
/**
|
|
137
|
+
* The sorting strategy used for paginated objects.
|
|
138
|
+
* @beta
|
|
139
|
+
* @group Chat
|
|
140
|
+
* @enum
|
|
141
|
+
*/
|
|
142
|
+
export declare const OrderBy: {
|
|
143
|
+
[prop in typeof vonage.OrderByJS.prototype.name]: Lowercase<prop>;
|
|
144
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type KotlinClass = Function & {
|
|
2
|
+
prototype: {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export type KotlinEnum<T extends KotlinClass> = Lowercase<T['prototype']['name']> | {
|
|
7
|
+
[K in keyof T]: T[K extends T['prototype']['name'] ? K : never];
|
|
8
|
+
}[keyof T];
|
|
9
|
+
export type KotlinEnumValue<T extends KotlinClass, V extends KotlinEnum<T> = KotlinEnum<T>> = V extends Lowercase<T['prototype']['name']> ? T[keyof T extends string ? Uppercase<V> : never] : V;
|
|
10
|
+
export declare const jsEnumToVonageObject: <K extends KotlinClass, T extends KotlinEnum<K>, R extends KotlinEnumValue<K, T>>(kotlinType: K, value: T) => R;
|