@vonage/client-sdk 1.5.0-alpha.0 → 1.5.0-alpha.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/README.md +2 -0
- package/api_docs/ts/assets/navigation.js +1 -1
- package/api_docs/ts/assets/search.js +1 -1
- package/api_docs/ts/classes/VonageClient.html +9 -2
- package/api_docs/ts/interfaces/CustomConversationEvent.html +15 -15
- package/api_docs/ts/interfaces/EmbeddedInfo.html +6 -6
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +11 -11
- package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +13 -13
- package/api_docs/ts/interfaces/MemberInvitedEvent.html +13 -13
- package/api_docs/ts/interfaces/MemberJoinedEvent.html +13 -13
- package/api_docs/ts/interfaces/MemberLeftEvent.html +13 -13
- package/api_docs/ts/interfaces/MessageAudioEvent.html +13 -11
- package/api_docs/ts/interfaces/MessageCustomEvent.html +15 -13
- package/api_docs/ts/interfaces/MessageFileEvent.html +13 -11
- package/api_docs/ts/interfaces/MessageImageEvent.html +13 -11
- package/api_docs/ts/interfaces/MessageLocationEvent.html +13 -11
- package/api_docs/ts/interfaces/MessageSeenEvent.html +14 -0
- package/api_docs/ts/interfaces/MessageTemplateEvent.html +14 -11
- package/api_docs/ts/interfaces/MessageTextEvent.html +15 -13
- package/api_docs/ts/interfaces/MessageVCardEvent.html +13 -11
- package/api_docs/ts/interfaces/MessageVideoEvent.html +13 -11
- package/api_docs/ts/interfaces/System.html +2 -4
- package/api_docs/ts/modules.html +2 -0
- package/api_docs/ts/types/MemberStatus.html +2 -0
- package/api_docs/ts/types/PersistentConversationEvent.html +1 -1
- package/dist/client/VonageClient.d.ts +13 -0
- package/dist/client/index.cjs +27374 -15020
- package/dist/client/index.mjs +27374 -15020
- package/dist/kotlin/JsUnions.d.ts +73 -36
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +60 -0
- package/dist/utils/ConversationEventBodies.d.ts +7 -0
- package/dist/vonageClientSDK.js +27274 -14937
- package/dist/vonageClientSDK.min.js +144 -1
- package/dist/vonageClientSDK.min.mjs +144 -1
- package/dist/vonageClientSDK.mjs +27274 -14937
- package/package.json +2 -1
- package/rollup.config.js +2 -1
|
@@ -7,18 +7,18 @@ import { vonage } from './clientsdk-clientcore_js';
|
|
|
7
7
|
* @property user The user property of EmbeddedInfo
|
|
8
8
|
* @interface
|
|
9
9
|
*/
|
|
10
|
-
export type EmbeddedInfo = {
|
|
10
|
+
export type EmbeddedInfo = Omit<vonage.EmbeddedInfoJS, 'kind'> & {
|
|
11
11
|
kind: 'embeddedInfo';
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
/**
|
|
14
14
|
* The System type
|
|
15
15
|
*
|
|
16
16
|
* @property kind The kind property of System
|
|
17
17
|
* @interface
|
|
18
18
|
*/
|
|
19
|
-
export type System = {
|
|
19
|
+
export type System = Omit<typeof vonage.SystemJS, 'kind'> & {
|
|
20
20
|
kind: 'system';
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
/**
|
|
23
23
|
* A From is a discriminated union of {@link EmbeddedInfo}, {@link System}
|
|
24
24
|
*/
|
|
@@ -34,20 +34,22 @@ export type From = EmbeddedInfo | System;
|
|
|
34
34
|
* @interface
|
|
35
35
|
* @group Chat
|
|
36
36
|
*/
|
|
37
|
-
export type EphemeralConversationEvent = {
|
|
37
|
+
export type EphemeralConversationEvent = Omit<vonage.EphemeralConversationEventJS, 'kind' | 'from'> & {
|
|
38
38
|
kind: 'ephemeral';
|
|
39
39
|
from: From;
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
41
|
/**
|
|
42
42
|
* A NonPersistentConversationEvent is a {@link EphemeralConversationEvent}
|
|
43
43
|
* @group Chat
|
|
44
44
|
*/
|
|
45
45
|
export type NonPersistentConversationEvent = EphemeralConversationEvent;
|
|
46
46
|
import { MessageAudioEventBody } from '../utils/ConversationEventBodies';
|
|
47
|
+
import { MemberStatus } from '../utils/ConversationEventBodies';
|
|
47
48
|
import { MessageFileEventBody } from '../utils/ConversationEventBodies';
|
|
48
49
|
import { MessageImageEventBody } from '../utils/ConversationEventBodies';
|
|
49
50
|
import { MessageLocationEventBody } from '../utils/ConversationEventBodies';
|
|
50
51
|
import { MessageTemplateEventBody } from '../utils/ConversationEventBodies';
|
|
52
|
+
import { MessageTextEventBody } from '../utils/ConversationEventBodies';
|
|
51
53
|
import { MessageVCardEventBody } from '../utils/ConversationEventBodies';
|
|
52
54
|
import { MessageVideoEventBody } from '../utils/ConversationEventBodies';
|
|
53
55
|
/**
|
|
@@ -63,10 +65,10 @@ import { MessageVideoEventBody } from '../utils/ConversationEventBodies';
|
|
|
63
65
|
* @interface
|
|
64
66
|
* @group Chat
|
|
65
67
|
*/
|
|
66
|
-
export type CustomConversationEvent = {
|
|
68
|
+
export type CustomConversationEvent = Omit<vonage.CustomConversationEventJS, 'kind' | 'from'> & {
|
|
67
69
|
kind: 'custom';
|
|
68
70
|
from: From;
|
|
69
|
-
}
|
|
71
|
+
};
|
|
70
72
|
/**
|
|
71
73
|
* The EventDeleteConversationEvent type
|
|
72
74
|
*
|
|
@@ -79,10 +81,10 @@ export type CustomConversationEvent = {
|
|
|
79
81
|
* @interface
|
|
80
82
|
* @group Chat
|
|
81
83
|
*/
|
|
82
|
-
export type EventDeleteConversationEvent = {
|
|
84
|
+
export type EventDeleteConversationEvent = Omit<vonage.EventDeleteConversationEventJS, 'kind' | 'from'> & {
|
|
83
85
|
kind: 'event:delete';
|
|
84
86
|
from: From;
|
|
85
|
-
}
|
|
87
|
+
};
|
|
86
88
|
/**
|
|
87
89
|
* The MemberInvitedEvent type
|
|
88
90
|
*
|
|
@@ -95,10 +97,10 @@ export type EventDeleteConversationEvent = {
|
|
|
95
97
|
* @interface
|
|
96
98
|
* @group Chat
|
|
97
99
|
*/
|
|
98
|
-
export type MemberInvitedEvent = {
|
|
100
|
+
export type MemberInvitedEvent = Omit<vonage.MemberInvitedEventJS, 'kind' | 'from'> & {
|
|
99
101
|
kind: 'member:invited';
|
|
100
102
|
from: From;
|
|
101
|
-
}
|
|
103
|
+
};
|
|
102
104
|
/**
|
|
103
105
|
* The MemberJoinedEvent type
|
|
104
106
|
*
|
|
@@ -111,10 +113,10 @@ export type MemberInvitedEvent = {
|
|
|
111
113
|
* @interface
|
|
112
114
|
* @group Chat
|
|
113
115
|
*/
|
|
114
|
-
export type MemberJoinedEvent = {
|
|
116
|
+
export type MemberJoinedEvent = Omit<vonage.MemberJoinedEventJS, 'kind' | 'from'> & {
|
|
115
117
|
kind: 'member:joined';
|
|
116
118
|
from: From;
|
|
117
|
-
}
|
|
119
|
+
};
|
|
118
120
|
/**
|
|
119
121
|
* The MemberLeftEvent type
|
|
120
122
|
*
|
|
@@ -127,10 +129,10 @@ export type MemberJoinedEvent = {
|
|
|
127
129
|
* @interface
|
|
128
130
|
* @group Chat
|
|
129
131
|
*/
|
|
130
|
-
export type MemberLeftEvent = {
|
|
132
|
+
export type MemberLeftEvent = Omit<vonage.MemberLeftEventJS, 'kind' | 'from'> & {
|
|
131
133
|
kind: 'member:left';
|
|
132
134
|
from: From;
|
|
133
|
-
}
|
|
135
|
+
};
|
|
134
136
|
/**
|
|
135
137
|
* The MessageAudioEvent type
|
|
136
138
|
*
|
|
@@ -140,14 +142,16 @@ export type MemberLeftEvent = {
|
|
|
140
142
|
* @property conversationId The conversationId property of MessageAudioEvent
|
|
141
143
|
* @property from The {@link From} property of MessageAudioEvent
|
|
142
144
|
* @property body The body property of MessageAudioEvent
|
|
145
|
+
* @property memberStatuses The memberStatuses property of MessageAudioEvent
|
|
143
146
|
* @interface
|
|
144
147
|
* @group Chat
|
|
145
148
|
*/
|
|
146
|
-
export type MessageAudioEvent = {
|
|
149
|
+
export type MessageAudioEvent = Omit<vonage.MessageAudioEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
147
150
|
kind: 'message:audio';
|
|
148
151
|
from: From;
|
|
149
152
|
body: MessageAudioEventBody;
|
|
150
|
-
|
|
153
|
+
memberStatuses: MemberStatus;
|
|
154
|
+
};
|
|
151
155
|
/**
|
|
152
156
|
* The MessageCustomEvent type
|
|
153
157
|
*
|
|
@@ -157,13 +161,15 @@ export type MessageAudioEvent = {
|
|
|
157
161
|
* @property conversationId The conversationId property of MessageCustomEvent
|
|
158
162
|
* @property from The {@link From} property of MessageCustomEvent
|
|
159
163
|
* @property body The body property of MessageCustomEvent
|
|
164
|
+
* @property memberStatuses The memberStatuses property of MessageCustomEvent
|
|
160
165
|
* @interface
|
|
161
166
|
* @group Chat
|
|
162
167
|
*/
|
|
163
|
-
export type MessageCustomEvent = {
|
|
168
|
+
export type MessageCustomEvent = Omit<vonage.MessageCustomEventJS, 'kind' | 'from' | 'memberStatuses'> & {
|
|
164
169
|
kind: 'message:custom';
|
|
165
170
|
from: From;
|
|
166
|
-
|
|
171
|
+
memberStatuses: MemberStatus;
|
|
172
|
+
};
|
|
167
173
|
/**
|
|
168
174
|
* The MessageFileEvent type
|
|
169
175
|
*
|
|
@@ -173,14 +179,16 @@ export type MessageCustomEvent = {
|
|
|
173
179
|
* @property conversationId The conversationId property of MessageFileEvent
|
|
174
180
|
* @property from The {@link From} property of MessageFileEvent
|
|
175
181
|
* @property body The body property of MessageFileEvent
|
|
182
|
+
* @property memberStatuses The memberStatuses property of MessageFileEvent
|
|
176
183
|
* @interface
|
|
177
184
|
* @group Chat
|
|
178
185
|
*/
|
|
179
|
-
export type MessageFileEvent = {
|
|
186
|
+
export type MessageFileEvent = Omit<vonage.MessageFileEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
180
187
|
kind: 'message:file';
|
|
181
188
|
from: From;
|
|
182
189
|
body: MessageFileEventBody;
|
|
183
|
-
|
|
190
|
+
memberStatuses: MemberStatus;
|
|
191
|
+
};
|
|
184
192
|
/**
|
|
185
193
|
* The MessageImageEvent type
|
|
186
194
|
*
|
|
@@ -190,14 +198,16 @@ export type MessageFileEvent = {
|
|
|
190
198
|
* @property conversationId The conversationId property of MessageImageEvent
|
|
191
199
|
* @property from The {@link From} property of MessageImageEvent
|
|
192
200
|
* @property body The body property of MessageImageEvent
|
|
201
|
+
* @property memberStatuses The memberStatuses property of MessageImageEvent
|
|
193
202
|
* @interface
|
|
194
203
|
* @group Chat
|
|
195
204
|
*/
|
|
196
|
-
export type MessageImageEvent = {
|
|
205
|
+
export type MessageImageEvent = Omit<vonage.MessageImageEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
197
206
|
kind: 'message:image';
|
|
198
207
|
from: From;
|
|
199
208
|
body: MessageImageEventBody;
|
|
200
|
-
|
|
209
|
+
memberStatuses: MemberStatus;
|
|
210
|
+
};
|
|
201
211
|
/**
|
|
202
212
|
* The MessageLocationEvent type
|
|
203
213
|
*
|
|
@@ -207,14 +217,32 @@ export type MessageImageEvent = {
|
|
|
207
217
|
* @property conversationId The conversationId property of MessageLocationEvent
|
|
208
218
|
* @property from The {@link From} property of MessageLocationEvent
|
|
209
219
|
* @property body The body property of MessageLocationEvent
|
|
220
|
+
* @property memberStatuses The memberStatuses property of MessageLocationEvent
|
|
210
221
|
* @interface
|
|
211
222
|
* @group Chat
|
|
212
223
|
*/
|
|
213
|
-
export type MessageLocationEvent = {
|
|
224
|
+
export type MessageLocationEvent = Omit<vonage.MessageLocationEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
214
225
|
kind: 'message:location';
|
|
215
226
|
from: From;
|
|
216
227
|
body: MessageLocationEventBody;
|
|
217
|
-
|
|
228
|
+
memberStatuses: MemberStatus;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* The MessageSeenEvent type
|
|
232
|
+
*
|
|
233
|
+
* @property kind The kind property of MessageSeenEvent
|
|
234
|
+
* @property id The id property of MessageSeenEvent
|
|
235
|
+
* @property timestamp The timestamp property of MessageSeenEvent
|
|
236
|
+
* @property conversationId The conversationId property of MessageSeenEvent
|
|
237
|
+
* @property from The {@link From} property of MessageSeenEvent
|
|
238
|
+
* @property body The body property of MessageSeenEvent
|
|
239
|
+
* @interface
|
|
240
|
+
* @group Chat
|
|
241
|
+
*/
|
|
242
|
+
export type MessageSeenEvent = Omit<vonage.MessageSeenEventJS, 'kind' | 'from'> & {
|
|
243
|
+
kind: 'message:seen';
|
|
244
|
+
from: From;
|
|
245
|
+
};
|
|
218
246
|
/**
|
|
219
247
|
* The MessageTemplateEvent type
|
|
220
248
|
*
|
|
@@ -223,15 +251,17 @@ export type MessageLocationEvent = {
|
|
|
223
251
|
* @property timestamp The timestamp property of MessageTemplateEvent
|
|
224
252
|
* @property conversationId The conversationId property of MessageTemplateEvent
|
|
225
253
|
* @property from The {@link From} property of MessageTemplateEvent
|
|
254
|
+
* @property memberStatuses The memberStatuses property of MessageTemplateEvent
|
|
226
255
|
* @property body The body property of MessageTemplateEvent
|
|
227
256
|
* @interface
|
|
228
257
|
* @group Chat
|
|
229
258
|
*/
|
|
230
|
-
export type MessageTemplateEvent = {
|
|
259
|
+
export type MessageTemplateEvent = Omit<vonage.MessageTemplateEventJS, 'kind' | 'from' | 'memberStatuses' | 'body'> & {
|
|
231
260
|
kind: 'message:template';
|
|
232
261
|
from: From;
|
|
262
|
+
memberStatuses: MemberStatus;
|
|
233
263
|
body: MessageTemplateEventBody;
|
|
234
|
-
}
|
|
264
|
+
};
|
|
235
265
|
/**
|
|
236
266
|
* The MessageTextEvent type
|
|
237
267
|
*
|
|
@@ -241,13 +271,16 @@ export type MessageTemplateEvent = {
|
|
|
241
271
|
* @property conversationId The conversationId property of MessageTextEvent
|
|
242
272
|
* @property from The {@link From} property of MessageTextEvent
|
|
243
273
|
* @property body The body property of MessageTextEvent
|
|
274
|
+
* @property memberStatuses The memberStatuses property of MessageTextEvent
|
|
244
275
|
* @interface
|
|
245
276
|
* @group Chat
|
|
246
277
|
*/
|
|
247
|
-
export type MessageTextEvent = {
|
|
278
|
+
export type MessageTextEvent = Omit<vonage.MessageTextEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
248
279
|
kind: 'message:text';
|
|
249
280
|
from: From;
|
|
250
|
-
|
|
281
|
+
body: MessageTextEventBody;
|
|
282
|
+
memberStatuses: MemberStatus;
|
|
283
|
+
};
|
|
251
284
|
/**
|
|
252
285
|
* The MessageVCardEvent type
|
|
253
286
|
*
|
|
@@ -257,14 +290,16 @@ export type MessageTextEvent = {
|
|
|
257
290
|
* @property conversationId The conversationId property of MessageVCardEvent
|
|
258
291
|
* @property from The {@link From} property of MessageVCardEvent
|
|
259
292
|
* @property body The body property of MessageVCardEvent
|
|
293
|
+
* @property memberStatuses The memberStatuses property of MessageVCardEvent
|
|
260
294
|
* @interface
|
|
261
295
|
* @group Chat
|
|
262
296
|
*/
|
|
263
|
-
export type MessageVCardEvent = {
|
|
297
|
+
export type MessageVCardEvent = Omit<vonage.MessageVCardEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
264
298
|
kind: 'message:vcard';
|
|
265
299
|
from: From;
|
|
266
300
|
body: MessageVCardEventBody;
|
|
267
|
-
|
|
301
|
+
memberStatuses: MemberStatus;
|
|
302
|
+
};
|
|
268
303
|
/**
|
|
269
304
|
* The MessageVideoEvent type
|
|
270
305
|
*
|
|
@@ -274,19 +309,21 @@ export type MessageVCardEvent = {
|
|
|
274
309
|
* @property conversationId The conversationId property of MessageVideoEvent
|
|
275
310
|
* @property from The {@link From} property of MessageVideoEvent
|
|
276
311
|
* @property body The body property of MessageVideoEvent
|
|
312
|
+
* @property memberStatuses The memberStatuses property of MessageVideoEvent
|
|
277
313
|
* @interface
|
|
278
314
|
* @group Chat
|
|
279
315
|
*/
|
|
280
|
-
export type MessageVideoEvent = {
|
|
316
|
+
export type MessageVideoEvent = Omit<vonage.MessageVideoEventJS, 'kind' | 'from' | 'body' | 'memberStatuses'> & {
|
|
281
317
|
kind: 'message:video';
|
|
282
318
|
from: From;
|
|
283
319
|
body: MessageVideoEventBody;
|
|
284
|
-
|
|
320
|
+
memberStatuses: MemberStatus;
|
|
321
|
+
};
|
|
285
322
|
/**
|
|
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}
|
|
323
|
+
* 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 MessageSeenEvent}, {@link MessageTemplateEvent}, {@link MessageTextEvent}, {@link MessageVCardEvent}, {@link MessageVideoEvent}
|
|
287
324
|
* @group Chat
|
|
288
325
|
*/
|
|
289
|
-
export type PersistentConversationEvent = CustomConversationEvent | EventDeleteConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageTemplateEvent | MessageTextEvent | MessageVCardEvent | MessageVideoEvent;
|
|
326
|
+
export type PersistentConversationEvent = CustomConversationEvent | EventDeleteConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageSeenEvent | MessageTemplateEvent | MessageTextEvent | MessageVCardEvent | MessageVideoEvent;
|
|
290
327
|
/**
|
|
291
328
|
* A ConversationEvent is a union of {@link NonPersistentConversationEvent}, {@link PersistentConversationEvent}
|
|
292
329
|
* @group Chat
|
|
@@ -48,6 +48,7 @@ export declare namespace vonage {
|
|
|
48
48
|
sendEphemeralEvent(cid: string, customData: string): Promise<string>;
|
|
49
49
|
sendCustomEvent(cid: string, eventType: string, customData: string): Promise<string>;
|
|
50
50
|
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
51
|
+
sendMessageSeenEvent(id: number, conversationId: string): Promise<any>;
|
|
51
52
|
updateConversation(conversationId: string, parameters: vonage.UpdateConversationParametersJS): Promise<any>;
|
|
52
53
|
setConfig(config: vonage.ConfigObjectJS): void;
|
|
53
54
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
@@ -72,6 +73,46 @@ export declare namespace vonage {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
export declare namespace vonage {
|
|
76
|
+
abstract class EventStateTypeJS {
|
|
77
|
+
private constructor();
|
|
78
|
+
static get SEEN(): vonage.EventStateTypeJS & {
|
|
79
|
+
get name(): "SEEN";
|
|
80
|
+
get ordinal(): 0;
|
|
81
|
+
};
|
|
82
|
+
static get DELIVERED(): vonage.EventStateTypeJS & {
|
|
83
|
+
get name(): "DELIVERED";
|
|
84
|
+
get ordinal(): 1;
|
|
85
|
+
};
|
|
86
|
+
static get SUBMITTED(): vonage.EventStateTypeJS & {
|
|
87
|
+
get name(): "SUBMITTED";
|
|
88
|
+
get ordinal(): 2;
|
|
89
|
+
};
|
|
90
|
+
static get REJECTED(): vonage.EventStateTypeJS & {
|
|
91
|
+
get name(): "REJECTED";
|
|
92
|
+
get ordinal(): 3;
|
|
93
|
+
};
|
|
94
|
+
static get UNDELIVERABLE(): vonage.EventStateTypeJS & {
|
|
95
|
+
get name(): "UNDELIVERABLE";
|
|
96
|
+
get ordinal(): 4;
|
|
97
|
+
};
|
|
98
|
+
static get NONE(): vonage.EventStateTypeJS & {
|
|
99
|
+
get name(): "NONE";
|
|
100
|
+
get ordinal(): 5;
|
|
101
|
+
};
|
|
102
|
+
static values(): Array<vonage.EventStateTypeJS>;
|
|
103
|
+
static valueOf(value: string): vonage.EventStateTypeJS;
|
|
104
|
+
get name(): "SEEN" | "DELIVERED" | "SUBMITTED" | "REJECTED" | "UNDELIVERABLE" | "NONE";
|
|
105
|
+
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5;
|
|
106
|
+
}
|
|
107
|
+
class EventStateJS {
|
|
108
|
+
private constructor();
|
|
109
|
+
get seenBy(): Nullable<string>;
|
|
110
|
+
get deliveredTo(): Nullable<string>;
|
|
111
|
+
get submittedTo(): Nullable<string>;
|
|
112
|
+
get rejectedBy(): Nullable<string>;
|
|
113
|
+
get undeliverableTo(): Nullable<string>;
|
|
114
|
+
get current(): string;
|
|
115
|
+
}
|
|
75
116
|
class EventsPageJS {
|
|
76
117
|
private constructor();
|
|
77
118
|
get events(): Array<vonage.PersistentConversationEventJS>;
|
|
@@ -161,6 +202,15 @@ export declare namespace vonage {
|
|
|
161
202
|
get from(): vonage.FromJS;
|
|
162
203
|
get body(): string;
|
|
163
204
|
}
|
|
205
|
+
class MessageSeenEventJS implements vonage.PersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
206
|
+
private constructor();
|
|
207
|
+
get kind(): string;
|
|
208
|
+
get id(): number;
|
|
209
|
+
get timestamp(): string;
|
|
210
|
+
get conversationId(): string;
|
|
211
|
+
get from(): vonage.FromJS;
|
|
212
|
+
get body(): string;
|
|
213
|
+
}
|
|
164
214
|
}
|
|
165
215
|
export declare namespace vonage {
|
|
166
216
|
interface TemplateObjectJS {
|
|
@@ -191,6 +241,7 @@ export declare namespace vonage {
|
|
|
191
241
|
get conversationId(): string;
|
|
192
242
|
get from(): vonage.FromJS;
|
|
193
243
|
get body(): vonage.MessageTextEventJS.MessageTextEventBody;
|
|
244
|
+
get memberStatuses(): any;
|
|
194
245
|
}
|
|
195
246
|
namespace MessageTextEventJS {
|
|
196
247
|
class MessageTextEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -207,6 +258,7 @@ export declare namespace vonage {
|
|
|
207
258
|
get conversationId(): string;
|
|
208
259
|
get from(): vonage.FromJS;
|
|
209
260
|
get body(): vonage.MessageCustomEventJS.MessageCustomEventBody;
|
|
261
|
+
get memberStatuses(): any;
|
|
210
262
|
}
|
|
211
263
|
namespace MessageCustomEventJS {
|
|
212
264
|
class MessageCustomEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -223,6 +275,7 @@ export declare namespace vonage {
|
|
|
223
275
|
get conversationId(): string;
|
|
224
276
|
get from(): vonage.FromJS;
|
|
225
277
|
get body(): vonage.MessageAudioEventJS.MessageAudioEventBody;
|
|
278
|
+
get memberStatuses(): any;
|
|
226
279
|
}
|
|
227
280
|
namespace MessageAudioEventJS {
|
|
228
281
|
class MessageAudioEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -239,6 +292,7 @@ export declare namespace vonage {
|
|
|
239
292
|
get conversationId(): string;
|
|
240
293
|
get from(): vonage.FromJS;
|
|
241
294
|
get body(): vonage.MessageVideoEventJS.MessageVideoEventBody;
|
|
295
|
+
get memberStatuses(): any;
|
|
242
296
|
}
|
|
243
297
|
namespace MessageVideoEventJS {
|
|
244
298
|
class MessageVideoEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -255,6 +309,7 @@ export declare namespace vonage {
|
|
|
255
309
|
get conversationId(): string;
|
|
256
310
|
get from(): vonage.FromJS;
|
|
257
311
|
get body(): vonage.MessageImageEventJS.MessageImageEventBody;
|
|
312
|
+
get memberStatuses(): any;
|
|
258
313
|
}
|
|
259
314
|
namespace MessageImageEventJS {
|
|
260
315
|
class MessageImageEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -271,6 +326,7 @@ export declare namespace vonage {
|
|
|
271
326
|
get conversationId(): string;
|
|
272
327
|
get from(): vonage.FromJS;
|
|
273
328
|
get body(): vonage.MessageFileEventJS.MessageFileEventBody;
|
|
329
|
+
get memberStatuses(): any;
|
|
274
330
|
}
|
|
275
331
|
namespace MessageFileEventJS {
|
|
276
332
|
class MessageFileEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -287,6 +343,7 @@ export declare namespace vonage {
|
|
|
287
343
|
get conversationId(): string;
|
|
288
344
|
get from(): vonage.FromJS;
|
|
289
345
|
get body(): vonage.MessageVCardEventJS.MessageVCardEventBody;
|
|
346
|
+
get memberStatuses(): any;
|
|
290
347
|
}
|
|
291
348
|
namespace MessageVCardEventJS {
|
|
292
349
|
class MessageVCardEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -303,6 +360,7 @@ export declare namespace vonage {
|
|
|
303
360
|
get conversationId(): string;
|
|
304
361
|
get from(): vonage.FromJS;
|
|
305
362
|
get body(): vonage.MessageLocationEventJS.MessageLocationEventBody;
|
|
363
|
+
get memberStatuses(): any;
|
|
306
364
|
}
|
|
307
365
|
namespace MessageLocationEventJS {
|
|
308
366
|
class MessageLocationEventBody implements vonage.MessageEventBodyJS {
|
|
@@ -325,6 +383,7 @@ export declare namespace vonage {
|
|
|
325
383
|
get timestamp(): string;
|
|
326
384
|
get conversationId(): string;
|
|
327
385
|
get from(): vonage.FromJS;
|
|
386
|
+
get memberStatus(): any;
|
|
328
387
|
get body(): vonage.MessageTemplateEventJS.MessageTemplateEventBody;
|
|
329
388
|
}
|
|
330
389
|
namespace MessageTemplateEventJS {
|
|
@@ -706,6 +765,7 @@ export declare namespace vonage {
|
|
|
706
765
|
sendEphemeralEvent(cid: string, customData: string): Promise<string>;
|
|
707
766
|
sendCustomEvent(cid: string, eventType: string, customData: string): Promise<string>;
|
|
708
767
|
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
768
|
+
sendMessageSeenEvent(id: number, conversationId: string): Promise<any>;
|
|
709
769
|
updateConversation(conversationId: string, parameters: vonage.UpdateConversationParametersJS): Promise<any>;
|
|
710
770
|
setConfig(config: vonage.ConfigObjectJS): void;
|
|
711
771
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
|
+
export type EventState = Omit<vonage.EventStateJS, 'current'> & {
|
|
3
|
+
current: Lowercase<typeof vonage.EventStateTypeJS.prototype.name>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Member status is a map of member id to {@link EventState}
|
|
7
|
+
*/
|
|
8
|
+
export type MemberStatus = Record<string, EventState>;
|
|
2
9
|
/**
|
|
3
10
|
* The {@link MessageAudioEvent} Body type
|
|
4
11
|
*
|