@vonage/client-sdk 1.2.0-alpha.11 → 1.2.0-alpha.13

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.
@@ -1,50 +1,67 @@
1
1
  import { vonage } from './clientsdk-clientcore_js';
2
- import { From } from './From';
3
2
  /**
4
- * A MemberInvitedEvent is a ConversationEvent with a type of 'member:invited'
3
+ * The EmbeddedInfo type
5
4
  *
6
- * @property id The event id
7
- * @property timestamp The event timestamp
8
- * @property conversationId The conversation id
9
- * @property from The event sender
10
- * @property body The invited member
5
+ * @property kind the kind property of the EmbeddedInfo
6
+ * @property memberId the memberId property of the EmbeddedInfo
7
+ * @property user the user property of the EmbeddedInfo
11
8
  * @interface
12
9
  */
13
- export type MemberInvitedEvent = {
14
- kind: 'member:invited';
15
- from: From;
16
- } & vonage.MemberInvitedEventJS;
10
+ export type EmbeddedInfo = {
11
+ kind: 'embeddedInfo';
12
+ } & vonage.EmbeddedInfoJS;
17
13
  /**
18
- * A MemberJoinedEvent is a ConversationEvent with a type of 'member:joined'
14
+ * The System type
19
15
  *
20
- * @property id the id property of the MemberJoinedEvent
21
- * @property timestamp the timestamp property of the MemberJoinedEvent
22
- * @property conversationId the conversationId property of the MemberJoinedEvent
23
- * @property from the from property of the MemberJoinedEvent
24
- * @property body the body property of the MemberJoinedEvent
16
+ * @property kind the kind property of the System
25
17
  * @interface
26
18
  */
27
- export type MemberJoinedEvent = {
28
- kind: 'member:joined';
19
+ export type System = {
20
+ kind: 'system';
21
+ } & typeof vonage.SystemJS;
22
+ /**
23
+ * A From is a union of EmbeddedInfo, System
24
+ * @interface
25
+ */
26
+ export type From = EmbeddedInfo | System;
27
+ /**
28
+ * The EphemeralConversationEvent type
29
+ *
30
+ * @property kind the kind property of the EphemeralConversationEvent
31
+ * @property timestamp the timestamp property of the EphemeralConversationEvent
32
+ * @property conversationId the conversationId property of the EphemeralConversationEvent
33
+ * @property from the from property of the EphemeralConversationEvent
34
+ * @property body the body property of the EphemeralConversationEvent
35
+ * @interface
36
+ */
37
+ export type EphemeralConversationEvent = {
38
+ kind: 'ephemeral';
29
39
  from: From;
30
- } & vonage.MemberJoinedEventJS;
40
+ } & vonage.EphemeralConversationEventJS;
31
41
  /**
32
- * A MemberLeftEvent is a ConversationEvent with a type of 'member:left'
42
+ * A NonPersistentConversationEvent is a union of EphemeralConversationEvent
43
+ * @interface
44
+ */
45
+ export type NonPersistentConversationEvent = EphemeralConversationEvent;
46
+ /**
47
+ * The AudioMessageEvent type
33
48
  *
34
- * @property id the id property of the MemberLeftEvent
35
- * @property timestamp the timestamp property of the MemberLeftEvent
36
- * @property conversationId the conversationId property of the MemberLeftEvent
37
- * @property from the from property of the MemberLeftEvent
38
- * @property body the body property of the MemberLeftEvent
49
+ * @property kind the kind property of the AudioMessageEvent
50
+ * @property id the id property of the AudioMessageEvent
51
+ * @property timestamp the timestamp property of the AudioMessageEvent
52
+ * @property conversationId the conversationId property of the AudioMessageEvent
53
+ * @property from the from property of the AudioMessageEvent
54
+ * @property body the body property of the AudioMessageEvent
39
55
  * @interface
40
56
  */
