mezon-js 2.14.2 → 2.14.3
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/dist/mezon-js/socket.d.ts +379 -379
- package/dist/mezon-js.cjs.js +209 -179
- package/dist/mezon-js.esm.mjs +209 -179
- package/dist/mezon-js.esm.mjs.map +1 -1
- package/dist/socket.d.ts +379 -379
- package/package.json +1 -1
- package/socket.ts +806 -775
|
@@ -19,17 +19,17 @@ import { WebSocketAdapter } from "./web_socket_adapter";
|
|
|
19
19
|
/** An object which represents a connected user in the server. */
|
|
20
20
|
export interface Presence {
|
|
21
21
|
/** The id of the user. */
|
|
22
|
-
|
|
22
|
+
user_id: string;
|
|
23
23
|
/** The session id of the user. */
|
|
24
|
-
|
|
24
|
+
session_id: string;
|
|
25
25
|
/** The username of the user. */
|
|
26
26
|
username: string;
|
|
27
27
|
/** The node the user is connected to. */
|
|
28
28
|
node: string;
|
|
29
29
|
/** The status of the user */
|
|
30
30
|
status: string;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
is_mobile: boolean;
|
|
32
|
+
user_status: string;
|
|
33
33
|
}
|
|
34
34
|
export interface NotificationInfo {
|
|
35
35
|
/** Category code for this notification. */
|
|
@@ -37,190 +37,190 @@ export interface NotificationInfo {
|
|
|
37
37
|
/** Content of the notification in JSON. */
|
|
38
38
|
content?: {};
|
|
39
39
|
/** The UNIX time when the notification was created. */
|
|
40
|
-
|
|
40
|
+
create_time?: string;
|
|
41
41
|
/** ID of the Notification. */
|
|
42
42
|
id?: string;
|
|
43
43
|
/** True if this notification was persisted to the database. */
|
|
44
44
|
persistent?: boolean;
|
|
45
45
|
/** ID of the sender, if a user. Otherwise 'null'. */
|
|
46
|
-
|
|
46
|
+
sender_id?: string;
|
|
47
47
|
/** Subject of the notification. */
|
|
48
48
|
subject?: string;
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
channel_id?: string;
|
|
50
|
+
clan_id?: string;
|
|
51
51
|
channel?: ApiChannelDescription;
|
|
52
|
-
|
|
52
|
+
topic_id?: string;
|
|
53
53
|
}
|
|
54
54
|
/** A response from a channel join operation. */
|
|
55
55
|
export interface Channel {
|
|
56
56
|
/** The server-assigned channel id. */
|
|
57
57
|
id: string;
|
|
58
|
-
|
|
58
|
+
chanel_label: string;
|
|
59
59
|
/** The presences visible on the chat channel. */
|
|
60
60
|
presences: Presence[];
|
|
61
61
|
/** The presence of the current user, i.e. yourself. */
|
|
62
62
|
self: Presence;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
clan_logo: string;
|
|
64
|
+
category_name: string;
|
|
65
65
|
}
|
|
66
66
|
export interface ClanJoin {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
clan_join: {
|
|
68
|
+
clan_id: string;
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
/** Join a realtime chat channel. */
|
|
72
72
|
interface ChannelJoin {
|
|
73
|
-
|
|
73
|
+
channel_join: {
|
|
74
74
|
/** The id of the channel to join. */
|
|
75
|
-
|
|
75
|
+
channel_id: string;
|
|
76
76
|
/** The name of the channel to join. */
|
|
77
|
-
|
|
77
|
+
channel_label: string;
|
|
78
78
|
/** The channel type: 1 = Channel, 2 = Direct Message, 3 = Group. */
|
|
79
79
|
type: number;
|
|
80
80
|
/** Whether channel messages are persisted in the database. */
|
|
81
81
|
persistence: boolean;
|
|
82
82
|
/** Whether the user's channel presence is hidden when joining. */
|
|
83
83
|
hidden: boolean;
|
|
84
|
-
|
|
84
|
+
is_public: boolean;
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
/** Leave a realtime chat channel. */
|
|
88
88
|
interface ChannelLeave {
|
|
89
|
-
|
|
89
|
+
channel_leave: {
|
|
90
90
|
/** The id of the channel to leave. */
|
|
91
|
-
|
|
91
|
+
channel_id: string;
|
|
92
92
|
mode: number;
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
channel_label: string;
|
|
94
|
+
is_public: boolean;
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
export interface AddClanUserEvent {
|
|
98
|
-
|
|
98
|
+
clan_id: string;
|
|
99
99
|
user: UserProfileRedis;
|
|
100
100
|
invitor: string;
|
|
101
101
|
}
|
|
102
102
|
export interface BannedUserEvent {
|
|
103
|
-
|
|
103
|
+
user_ids: Array<string>;
|
|
104
104
|
action: number;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
banner_id: string;
|
|
106
|
+
channel_id: string;
|
|
107
|
+
clan_id: string;
|
|
108
|
+
ban_time: number;
|
|
109
109
|
}
|
|
110
110
|
export interface UserProfileRedis {
|
|
111
111
|
/** User IDs to follow. */
|
|
112
|
-
|
|
112
|
+
user_id: string;
|
|
113
113
|
/** Username to follow. */
|
|
114
114
|
username: string;
|
|
115
115
|
/** Avatar to follow. */
|
|
116
116
|
avatar: string;
|
|
117
117
|
/** Display name */
|
|
118
|
-
|
|
118
|
+
display_name: string;
|
|
119
119
|
/** custom status */
|
|
120
|
-
|
|
120
|
+
custom_status: string;
|
|
121
121
|
/** online */
|
|
122
122
|
online: boolean;
|
|
123
|
-
|
|
123
|
+
create_time_second: number;
|
|
124
124
|
/** clans */
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
joined_clans: number[];
|
|
126
|
+
app_url: string;
|
|
127
|
+
is_bot: boolean;
|
|
128
128
|
}
|
|
129
129
|
/** UserChannelAddedEvent */
|
|
130
130
|
export interface UserChannelAddedEvent {
|
|
131
|
-
|
|
131
|
+
channel_desc: ChannelDescription;
|
|
132
132
|
users: UserProfileRedis[];
|
|
133
133
|
status: string;
|
|
134
|
-
|
|
134
|
+
clan_id: string;
|
|
135
135
|
caller: UserProfileRedis;
|
|
136
|
-
|
|
136
|
+
create_time_second: number;
|
|
137
137
|
active: number;
|
|
138
138
|
}
|
|
139
139
|
export interface UserChannelRemovedEvent {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
channel_id: string;
|
|
141
|
+
user_ids: string[];
|
|
142
|
+
channel_type: number;
|
|
143
|
+
clan_id: string;
|
|
144
|
+
badge_counts: number[];
|
|
145
145
|
}
|
|
146
146
|
export interface UserClanRemovedEvent {
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
clan_id: string;
|
|
148
|
+
user_ids: string[];
|
|
149
149
|
}
|
|
150
150
|
/** Last seen message by user */
|
|
151
151
|
export interface LastPinMessageEvent {
|
|
152
152
|
/** The channel this message belongs to. */
|
|
153
|
-
|
|
153
|
+
channel_id: string;
|
|
154
154
|
mode: number;
|
|
155
|
-
|
|
155
|
+
channel_label: string;
|
|
156
156
|
/** The unique ID of this message. */
|
|
157
|
-
|
|
157
|
+
message_id: string;
|
|
158
158
|
/** user id */
|
|
159
|
-
|
|
159
|
+
user_id: string;
|
|
160
160
|
/** operation */
|
|
161
161
|
operation: number;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
is_public: boolean;
|
|
163
|
+
clan_id: string;
|
|
164
|
+
message_sender_avatar: string;
|
|
165
|
+
message_sender_id: string;
|
|
166
|
+
message_sender_username: string;
|
|
167
|
+
message_content: string;
|
|
168
|
+
message_attachment: string;
|
|
169
|
+
message_created_time: string;
|
|
170
170
|
}
|
|
171
171
|
export interface UnmuteEvent {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
channel_id: string;
|
|
173
|
+
category_id: string;
|
|
174
|
+
clan_id: string;
|
|
175
175
|
}
|
|
176
176
|
/** Last seen message by user */
|
|
177
177
|
export interface LastSeenMessageEvent {
|
|
178
|
-
|
|
178
|
+
clan_id: string;
|
|
179
179
|
/** The channel this message belongs to. */
|
|
180
|
-
|
|
180
|
+
channel_id: string;
|
|
181
181
|
mode: number;
|
|
182
|
-
|
|
182
|
+
channel_label: string;
|
|
183
183
|
/** The unique ID of this message. */
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
message_id: string;
|
|
185
|
+
badge_count: number;
|
|
186
186
|
}
|
|
187
187
|
/** User is typing */
|
|
188
188
|
export interface MessageTypingEvent {
|
|
189
189
|
/** The channel this message belongs to. */
|
|
190
|
-
|
|
190
|
+
channel_id: string;
|
|
191
191
|
mode: number;
|
|
192
|
-
|
|
192
|
+
channel_label: string;
|
|
193
193
|
/** Message sender, usually a user ID. */
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
194
|
+
sender_id: string;
|
|
195
|
+
is_public: boolean;
|
|
196
|
+
sender_username: string;
|
|
197
|
+
sender_display_name: string;
|
|
198
|
+
topic_id?: string;
|
|
199
199
|
}
|
|
200
200
|
export interface UserProfileUpdatedEvent {
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
user_id: string;
|
|
202
|
+
display_name: string;
|
|
203
203
|
avatar: string;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
about_me: string;
|
|
205
|
+
channel_id: string;
|
|
206
|
+
clan_id: string;
|
|
207
|
+
encrypt_private_key: string;
|
|
208
208
|
}
|
|
209
209
|
/** An acknowledgement received in response to sending a message on a chat channel. */
|
|
210
210
|
export interface ChannelMessageAck {
|
|
211
211
|
/** The server-assigned channel ID. */
|
|
212
|
-
|
|
212
|
+
channel_id: string;
|
|
213
213
|
mode: number;
|
|
214
214
|
/** A unique ID for the chat message. */
|
|
215
|
-
|
|
215
|
+
message_id: string;
|
|
216
216
|
/** A user-defined code for the chat message. */
|
|
217
217
|
code: number;
|
|
218
218
|
/** The username of the sender of the message. */
|
|
219
219
|
username: string;
|
|
220
220
|
/** The UNIX time when the message was created. */
|
|
221
|
-
|
|
221
|
+
create_time: string;
|
|
222
222
|
/** The UNIX time when the message was updated. */
|
|
223
|
-
|
|
223
|
+
update_time: string;
|
|
224
224
|
/** True if the chat message has been stored in history. */
|
|
225
225
|
persistence: boolean;
|
|
226
226
|
}
|
|
@@ -228,71 +228,71 @@ export interface ChannelMessageAck {
|
|
|
228
228
|
interface ChannelMessageSend {
|
|
229
229
|
channel_message_send: {
|
|
230
230
|
/** Clan Id */
|
|
231
|
-
|
|
231
|
+
clan_id: string;
|
|
232
232
|
/** The server-assigned channel ID. */
|
|
233
|
-
|
|
233
|
+
channel_id: string;
|
|
234
234
|
mode: number;
|
|
235
|
-
|
|
235
|
+
channel_label: string;
|
|
236
236
|
/** The content payload. */
|
|
237
237
|
content: any;
|
|
238
238
|
mentions?: Array<ApiMessageMention>;
|
|
239
239
|
attachments?: Array<ApiMessageAttachment>;
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
anonymous_message?: boolean;
|
|
241
|
+
mention_everyone?: boolean;
|
|
242
242
|
avatar: string;
|
|
243
|
-
|
|
243
|
+
is_public: boolean;
|
|
244
244
|
code: number;
|
|
245
|
-
|
|
245
|
+
topic_id?: string;
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
interface TransferOwnershipEvent {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
clan_id: string;
|
|
250
|
+
prev_owner: string;
|
|
251
|
+
curr_owner: string;
|
|
252
252
|
}
|
|
253
253
|
interface QuickMenuEvent {
|
|
254
254
|
quick_menu_event: {
|
|
255
|
-
|
|
255
|
+
menu_name: string;
|
|
256
256
|
message: {
|
|
257
257
|
/** Clan Id */
|
|
258
|
-
|
|
258
|
+
clan_id: string;
|
|
259
259
|
/** The server-assigned channel ID. */
|
|
260
|
-
|
|
260
|
+
channel_id: string;
|
|
261
261
|
mode: number;
|
|
262
|
-
|
|
262
|
+
channel_label: string;
|
|
263
263
|
/** The content payload. */
|
|
264
264
|
content: any;
|
|
265
265
|
mentions?: Array<ApiMessageMention>;
|
|
266
266
|
attachments?: Array<ApiMessageAttachment>;
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
anonymous_message?: boolean;
|
|
268
|
+
mention_everyone?: boolean;
|
|
269
269
|
avatar: string;
|
|
270
|
-
|
|
270
|
+
is_public: boolean;
|
|
271
271
|
code: number;
|
|
272
|
-
|
|
272
|
+
topic_id?: string;
|
|
273
273
|
};
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
interface EphemeralMessageSend {
|
|
277
277
|
ephemeral_message_send: {
|
|
278
|
-
|
|
278
|
+
receiver_id: string;
|
|
279
279
|
message: {
|
|
280
280
|
/** Clan Id */
|
|
281
|
-
|
|
281
|
+
clan_id: string;
|
|
282
282
|
/** The server-assigned channel ID. */
|
|
283
|
-
|
|
283
|
+
channel_id: string;
|
|
284
284
|
mode: number;
|
|
285
|
-
|
|
285
|
+
channel_label: string;
|
|
286
286
|
/** The content payload. */
|
|
287
287
|
content: any;
|
|
288
288
|
mentions?: Array<ApiMessageMention>;
|
|
289
289
|
attachments?: Array<ApiMessageAttachment>;
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
anonymous_message?: boolean;
|
|
291
|
+
mention_everyone?: boolean;
|
|
292
292
|
avatar: string;
|
|
293
|
-
|
|
293
|
+
is_public: boolean;
|
|
294
294
|
code: number;
|
|
295
|
-
|
|
295
|
+
topic_id?: string;
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
298
|
}
|
|
@@ -300,9 +300,9 @@ interface EphemeralMessageSend {
|
|
|
300
300
|
interface ChannelMessageUpdate {
|
|
301
301
|
channel_message_update: {
|
|
302
302
|
/** The server-assigned channel ID. */
|
|
303
|
-
|
|
303
|
+
channel_id: string;
|
|
304
304
|
/** A unique ID for the chat message to be updated. */
|
|
305
|
-
|
|
305
|
+
message_id: string;
|
|
306
306
|
/** The content payload. */
|
|
307
307
|
content: any;
|
|
308
308
|
/** mentions */
|
|
@@ -311,27 +311,27 @@ interface ChannelMessageUpdate {
|
|
|
311
311
|
attachments?: Array<ApiMessageAttachment>;
|
|
312
312
|
/** The mode payload. */
|
|
313
313
|
mode: number;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
314
|
+
is_public: boolean;
|
|
315
|
+
topic_id?: string;
|
|
316
|
+
is_update_msg_topic?: boolean;
|
|
317
|
+
old_mentions?: string;
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
/** Remove a message previously sent to a realtime chat channel. */
|
|
321
321
|
interface ChannelMessageRemove {
|
|
322
322
|
channel_message_remove: {
|
|
323
323
|
/** The clan id */
|
|
324
|
-
|
|
324
|
+
clan_id: string;
|
|
325
325
|
/** The server-assigned channel ID. */
|
|
326
|
-
|
|
326
|
+
channel_id: string;
|
|
327
327
|
mode: number;
|
|
328
|
-
|
|
328
|
+
channel_label: string;
|
|
329
329
|
/** A unique ID for the chat message to be removed. */
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
message_id: string;
|
|
331
|
+
is_public: boolean;
|
|
332
332
|
/** attachments */
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
has_attachment?: boolean;
|
|
334
|
+
topic_id?: string;
|
|
335
335
|
mentions: string;
|
|
336
336
|
references: string;
|
|
337
337
|
};
|
|
@@ -339,8 +339,8 @@ interface ChannelMessageRemove {
|
|
|
339
339
|
/** Presence update for a particular realtime chat channel. */
|
|
340
340
|
export interface ChannelPresenceEvent {
|
|
341
341
|
/** The unique identifier of the chat channel. */
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
channel_id: string;
|
|
343
|
+
channel_label: string;
|
|
344
344
|
mode: number;
|
|
345
345
|
/** Presences of the users who joined the channel. */
|
|
346
346
|
joins: Presence[];
|
|
@@ -349,151 +349,151 @@ export interface ChannelPresenceEvent {
|
|
|
349
349
|
}
|
|
350
350
|
export interface VoiceEndedEvent {
|
|
351
351
|
id: string;
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
clan_id: string;
|
|
353
|
+
voice_channel_id: string;
|
|
354
354
|
}
|
|
355
355
|
export interface VoiceStartedEvent {
|
|
356
356
|
id: string;
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
clan_id: string;
|
|
358
|
+
voice_channel_id: string;
|
|
359
359
|
}
|
|
360
360
|
export interface VoiceLeavedEvent {
|
|
361
361
|
id: string;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
clan_id: string;
|
|
363
|
+
voice_channel_id: string;
|
|
364
|
+
voice_user_id: string;
|
|
365
365
|
}
|
|
366
366
|
export interface VoiceJoinedEvent {
|
|
367
367
|
/** The unique identifier of the chat channel. */
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
clan_id: string;
|
|
369
|
+
clan_name: string;
|
|
370
370
|
id: string;
|
|
371
371
|
participant: string;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
372
|
+
user_id: string;
|
|
373
|
+
voice_channel_label: string;
|
|
374
|
+
voice_channel_id: string;
|
|
375
|
+
last_screenshot: string;
|
|
376
376
|
}
|
|
377
377
|
export interface CustomStatusEvent {
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
clan_id: string;
|
|
379
|
+
user_id: string;
|
|
380
380
|
username: string;
|
|
381
381
|
status: string;
|
|
382
382
|
/** time reset */
|
|
383
|
-
|
|
383
|
+
time_reset: number;
|
|
384
384
|
/** no clear */
|
|
385
|
-
|
|
385
|
+
no_clear: boolean;
|
|
386
386
|
}
|
|
387
387
|
export interface UnpinMessageEvent {
|
|
388
388
|
id: string;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
message_id: string;
|
|
390
|
+
channel_id: string;
|
|
391
|
+
clan_id: string;
|
|
392
392
|
}
|
|
393
393
|
export interface ChannelUpdatedEvent {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
394
|
+
clan_id: string;
|
|
395
|
+
category_id: string;
|
|
396
|
+
creator_id: string;
|
|
397
|
+
parent_id: string;
|
|
398
|
+
channel_id: string;
|
|
399
|
+
channel_label: string;
|
|
400
|
+
channel_type: number;
|
|
401
401
|
status: number;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
402
|
+
meeting_code: string;
|
|
403
|
+
channel_private: number;
|
|
404
|
+
is_error: boolean;
|
|
405
|
+
app_id: string;
|
|
406
406
|
e2ee: number;
|
|
407
407
|
topic: string;
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
age_restricted: number;
|
|
409
|
+
is_active_thread: boolean;
|
|
410
410
|
active: number;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
count_mess_unread: number;
|
|
412
|
+
role_ids?: Array<string>;
|
|
413
|
+
user_ids?: Array<string>;
|
|
414
|
+
channel_avatar: string;
|
|
415
415
|
}
|
|
416
416
|
export interface DeleteAccountEvent {
|
|
417
|
-
|
|
417
|
+
user_id: string;
|
|
418
418
|
}
|
|
419
419
|
export interface ChannelCreatedEvent {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
420
|
+
clan_id: string;
|
|
421
|
+
category_id: string;
|
|
422
|
+
creator_id: string;
|
|
423
|
+
parent_id: string;
|
|
424
|
+
channel_id: string;
|
|
425
|
+
channel_label: string;
|
|
426
|
+
channel_private: number;
|
|
427
|
+
channel_type: number;
|
|
428
428
|
status: number;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
app_id: string;
|
|
430
|
+
clan_name: string;
|
|
431
|
+
channel_avatar: string;
|
|
432
432
|
}
|
|
433
433
|
export interface CategoryEvent {
|
|
434
|
-
|
|
434
|
+
clan_id: string;
|
|
435
435
|
id: string;
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
creator_id: string;
|
|
437
|
+
category_name: string;
|
|
438
438
|
status: number;
|
|
439
439
|
}
|
|
440
440
|
export interface ChannelDeletedEvent {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
clan_id: string;
|
|
442
|
+
category_id: string;
|
|
443
|
+
channel_id: string;
|
|
444
444
|
deletor: string;
|
|
445
|
-
|
|
445
|
+
parent_id: string;
|
|
446
446
|
}
|
|
447
447
|
export interface StickerCreateEvent {
|
|
448
|
-
|
|
448
|
+
clan_id: string;
|
|
449
449
|
source: string;
|
|
450
450
|
shortname: string;
|
|
451
451
|
category: string;
|
|
452
|
-
|
|
452
|
+
creator_id: string;
|
|
453
453
|
sticker_id: string;
|
|
454
454
|
logo: string;
|
|
455
|
-
|
|
455
|
+
clan_name: string;
|
|
456
456
|
}
|
|
457
457
|
export interface StickerUpdateEvent {
|
|
458
458
|
shortname: string;
|
|
459
459
|
sticker_id: string;
|
|
460
|
-
|
|
460
|
+
user_id: string;
|
|
461
461
|
}
|
|
462
462
|
export interface StickerDeleteEvent {
|
|
463
463
|
sticker_id: string;
|
|
464
|
-
|
|
464
|
+
user_id: string;
|
|
465
465
|
}
|
|
466
466
|
export interface ClanDeletedEvent {
|
|
467
|
-
|
|
467
|
+
clan_id: string;
|
|
468
468
|
deletor: string;
|
|
469
469
|
}
|
|
470
470
|
export interface ClanUpdatedEvent {
|
|
471
|
-
|
|
472
|
-
|
|
471
|
+
clan_id: string;
|
|
472
|
+
clan_name: string;
|
|
473
473
|
logo: string;
|
|
474
474
|
banner: string;
|
|
475
475
|
status: number;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
is_onboarding: boolean;
|
|
477
|
+
welcome_channel_id: string;
|
|
478
|
+
onboarding_banner: string;
|
|
479
479
|
about: string;
|
|
480
|
-
|
|
480
|
+
prevent_anonymous: boolean;
|
|
481
481
|
}
|
|
482
482
|
export interface ClanProfileUpdatedEvent {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
483
|
+
user_id: string;
|
|
484
|
+
clan_nick: string;
|
|
485
|
+
clan_avatar: string;
|
|
486
|
+
clan_id: string;
|
|
487
487
|
}
|
|
488
488
|
export interface MeetParticipantEvent {
|
|
489
489
|
username: string;
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
room_name: string;
|
|
491
|
+
channel_id: string;
|
|
492
|
+
clan_id: string;
|
|
493
493
|
action: number;
|
|
494
494
|
}
|
|
495
495
|
export interface AllowAnonymousEvent {
|
|
496
|
-
|
|
496
|
+
clan_id: string;
|
|
497
497
|
allow: boolean;
|
|
498
498
|
}
|
|
499
499
|
/** Stream identifier */
|
|
@@ -543,7 +543,7 @@ export interface Status {
|
|
|
543
543
|
interface StatusFollow {
|
|
544
544
|
/** The IDs of the users to follow. */
|
|
545
545
|
status_follow: {
|
|
546
|
-
|
|
546
|
+
user_ids: string[];
|
|
547
547
|
};
|
|
548
548
|
}
|
|
549
549
|
/** A batch of status updates for a given user. */
|
|
@@ -556,8 +556,8 @@ export interface StatusPresenceEvent {
|
|
|
556
556
|
/** Stop receiving status updates for some set of users. */
|
|
557
557
|
interface StatusUnfollow {
|
|
558
558
|
/** The IDs of user to unfollow. */
|
|
559
|
-
|
|
560
|
-
|
|
559
|
+
status_unfollow: {
|
|
560
|
+
user_ids: string[];
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
/** Set the user's own status. */
|
|
@@ -568,292 +568,292 @@ interface StatusUpdate {
|
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
570
|
export interface CheckNameExistedEvent {
|
|
571
|
-
|
|
571
|
+
clan_name: string;
|
|
572
572
|
exist: boolean;
|
|
573
573
|
condition_id: string;
|
|
574
574
|
type: number;
|
|
575
|
-
|
|
575
|
+
clan_id: string;
|
|
576
576
|
}
|
|
577
577
|
/** */
|
|
578
578
|
export interface ClanSticker {
|
|
579
579
|
category?: string;
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
580
|
+
clan_id?: string;
|
|
581
|
+
create_time?: string;
|
|
582
|
+
creator_id?: string;
|
|
583
583
|
id?: string;
|
|
584
584
|
shortname?: string;
|
|
585
585
|
source?: string;
|
|
586
586
|
logo?: string;
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
clan_name?: string;
|
|
588
|
+
is_for_sale?: boolean;
|
|
589
589
|
}
|
|
590
590
|
export interface RoleEvent {
|
|
591
591
|
role: ApiRole;
|
|
592
592
|
status: number;
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
593
|
+
user_id: string;
|
|
594
|
+
user_add_ids: Array<string>;
|
|
595
|
+
user_remove_ids: Array<string>;
|
|
596
|
+
active_permission_ids: Array<string>;
|
|
597
|
+
remove_permission_ids: Array<string>;
|
|
598
598
|
}
|
|
599
599
|
export interface EventEmoji {
|
|
600
600
|
id: string;
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
clan_id: string;
|
|
602
|
+
short_name: string;
|
|
603
603
|
source: string;
|
|
604
604
|
category: string;
|
|
605
605
|
action: number;
|
|
606
|
-
|
|
606
|
+
user_id: string;
|
|
607
607
|
logo: string;
|
|
608
|
-
|
|
609
|
-
|
|
608
|
+
clan_name: string;
|
|
609
|
+
is_for_sale: boolean;
|
|
610
610
|
}
|
|
611
611
|
/** */
|
|
612
612
|
export interface ClanEmoji {
|
|
613
613
|
category?: string;
|
|
614
|
-
|
|
614
|
+
creator_id?: string;
|
|
615
615
|
id?: string;
|
|
616
616
|
shortname?: string;
|
|
617
617
|
src?: string;
|
|
618
618
|
logo?: string;
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
619
|
+
clan_name?: string;
|
|
620
|
+
clan_id?: string;
|
|
621
|
+
is_for_sale?: boolean;
|
|
622
622
|
}
|
|
623
623
|
/** */
|
|
624
624
|
export interface ChannelDescription {
|
|
625
|
-
|
|
626
|
-
|
|
625
|
+
clan_id?: string;
|
|
626
|
+
channel_id?: string;
|
|
627
627
|
type?: number;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
628
|
+
channel_label?: string;
|
|
629
|
+
app_url?: string;
|
|
630
|
+
channel_private?: number;
|
|
631
|
+
meeting_code?: string;
|
|
632
|
+
clan_name?: string;
|
|
633
|
+
parent_id?: string;
|
|
634
|
+
last_sent_message?: ApiChannelMessageHeader;
|
|
635
635
|
}
|
|
636
636
|
export interface HashtagDm {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
637
|
+
channel_id?: string;
|
|
638
|
+
channel_label?: string;
|
|
639
|
+
clan_id?: string;
|
|
640
|
+
clan_name?: string;
|
|
641
|
+
meeting_code?: string;
|
|
642
642
|
type?: number;
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
channel_private?: number;
|
|
644
|
+
parent_id?: string;
|
|
645
645
|
}
|
|
646
646
|
export interface NotificationSetting {
|
|
647
647
|
id?: string;
|
|
648
|
-
|
|
648
|
+
notification_setting_type?: number;
|
|
649
649
|
}
|
|
650
650
|
export interface NotificationChannelCategorySetting {
|
|
651
651
|
id: string;
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
652
|
+
channel_category_label: string;
|
|
653
|
+
notification_setting_type: number;
|
|
654
|
+
channel_category_title: string;
|
|
655
655
|
action: number;
|
|
656
656
|
}
|
|
657
657
|
export interface UserEmojiUsage {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
658
|
+
user_id: string;
|
|
659
|
+
emoji_id: string;
|
|
660
|
+
clan_id: string;
|
|
661
|
+
create_time: string;
|
|
662
662
|
}
|
|
663
663
|
export interface AddFriend {
|
|
664
|
-
|
|
664
|
+
user_id: string;
|
|
665
665
|
username: string;
|
|
666
|
-
|
|
666
|
+
display_name: string;
|
|
667
667
|
avatar: string;
|
|
668
668
|
}
|
|
669
669
|
export interface RemoveFriend {
|
|
670
|
-
|
|
670
|
+
user_id: string;
|
|
671
671
|
}
|
|
672
672
|
export interface BlockFriend {
|
|
673
|
-
|
|
673
|
+
user_id: string;
|
|
674
674
|
}
|
|
675
675
|
export interface UnblockFriend {
|
|
676
|
-
|
|
676
|
+
user_id: string;
|
|
677
677
|
username: string;
|
|
678
678
|
avatar: string;
|
|
679
|
-
|
|
679
|
+
display_name: string;
|
|
680
680
|
status: string;
|
|
681
|
-
|
|
681
|
+
user_status: string;
|
|
682
682
|
}
|
|
683
683
|
export interface AddUserEmojiUsageEvent {
|
|
684
|
-
|
|
685
|
-
|
|
684
|
+
emoji_id: string;
|
|
685
|
+
clan_id: string;
|
|
686
686
|
}
|
|
687
687
|
/** Response cho ListUserEmojiUsage */
|
|
688
688
|
export interface GetUserEmojiUsageEvent {
|
|
689
689
|
clanId: string;
|
|
690
|
-
|
|
690
|
+
user_emoji_usage: Array<UserEmojiUsage>;
|
|
691
691
|
}
|
|
692
692
|
/** On role assign */
|
|
693
693
|
export interface RoleAssignedEvent {
|
|
694
694
|
/** The clan of this role */
|
|
695
695
|
ClanId: string;
|
|
696
696
|
/** Role ID */
|
|
697
|
-
|
|
697
|
+
role_id: string;
|
|
698
698
|
/** UserIds Assigned */
|
|
699
|
-
|
|
699
|
+
user_ids_assigned: string[];
|
|
700
700
|
/** UserIds Removed */
|
|
701
|
-
|
|
701
|
+
user_ids_removed: string[];
|
|
702
702
|
}
|
|
703
703
|
/** Streaming Joined event */
|
|
704
704
|
export interface StreamingLeavedEvent {
|
|
705
705
|
/** id */
|
|
706
706
|
id: string;
|
|
707
707
|
/** The unique identifier of the chat clan. */
|
|
708
|
-
|
|
708
|
+
clan_id: string;
|
|
709
709
|
/** streaming channel name */
|
|
710
|
-
|
|
711
|
-
/** streaming
|
|
712
|
-
|
|
710
|
+
streaming_channel_id: string;
|
|
711
|
+
/** streaming user_id */
|
|
712
|
+
streaming_user_id: string;
|
|
713
713
|
}
|
|
714
714
|
/** Streaming Joined event */
|
|
715
715
|
export interface StreamingJoinedEvent {
|
|
716
716
|
/** The unique identifier of the chat clan. */
|
|
717
|
-
|
|
717
|
+
clan_id: string;
|
|
718
718
|
/** The channel name */
|
|
719
|
-
|
|
719
|
+
clan_name: string;
|
|
720
720
|
/** id streaming */
|
|
721
721
|
id: string;
|
|
722
722
|
/** streaming participant */
|
|
723
723
|
participant: string;
|
|
724
724
|
/** user id */
|
|
725
|
-
|
|
725
|
+
user_id: string;
|
|
726
726
|
/** streaming channel label */
|
|
727
|
-
|
|
727
|
+
streaming_channel_label: string;
|
|
728
728
|
/** streaming channel id */
|
|
729
|
-
|
|
729
|
+
streaming_channel_id: string;
|
|
730
730
|
}
|
|
731
731
|
/** Streaming start event */
|
|
732
732
|
export interface StreamingStartedEvent {
|
|
733
733
|
/** clan id */
|
|
734
|
-
|
|
734
|
+
clan_id: string;
|
|
735
735
|
/** channel id */
|
|
736
|
-
|
|
736
|
+
channel_id: string;
|
|
737
737
|
/** stream url */
|
|
738
|
-
|
|
738
|
+
streaming_url: string;
|
|
739
739
|
/** status */
|
|
740
|
-
|
|
740
|
+
is_streaming: boolean;
|
|
741
741
|
}
|
|
742
742
|
/** Streaming start event */
|
|
743
743
|
export interface StreamingEndedEvent {
|
|
744
744
|
/** clan id */
|
|
745
|
-
|
|
745
|
+
clan_id: string;
|
|
746
746
|
/** channel id */
|
|
747
|
-
|
|
747
|
+
channel_id: string;
|
|
748
748
|
}
|
|
749
749
|
export interface ChannelAppEvent {
|
|
750
|
-
|
|
750
|
+
user_id: string;
|
|
751
751
|
username: string;
|
|
752
|
-
|
|
753
|
-
|
|
752
|
+
clan_id: string;
|
|
753
|
+
channel_id: string;
|
|
754
754
|
action: number;
|
|
755
755
|
}
|
|
756
756
|
export interface HandleParticipantMeetStateEvent {
|
|
757
757
|
/** clan id */
|
|
758
|
-
|
|
758
|
+
clan_id: string;
|
|
759
759
|
/** channel id */
|
|
760
|
-
|
|
760
|
+
channel_id: string;
|
|
761
761
|
/** display name */
|
|
762
|
-
|
|
762
|
+
display_name: string;
|
|
763
763
|
/** state (0: join, 1: leave) */
|
|
764
764
|
state: number;
|
|
765
765
|
/** room name */
|
|
766
|
-
|
|
766
|
+
room_name: string;
|
|
767
767
|
}
|
|
768
768
|
export interface PermissionSet {
|
|
769
769
|
/** Role ID */
|
|
770
|
-
|
|
770
|
+
role_id: string;
|
|
771
771
|
/** User ID */
|
|
772
|
-
|
|
772
|
+
user_id: string;
|
|
773
773
|
/** Channel ID */
|
|
774
|
-
|
|
774
|
+
channel_id: string;
|
|
775
775
|
/** List permission update */
|
|
776
|
-
|
|
776
|
+
permission_updates: ApiPermissionUpdate[];
|
|
777
777
|
/** */
|
|
778
778
|
caller: string;
|
|
779
779
|
}
|
|
780
780
|
export interface PermissionChangedEvent {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
781
|
+
user_id: string;
|
|
782
|
+
channel_id: string;
|
|
783
|
+
add_permissions: ApiPermissionUpdate[];
|
|
784
|
+
remove_permissions: ApiPermissionUpdate[];
|
|
785
|
+
default_permissions: ApiPermissionUpdate[];
|
|
786
786
|
}
|
|
787
787
|
export interface DropdownBoxSelected {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
788
|
+
message_id: string;
|
|
789
|
+
channel_id: string;
|
|
790
|
+
selectbox_id: string;
|
|
791
|
+
sender_id: string;
|
|
792
|
+
user_id: string;
|
|
793
793
|
value: Array<string>;
|
|
794
794
|
}
|
|
795
795
|
export interface MessageButtonClicked {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
796
|
+
message_id: string;
|
|
797
|
+
channel_id: string;
|
|
798
|
+
button_id: string;
|
|
799
|
+
sender_id: string;
|
|
800
|
+
user_id: string;
|
|
801
|
+
extra_data: string;
|
|
802
802
|
}
|
|
803
803
|
export interface IncomingCallPush {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
804
|
+
receiver_id: string;
|
|
805
|
+
json_data: string;
|
|
806
|
+
channel_id: string;
|
|
807
|
+
caller_id: string;
|
|
808
808
|
}
|
|
809
809
|
export interface VoiceReactionSend {
|
|
810
810
|
emojis: Array<string>;
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
811
|
+
channel_id: string;
|
|
812
|
+
sender_id: string;
|
|
813
|
+
media_type: number;
|
|
814
814
|
}
|
|
815
815
|
export interface MarkAsRead {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
channel_id: string;
|
|
817
|
+
category_id: string;
|
|
818
|
+
clan_id: string;
|
|
819
819
|
}
|
|
820
820
|
export interface WebrtcSignalingFwd {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
821
|
+
receiver_id: string;
|
|
822
|
+
data_type: number;
|
|
823
|
+
json_data: string;
|
|
824
|
+
channel_id: string;
|
|
825
|
+
caller_id: string;
|
|
826
826
|
}
|
|
827
827
|
export interface ListActivity {
|
|
828
828
|
acts: ApiUserActivity[];
|
|
829
829
|
}
|
|
830
830
|
export interface SdTopicEvent {
|
|
831
831
|
id: string;
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
832
|
+
clan_id: string;
|
|
833
|
+
channel_id: string;
|
|
834
|
+
message_id: string;
|
|
835
|
+
user_id: string;
|
|
836
|
+
last_sent_message?: ApiChannelMessageHeader;
|
|
837
837
|
message?: ApiChannelMessage;
|
|
838
838
|
}
|
|
839
839
|
export interface UserStatusEvent {
|
|
840
|
-
|
|
841
|
-
|
|
840
|
+
user_id: string;
|
|
841
|
+
custom_status: string;
|
|
842
842
|
}
|
|
843
843
|
export interface JoinChannelAppData {
|
|
844
|
-
|
|
844
|
+
user_id: string;
|
|
845
845
|
username: string;
|
|
846
846
|
hash: string;
|
|
847
847
|
}
|
|
848
848
|
/** */
|
|
849
849
|
export interface ChannelCanvas {
|
|
850
850
|
content?: string;
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
creator_id?: string;
|
|
852
|
+
editor_id?: string;
|
|
853
853
|
id?: string;
|
|
854
|
-
|
|
854
|
+
is_default?: boolean;
|
|
855
855
|
title?: string;
|
|
856
|
-
|
|
856
|
+
channel_id?: string;
|
|
857
857
|
status?: number;
|
|
858
858
|
}
|
|
859
859
|
export interface ListDataSocket {
|
|
@@ -926,53 +926,53 @@ export interface Socket {
|
|
|
926
926
|
/** Disconnect from the server. */
|
|
927
927
|
disconnect(fireDisconnectEvent: boolean): void;
|
|
928
928
|
/** Subscribe to one or more users for their status updates. */
|
|
929
|
-
followUsers(
|
|
929
|
+
followUsers(user_ids: string[]): Promise<Status>;
|
|
930
930
|
/** Join clan chat */
|
|
931
|
-
joinClanChat(
|
|
931
|
+
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
|
932
932
|
follower(): Promise<void>;
|
|
933
933
|
/** Join a chat channel on the server. */
|
|
934
|
-
joinChat(
|
|
934
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
|
935
935
|
/** Leave a chat channel on the server. */
|
|
936
|
-
leaveChat(
|
|
936
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
|
937
937
|
/** handle user join/leave channel voice on the server. */
|
|
938
|
-
handleParticipantMeetState(
|
|
938
|
+
handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number, room_name: string): Promise<void>;
|
|
939
939
|
/** Remove a chat message from a chat channel on the server. */
|
|
940
|
-
removeChatMessage(
|
|
940
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string, mentions?: string, references?: string): Promise<ChannelMessageAck>;
|
|
941
941
|
/** Execute an RPC function to the server. */
|
|
942
|
-
rpc(id?: string, payload?: string,
|
|
942
|
+
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
|
943
943
|
/** Unfollow one or more users from their status updates. */
|
|
944
|
-
unfollowUsers(
|
|
944
|
+
unfollowUsers(user_ids: string[]): Promise<void>;
|
|
945
945
|
/** Update a chat message on a chat channel in the server. */
|
|
946
|
-
updateChatMessage(
|
|
946
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string, is_update_msg_topic?: boolean, old_mentions?: string): Promise<ChannelMessageAck>;
|
|
947
947
|
/** Update the status for the current user online. */
|
|
948
948
|
updateStatus(status?: string): Promise<void>;
|
|
949
949
|
/** Send a chat message to a chat channel on the server. */
|
|
950
|
-
writeChatMessage(
|
|
950
|
+
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string, code?: number, topic_id?: string, id?: string): Promise<ChannelMessageAck>;
|
|
951
951
|
/** Send a chat message to a chat channel on the server. */
|
|
952
|
-
writeEphemeralMessage(
|
|
952
|
+
writeEphemeralMessage(receiver_id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string, code?: number, topic_id?: string): Promise<ChannelMessageAck>;
|
|
953
953
|
/** Send a quick menu event to a chat channel on the server. */
|
|
954
|
-
writeQuickMenuEvent(
|
|
954
|
+
writeQuickMenuEvent(menu_name: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string, code?: number, topic_id?: string, id?: string): Promise<QuickMenuEvent>;
|
|
955
955
|
/** Send message typing */
|
|
956
|
-
writeMessageTyping(
|
|
956
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
|
|
957
957
|
/** Send message reaction */
|
|
958
|
-
writeMessageReaction(id: string,
|
|
958
|
+
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
|
|
959
959
|
/** Send last seen message */
|
|
960
|
-
writeLastSeenMessage(
|
|
960
|
+
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, badge_count: number): Promise<LastSeenMessageEvent>;
|
|
961
961
|
/** Send last pin message */
|
|
962
|
-
writeLastPinMessage(
|
|
962
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number, message_sender_avatar: string, message_sender_id: string, message_sender_username: string, message_content: string, message_attachment: string, message_created_time: string): Promise<LastPinMessageEvent>;
|
|
963
963
|
/** Send custom user status */
|
|
964
|
-
writeCustomStatus(
|
|
965
|
-
writeActiveArchivedThread(
|
|
964
|
+
writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
|
|
965
|
+
writeActiveArchivedThread(clan_id: string, channel_id: string): Promise<void>;
|
|
966
966
|
setHeartbeatTimeoutMs(ms: number): void;
|
|
967
967
|
getHeartbeatTimeoutMs(): number;
|
|
968
968
|
onreconnect: (evt: Event) => void;
|
|
969
|
-
checkDuplicateName(name: string, condition_id: string, type: number,
|
|
970
|
-
handleMessageButtonClick: (
|
|
971
|
-
handleDropdownBoxSelected: (
|
|
972
|
-
writeVoiceReaction: (emojis: Array<string>,
|
|
973
|
-
forwardWebrtcSignaling: (receiverId: string, dataType: number, jsonData: string, channelId: string,
|
|
974
|
-
makeCallPush: (receiverId: string, jsonData: string, channelId: string,
|
|
975
|
-
writeChannelAppEvent: (
|
|
969
|
+
checkDuplicateName(name: string, condition_id: string, type: number, clan_id: string): Promise<CheckNameExistedEvent>;
|
|
970
|
+
handleMessageButtonClick: (message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string, extra_data: string) => Promise<MessageButtonClicked>;
|
|
971
|
+
handleDropdownBoxSelected: (message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>) => Promise<DropdownBoxSelected>;
|
|
972
|
+
writeVoiceReaction: (emojis: Array<string>, channel_id: string) => Promise<VoiceReactionSend>;
|
|
973
|
+
forwardWebrtcSignaling: (receiverId: string, dataType: number, jsonData: string, channelId: string, caller_id: string) => Promise<WebrtcSignalingFwd>;
|
|
974
|
+
makeCallPush: (receiverId: string, jsonData: string, channelId: string, caller_id: string) => Promise<IncomingCallPush>;
|
|
975
|
+
writeChannelAppEvent: (clan_id: string, channel_id: string, action: number) => Promise<ChannelAppEvent>;
|
|
976
976
|
listDataSocket(request: ListDataSocket): Promise<any>;
|
|
977
977
|
/** Handle disconnect events received from the socket. */
|
|
978
978
|
ondisconnect: (evt: Event) => void;
|
|
@@ -1079,7 +1079,7 @@ export declare const ConnectionState: {
|
|
|
1079
1079
|
readonly CONNECTING: "connecting";
|
|
1080
1080
|
readonly CONNECTED: "connected";
|
|
1081
1081
|
};
|
|
1082
|
-
export type ConnectionStateType =
|
|
1082
|
+
export type ConnectionStateType = typeof ConnectionState[keyof typeof ConnectionState];
|
|
1083
1083
|
export declare class DefaultSocket implements Socket {
|
|
1084
1084
|
readonly host: string;
|
|
1085
1085
|
readonly port: string;
|
|
@@ -1177,32 +1177,32 @@ export declare class DefaultSocket implements Socket {
|
|
|
1177
1177
|
onallowanonymousevent(event: AllowAnonymousEvent): void;
|
|
1178
1178
|
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | IncomingCallPush | MessageButtonClicked | DropdownBoxSelected | ChannelAppEvent | EphemeralMessageSend | VoiceReactionSend | ListDataSocket | QuickMenuEvent, sendTimeout?: number): Promise<any>;
|
|
1179
1179
|
followUsers(userIds: string[]): Promise<Status>;
|
|
1180
|
-
joinClanChat(
|
|
1180
|
+
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
|
1181
1181
|
follower(): Promise<void>;
|
|
1182
|
-
joinChat(
|
|
1183
|
-
handleParticipantMeetState(
|
|
1184
|
-
leaveChat(
|
|
1185
|
-
removeChatMessage(
|
|
1186
|
-
rpc(id?: string, payload?: string,
|
|
1187
|
-
unfollowUsers(
|
|
1188
|
-
updateChatMessage(
|
|
1182
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
|
1183
|
+
handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number, room_name: string): Promise<void>;
|
|
1184
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
|
1185
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string, mentions?: string, references?: string): Promise<ChannelMessageAck>;
|
|
1186
|
+
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
|
1187
|
+
unfollowUsers(user_ids: string[]): Promise<void>;
|
|
1188
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string, is_update_msg_topic?: boolean, old_mentions?: string): Promise<ChannelMessageAck>;
|
|
1189
1189
|
updateStatus(status?: string): Promise<void>;
|
|
1190
|
-
writeQuickMenuEvent(
|
|
1191
|
-
writeEphemeralMessage(
|
|
1192
|
-
writeChatMessage(
|
|
1193
|
-
writeMessageReaction(id: string,
|
|
1194
|
-
writeMessageTyping(
|
|
1195
|
-
writeLastSeenMessage(
|
|
1196
|
-
writeLastPinMessage(
|
|
1197
|
-
writeCustomStatus(
|
|
1198
|
-
writeActiveArchivedThread(
|
|
1199
|
-
checkDuplicateName(name: string, condition_id: string, type: number,
|
|
1200
|
-
writeVoiceReaction(emojis: Array<string>,
|
|
1201
|
-
forwardWebrtcSignaling(
|
|
1202
|
-
makeCallPush(
|
|
1203
|
-
handleDropdownBoxSelected(
|
|
1204
|
-
handleMessageButtonClick(
|
|
1205
|
-
writeChannelAppEvent(
|
|
1190
|
+
writeQuickMenuEvent(menu_name: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string, code?: number, topic_id?: string): Promise<QuickMenuEvent>;
|
|
1191
|
+
writeEphemeralMessage(receiver_id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string, code?: number, topic_id?: string, id?: string): Promise<ChannelMessageAck>;
|
|
1192
|
+
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string, code?: number, topic_id?: string): Promise<ChannelMessageAck>;
|
|
1193
|
+
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
|
|
1194
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
|
|
1195
|
+
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, badge_count: number): Promise<LastSeenMessageEvent>;
|
|
1196
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number, message_sender_avatar: string, message_sender_id: string, message_sender_username: string, message_content: string, message_attachment: string, message_created_time: string): Promise<LastPinMessageEvent>;
|
|
1197
|
+
writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
|
|
1198
|
+
writeActiveArchivedThread(clan_id: string, channel_id: string): Promise<void>;
|
|
1199
|
+
checkDuplicateName(name: string, condition_id: string, type: number, clan_id: string): Promise<CheckNameExistedEvent>;
|
|
1200
|
+
writeVoiceReaction(emojis: Array<string>, channel_id: string): Promise<VoiceReactionSend>;
|
|
1201
|
+
forwardWebrtcSignaling(receiver_id: string, data_type: number, json_data: string, channel_id: string, caller_id: string): Promise<WebrtcSignalingFwd>;
|
|
1202
|
+
makeCallPush(receiver_id: string, json_data: string, channel_id: string, caller_id: string): Promise<IncomingCallPush>;
|
|
1203
|
+
handleDropdownBoxSelected(message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>): Promise<DropdownBoxSelected>;
|
|
1204
|
+
handleMessageButtonClick(message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string, extra_data: string): Promise<MessageButtonClicked>;
|
|
1205
|
+
writeChannelAppEvent(clan_id: string, channel_id: string, action: number): Promise<ChannelAppEvent>;
|
|
1206
1206
|
listDataSocket(request: ListDataSocket): Promise<any>;
|
|
1207
1207
|
private pingPong;
|
|
1208
1208
|
private startHeartbeatLoop;
|