@vonage/client-sdk 1.2.0-alpha.0 → 1.2.0-alpha.10

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.
@@ -43,19 +43,20 @@ export type MemberLeftEvent = {
43
43
  from: From;
44
44
  } & vonage.MemberLeftEventJS;
45
45
  /**
46
- * A UnknownEvent is a ConversationEvent with a type of 'unknown'
46
+ * A CustomConversationEvent is a ConversationEvent with a type of 'custom'
47
47
  *
48
- * @property type the type property of the UnknownEvent
49
- * @property id the id property of the UnknownEvent
50
- * @property timestamp the timestamp property of the UnknownEvent
51
- * @property conversationId the conversationId property of the UnknownEvent
52
- * @property from the from property of the UnknownEvent
48
+ * @property id the id property of the CustomConversationEvent
49
+ * @property timestamp the timestamp property of the CustomConversationEvent
50
+ * @property conversationId the conversationId property of the CustomConversationEvent
51
+ * @property from the from property of the CustomConversationEvent
52
+ * @property eventType the eventType property of the CustomConversationEvent
53
+ * @property body the body property of the CustomConversationEvent
53
54
  * @interface
54
55
  */
55
- export type UnknownEvent = {
56
- kind: 'unknown';
56
+ export type CustomConversationEvent = {
57
+ kind: 'custom';
57
58
  from: From;
58
- } & vonage.UnknownEventJS;
59
+ } & vonage.CustomConversationEventJS;
59
60
  /**
60
61
  * A TextMessageEvent is a ConversationEvent with a type of 'message:text'
61
62
  *
@@ -84,4 +85,102 @@ export type CustomMessageEvent = {
84
85
  kind: 'message:custom';
85
86
  from: From;
86
87
  } & vonage.CustomMessageEventJS;
87
- export type ConversationEvent = MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | UnknownEvent | TextMessageEvent | CustomMessageEvent;
88
+ /**
89
+ * A AudioMessageEvent is a ConversationEvent with a type of 'message:audio'
90
+ *
91
+ * @property id the id property of the AudioMessageEvent
92
+ * @property timestamp the timestamp property of the AudioMessageEvent
93
+ * @property conversationId the conversationId property of the AudioMessageEvent
94
+ * @property from the from property of the AudioMessageEvent
95
+ * @property body the body property of the AudioMessageEvent
96
+ * @interface
97
+ */
98
+ export type AudioMessageEvent = {
99
+ kind: 'message:audio';
100
+ from: From;
101
+ } & vonage.AudioMessageEventJS;
102
+ /**
103
+ * A VideoMessageEvent is a ConversationEvent with a type of 'message:video'
104
+ *
105
+ * @property id the id property of the VideoMessageEvent
106
+ * @property timestamp the timestamp property of the VideoMessageEvent
107
+ * @property conversationId the conversationId property of the VideoMessageEvent
108
+ * @property from the from property of the VideoMessageEvent
109
+ * @property body the body property of the VideoMessageEvent
110
+ * @interface
111
+ */
112
+ export type VideoMessageEvent = {
113
+ kind: 'message:video';
114
+ from: From;
115
+ } & vonage.VideoMessageEventJS;
116
+ /**
117
+ * A ImageMessageEvent is a ConversationEvent with a type of 'message:image'
118
+ *
119
+ * @property id the id property of the ImageMessageEvent
120
+ * @property timestamp the timestamp property of the ImageMessageEvent
121
+ * @property conversationId the conversationId property of the ImageMessageEvent
122
+ * @property from the from property of the ImageMessageEvent
123
+ * @property body the body property of the ImageMessageEvent
124
+ * @interface
125
+ */
126
+ export type ImageMessageEvent = {
127
+ kind: 'message:image';
128
+ from: From;
129
+ } & vonage.ImageMessageEventJS;
130
+ /**
131
+ * A FileMessageEvent is a ConversationEvent with a type of 'message:file'
132
+ *
133
+ * @property id the id property of the FileMessageEvent
134
+ * @property timestamp the timestamp property of the FileMessageEvent
135
+ * @property conversationId the conversationId property of the FileMessageEvent
136
+ * @property from the from property of the FileMessageEvent
137
+ * @property body the body property of the FileMessageEvent
138
+ * @interface
139
+ */
140
+ export type FileMessageEvent = {
141
+ kind: 'message:file';
142
+ from: From;
143
+ } & vonage.FileMessageEventJS;
144
+ /**
145
+ * A VCardMessageEvent is a ConversationEvent with a type of 'message:vcard'
146
+ *
147
+ * @property id the id property of the VCardMessageEvent
148
+ * @property timestamp the timestamp property of the VCardMessageEvent
149
+ * @property conversationId the conversationId property of the VCardMessageEvent
150
+ * @property from the from property of the VCardMessageEvent
151
+ * @property body the body property of the VCardMessageEvent
152
+ * @interface
153
+ */
154
+ export type VCardMessageEvent = {
155
+ kind: 'message:vcard';
156
+ from: From;
157
+ } & vonage.VCardMessageEventJS;
158
+ /**
159
+ * A LocationMessageEvent is a ConversationEvent with a type of 'message:location'
160
+ *
161
+ * @property id the id property of the LocationMessageEvent
162
+ * @property timestamp the timestamp property of the LocationMessageEvent
163
+ * @property conversationId the conversationId property of the LocationMessageEvent
164
+ * @property from the from property of the LocationMessageEvent
165
+ * @property body the body property of the LocationMessageEvent
166
+ * @interface
167
+ */
168
+ export type LocationMessageEvent = {
169
+ kind: 'message:location';
170
+ from: From;
171
+ } & vonage.LocationMessageEventJS;
172
+ /**
173
+ * A TemplateMessageEvent is a ConversationEvent with a type of 'message:template'
174
+ *
175
+ * @property id the id property of the TemplateMessageEvent
176
+ * @property timestamp the timestamp property of the TemplateMessageEvent
177
+ * @property conversationId the conversationId property of the TemplateMessageEvent
178
+ * @property from the from property of the TemplateMessageEvent
179
+ * @property body the body property of the TemplateMessageEvent
180
+ * @interface
181
+ */
182
+ export type TemplateMessageEvent = {
183
+ kind: 'message:template';
184
+ from: From;
185
+ } & vonage.TemplateMessageEventJS;
186
+ export type ConversationEvent = MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | CustomConversationEvent | TextMessageEvent | CustomMessageEvent | AudioMessageEvent | VideoMessageEvent | ImageMessageEvent | FileMessageEvent | VCardMessageEvent | LocationMessageEvent | TemplateMessageEvent;
@@ -27,9 +27,9 @@ export declare namespace vonage {
27
27
  inviteToConversation(cid: string, username: string): Promise<string>;
28
28
  leaveConversation(cid: string): Promise<any>;
29
29
  deleteConversation(cid: string): Promise<any>;
30
- getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>;
30
+ getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData: boolean): Promise<vonage.ConversationsPageJS>;
31
31
  getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