41
- export type MemberLeftEvent = {
42
- kind: 'member:left';
57
+ export type AudioMessageEvent = {
58
+ kind: 'message:audio';
43
59
  from: From;
44
- } & vonage.MemberLeftEventJS;
60
+ } & vonage.AudioMessageEventJS;
45
61
  /**
46
- * A CustomConversationEvent is a ConversationEvent with a type of 'custom'
62
+ * The CustomConversationEvent type
47
63
  *
64
+ * @property kind the kind property of the CustomConversationEvent
48
65
  * @property id the id property of the CustomConversationEvent
49
66
  * @property timestamp the timestamp property of the CustomConversationEvent
50
67
  * @property conversationId the conversationId property of the CustomConversationEvent
@@ -58,22 +75,9 @@ export type CustomConversationEvent = {
58
75
  from: From;
59
76
  } & vonage.CustomConversationEventJS;
60
77
  /**
61
- * A TextMessageEvent is a ConversationEvent with a type of 'message:text'
62
- *
63
- * @property id the id property of the TextMessageEvent
64
- * @property timestamp the timestamp property of the TextMessageEvent
65
- * @property conversationId the conversationId property of the TextMessageEvent
66
- * @property from the from property of the TextMessageEvent
67
- * @property body the body property of the TextMessageEvent
68
- * @interface
69
- */
70
- export type TextMessageEvent = {
71
- kind: 'message:text';
72
- from: From;
73
- } & vonage.TextMessageEventJS;
74
- /**
75
- * A CustomMessageEvent is a ConversationEvent with a type of 'message:custom'
78
+ * The CustomMessageEvent type
76
79
  *
80
+ * @property kind the kind property of the CustomMessageEvent
77
81
  * @property id the id property of the CustomMessageEvent
78
82
  * @property timestamp the timestamp property of the CustomMessageEvent
79
83
  * @property conversationId the conversationId property of the CustomMessageEvent
@@ -86,36 +90,24 @@ export type CustomMessageEvent = {
86
90
  from: From;
87
91
  } & vonage.CustomMessageEventJS;
88
92
  /**
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'
93
+ * The FileMessageEvent type
104
94
  *
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
95
+ * @property kind the kind property of the FileMessageEvent
96
+ * @property id the id property of the FileMessageEvent
97
+ * @property timestamp the timestamp property of the FileMessageEvent
98
+ * @property conversationId the conversationId property of the FileMessageEvent
99
+ * @property from the from property of the FileMessageEvent
100
+ * @property body the body property of the FileMessageEvent
110
101
  * @interface
111
102
  */
112
- export type VideoMessageEvent = {
113
- kind: 'message:video';
103
+ export type FileMessageEvent = {
104
+ kind: 'message:file';
114
105
  from: From;
115
- } & vonage.VideoMessageEventJS;
106
+ } & vonage.FileMessageEventJS;
116
107
  /**
117
- * A ImageMessageEvent is a ConversationEvent with a type of 'message:image'
108
+ * The ImageMessageEvent type
118
109
  *
110
+ * @property kind the kind property of the ImageMessageEvent
119
111
  * @property id the id property of the ImageMessageEvent
120
112
  * @property timestamp the timestamp property of the ImageMessageEvent
121
113
  * @property conversationId the conversationId property of the ImageMessageEvent
@@ -128,50 +120,69 @@ export type ImageMessageEvent = {
128
120
  from: From;
129
121
  } & vonage.ImageMessageEventJS;
130
122
  /**
131
- * A FileMessageEvent is a ConversationEvent with a type of 'message:file'
123
+ * The LocationMessageEvent type
132
124
  *
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
125
+ * @property kind the kind property of the LocationMessageEvent
126
+ * @property id the id property of the LocationMessageEvent
127
+ * @property timestamp the timestamp property of the LocationMessageEvent
128
+ * @property conversationId the conversationId property of the LocationMessageEvent
129
+ * @property from the from property of the LocationMessageEvent
130
+ * @property body the body property of the LocationMessageEvent
138
131
  * @interface
139
132
  */
140
- export type FileMessageEvent = {
141
- kind: 'message:file';
133
+ export type LocationMessageEvent = {
134
+ kind: 'message:location';
142
135
  from: From;
143
- } & vonage.FileMessageEventJS;
136
+ } & vonage.LocationMessageEventJS;
144
137
  /**
145
- * A VCardMessageEvent is a ConversationEvent with a type of 'message:vcard'
138
+ * The MemberInvitedEvent type
146
139
  *
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
140
+ * @property kind the kind property of the MemberInvitedEvent
141
+ * @property id The event id
142
+ * @property timestamp The event timestamp
143
+ * @property conversationId The conversation id
144
+ * @property from The event sender
145
+ * @property body The invited member
152
146
  * @interface
153
147
  */
