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

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;