32
- getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.EventsPageJS>;
32
+ getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
33
33
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
34
34
  sendTextMessage(cid: string, text: string): Promise<string>;
35
35
  sendCustomMessage(cid: string, customData: string): Promise<string>;
@@ -129,13 +129,14 @@ export declare namespace vonage {
129
129
  get body(): vonage.MemberEventBodyJS;
130
130
  readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
131
131
  }
132
- class UnknownEventJS implements vonage.ConversationEventJS {
132
+ class CustomConversationEventJS implements vonage.ConversationEventJS {
133
133
  private constructor();
134
- get type(): string;
135
- get id(): Nullable<number>;
134
+ get id(): number;
136
135
  get timestamp(): string;
137
136
  get conversationId(): string;
138
137
  get from(): vonage.FromJS;
138
+ get eventType(): Nullable<string>;
139
+ get body(): string;
139
140
  readonly __doNotUseOrImplementIt: vonage.ConversationEventJS["__doNotUseOrImplementIt"];
140
141
  }
141
142
  }
@@ -179,6 +180,128 @@ export declare namespace vonage {
179
180
  get customData(): string;
180
181
  }
181
182
  }
183
+ class AudioMessageEventJS implements vonage.MessageEventJS {
184
+ private constructor();
185
+ get id(): number;
186
+ get timestamp(): string;
187
+ get conversationId(): string;
188
+ get from(): vonage.FromJS;
189
+ get body(): vonage.AudioMessageEventJS.Body;
190
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
191
+ }
192
+ namespace AudioMessageEventJS {
193
+ class Body {
194
+ private constructor();
195
+ get audioUrl(): string;
196
+ }
197
+ }
198
+ class VideoMessageEventJS implements vonage.MessageEventJS {
199
+ private constructor();
200
+ get id(): number;
201
+ get timestamp(): string;
202
+ get conversationId(): string;
203
+ get from(): vonage.FromJS;
204
+ get body(): vonage.VideoMessageEventJS.Body;
205
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
206
+ }
207
+ namespace VideoMessageEventJS {
208
+ class Body {
209
+ private constructor();
210
+ get videoUrl(): string;
211
+ }
212
+ }
213
+ class ImageMessageEventJS implements vonage.MessageEventJS {
214
+ private constructor();
215
+ get id(): number;
216
+ get timestamp(): string;
217
+ get conversationId(): string;
218
+ get from(): vonage.FromJS;
219
+ get body(): vonage.ImageMessageEventJS.Body;
220
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
221
+ }
222
+ namespace ImageMessageEventJS {
223
+ class Body {
224
+ private constructor();
225
+ get imageUrl(): string;
226
+ }
227
+ }
228
+ class FileMessageEventJS implements vonage.MessageEventJS {
229
+ private constructor();
230
+ get id(): number;
231
+ get timestamp(): string;
232
+ get conversationId(): string;
233
+ get from(): vonage.FromJS;
234
+ get body(): vonage.FileMessageEventJS.Body;
235
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
236
+ }
237
+ namespace FileMessageEventJS {
238
+ class Body {
239
+ private constructor();
240
+ get fileUrl(): string;
241
+ }
242
+ }
243
+ class VCardMessageEventJS implements vonage.MessageEventJS {
244
+ private constructor();
245
+ get id(): number;
246
+ get timestamp(): string;
247
+ get conversationId(): string;
248
+ get from(): vonage.FromJS;
249
+ get body(): vonage.VCardMessageEventJS.Body;
250
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
251
+ }
252
+ namespace VCardMessageEventJS {
253
+ class Body {
254
+ private constructor();
255
+ get vcardUrl(): string;
256
+ }
257
+ }
258
+ class LocationMessageEventJS implements vonage.MessageEventJS {
259
+ private constructor();
260
+ get id(): number;
261
+ get timestamp(): string;
262
+ get conversationId(): string;
263
+ get from(): vonage.FromJS;
264
+ get body(): vonage.LocationMessageEventJS.Body;
265
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
266
+ }
267
+ namespace LocationMessageEventJS {
268
+ class Body {
269
+ private constructor();
270
+ get location(): vonage.LocationMessageEventJS.Location;
271
+ }
272
+ class Location {
273
+ private constructor();
274
+ get longitude(): string;
275
+ get latitude(): string;
276
+ get name(): Nullable<string>;
277
+ get address(): Nullable<string>;
278
+ }
279
+ }
280
+ class TemplateMessageEventJS implements vonage.MessageEventJS {
281
+ private constructor();
282
+ get id(): number;
283
+ get timestamp(): string;
284
+ get conversationId(): string;
285
+ get from(): vonage.FromJS;
286
+ get body(): vonage.TemplateMessageEventJS.Body;
287
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
288
+ }
289
+ namespace TemplateMessageEventJS {
290
+ class Body {
291
+ private constructor();
292
+ get body(): any/* com.vonage.clientcore.core.api.models.TemplateMessageEvent.Body */;
293
+ get template(): vonage.TemplateMessageEventJS.TemplateObject;
294
+ copy(body?: any/* com.vonage.clientcore.core.api.models.TemplateMessageEvent.Body */): vonage.TemplateMessageEventJS.Body;
295
+ toString(): string;
296
+ hashCode(): number;
297
+ equals(other: Nullable<any>): boolean;
298
+ }
299
+ class TemplateObject {
300
+ private constructor();
301
+ get name(): string;
302
+ get parameters(): Nullable<Array<string>>;
303
+ }
304
+ }
182
305
  }
183
306
  export declare namespace vonage {
184
307
  abstract class PresentingOrderJS {
@@ -476,9 +599,9 @@ export declare namespace vonage {
476
599
  inviteToConversation(cid: string, username: string): Promise<string>;
477
600
  leaveConversation(cid: string): Promise<any>;
478
601
  deleteConversation(cid: string): Promise<any>;
479
- getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>;
602
+ getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData?: boolean): Promise<vonage.ConversationsPageJS>;
480
603
  getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
481
- getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.EventsPageJS>;
604
+ getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
482
605
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
483
606
  sendTextMessage(cid: string, text: string): Promise<string>;
484
607
  sendCustomMessage(cid: string, customData: string): Promise<string>;