@vonage/client-sdk 1.3.0-rc.1 → 1.3.0-rc.2
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 -7
- package/api_docs/ts/classes/ClientInitConfig.html +1 -1
- package/api_docs/ts/classes/VonageClient.html +35 -35
- package/api_docs/ts/functions/none.html +2 -0
- package/api_docs/ts/functions/setDefaultLoggingLevel.html +2 -2
- package/api_docs/ts/functions/setVonageClientLoggingLevel.html +2 -2
- package/api_docs/ts/functions/some.html +3 -0
- package/api_docs/ts/index.html +4 -4
- package/api_docs/ts/interfaces/CallSayParams.html +8 -0
- package/api_docs/ts/interfaces/Channel.html +8 -0
- package/api_docs/ts/interfaces/ClientConfigObject.html +18 -0
- package/api_docs/ts/interfaces/ClientInitConfigObject.html +24 -0
- package/api_docs/ts/interfaces/Conversation.html +20 -0
- package/api_docs/ts/interfaces/ConversationProperties.html +8 -0
- package/api_docs/ts/interfaces/ConversationTimestamp.html +5 -0
- package/api_docs/ts/interfaces/ConversationsPage.html +8 -0
- package/api_docs/ts/interfaces/CreateConversationParameters.html +15 -0
- package/api_docs/ts/interfaces/CustomConversationEvent.html +8 -8
- package/api_docs/ts/interfaces/EmbeddedInfo.html +4 -4
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +6 -6
- package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +7 -7
- package/api_docs/ts/interfaces/EventsPage.html +8 -0
- package/api_docs/ts/interfaces/GetConversationEventsParameters.html +14 -0
- package/api_docs/ts/interfaces/GetConversationMembersParameters.html +8 -0
- package/api_docs/ts/interfaces/GetConversationsParameters.html +12 -0
- package/api_docs/ts/interfaces/Leg.html +20 -0
- package/api_docs/ts/interfaces/LegChannel.html +8 -0
- package/api_docs/ts/interfaces/Location.html +3 -2
- package/api_docs/ts/interfaces/Member.html +12 -0
- package/api_docs/ts/interfaces/MemberChannel.html +8 -0
- package/api_docs/ts/interfaces/MemberEventBody.html +6 -0
- package/api_docs/ts/interfaces/MemberInvitedEvent.html +2 -2
- package/api_docs/ts/interfaces/MemberJoinedEvent.html +7 -7
- package/api_docs/ts/interfaces/MemberLeftEvent.html +7 -7
- package/api_docs/ts/interfaces/MemberTimestamp.html +5 -0
- package/api_docs/ts/interfaces/MembersPage.html +8 -0
- package/api_docs/ts/interfaces/MessageAudioEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageAudioEventBody.html +6 -0
- package/api_docs/ts/interfaces/MessageCustomEvent.html +8 -8
- package/api_docs/ts/interfaces/MessageCustomEventBody.html +6 -0
- package/api_docs/ts/interfaces/MessageFileEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageFileEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageImageEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageImageEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageLocationEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageLocationEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageTemplateEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageTemplateEventBody.html +10 -0
- package/api_docs/ts/interfaces/MessageTextEvent.html +8 -8
- package/api_docs/ts/interfaces/MessageTextEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageVCardEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageVCardEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageVideoEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageVideoEventBody.html +7 -0
- package/api_docs/ts/interfaces/RTCQuality.html +11 -0
- package/api_docs/ts/interfaces/RtcStats.html +11 -0
- package/api_docs/ts/interfaces/System.html +3 -2
- package/api_docs/ts/interfaces/Template.html +3 -2
- package/api_docs/ts/interfaces/UpdateConversationParameters.html +12 -2
- package/api_docs/ts/interfaces/User.html +16 -0
- package/api_docs/ts/interfaces/UserChannels.html +14 -0
- package/api_docs/ts/interfaces/UserTimestamp.html +5 -0
- package/api_docs/ts/interfaces/VonageEvent.html +2 -0
- package/api_docs/ts/interfaces/VonageLogger.html +10 -0
- package/api_docs/ts/interfaces/Whatsapp.html +3 -2
- package/api_docs/ts/modules.html +64 -16
- package/api_docs/ts/types/ChannelType.html +2 -0
- package/api_docs/ts/types/ConfigRegion.html +3 -0
- package/api_docs/ts/types/ConversationEvent.html +2 -0
- package/api_docs/ts/types/ConversationState.html +2 -0
- package/api_docs/ts/types/CustomData.html +2 -2
- package/api_docs/ts/types/From.html +2 -0
- package/api_docs/ts/types/Json.html +2 -0
- package/api_docs/ts/types/JsonValue.html +2 -0
- package/api_docs/ts/types/LoggingLevel.html +4 -0
- package/api_docs/ts/types/MemberState.html +2 -0
- package/api_docs/ts/types/NonPersistentConversationEvent.html +2 -0
- package/api_docs/ts/types/Option.html +3 -0
- package/api_docs/ts/types/OrderBy.html +2 -0
- package/api_docs/ts/types/PersistentConversationEvent.html +2 -0
- package/api_docs/ts/types/PresentingOrder.html +2 -0
- package/api_docs/ts/types/Topics.html +2 -0
- package/api_docs/ts/variables/Topics-1.html +2 -0
- package/dist/client/VonageClient.d.ts +74 -7
- package/dist/client/index.cjs +1325 -1082
- package/dist/client/index.mjs +1325 -1082
- package/dist/kotlin/JsUnions.d.ts +127 -101
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +19 -36
- package/dist/utils/ClientConfig.d.ts +45 -9
- package/dist/utils/ConversationEventBodies.d.ts +134 -0
- package/dist/utils/ConversationModels.d.ts +133 -18
- package/dist/utils/JsonUtils.d.ts +6 -0
- package/dist/utils/Option.d.ts +14 -0
- package/dist/utils/RequestParameterModels.d.ts +82 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/logging.d.ts +26 -2
- package/dist/vonageClientSDK.js +1264 -1064
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +1264 -1064
- package/package.json +4 -2
- package/typedoc.json +6 -3
- package/api_docs/ts/interfaces/ConversationEvent.html +0 -8
- package/api_docs/ts/interfaces/ConversationState.html +0 -198
- package/api_docs/ts/interfaces/From.html +0 -4
- package/api_docs/ts/interfaces/MemberState.html +0 -198
- package/api_docs/ts/interfaces/NonPersistentConversationEvent.html +0 -8
- package/api_docs/ts/interfaces/PersistentConversationEvent.html +0 -9
|
@@ -2,9 +2,9 @@ import { vonage } from './clientsdk-clientcore_js';
|
|
|
2
2
|
/**
|
|
3
3
|
* The EmbeddedInfo type
|
|
4
4
|
*
|
|
5
|
-
* @property kind
|
|
6
|
-
* @property memberId
|
|
7
|
-
* @property user
|
|
5
|
+
* @property kind The kind property of EmbeddedInfo
|
|
6
|
+
* @property memberId The memberId property of EmbeddedInfo
|
|
7
|
+
* @property user The user property of EmbeddedInfo
|
|
8
8
|
* @interface
|
|
9
9
|
*/
|
|
10
10
|
export type EmbeddedInfo = {
|
|
@@ -13,47 +13,55 @@ export type EmbeddedInfo = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The System type
|
|
15
15
|
*
|
|
16
|
-
* @property
|
|
16
|
+
* @property kind The kind property of System
|
|
17
17
|
* @interface
|
|
18
18
|
*/
|
|
19
19
|
export type System = {
|
|
20
20
|
kind: 'system';
|
|
21
21
|
} & typeof vonage.SystemJS;
|
|
22
22
|
/**
|
|
23
|
-
* A From is a union of EmbeddedInfo, System
|
|
24
|
-
* @interface
|
|
23
|
+
* A From is a discriminated union of {@link EmbeddedInfo}, {@link System}
|
|
25
24
|
*/
|
|
26
25
|
export type From = EmbeddedInfo | System;
|
|
27
26
|
/**
|
|
28
27
|
* The EphemeralConversationEvent type
|
|
29
28
|
*
|
|
30
|
-
* @property kind
|
|
31
|
-
* @property timestamp
|
|
32
|
-
* @property conversationId
|
|
33
|
-
* @property from
|
|
34
|
-
* @property body
|
|
29
|
+
* @property kind The kind property of EphemeralConversationEvent
|
|
30
|
+
* @property timestamp The timestamp property of EphemeralConversationEvent
|
|
31
|
+
* @property conversationId The conversationId property of EphemeralConversationEvent
|
|
32
|
+
* @property from The {@link From} property of EphemeralConversationEvent
|
|
33
|
+
* @property body The body property of EphemeralConversationEvent
|
|
35
34
|
* @interface
|
|
35
|
+
* @group Chat
|
|
36
36
|
*/
|
|
37
37
|
export type EphemeralConversationEvent = {
|
|
38
38
|
kind: 'ephemeral';
|
|
39
39
|
from: From;
|
|
40
40
|
} & vonage.EphemeralConversationEventJS;
|
|
41
41
|
/**
|
|
42
|
-
* A NonPersistentConversationEvent is a
|
|
43
|
-
* @
|
|
42
|
+
* A NonPersistentConversationEvent is a {@link EphemeralConversationEvent}
|
|
43
|
+
* @group Chat
|
|
44
44
|
*/
|
|
45
45
|
export type NonPersistentConversationEvent = EphemeralConversationEvent;
|
|
46
|
+
import { MessageAudioEventBody } from '../utils/ConversationEventBodies';
|
|
47
|
+
import { MessageFileEventBody } from '../utils/ConversationEventBodies';
|
|
48
|
+
import { MessageImageEventBody } from '../utils/ConversationEventBodies';
|
|
49
|
+
import { MessageLocationEventBody } from '../utils/ConversationEventBodies';
|
|
50
|
+
import { MessageTemplateEventBody } from '../utils/ConversationEventBodies';
|
|
51
|
+
import { MessageVCardEventBody } from '../utils/ConversationEventBodies';
|
|
52
|
+
import { MessageVideoEventBody } from '../utils/ConversationEventBodies';
|
|
46
53
|
/**
|
|
47
54
|
* The CustomConversationEvent type
|
|
48
55
|
*
|
|
49
|
-
* @property kind
|
|
50
|
-
* @property id
|
|
51
|
-
* @property timestamp
|
|
52
|
-
* @property conversationId
|
|
53
|
-
* @property from
|
|
54
|
-
* @property eventType
|
|
55
|
-
* @property body
|
|
56
|
+
* @property kind The kind property of CustomConversationEvent
|
|
57
|
+
* @property id The id property of CustomConversationEvent
|
|
58
|
+
* @property timestamp The timestamp property of CustomConversationEvent
|
|
59
|
+
* @property conversationId The conversationId property of CustomConversationEvent
|
|
60
|
+
* @property from The {@link From} property of CustomConversationEvent
|
|
61
|
+
* @property eventType The eventType property of CustomConversationEvent
|
|
62
|
+
* @property body The body property of CustomConversationEvent
|
|
56
63
|
* @interface
|
|
64
|
+
* @group Chat
|
|
57
65
|
*/
|
|
58
66
|
export type CustomConversationEvent = {
|
|
59
67
|
kind: 'custom';
|
|
@@ -62,13 +70,14 @@ export type CustomConversationEvent = {
|
|
|
62
70
|
/**
|
|
63
71
|
* The EventDeleteConversationEvent type
|
|
64
72
|
*
|
|
65
|
-
* @property kind
|
|
66
|
-
* @property id
|
|
67
|
-
* @property timestamp
|
|
68
|
-
* @property conversationId
|
|
69
|
-
* @property from
|
|
70
|
-
* @property body
|
|
73
|
+
* @property kind The kind property of EventDeleteConversationEvent
|
|
74
|
+
* @property id The id property of EventDeleteConversationEvent
|
|
75
|
+
* @property timestamp The timestamp property of EventDeleteConversationEvent
|
|
76
|
+
* @property conversationId The conversationId property of EventDeleteConversationEvent
|
|
77
|
+
* @property from The {@link From} property of EventDeleteConversationEvent
|
|
78
|
+
* @property body The body property of EventDeleteConversationEvent
|
|
71
79
|
* @interface
|
|
80
|
+
* @group Chat
|
|
72
81
|
*/
|
|
73
82
|
export type EventDeleteConversationEvent = {
|
|
74
83
|
kind: 'event:delete';
|
|
@@ -77,13 +86,14 @@ export type EventDeleteConversationEvent = {
|
|
|
77
86
|
/**
|
|
78
87
|
* The MemberInvitedEvent type
|
|
79
88
|
*
|
|
80
|
-
* @property kind
|
|
89
|
+
* @property kind The kind property of MemberInvitedEvent
|
|
81
90
|
* @property id The event id
|
|
82
91
|
* @property timestamp The event timestamp
|
|
83
92
|
* @property conversationId The conversation id
|
|
84
93
|
* @property from The event sender
|
|
85
94
|
* @property body The invited member
|
|
86
95
|
* @interface
|
|
96
|
+
* @group Chat
|
|
87
97
|
*/
|
|
88
98
|
export type MemberInvitedEvent = {
|
|
89
99
|
kind: 'member:invited';
|
|
@@ -92,13 +102,14 @@ export type MemberInvitedEvent = {
|
|
|
92
102
|
/**
|
|
93
103
|
* The MemberJoinedEvent type
|
|
94
104
|
*
|
|
95
|
-
* @property kind
|
|
96
|
-
* @property id
|
|
97
|
-
* @property timestamp
|
|
98
|
-
* @property conversationId
|
|
99
|
-
* @property from
|
|
100
|
-
* @property body
|
|
105
|
+
* @property kind The kind property of MemberJoinedEvent
|
|
106
|
+
* @property id The id property of MemberJoinedEvent
|
|
107
|
+
* @property timestamp The timestamp property of MemberJoinedEvent
|
|
108
|
+
* @property conversationId The conversationId property of MemberJoinedEvent
|
|
109
|
+
* @property from The {@link From} property of MemberJoinedEvent
|
|
110
|
+
* @property body The body property of MemberJoinedEvent
|
|
101
111
|
* @interface
|
|
112
|
+
* @group Chat
|
|
102
113
|
*/
|
|
103
114
|
export type MemberJoinedEvent = {
|
|
104
115
|
kind: 'member:joined';
|
|
@@ -107,13 +118,14 @@ export type MemberJoinedEvent = {
|
|
|
107
118
|
/**
|
|
108
119
|
* The MemberLeftEvent type
|
|
109
120
|
*
|
|
110
|
-
* @property kind
|
|
111
|
-
* @property id
|
|
112
|
-
* @property timestamp
|
|
113
|
-
* @property conversationId
|
|
114
|
-
* @property from
|
|
115
|
-
* @property body
|
|
121
|
+
* @property kind The kind property of MemberLeftEvent
|
|
122
|
+
* @property id The id property of MemberLeftEvent
|
|
123
|
+
* @property timestamp The timestamp property of MemberLeftEvent
|
|
124
|
+
* @property conversationId The conversationId property of MemberLeftEvent
|
|
125
|
+
* @property from The {@link From} property of MemberLeftEvent
|
|
126
|
+
* @property body The body property of MemberLeftEvent
|
|
116
127
|
* @interface
|
|
128
|
+
* @group Chat
|
|
117
129
|
*/
|
|
118
130
|
export type MemberLeftEvent = {
|
|
119
131
|
kind: 'member:left';
|
|
@@ -122,28 +134,31 @@ export type MemberLeftEvent = {
|
|
|
122
134
|
/**
|
|
123
135
|
* The MessageAudioEvent type
|
|
124
136
|
*
|
|
125
|
-
* @property kind
|
|
126
|
-
* @property id
|
|
127
|
-
* @property timestamp
|
|
128
|
-
* @property conversationId
|
|
129
|
-
* @property from
|
|
130
|
-
* @property body
|
|
137
|
+
* @property kind The kind property of MessageAudioEvent
|
|
138
|
+
* @property id The id property of MessageAudioEvent
|
|
139
|
+
* @property timestamp The timestamp property of MessageAudioEvent
|
|
140
|
+
* @property conversationId The conversationId property of MessageAudioEvent
|
|
141
|
+
* @property from The {@link From} property of MessageAudioEvent
|
|
142
|
+
* @property body The body property of MessageAudioEvent
|
|
131
143
|
* @interface
|
|
144
|
+
* @group Chat
|
|
132
145
|
*/
|
|
133
146
|
export type MessageAudioEvent = {
|
|
134
147
|
kind: 'message:audio';
|
|
135
148
|
from: From;
|
|
149
|
+
body: MessageAudioEventBody;
|
|
136
150
|
} & vonage.MessageAudioEventJS;
|
|
137
151
|
/**
|
|
138
152
|
* The MessageCustomEvent type
|
|
139
153
|
*
|
|
140
|
-
* @property kind
|
|
141
|
-
* @property id
|
|
142
|
-
* @property timestamp
|
|
143
|
-
* @property conversationId
|
|
144
|
-
* @property from
|
|
145
|
-
* @property body
|
|
154
|
+
* @property kind The kind property of MessageCustomEvent
|
|
155
|
+
* @property id The id property of MessageCustomEvent
|
|
156
|
+
* @property timestamp The timestamp property of MessageCustomEvent
|
|
157
|
+
* @property conversationId The conversationId property of MessageCustomEvent
|
|
158
|
+
* @property from The {@link From} property of MessageCustomEvent
|
|
159
|
+
* @property body The body property of MessageCustomEvent
|
|
146
160
|
* @interface
|
|
161
|
+
* @group Chat
|
|
147
162
|
*/
|
|
148
163
|
export type MessageCustomEvent = {
|
|
149
164
|
kind: 'message:custom';
|
|
@@ -152,73 +167,82 @@ export type MessageCustomEvent = {
|
|
|
152
167
|
/**
|
|
153
168
|
* The MessageFileEvent type
|
|
154
169
|
*
|
|
155
|
-
* @property kind
|
|
156
|
-
* @property id
|
|
157
|
-
* @property timestamp
|
|
158
|
-
* @property conversationId
|
|
159
|
-
* @property from
|
|
160
|
-
* @property body
|
|
170
|
+
* @property kind The kind property of MessageFileEvent
|
|
171
|
+
* @property id The id property of MessageFileEvent
|
|
172
|
+
* @property timestamp The timestamp property of MessageFileEvent
|
|
173
|
+
* @property conversationId The conversationId property of MessageFileEvent
|
|
174
|
+
* @property from The {@link From} property of MessageFileEvent
|
|
175
|
+
* @property body The body property of MessageFileEvent
|
|
161
176
|
* @interface
|
|
177
|
+
* @group Chat
|
|
162
178
|
*/
|
|
163
179
|
export type MessageFileEvent = {
|
|
164
180
|
kind: 'message:file';
|
|
165
181
|
from: From;
|
|
182
|
+
body: MessageFileEventBody;
|
|
166
183
|
} & vonage.MessageFileEventJS;
|
|
167
184
|
/**
|
|
168
185
|
* The MessageImageEvent type
|
|
169
186
|
*
|
|
170
|
-
* @property kind
|
|
171
|
-
* @property id
|
|
172
|
-
* @property timestamp
|
|
173
|
-
* @property conversationId
|
|
174
|
-
* @property from
|
|
175
|
-
* @property body
|
|
187
|
+
* @property kind The kind property of MessageImageEvent
|
|
188
|
+
* @property id The id property of MessageImageEvent
|
|
189
|
+
* @property timestamp The timestamp property of MessageImageEvent
|
|
190
|
+
* @property conversationId The conversationId property of MessageImageEvent
|
|
191
|
+
* @property from The {@link From} property of MessageImageEvent
|
|
192
|
+
* @property body The body property of MessageImageEvent
|
|
176
193
|
* @interface
|
|
194
|
+
* @group Chat
|
|
177
195
|
*/
|
|
178
196
|
export type MessageImageEvent = {
|
|
179
197
|
kind: 'message:image';
|
|
180
198
|
from: From;
|
|
199
|
+
body: MessageImageEventBody;
|
|
181
200
|
} & vonage.MessageImageEventJS;
|
|
182
201
|
/**
|
|
183
202
|
* The MessageLocationEvent type
|
|
184
203
|
*
|
|
185
|
-
* @property kind
|
|
186
|
-
* @property id
|
|
187
|
-
* @property timestamp
|
|
188
|
-
* @property conversationId
|
|
189
|
-
* @property from
|
|
190
|
-
* @property body
|
|
204
|
+
* @property kind The kind property of MessageLocationEvent
|
|
205
|
+
* @property id The id property of MessageLocationEvent
|
|
206
|
+
* @property timestamp The timestamp property of MessageLocationEvent
|
|
207
|
+
* @property conversationId The conversationId property of MessageLocationEvent
|
|
208
|
+
* @property from The {@link From} property of MessageLocationEvent
|
|
209
|
+
* @property body The body property of MessageLocationEvent
|
|
191
210
|
* @interface
|
|
211
|
+
* @group Chat
|
|
192
212
|
*/
|
|
193
213
|
export type MessageLocationEvent = {
|
|
194
214
|
kind: 'message:location';
|
|
195
215
|
from: From;
|
|
216
|
+
body: MessageLocationEventBody;
|
|
196
217
|
} & vonage.MessageLocationEventJS;
|
|
197
218
|
/**
|
|
198
219
|
* The MessageTemplateEvent type
|
|
199
220
|
*
|
|
200
|
-
* @property kind
|
|
201
|
-
* @property id
|
|
202
|
-
* @property timestamp
|
|
203
|
-
* @property conversationId
|
|
204
|
-
* @property from
|
|
205
|
-
* @property body
|
|
221
|
+
* @property kind The kind property of MessageTemplateEvent
|
|
222
|
+
* @property id The id property of MessageTemplateEvent
|
|
223
|
+
* @property timestamp The timestamp property of MessageTemplateEvent
|
|
224
|
+
* @property conversationId The conversationId property of MessageTemplateEvent
|
|
225
|
+
* @property from The {@link From} property of MessageTemplateEvent
|
|
226
|
+
* @property body The body property of MessageTemplateEvent
|
|
206
227
|
* @interface
|
|
228
|
+
* @group Chat
|
|
207
229
|
*/
|
|
208
230
|
export type MessageTemplateEvent = {
|
|
209
231
|
kind: 'message:template';
|
|
210
232
|
from: From;
|
|
233
|
+
body: MessageTemplateEventBody;
|
|
211
234
|
} & vonage.MessageTemplateEventJS;
|
|
212
235
|
/**
|
|
213
236
|
* The MessageTextEvent type
|
|
214
237
|
*
|
|
215
|
-
* @property kind
|
|
216
|
-
* @property id
|
|
217
|
-
* @property timestamp
|
|
218
|
-
* @property conversationId
|
|
219
|
-
* @property from
|
|
220
|
-
* @property body
|
|
238
|
+
* @property kind The kind property of MessageTextEvent
|
|
239
|
+
* @property id The id property of MessageTextEvent
|
|
240
|
+
* @property timestamp The timestamp property of MessageTextEvent
|
|
241
|
+
* @property conversationId The conversationId property of MessageTextEvent
|
|
242
|
+
* @property from The {@link From} property of MessageTextEvent
|
|
243
|
+
* @property body The body property of MessageTextEvent
|
|
221
244
|
* @interface
|
|
245
|
+
* @group Chat
|
|
222
246
|
*/
|
|
223
247
|
export type MessageTextEvent = {
|
|
224
248
|
kind: 'message:text';
|
|
@@ -227,50 +251,52 @@ export type MessageTextEvent = {
|
|
|
227
251
|
/**
|
|
228
252
|
* The MessageVCardEvent type
|
|
229
253
|
*
|
|
230
|
-
* @property kind
|
|
231
|
-
* @property id
|
|
232
|
-
* @property timestamp
|
|
233
|
-
* @property conversationId
|
|
234
|
-
* @property from
|
|
235
|
-
* @property body
|
|
254
|
+
* @property kind The kind property of MessageVCardEvent
|
|
255
|
+
* @property id The id property of MessageVCardEvent
|
|
256
|
+
* @property timestamp The timestamp property of MessageVCardEvent
|
|
257
|
+
* @property conversationId The conversationId property of MessageVCardEvent
|
|
258
|
+
* @property from The {@link From} property of MessageVCardEvent
|
|
259
|
+
* @property body The body property of MessageVCardEvent
|
|
236
260
|
* @interface
|
|
261
|
+
* @group Chat
|
|
237
262
|
*/
|
|
238
263
|
export type MessageVCardEvent = {
|
|
239
264
|
kind: 'message:vcard';
|
|
240
265
|
from: From;
|
|
266
|
+
body: MessageVCardEventBody;
|
|
241
267
|
} & vonage.MessageVCardEventJS;
|
|
242
268
|
/**
|
|
243
269
|
* The MessageVideoEvent type
|
|
244
270
|
*
|
|
245
|
-
* @property kind
|
|
246
|
-
* @property id
|
|
247
|
-
* @property timestamp
|
|
248
|
-
* @property conversationId
|
|
249
|
-
* @property from
|
|
250
|
-
* @property body
|
|
271
|
+
* @property kind The kind property of MessageVideoEvent
|
|
272
|
+
* @property id The id property of MessageVideoEvent
|
|
273
|
+
* @property timestamp The timestamp property of MessageVideoEvent
|
|
274
|
+
* @property conversationId The conversationId property of MessageVideoEvent
|
|
275
|
+
* @property from The {@link From} property of MessageVideoEvent
|
|
276
|
+
* @property body The body property of MessageVideoEvent
|
|
251
277
|
* @interface
|
|
278
|
+
* @group Chat
|
|
252
279
|
*/
|
|
253
280
|
export type MessageVideoEvent = {
|
|
254
281
|
kind: 'message:video';
|
|
255
282
|
from: From;
|
|
283
|
+
body: MessageVideoEventBody;
|
|
256
284
|
} & vonage.MessageVideoEventJS;
|
|
257
285
|
/**
|
|
258
|
-
* A PersistentConversationEvent is a union of CustomConversationEvent, EventDeleteConversationEvent, MemberInvitedEvent, MemberJoinedEvent, MemberLeftEvent, MessageAudioEvent, MessageCustomEvent, MessageFileEvent, MessageImageEvent, MessageLocationEvent, MessageTemplateEvent, MessageTextEvent, MessageVCardEvent, MessageVideoEvent
|
|
259
|
-
* @
|
|
286
|
+
* A PersistentConversationEvent is a discriminated union of {@link CustomConversationEvent}, {@link EventDeleteConversationEvent}, {@link MemberInvitedEvent}, {@link MemberJoinedEvent}, {@link MemberLeftEvent}, {@link MessageAudioEvent}, {@link MessageCustomEvent}, {@link MessageFileEvent}, {@link MessageImageEvent}, {@link MessageLocationEvent}, {@link MessageTemplateEvent}, {@link MessageTextEvent}, {@link MessageVCardEvent}, {@link MessageVideoEvent}
|
|
287
|
+
* @group Chat
|
|
260
288
|
*/
|
|
261
289
|
export type PersistentConversationEvent = CustomConversationEvent | EventDeleteConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageTemplateEvent | MessageTextEvent | MessageVCardEvent | MessageVideoEvent;
|
|
262
290
|
/**
|
|
263
|
-
* A ConversationEvent is a union of
|
|
264
|
-
* @
|
|
291
|
+
* A ConversationEvent is a union of {@link NonPersistentConversationEvent}, {@link PersistentConversationEvent}
|
|
292
|
+
* @group Chat
|
|
265
293
|
*/
|
|
266
294
|
export type ConversationEvent = NonPersistentConversationEvent | PersistentConversationEvent;
|
|
267
295
|
/**
|
|
268
|
-
* A ConversationState is a union of
|
|
269
|
-
* @interface
|
|
296
|
+
* A ConversationState is a union of 'ACTIVE', 'INACTIVE', 'DELETED'
|
|
270
297
|
*/
|
|
271
298
|
export type ConversationState = 'ACTIVE' | 'INACTIVE' | 'DELETED';
|
|
272
299
|
/**
|
|
273
|
-
* A MemberState is a union of
|
|
274
|
-
* @interface
|
|
300
|
+
* A MemberState is a union of 'INVITED', 'JOINED', 'LEFT', 'UNKNOWN'
|
|
275
301
|
*/
|
|
276
302
|
export type MemberState = 'INVITED' | 'JOINED' | 'LEFT' | 'UNKNOWN';
|
|
@@ -91,26 +91,12 @@ export declare namespace vonage {
|
|
|
91
91
|
equals(other: Nullable<any>): boolean;
|
|
92
92
|
} & vonage.FromJS;
|
|
93
93
|
interface ConversationEventJS {
|
|
94
|
-
readonly kind: string;
|
|
95
|
-
readonly timestamp: string;
|
|
96
|
-
readonly conversationId: string;
|
|
97
|
-
readonly from: vonage.FromJS;
|
|
98
94
|
}
|
|
99
95
|
interface NonPersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
100
|
-
readonly kind: string;
|
|
101
|
-
readonly timestamp: string;
|
|
102
|
-
readonly conversationId: string;
|
|
103
|
-
readonly from: vonage.FromJS;
|
|
104
96
|
}
|
|
105
97
|
interface PersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
106
|
-
readonly id: number;
|
|
107
|
-
readonly kind: string;
|
|
108
|
-
readonly timestamp: string;
|
|
109
|
-
readonly conversationId: string;
|
|
110
|
-
readonly from: vonage.FromJS;
|
|
111
98
|
}
|
|
112
99
|
interface MemberEventJS {
|
|
113
|
-
readonly body: vonage.MemberEventBodyJS;
|
|
114
100
|
}
|
|
115
101
|
class MemberEventBodyJS {
|
|
116
102
|
private constructor();
|
|
@@ -145,7 +131,6 @@ export declare namespace vonage {
|
|
|
145
131
|
get body(): vonage.MemberEventBodyJS;
|
|
146
132
|
}
|
|
147
133
|
interface JSONBodyEventJS {
|
|
148
|
-
readonly body: string;
|
|
149
134
|
}
|
|
150
135
|
class CustomConversationEventJS implements vonage.PersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
151
136
|
private constructor();
|
|
@@ -193,10 +178,8 @@ export declare namespace vonage {
|
|
|
193
178
|
}
|
|
194
179
|
export declare namespace vonage {
|
|
195
180
|
interface MessageEventJS {
|
|
196
|
-
readonly body: vonage.MessageEventBodyJS;
|
|
197
181
|
}
|
|
198
182
|
interface MessageEventBodyJS {
|
|
199
|
-
readonly deleted: Nullable<string>;
|
|
200
183
|
}
|
|
201
184
|
class MessageTextEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
202
185
|
private constructor();
|
|
@@ -205,10 +188,10 @@ export declare namespace vonage {
|
|
|
205
188
|
get timestamp(): string;
|
|
206
189
|
get conversationId(): string;
|
|
207
190
|
get from(): vonage.FromJS;
|
|
208
|
-
get body(): vonage.MessageTextEventJS.
|
|
191
|
+
get body(): vonage.MessageTextEventJS.MessageTextEventBody;
|
|
209
192
|
}
|
|
210
193
|
namespace MessageTextEventJS {
|
|
211
|
-
class
|
|
194
|
+
class MessageTextEventBody implements vonage.MessageEventBodyJS {
|
|
212
195
|
private constructor();
|
|
213
196
|
get text(): string;
|
|
214
197
|
get deleted(): Nullable<string>;
|
|
@@ -221,10 +204,10 @@ export declare namespace vonage {
|
|
|
221
204
|
get timestamp(): string;
|
|
222
205
|
get conversationId(): string;
|
|
223
206
|
get from(): vonage.FromJS;
|
|
224
|
-
get body(): vonage.MessageCustomEventJS.
|
|
207
|
+
get body(): vonage.MessageCustomEventJS.MessageCustomEventBody;
|
|
225
208
|
}
|
|
226
209
|
namespace MessageCustomEventJS {
|
|
227
|
-
class
|
|
210
|
+
class MessageCustomEventBody implements vonage.MessageEventBodyJS {
|
|
228
211
|
private constructor();
|
|
229
212
|
get customData(): string;
|
|
230
213
|
get deleted(): Nullable<string>;
|
|
@@ -237,10 +220,10 @@ export declare namespace vonage {
|
|
|
237
220
|
get timestamp(): string;
|
|
238
221
|
get conversationId(): string;
|
|
239
222
|
get from(): vonage.FromJS;
|
|
240
|
-
get body(): vonage.MessageAudioEventJS.
|
|
223
|
+
get body(): vonage.MessageAudioEventJS.MessageAudioEventBody;
|
|
241
224
|
}
|
|
242
225
|
namespace MessageAudioEventJS {
|
|
243
|
-
class
|
|
226
|
+
class MessageAudioEventBody implements vonage.MessageEventBodyJS {
|
|
244
227
|
private constructor();
|
|
245
228
|
get audioUrl(): string;
|
|
246
229
|
get deleted(): Nullable<string>;
|
|
@@ -253,10 +236,10 @@ export declare namespace vonage {
|
|
|
253
236
|
get timestamp(): string;
|
|
254
237
|
get conversationId(): string;
|
|
255
238
|
get from(): vonage.FromJS;
|
|
256
|
-
get body(): vonage.MessageVideoEventJS.
|
|
239
|
+
get body(): vonage.MessageVideoEventJS.MessageVideoEventBody;
|
|
257
240
|
}
|
|
258
241
|
namespace MessageVideoEventJS {
|
|
259
|
-
class
|
|
242
|
+
class MessageVideoEventBody implements vonage.MessageEventBodyJS {
|
|
260
243
|
private constructor();
|
|
261
244
|
get videoUrl(): string;
|
|
262
245
|
get deleted(): Nullable<string>;
|
|
@@ -269,10 +252,10 @@ export declare namespace vonage {
|
|
|
269
252
|
get timestamp(): string;
|
|
270
253
|
get conversationId(): string;
|
|
271
254
|
get from(): vonage.FromJS;
|
|
272
|
-
get body(): vonage.MessageImageEventJS.
|
|
255
|
+
get body(): vonage.MessageImageEventJS.MessageImageEventBody;
|
|
273
256
|
}
|
|
274
257
|
namespace MessageImageEventJS {
|
|
275
|
-
class
|
|
258
|
+
class MessageImageEventBody implements vonage.MessageEventBodyJS {
|
|
276
259
|
private constructor();
|
|
277
260
|
get imageUrl(): string;
|
|
278
261
|
get deleted(): Nullable<string>;
|
|
@@ -285,10 +268,10 @@ export declare namespace vonage {
|
|
|
285
268
|
get timestamp(): string;
|
|
286
269
|
get conversationId(): string;
|
|
287
270
|
get from(): vonage.FromJS;
|
|
288
|
-
get body(): vonage.MessageFileEventJS.
|
|
271
|
+
get body(): vonage.MessageFileEventJS.MessageFileEventBody;
|
|
289
272
|
}
|
|
290
273
|
namespace MessageFileEventJS {
|
|
291
|
-
class
|
|
274
|
+
class MessageFileEventBody implements vonage.MessageEventBodyJS {
|
|
292
275
|
private constructor();
|
|
293
276
|
get fileUrl(): string;
|
|
294
277
|
get deleted(): Nullable<string>;
|
|
@@ -301,10 +284,10 @@ export declare namespace vonage {
|
|
|
301
284
|
get timestamp(): string;
|
|
302
285
|
get conversationId(): string;
|
|
303
286
|
get from(): vonage.FromJS;
|
|
304
|
-
get body(): vonage.MessageVCardEventJS.
|
|
287
|
+
get body(): vonage.MessageVCardEventJS.MessageVCardEventBody;
|
|
305
288
|
}
|
|
306
289
|
namespace MessageVCardEventJS {
|
|
307
|
-
class
|
|
290
|
+
class MessageVCardEventBody implements vonage.MessageEventBodyJS {
|
|
308
291
|
private constructor();
|
|
309
292
|
get vcardUrl(): string;
|
|
310
293
|
get deleted(): Nullable<string>;
|
|
@@ -317,10 +300,10 @@ export declare namespace vonage {
|
|
|
317
300
|
get timestamp(): string;
|
|
318
301
|
get conversationId(): string;
|
|
319
302
|
get from(): vonage.FromJS;
|
|
320
|
-
get body(): vonage.MessageLocationEventJS.
|
|
303
|
+
get body(): vonage.MessageLocationEventJS.MessageLocationEventBody;
|
|
321
304
|
}
|
|
322
305
|
namespace MessageLocationEventJS {
|
|
323
|
-
class
|
|
306
|
+
class MessageLocationEventBody implements vonage.MessageEventBodyJS {
|
|
324
307
|
private constructor();
|
|
325
308
|
get location(): vonage.MessageLocationEventJS.Location;
|
|
326
309
|
get deleted(): Nullable<string>;
|
|
@@ -340,16 +323,16 @@ export declare namespace vonage {
|
|
|
340
323
|
get timestamp(): string;
|
|
341
324
|
get conversationId(): string;
|
|
342
325
|
get from(): vonage.FromJS;
|
|
343
|
-
get body(): vonage.MessageTemplateEventJS.
|
|
326
|
+
get body(): vonage.MessageTemplateEventJS.MessageTemplateEventBody;
|
|
344
327
|
}
|
|
345
328
|
namespace MessageTemplateEventJS {
|
|
346
|
-
class
|
|
329
|
+
class MessageTemplateEventBody implements vonage.MessageEventBodyJS {
|
|
347
330
|
private constructor();
|
|
348
331
|
get body(): any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */;
|
|
349
332
|
get template(): vonage.MessageTemplateEventJS.TemplateObject;
|
|
350
333
|
get whatsapp(): vonage.MessageTemplateEventJS.WhatsappObject;
|
|
351
334
|
get deleted(): Nullable<string>;
|
|
352
|
-
copy(body?: any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */): vonage.MessageTemplateEventJS.
|
|
335
|
+
copy(body?: any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */): vonage.MessageTemplateEventJS.MessageTemplateEventBody;
|
|
353
336
|
toString(): string;
|
|
354
337
|
hashCode(): number;
|
|
355
338
|
equals(other: Nullable<any>): boolean;
|
|
@@ -1,11 +1,56 @@
|
|
|
1
1
|
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
2
2
|
import vonage from '../utils/vonage';
|
|
3
3
|
import { LoggingLevel, VonageLogger, VonageLoggerJS } from './logging';
|
|
4
|
+
/**
|
|
5
|
+
* The datacenter region for the Client.
|
|
6
|
+
*
|
|
7
|
+
* It can be set either via {@link ClientInitConfigObject} or {@link ClientConfigObject}.
|
|
8
|
+
*/
|
|
4
9
|
export type ConfigRegion = vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name;
|
|
5
10
|
export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
|
|
11
|
+
/**
|
|
12
|
+
* An convenience union for {@link ConfigObjectJS} allowing to pass strings for enum properties.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Represents the configuration object for the client.
|
|
16
|
+
*
|
|
17
|
+
* The `ClientConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
18
|
+
* These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings.
|
|
19
|
+
*
|
|
20
|
+
* @property region The Vonage datacenter to use
|
|
21
|
+
* @property apiUrl The API URL of your chosen datacenter, if set overrides default from region
|
|
22
|
+
* @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region
|
|
23
|
+
* @property websocketPath The Path component appended to the Websocket URL
|
|
24
|
+
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
25
|
+
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
26
|
+
* @interface
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* [[include:snippet_SetClientConfig.txt]]
|
|
30
|
+
*/
|
|
6
31
|
export type ClientConfigObject = ConfigObjectJS | ({
|
|
7
32
|
region?: ConfigRegion;
|
|
8
33
|
} & Omit<ConfigObjectJS, 'region'>);
|
|
34
|
+
/**
|
|
35
|
+
* Represents the configuration object used to initialize the client.
|
|
36
|
+
*
|
|
37
|
+
* The `ClientInitConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
38
|
+
* These properties include all the ones in {@link ClientConfigObject} plus {@link loggingLevel}, {@link customLoggers} and {@link disableInternalLogger}.
|
|
39
|
+
*
|
|
40
|
+
* @property loggingLevel The Logging Level to use
|
|
41
|
+
* @property customLoggers A List of custom loggers
|
|
42
|
+
* @property disableInternalLogger Whether to enable the SDK internal logger
|
|
43
|
+
* @property region The Vonage datacenter to use
|
|
44
|
+
* @property apiUrl The API URL of your chosen datacenter, if set overrides default from region
|
|
45
|
+
* @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region
|
|
46
|
+
* @property websocketPath The Path component appended to the Websocket URL
|
|
47
|
+
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
48
|
+
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
49
|
+
* @interface
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* [[include:snippet_Logging.txt]]
|
|
53
|
+
*/
|
|
9
54
|
export type ClientInitConfigObject = InitConfigObjectJS | ({
|
|
10
55
|
region?: ConfigRegion;
|
|
11
56
|
loggingLevel?: LoggingLevel;
|
|
@@ -24,15 +69,6 @@ export interface InitConfigObjectJS extends ConfigObjectJS {
|
|
|
24
69
|
customLoggers?: Nullable<VonageLoggerJS[]>;
|
|
25
70
|
disableInternalLogger?: Nullable<boolean>;
|
|
26
71
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Represents the configuration object for the client.
|
|
29
|
-
*
|
|
30
|
-
* The `ClientConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
31
|
-
* These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* [[include:snippet_setClientConfig.txt]]
|
|
35
|
-
*/
|
|
36
72
|
export declare class ClientConfig extends vonage.CoreClientConfigJS {
|
|
37
73
|
/**
|
|
38
74
|
* Constructs a new instance of the class.
|