154
- export type VCardMessageEvent = {
155
- kind: 'message:vcard';
148
+ export type MemberInvitedEvent = {
149
+ kind: 'member:invited';
156
150
  from: From;
157
- } & vonage.VCardMessageEventJS;
151
+ } & vonage.MemberInvitedEventJS;
158
152
  /**
159
- * A LocationMessageEvent is a ConversationEvent with a type of 'message:location'
153
+ * The MemberJoinedEvent type
160
154
  *
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
155
+ * @property kind the kind property of the MemberJoinedEvent
156
+ * @property id the id property of the MemberJoinedEvent
157
+ * @property timestamp the timestamp property of the MemberJoinedEvent
158
+ * @property conversationId the conversationId property of the MemberJoinedEvent
159
+ * @property from the from property of the MemberJoinedEvent
160
+ * @property body the body property of the MemberJoinedEvent
166
161
  * @interface
167
162
  */
168
- export type LocationMessageEvent = {
169
- kind: 'message:location';
163
+ export type MemberJoinedEvent = {
164
+ kind: 'member:joined';
170
165
  from: From;
171
- } & vonage.LocationMessageEventJS;
166
+ } & vonage.MemberJoinedEventJS;
172
167
  /**
173
- * A TemplateMessageEvent is a ConversationEvent with a type of 'message:template'
168
+ * The MemberLeftEvent type
174
169
  *
170
+ * @property kind the kind property of the MemberLeftEvent
171
+ * @property id the id property of the MemberLeftEvent
172
+ * @property timestamp the timestamp property of the MemberLeftEvent
173
+ * @property conversationId the conversationId property of the MemberLeftEvent
174
+ * @property from the from property of the MemberLeftEvent
175
+ * @property body the body property of the MemberLeftEvent
176
+ * @interface
177
+ */
178
+ export type MemberLeftEvent = {
179
+ kind: 'member:left';
180
+ from: From;
181
+ } & vonage.MemberLeftEventJS;
182
+ /**
183
+ * The TemplateMessageEvent type
184
+ *
185
+ * @property kind the kind property of the TemplateMessageEvent
175
186
  * @property id the id property of the TemplateMessageEvent
176
187
  * @property timestamp the timestamp property of the TemplateMessageEvent
177
188
  * @property conversationId the conversationId property of the TemplateMessageEvent
@@ -183,4 +194,58 @@ export type TemplateMessageEvent = {
183
194
  kind: 'message:template';
184
195
  from: From;
185
196
  } & vonage.TemplateMessageEventJS;
186
- export type ConversationEvent = MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | CustomConversationEvent | TextMessageEvent | CustomMessageEvent | AudioMessageEvent | VideoMessageEvent | ImageMessageEvent | FileMessageEvent | VCardMessageEvent | LocationMessageEvent | TemplateMessageEvent;
197
+ /**
198
+ * The TextMessageEvent type
199
+ *
200
+ * @property kind the kind property of the TextMessageEvent
201
+ * @property id the id property of the TextMessageEvent
202
+ * @property timestamp the timestamp property of the TextMessageEvent
203
+ * @property conversationId the conversationId property of the TextMessageEvent
204
+ * @property from the from property of the TextMessageEvent
205
+ * @property body the body property of the TextMessageEvent
206
+ * @interface
207
+ */
208
+ export type TextMessageEvent = {
209
+ kind: 'message:text';
210
+ from: From;
211
+ } & vonage.TextMessageEventJS;
212
+ /**
213
+ * The VCardMessageEvent type
214
+ *
215
+ * @property kind the kind property of the VCardMessageEvent
216
+ * @property id the id property of the VCardMessageEvent
217
+ * @property timestamp the timestamp property of the VCardMessageEvent
218
+ * @property conversationId the conversationId property of the VCardMessageEvent
219
+ * @property from the from property of the VCardMessageEvent
220
+ * @property body the body property of the VCardMessageEvent
221
+ * @interface
222
+ */
223
+ export type VCardMessageEvent = {
224
+ kind: 'message:vcard';
225
+ from: From;
226
+ } & vonage.VCardMessageEventJS;
227
+ /**
228
+ * The VideoMessageEvent type
229
+ *
230
+ * @property kind the kind property of the VideoMessageEvent
231
+ * @property id the id property of the VideoMessageEvent
232
+ * @property timestamp the timestamp property of the VideoMessageEvent
233
+ * @property conversationId the conversationId property of the VideoMessageEvent
234
+ * @property from the from property of the VideoMessageEvent
235
+ * @property body the body property of the VideoMessageEvent
236
+ * @interface
237
+ */
238
+ export type VideoMessageEvent = {
239
+ kind: 'message:video';
240
+ from: From;
241
+ } & vonage.VideoMessageEventJS;
242
+ /**
243
+ * A PersistentConversationEvent is a union of AudioMessageEvent, CustomConversationEvent, CustomMessageEvent, FileMessageEvent, ImageMessageEvent, LocationMessageEvent, MemberInvitedEvent, MemberJoinedEvent, MemberLeftEvent, TemplateMessageEvent, TextMessageEvent, VCardMessageEvent, VideoMessageEvent
244
+ * @interface
245
+ */
246
+ export type PersistentConversationEvent = AudioMessageEvent | CustomConversationEvent | CustomMessageEvent | FileMessageEvent | ImageMessageEvent | LocationMessageEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | TemplateMessageEvent | TextMessageEvent | VCardMessageEvent | VideoMessageEvent;
247
+ /**
248
+ * A ConversationEvent is a union of NonPersistentConversationEventJS, PersistentConversationEventJS
249
+ * @interface
250
+ */
251
+ export type ConversationEvent = NonPersistentConversationEvent | PersistentConversationEvent;
@@ -36,6 +36,7 @@ export declare namespace vonage {
36
36
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
37
37
  sendTextMessage(cid: string, text: string): Promise<string>;
38
38
  sendCustomMessage(cid: string, customData: string): Promise<string>;
39
+ sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
39
40
  setConfig(config: vonage.CoreClientConfigJS): void;
40
41
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
41
42
  deleteSession(): Promise<any>;
@@ -61,7 +62,7 @@ export declare namespace vonage {
61
62
  export declare namespace vonage {
62
63
  class EventsPageJS {
63
64
  private constructor();
64
- get events(): Array<vonage.ConversationEventJS>;
65
+ get events(): Array<vonage.PersistentConversationEventJS>;
65
66
  get previousCursor(): Nullable<string>;
66
67
  get nextCursor(): Nullable<string>;
67
68
  }
@@ -79,88 +80,116 @@ export declare namespace vonage {
79
80
  }
80
81
  const SystemJS: {
81
82
  get kind(): string;
83
+ toString(): string;
84
+ hashCode(): number;
85
+ equals(other: Nullable<any>): boolean;
82
86
  readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
83
87
  } & vonage.FromJS;
84
88
  interface ConversationEventJS {
85
- readonly id: Nullable<number>;
89
+ readonly kind: string;
86
90
  readonly timestamp: string;
87
91
  readonly conversationId: string;
88
- readonly from: Nullable<vonage.FromJS>;
92
+ readonly from: vonage.FromJS;
89
93
  readonly __doNotUseOrImplementIt: {
90
94
  readonly "vonage.ConversationEventJS": unique symbol;
91
95
  };
92
96
  }
93
- interface MemberEventJS extends vonage.ConversationEventJS {
94
- readonly body: vonage.MemberEventBodyJS;
95
- readonly id: Nullable<number>;
97
+ interface NonPersistentConversationEventJS extends vonage.ConversationEventJS {
98
+ readonly kind: string;
96
99
  readonly timestamp: string;
97
100
  readonly conversationId: string;
98
- readonly from: Nullable<vonage.FromJS>;
101
+ readonly from: vonage.FromJS;
99
102
  readonly __doNotUseOrImplementIt: {
100
- readonly "vonage.MemberEventJS": unique symbol;
103
+ readonly "vonage.NonPersistentConversationEventJS": unique symbol;
104
+ } & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
105
+ }
106
+ interface PersistentConversationEventJS extends vonage.ConversationEventJS {
107
+ readonly id: number;
108
+ readonly kind: string;
109
+ readonly timestamp: string;
110
+ readonly conversationId: string;
111
+ readonly from: vonage.FromJS;
112
+ readonly __doNotUseOrImplementIt: {
113
+ readonly "vonage.PersistentConversationEventJS": unique symbol;
101
114
  } & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
102
115
  }
116
+ interface MemberEventJS {
117
+ readonly body: vonage.MemberEventBodyJS;
118
+ readonly __doNotUseOrImplementIt: {
119
+ readonly "vonage.MemberEventJS": unique symbol;
120
+ };
121
+ }
103
122
  class MemberEventBodyJS {
104
123
  private constructor();
105
124
  get memberId(): string;
106
125
  get user(): vonage.UserJS;
107
126
  }
108
- class MemberInvitedEventJS implements vonage.MemberEventJS {
127
+ class MemberInvitedEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
109
128
  private constructor();
129
+ get kind(): string;
110
130
  get id(): number;
111
131
  get timestamp(): string;
112
132
  get conversationId(): string;
113
133
  get from(): vonage.FromJS;
114
134
  get body(): vonage.MemberEventBodyJS;
115
- readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
135
+ readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
116
136
  }
117
- class MemberJoinedEventJS implements vonage.MemberEventJS {
137
+ class MemberJoinedEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
118
138
  private constructor();
139
+ get kind(): string;
119
140
  get id(): number;
120
141
  get timestamp(): string;
121
142
  get conversationId(): string;
122
143
  get from(): vonage.FromJS;
123
144
  get body(): vonage.MemberEventBodyJS;
124
- readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
145
+ readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
125
146
  }
126
- class MemberLeftEventJS implements vonage.MemberEventJS {
147
+ class MemberLeftEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
127
148
  private constructor();
149
+ get kind(): string;
128
150
  get id(): number;
129
151
  get timestamp(): string;
130
152
  get conversationId(): string;
131
153
  get from(): vonage.FromJS;
132
154
  get body(): vonage.MemberEventBodyJS;
133
- readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"];
155
+ readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
134
156
  }
135
- class CustomConversationEventJS implements vonage.ConversationEventJS {
157
+ class CustomConversationEventJS implements vonage.PersistentConversationEventJS {
136
158
  private constructor();
159
+ get kind(): string;
137
160
  get id(): number;
138
161
  get timestamp(): string;
139
162
  get conversationId(): string;
140
163
  get from(): vonage.FromJS;
141
164
  get eventType(): Nullable<string>;
142
165
  get body(): string;
143
- readonly __doNotUseOrImplementIt: vonage.ConversationEventJS["__doNotUseOrImplementIt"];
166
+ readonly __doNotUseOrImplementIt: vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
167
+ }
168
+ class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS {
169
+ private constructor();
170
+ get kind(): string;
171
+ get timestamp(): string;
172
+ get conversationId(): string;
173
+ get from(): vonage.FromJS;
174
+ get body(): string;
175
+ readonly __doNotUseOrImplementIt: vonage.NonPersistentConversationEventJS["__doNotUseOrImplementIt"];
144
176
  }
145
177
  }
146
178
  export declare namespace vonage {
147
- interface MessageEventJS extends vonage.ConversationEventJS {
148
- readonly id: number;
149
- readonly timestamp: string;
150
- readonly conversationId: string;
151
- readonly from: Nullable<vonage.FromJS>;
179
+ interface MessageEventJS {
152
180
  readonly __doNotUseOrImplementIt: {
153
181
  readonly "vonage.MessageEventJS": unique symbol;
154
- } & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
182
+ };
155
183
  }
156
- class TextMessageEventJS implements vonage.MessageEventJS {
184
+ class TextMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
157
185
  private constructor();
186
+ get kind(): string;
158
187
  get id(): number;
159
188
  get timestamp(): string;
160
189
  get conversationId(): string;
161
190
  get from(): vonage.FromJS;
162
191
  get body(): vonage.TextMessageEventJS.Body;
163
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
192
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
164
193
  }
165
194
  namespace TextMessageEventJS {
166
195
  class Body {
@@ -168,14 +197,15 @@ export declare namespace vonage {
168
197
  get text(): string;
169
198
  }
170
199
  }
171
- class CustomMessageEventJS implements vonage.MessageEventJS {
200
+ class CustomMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
172
201
  private constructor();
202
+ get kind(): string;
173
203
  get id(): number;
174
204
  get timestamp(): string;
175
205
  get conversationId(): string;
176
206
  get from(): vonage.FromJS;
177
207
  get body(): vonage.CustomMessageEventJS.Body;
178
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
208
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
179
209
  }
180
210
  namespace CustomMessageEventJS {
181
211
  class Body {
@@ -183,14 +213,15 @@ export declare namespace vonage {
183
213
  get customData(): string;
184
214
  }
185
215
  }
186
- class AudioMessageEventJS implements vonage.MessageEventJS {
216
+ class AudioMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
187
217
  private constructor();
218
+ get kind(): string;
188
219
  get id(): number;
189
220
  get timestamp(): string;
190
221
  get conversationId(): string;
191
222
  get from(): vonage.FromJS;
192
223
  get body(): vonage.AudioMessageEventJS.Body;
193
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
224
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
194
225
  }
195
226
  namespace AudioMessageEventJS {
196
227
  class Body {
@@ -198,14 +229,15 @@ export declare namespace vonage {
198
229
  get audioUrl(): string;
199
230
  }
200
231
  }
201
- class VideoMessageEventJS implements vonage.MessageEventJS {
232
+ class VideoMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
202
233
  private constructor();
234
+ get kind(): string;
203
235
  get id(): number;
204
236
  get timestamp(): string;
205
237
  get conversationId(): string;
206
238
  get from(): vonage.FromJS;
207
239
  get body(): vonage.VideoMessageEventJS.Body;
208
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
240
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
209
241
  }
210
242
  namespace VideoMessageEventJS {
211
243
  class Body {
@@ -213,14 +245,15 @@ export declare namespace vonage {
213
245
  get videoUrl(): string;
214
246
  }
215
247
  }
216
- class ImageMessageEventJS implements vonage.MessageEventJS {
248
+ class ImageMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
217
249
  private constructor();
250
+ get kind(): string;
218
251
  get id(): number;
219
252
  get timestamp(): string;
220
253
  get conversationId(): string;
221
254
  get from(): vonage.FromJS;
222
255
  get body(): vonage.ImageMessageEventJS.Body;
223
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
256
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
224
257
  }
225
258
  namespace ImageMessageEventJS {
226
259
  class Body {
@@ -228,14 +261,15 @@ export declare namespace vonage {
228
261
  get imageUrl(): string;
229
262
  }
230
263
  }
231
- class FileMessageEventJS implements vonage.MessageEventJS {
264
+ class FileMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
232
265
  private constructor();
266
+ get kind(): string;
233
267
  get id(): number;
234
268
  get timestamp(): string;
235
269
  get conversationId(): string;
236
270
  get from(): vonage.FromJS;
237
271
  get body(): vonage.FileMessageEventJS.Body;
238
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
272
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
239
273
  }
240
274
  namespace FileMessageEventJS {
241
275
  class Body {
@@ -243,14 +277,15 @@ export declare namespace vonage {
243
277
  get fileUrl(): string;
244
278
  }
245
279
  }
246
- class VCardMessageEventJS implements vonage.MessageEventJS {
280
+ class VCardMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
247
281
  private constructor();
282
+ get kind(): string;
248
283
  get id(): number;
249
284
  get timestamp(): string;
250
285
  get conversationId(): string;
251
286
  get from(): vonage.FromJS;
252
287
  get body(): vonage.VCardMessageEventJS.Body;
253
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
288
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
254
289
  }
255
290
  namespace VCardMessageEventJS {
256
291
  class Body {
@@ -258,14 +293,15 @@ export declare namespace vonage {
258
293
  get vcardUrl(): string;
259
294
  }
260
295
  }
261
- class LocationMessageEventJS implements vonage.MessageEventJS {
296
+ class LocationMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
262
297
  private constructor();
298
+ get kind(): string;
263
299
  get id(): number;
264
300
  get timestamp(): string;
265
301
  get conversationId(): string;
266
302
  get from(): vonage.FromJS;
267
303
  get body(): vonage.LocationMessageEventJS.Body;
268
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
304
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
269
305
  }
270
306
  namespace LocationMessageEventJS {
271
307
  class Body {
@@ -280,14 +316,15 @@ export declare namespace vonage {
280
316
  get address(): Nullable<string>;
281
317
  }
282
318
  }
283
- class TemplateMessageEventJS implements vonage.MessageEventJS {
319
+ class TemplateMessageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
284
320
  private constructor();
321
+ get kind(): string;
285
322
  get id(): number;
286
323
  get timestamp(): string;
287
324
  get conversationId(): string;
288
325
  get from(): vonage.FromJS;
289
326
  get body(): vonage.TemplateMessageEventJS.Body;
290
- readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"];
327
+ readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
291
328
  }
292
329
  namespace TemplateMessageEventJS {
293
330
  class Body {
@@ -608,6 +645,7 @@ export declare namespace vonage {
608
645
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
609
646
  sendTextMessage(cid: string, text: string): Promise<string>;
610
647
  sendCustomMessage(cid: string, customData: string): Promise<string>;
648
+ sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
611
649
  setConfig(config: vonage.CoreClientConfigJS): void;
612
650
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
613
651
  deleteSession(): Promise<any>;
@@ -1,5 +1,5 @@
1
1
  export { ClientConfig, ConfigRegion } from './ClientConfig';
2
2
  export { LoggingLevel } from './logging';
3
3
  export * from './ConversationModels';
4
- export * from '../kotlin/ConversationEvents';
4
+ export * from '../kotlin/JsUnions';
5
5
  export * from './ErrorModels';