@simplex-chat/types 0.2.0 → 0.2.1

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.
@@ -0,0 +1,416 @@
1
+ // API Responses
2
+ // This file is generated automatically.
3
+
4
+ import * as T from "./types"
5
+
6
+ export type ChatResponse =
7
+ | CR.AcceptingContactRequest
8
+ | CR.ActiveUser
9
+ | CR.ChatItemNotChanged
10
+ | CR.ChatItemReaction
11
+ | CR.ChatItemUpdated
12
+ | CR.ChatItemsDeleted
13
+ | CR.ChatRunning
14
+ | CR.ChatStarted
15
+ | CR.ChatStopped
16
+ | CR.CmdOk
17
+ | CR.ChatCmdError
18
+ | CR.ConnectionPlan
19
+ | CR.ContactAlreadyExists
20
+ | CR.ContactConnectionDeleted
21
+ | CR.ContactDeleted
22
+ | CR.ContactPrefsUpdated
23
+ | CR.ContactRequestRejected
24
+ | CR.ContactsList
25
+ | CR.GroupDeletedUser
26
+ | CR.GroupLink
27
+ | CR.GroupLinkCreated
28
+ | CR.GroupLinkDeleted
29
+ | CR.GroupCreated
30
+ | CR.GroupMembers
31
+ | CR.GroupUpdated
32
+ | CR.GroupsList
33
+ | CR.Invitation
34
+ | CR.LeftMemberUser
35
+ | CR.MemberAccepted
36
+ | CR.MembersBlockedForAllUser
37
+ | CR.MembersRoleUser
38
+ | CR.NewChatItems
39
+ | CR.RcvFileAccepted
40
+ | CR.RcvFileAcceptedSndCancelled
41
+ | CR.RcvFileCancelled
42
+ | CR.SentConfirmation
43
+ | CR.SentGroupInvitation
44
+ | CR.SentInvitation
45
+ | CR.SndFileCancelled
46
+ | CR.UserAcceptedGroupSent
47
+ | CR.UserContactLink
48
+ | CR.UserContactLinkCreated
49
+ | CR.UserContactLinkDeleted
50
+ | CR.UserContactLinkUpdated
51
+ | CR.UserDeletedMembers
52
+ | CR.UserProfileUpdated
53
+ | CR.UserProfileNoChange
54
+ | CR.UsersList
55
+ | CR.Interface
56
+
57
+ export namespace CR {
58
+ export type Tag =
59
+ | "acceptingContactRequest"
60
+ | "activeUser"
61
+ | "chatItemNotChanged"
62
+ | "chatItemReaction"
63
+ | "chatItemUpdated"
64
+ | "chatItemsDeleted"
65
+ | "chatRunning"
66
+ | "chatStarted"
67
+ | "chatStopped"
68
+ | "cmdOk"
69
+ | "chatCmdError"
70
+ | "connectionPlan"
71
+ | "contactAlreadyExists"
72
+ | "contactConnectionDeleted"
73
+ | "contactDeleted"
74
+ | "contactPrefsUpdated"
75
+ | "contactRequestRejected"
76
+ | "contactsList"
77
+ | "groupDeletedUser"
78
+ | "groupLink"
79
+ | "groupLinkCreated"
80
+ | "groupLinkDeleted"
81
+ | "groupCreated"
82
+ | "groupMembers"
83
+ | "groupUpdated"
84
+ | "groupsList"
85
+ | "invitation"
86
+ | "leftMemberUser"
87
+ | "memberAccepted"
88
+ | "membersBlockedForAllUser"
89
+ | "membersRoleUser"
90
+ | "newChatItems"
91
+ | "rcvFileAccepted"
92
+ | "rcvFileAcceptedSndCancelled"
93
+ | "rcvFileCancelled"
94
+ | "sentConfirmation"
95
+ | "sentGroupInvitation"
96
+ | "sentInvitation"
97
+ | "sndFileCancelled"
98
+ | "userAcceptedGroupSent"
99
+ | "userContactLink"
100
+ | "userContactLinkCreated"
101
+ | "userContactLinkDeleted"
102
+ | "userContactLinkUpdated"
103
+ | "userDeletedMembers"
104
+ | "userProfileUpdated"
105
+ | "userProfileNoChange"
106
+ | "usersList"
107
+ | string
108
+
109
+ export interface Interface {
110
+ type: Tag
111
+ }
112
+
113
+ export interface AcceptingContactRequest extends Interface {
114
+ type: "acceptingContactRequest"
115
+ user: T.User
116
+ contact: T.Contact
117
+ }
118
+
119
+ export interface ActiveUser extends Interface {
120
+ type: "activeUser"
121
+ user: T.User
122
+ }
123
+
124
+ export interface ChatItemNotChanged extends Interface {
125
+ type: "chatItemNotChanged"
126
+ user: T.User
127
+ chatItem: T.AChatItem
128
+ }
129
+
130
+ export interface ChatItemReaction extends Interface {
131
+ type: "chatItemReaction"
132
+ user: T.User
133
+ added: boolean
134
+ reaction: T.ACIReaction
135
+ }
136
+
137
+ export interface ChatItemUpdated extends Interface {
138
+ type: "chatItemUpdated"
139
+ user: T.User
140
+ chatItem: T.AChatItem
141
+ }
142
+
143
+ export interface ChatItemsDeleted extends Interface {
144
+ type: "chatItemsDeleted"
145
+ user: T.User
146
+ chatItemDeletions: T.ChatItemDeletion[]
147
+ byUser: boolean
148
+ timed: boolean
149
+ }
150
+
151
+ export interface ChatRunning extends Interface {
152
+ type: "chatRunning"
153
+ }
154
+
155
+ export interface ChatStarted extends Interface {
156
+ type: "chatStarted"
157
+ }
158
+
159
+ export interface ChatStopped extends Interface {
160
+ type: "chatStopped"
161
+ }
162
+
163
+ export interface CmdOk extends Interface {
164
+ type: "cmdOk"
165
+ user_?: T.User
166
+ }
167
+
168
+ export interface ChatCmdError extends Interface {
169
+ type: "chatCmdError"
170
+ chatError: T.ChatError
171
+ }
172
+
173
+ export interface ConnectionPlan extends Interface {
174
+ type: "connectionPlan"
175
+ user: T.User
176
+ connLink: T.CreatedConnLink
177
+ connectionPlan: T.ConnectionPlan
178
+ }
179
+
180
+ export interface ContactAlreadyExists extends Interface {
181
+ type: "contactAlreadyExists"
182
+ user: T.User
183
+ contact: T.Contact
184
+ }
185
+
186
+ export interface ContactConnectionDeleted extends Interface {
187
+ type: "contactConnectionDeleted"
188
+ user: T.User
189
+ connection: T.PendingContactConnection
190
+ }
191
+
192
+ export interface ContactDeleted extends Interface {
193
+ type: "contactDeleted"
194
+ user: T.User
195
+ contact: T.Contact
196
+ }
197
+
198
+ export interface ContactPrefsUpdated extends Interface {
199
+ type: "contactPrefsUpdated"
200
+ user: T.User
201
+ fromContact: T.Contact
202
+ toContact: T.Contact
203
+ }
204
+
205
+ export interface ContactRequestRejected extends Interface {
206
+ type: "contactRequestRejected"
207
+ user: T.User
208
+ contactRequest: T.UserContactRequest
209
+ contact_?: T.Contact
210
+ }
211
+
212
+ export interface ContactsList extends Interface {
213
+ type: "contactsList"
214
+ user: T.User
215
+ contacts: T.Contact[]
216
+ }
217
+
218
+ export interface GroupDeletedUser extends Interface {
219
+ type: "groupDeletedUser"
220
+ user: T.User
221
+ groupInfo: T.GroupInfo
222
+ }
223
+
224
+ export interface GroupLink extends Interface {
225
+ type: "groupLink"
226
+ user: T.User
227
+ groupInfo: T.GroupInfo
228
+ groupLink: T.GroupLink
229
+ }
230
+
231
+ export interface GroupLinkCreated extends Interface {
232
+ type: "groupLinkCreated"
233
+ user: T.User
234
+ groupInfo: T.GroupInfo
235
+ groupLink: T.GroupLink
236
+ }
237
+
238
+ export interface GroupLinkDeleted extends Interface {
239
+ type: "groupLinkDeleted"
240
+ user: T.User
241
+ groupInfo: T.GroupInfo
242
+ }
243
+
244
+ export interface GroupCreated extends Interface {
245
+ type: "groupCreated"
246
+ user: T.User
247
+ groupInfo: T.GroupInfo
248
+ }
249
+
250
+ export interface GroupMembers extends Interface {
251
+ type: "groupMembers"
252
+ user: T.User
253
+ group: T.Group
254
+ }
255
+
256
+ export interface GroupUpdated extends Interface {
257
+ type: "groupUpdated"
258
+ user: T.User
259
+ fromGroup: T.GroupInfo
260
+ toGroup: T.GroupInfo
261
+ member_?: T.GroupMember
262
+ }
263
+
264
+ export interface GroupsList extends Interface {
265
+ type: "groupsList"
266
+ user: T.User
267
+ groups: T.GroupInfo[]
268
+ }
269
+
270
+ export interface Invitation extends Interface {
271
+ type: "invitation"
272
+ user: T.User
273
+ connLinkInvitation: T.CreatedConnLink
274
+ connection: T.PendingContactConnection
275
+ }
276
+
277
+ export interface LeftMemberUser extends Interface {
278
+ type: "leftMemberUser"
279
+ user: T.User
280
+ groupInfo: T.GroupInfo
281
+ }
282
+
283
+ export interface MemberAccepted extends Interface {
284
+ type: "memberAccepted"
285
+ user: T.User
286
+ groupInfo: T.GroupInfo
287
+ member: T.GroupMember
288
+ }
289
+
290
+ export interface MembersBlockedForAllUser extends Interface {
291
+ type: "membersBlockedForAllUser"
292
+ user: T.User
293
+ groupInfo: T.GroupInfo
294
+ members: T.GroupMember[]
295
+ blocked: boolean
296
+ }
297
+
298
+ export interface MembersRoleUser extends Interface {
299
+ type: "membersRoleUser"
300
+ user: T.User
301
+ groupInfo: T.GroupInfo
302
+ members: T.GroupMember[]
303
+ toRole: T.GroupMemberRole
304
+ }
305
+
306
+ export interface NewChatItems extends Interface {
307
+ type: "newChatItems"
308
+ user: T.User
309
+ chatItems: T.AChatItem[]
310
+ }
311
+
312
+ export interface RcvFileAccepted extends Interface {
313
+ type: "rcvFileAccepted"
314
+ user: T.User
315
+ chatItem: T.AChatItem
316
+ }
317
+
318
+ export interface RcvFileAcceptedSndCancelled extends Interface {
319
+ type: "rcvFileAcceptedSndCancelled"
320
+ user: T.User
321
+ rcvFileTransfer: T.RcvFileTransfer
322
+ }
323
+
324
+ export interface RcvFileCancelled extends Interface {
325
+ type: "rcvFileCancelled"
326
+ user: T.User
327
+ chatItem_?: T.AChatItem
328
+ rcvFileTransfer: T.RcvFileTransfer
329
+ }
330
+
331
+ export interface SentConfirmation extends Interface {
332
+ type: "sentConfirmation"
333
+ user: T.User
334
+ connection: T.PendingContactConnection
335
+ customUserProfile?: T.Profile
336
+ }
337
+
338
+ export interface SentGroupInvitation extends Interface {
339
+ type: "sentGroupInvitation"
340
+ user: T.User
341
+ groupInfo: T.GroupInfo
342
+ contact: T.Contact
343
+ member: T.GroupMember
344
+ }
345
+
346
+ export interface SentInvitation extends Interface {
347
+ type: "sentInvitation"
348
+ user: T.User
349
+ connection: T.PendingContactConnection
350
+ customUserProfile?: T.Profile
351
+ }
352
+
353
+ export interface SndFileCancelled extends Interface {
354
+ type: "sndFileCancelled"
355
+ user: T.User
356
+ chatItem_?: T.AChatItem
357
+ fileTransferMeta: T.FileTransferMeta
358
+ sndFileTransfers: T.SndFileTransfer[]
359
+ }
360
+
361
+ export interface UserAcceptedGroupSent extends Interface {
362
+ type: "userAcceptedGroupSent"
363
+ user: T.User
364
+ groupInfo: T.GroupInfo
365
+ hostContact?: T.Contact
366
+ }
367
+
368
+ export interface UserContactLink extends Interface {
369
+ type: "userContactLink"
370
+ user: T.User
371
+ contactLink: T.UserContactLink
372
+ }
373
+
374
+ export interface UserContactLinkCreated extends Interface {
375
+ type: "userContactLinkCreated"
376
+ user: T.User
377
+ connLinkContact: T.CreatedConnLink
378
+ }
379
+
380
+ export interface UserContactLinkDeleted extends Interface {
381
+ type: "userContactLinkDeleted"
382
+ user: T.User
383
+ }
384
+
385
+ export interface UserContactLinkUpdated extends Interface {
386
+ type: "userContactLinkUpdated"
387
+ user: T.User
388
+ contactLink: T.UserContactLink
389
+ }
390
+
391
+ export interface UserDeletedMembers extends Interface {
392
+ type: "userDeletedMembers"
393
+ user: T.User
394
+ groupInfo: T.GroupInfo
395
+ members: T.GroupMember[]
396
+ withMessages: boolean
397
+ }
398
+
399
+ export interface UserProfileUpdated extends Interface {
400
+ type: "userProfileUpdated"
401
+ user: T.User
402
+ fromProfile: T.Profile
403
+ toProfile: T.Profile
404
+ updateSummary: T.UserProfileUpdateSummary
405
+ }
406
+
407
+ export interface UserProfileNoChange extends Interface {
408
+ type: "userProfileNoChange"
409
+ user: T.User
410
+ }
411
+
412
+ export interface UsersList extends Interface {
413
+ type: "usersList"
414
+ users: T.UserInfo[]
415
+ }
416
+ }