mezon-js 2.9.30 → 2.9.32
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +2 -4
- package/dist/api.gen.d.ts +1 -2
- package/dist/mezon-js.cjs.js +16 -20
- package/dist/mezon-js.esm.mjs +16 -20
- package/dist/socket.d.ts +16 -34
- package/package.json +1 -1
- package/socket.ts +23 -63
package/api.gen.ts
CHANGED
@@ -707,6 +707,8 @@ export interface ApiChannelSettingItem {
|
|
707
707
|
//
|
708
708
|
meeting_code?: string;
|
709
709
|
//
|
710
|
+
message_count?: string;
|
711
|
+
//
|
710
712
|
parent_id?: string;
|
711
713
|
//
|
712
714
|
user_ids?: Array<string>;
|
@@ -1328,10 +1330,6 @@ export interface ApiMessageReaction {
|
|
1328
1330
|
channel_label: string;
|
1329
1331
|
/** The message that user react */
|
1330
1332
|
message_id: string;
|
1331
|
-
// The parent id to sent to.
|
1332
|
-
parent_id?: string;
|
1333
|
-
// is parent public
|
1334
|
-
is_parent_public?: boolean;
|
1335
1333
|
}
|
1336
1334
|
|
1337
1335
|
export interface ApiListChannelAppsResponse {
|
package/dist/api.gen.d.ts
CHANGED
@@ -406,6 +406,7 @@ export interface ApiChannelSettingItem {
|
|
406
406
|
creator_id?: string;
|
407
407
|
id?: string;
|
408
408
|
meeting_code?: string;
|
409
|
+
message_count?: string;
|
409
410
|
parent_id?: string;
|
410
411
|
user_ids?: Array<string>;
|
411
412
|
}
|
@@ -770,8 +771,6 @@ export interface ApiMessageReaction {
|
|
770
771
|
channel_label: string;
|
771
772
|
/** The message that user react */
|
772
773
|
message_id: string;
|
773
|
-
parent_id?: string;
|
774
|
-
is_parent_public?: boolean;
|
775
774
|
}
|
776
775
|
export interface ApiListChannelAppsResponse {
|
777
776
|
channel_apps?: Array<ApiChannelAppResponse>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6294,38 +6294,34 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6294
6294
|
return response.clan_join;
|
6295
6295
|
});
|
6296
6296
|
}
|
6297
|
-
joinChat(clan_id,
|
6297
|
+
joinChat(clan_id, channel_id, channel_type, is_public) {
|
6298
6298
|
return __async(this, null, function* () {
|
6299
6299
|
const response = yield this.send(
|
6300
6300
|
{
|
6301
6301
|
channel_join: {
|
6302
6302
|
clan_id,
|
6303
|
-
parent_id,
|
6304
6303
|
channel_id,
|
6305
6304
|
channel_type,
|
6306
|
-
is_public
|
6307
|
-
is_parent_public
|
6305
|
+
is_public
|
6308
6306
|
}
|
6309
6307
|
}
|
6310
6308
|
);
|
6311
6309
|
return response.channel;
|
6312
6310
|
});
|
6313
6311
|
}
|
6314
|
-
leaveChat(clan_id,
|
6315
|
-
return this.send({ channel_leave: { clan_id,
|
6312
|
+
leaveChat(clan_id, channel_id, channel_type, is_public) {
|
6313
|
+
return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
|
6316
6314
|
}
|
6317
|
-
removeChatMessage(clan_id,
|
6315
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
6318
6316
|
return __async(this, null, function* () {
|
6319
6317
|
const response = yield this.send(
|
6320
6318
|
{
|
6321
6319
|
channel_message_remove: {
|
6322
6320
|
clan_id,
|
6323
|
-
parent_id,
|
6324
6321
|
channel_id,
|
6325
6322
|
mode,
|
6326
6323
|
message_id,
|
6327
|
-
is_public
|
6328
|
-
is_parent_public
|
6324
|
+
is_public
|
6329
6325
|
}
|
6330
6326
|
}
|
6331
6327
|
);
|
@@ -6349,30 +6345,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6349
6345
|
unfollowUsers(user_ids) {
|
6350
6346
|
return this.send({ status_unfollow: { user_ids } });
|
6351
6347
|
}
|
6352
|
-
updateChatMessage(clan_id,
|
6348
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
|
6353
6349
|
return __async(this, null, function* () {
|
6354
|
-
const response = yield this.send({ channel_message_update: { clan_id,
|
6350
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
|
6355
6351
|
return response.channel_message_ack;
|
6356
6352
|
});
|
6357
6353
|
}
|
6358
6354
|
updateStatus(status) {
|
6359
6355
|
return this.send({ status_update: { status } });
|
6360
6356
|
}
|
6361
|
-
writeChatMessage(clan_id,
|
6357
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
6362
6358
|
return __async(this, null, function* () {
|
6363
|
-
const response = yield this.send({ channel_message_send: { clan_id,
|
6359
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
|
6364
6360
|
return response.channel_message_ack;
|
6365
6361
|
});
|
6366
6362
|
}
|
6367
|
-
writeMessageReaction(id, clan_id,
|
6363
|
+
writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
|
6368
6364
|
return __async(this, null, function* () {
|
6369
|
-
const response = yield this.send({ message_reaction_event: { id, clan_id,
|
6365
|
+
const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
|
6370
6366
|
return response.message_reaction_event;
|
6371
6367
|
});
|
6372
6368
|
}
|
6373
|
-
writeMessageTyping(clan_id,
|
6369
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public) {
|
6374
6370
|
return __async(this, null, function* () {
|
6375
|
-
const response = yield this.send({ message_typing_event: { clan_id,
|
6371
|
+
const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
|
6376
6372
|
return response.message_typing_event;
|
6377
6373
|
});
|
6378
6374
|
}
|
@@ -6382,9 +6378,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6382
6378
|
return response.last_seen_message_event;
|
6383
6379
|
});
|
6384
6380
|
}
|
6385
|
-
writeLastPinMessage(clan_id,
|
6381
|
+
writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
|
6386
6382
|
return __async(this, null, function* () {
|
6387
|
-
const response = yield this.send({ last_pin_message_event: { clan_id,
|
6383
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
|
6388
6384
|
return response.last_pin_message_event;
|
6389
6385
|
});
|
6390
6386
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6265,38 +6265,34 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6265
6265
|
return response.clan_join;
|
6266
6266
|
});
|
6267
6267
|
}
|
6268
|
-
joinChat(clan_id,
|
6268
|
+
joinChat(clan_id, channel_id, channel_type, is_public) {
|
6269
6269
|
return __async(this, null, function* () {
|
6270
6270
|
const response = yield this.send(
|
6271
6271
|
{
|
6272
6272
|
channel_join: {
|
6273
6273
|
clan_id,
|
6274
|
-
parent_id,
|
6275
6274
|
channel_id,
|
6276
6275
|
channel_type,
|
6277
|
-
is_public
|
6278
|
-
is_parent_public
|
6276
|
+
is_public
|
6279
6277
|
}
|
6280
6278
|
}
|
6281
6279
|
);
|
6282
6280
|
return response.channel;
|
6283
6281
|
});
|
6284
6282
|
}
|
6285
|
-
leaveChat(clan_id,
|
6286
|
-
return this.send({ channel_leave: { clan_id,
|
6283
|
+
leaveChat(clan_id, channel_id, channel_type, is_public) {
|
6284
|
+
return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
|
6287
6285
|
}
|
6288
|
-
removeChatMessage(clan_id,
|
6286
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
6289
6287
|
return __async(this, null, function* () {
|
6290
6288
|
const response = yield this.send(
|
6291
6289
|
{
|
6292
6290
|
channel_message_remove: {
|
6293
6291
|
clan_id,
|
6294
|
-
parent_id,
|
6295
6292
|
channel_id,
|
6296
6293
|
mode,
|
6297
6294
|
message_id,
|
6298
|
-
is_public
|
6299
|
-
is_parent_public
|
6295
|
+
is_public
|
6300
6296
|
}
|
6301
6297
|
}
|
6302
6298
|
);
|
@@ -6320,30 +6316,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6320
6316
|
unfollowUsers(user_ids) {
|
6321
6317
|
return this.send({ status_unfollow: { user_ids } });
|
6322
6318
|
}
|
6323
|
-
updateChatMessage(clan_id,
|
6319
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
|
6324
6320
|
return __async(this, null, function* () {
|
6325
|
-
const response = yield this.send({ channel_message_update: { clan_id,
|
6321
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
|
6326
6322
|
return response.channel_message_ack;
|
6327
6323
|
});
|
6328
6324
|
}
|
6329
6325
|
updateStatus(status) {
|
6330
6326
|
return this.send({ status_update: { status } });
|
6331
6327
|
}
|
6332
|
-
writeChatMessage(clan_id,
|
6328
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
6333
6329
|
return __async(this, null, function* () {
|
6334
|
-
const response = yield this.send({ channel_message_send: { clan_id,
|
6330
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
|
6335
6331
|
return response.channel_message_ack;
|
6336
6332
|
});
|
6337
6333
|
}
|
6338
|
-
writeMessageReaction(id, clan_id,
|
6334
|
+
writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
|
6339
6335
|
return __async(this, null, function* () {
|
6340
|
-
const response = yield this.send({ message_reaction_event: { id, clan_id,
|
6336
|
+
const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
|
6341
6337
|
return response.message_reaction_event;
|
6342
6338
|
});
|
6343
6339
|
}
|
6344
|
-
writeMessageTyping(clan_id,
|
6340
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public) {
|
6345
6341
|
return __async(this, null, function* () {
|
6346
|
-
const response = yield this.send({ message_typing_event: { clan_id,
|
6342
|
+
const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
|
6347
6343
|
return response.message_typing_event;
|
6348
6344
|
});
|
6349
6345
|
}
|
@@ -6353,9 +6349,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6353
6349
|
return response.last_seen_message_event;
|
6354
6350
|
});
|
6355
6351
|
}
|
6356
|
-
writeLastPinMessage(clan_id,
|
6352
|
+
writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
|
6357
6353
|
return __async(this, null, function* () {
|
6358
|
-
const response = yield this.send({ last_pin_message_event: { clan_id,
|
6354
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
|
6359
6355
|
return response.last_pin_message_event;
|
6360
6356
|
});
|
6361
6357
|
}
|
package/dist/socket.d.ts
CHANGED
@@ -61,8 +61,6 @@ interface ChannelJoin {
|
|
61
61
|
/** Whether the user's channel presence is hidden when joining. */
|
62
62
|
hidden: boolean;
|
63
63
|
is_public: boolean;
|
64
|
-
parent_id: string;
|
65
|
-
is_parent_public: boolean;
|
66
64
|
};
|
67
65
|
}
|
68
66
|
/** Leave a realtime chat channel. */
|
@@ -73,8 +71,6 @@ interface ChannelLeave {
|
|
73
71
|
mode: number;
|
74
72
|
channel_label: string;
|
75
73
|
is_public: boolean;
|
76
|
-
parent_id: string;
|
77
|
-
is_parent_public: boolean;
|
78
74
|
};
|
79
75
|
}
|
80
76
|
export interface AddClanUserEvent {
|
@@ -105,8 +101,6 @@ export interface UserChannelAddedEvent {
|
|
105
101
|
clan_id: string;
|
106
102
|
channel_type: number;
|
107
103
|
is_public: boolean;
|
108
|
-
parent_id: string;
|
109
|
-
is_parent_public: boolean;
|
110
104
|
}
|
111
105
|
export interface UserChannelRemovedEvent {
|
112
106
|
channel_id: string;
|
@@ -130,8 +124,6 @@ export interface LastPinMessageEvent {
|
|
130
124
|
/** operation */
|
131
125
|
operation: number;
|
132
126
|
is_public: boolean;
|
133
|
-
parent_id?: string;
|
134
|
-
is_parent_public?: string;
|
135
127
|
}
|
136
128
|
/** Last seen message by user */
|
137
129
|
export interface LastSeenMessageEvent {
|
@@ -152,8 +144,6 @@ export interface MessageTypingEvent {
|
|
152
144
|
/** Message sender, usually a user ID. */
|
153
145
|
sender_id: string;
|
154
146
|
is_public: boolean;
|
155
|
-
parent_id?: string;
|
156
|
-
is_parent_public?: string;
|
157
147
|
}
|
158
148
|
export interface UserProfileUpdatedEvent {
|
159
149
|
user_id: string;
|
@@ -198,8 +188,6 @@ interface ChannelMessageSend {
|
|
198
188
|
mention_everyone?: boolean;
|
199
189
|
avatar: string;
|
200
190
|
is_public: boolean;
|
201
|
-
parent_id?: string;
|
202
|
-
is_parent_public?: boolean;
|
203
191
|
};
|
204
192
|
}
|
205
193
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -218,8 +206,6 @@ interface ChannelMessageUpdate {
|
|
218
206
|
/** The mode payload. */
|
219
207
|
mode: number;
|
220
208
|
is_public: boolean;
|
221
|
-
parent_id?: string;
|
222
|
-
is_parent_public?: boolean;
|
223
209
|
};
|
224
210
|
}
|
225
211
|
/** Remove a message previously sent to a realtime chat channel. */
|
@@ -234,8 +220,6 @@ interface ChannelMessageRemove {
|
|
234
220
|
/** A unique ID for the chat message to be removed. */
|
235
221
|
message_id: string;
|
236
222
|
is_public: boolean;
|
237
|
-
parent_id?: string;
|
238
|
-
is_parent_public?: boolean;
|
239
223
|
};
|
240
224
|
}
|
241
225
|
/** Presence update for a particular realtime chat channel. */
|
@@ -305,8 +289,6 @@ export interface ChannelCreatedEvent {
|
|
305
289
|
channel_private: number;
|
306
290
|
channel_type: number;
|
307
291
|
status: number;
|
308
|
-
parent_id: string;
|
309
|
-
is_parent_public: boolean;
|
310
292
|
app_url: string;
|
311
293
|
}
|
312
294
|
export interface ChannelDeletedEvent {
|
@@ -600,29 +582,29 @@ export interface Socket {
|
|
600
582
|
/** Join clan chat */
|
601
583
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
602
584
|
/** Join a chat channel on the server. */
|
603
|
-
joinChat(clan_id: string,
|
585
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
604
586
|
/** Leave a chat channel on the server. */
|
605
|
-
leaveChat(clan_id: string,
|
587
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
606
588
|
/** Remove a chat message from a chat channel on the server. */
|
607
|
-
removeChatMessage(clan_id: string,
|
589
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
608
590
|
/** Execute an RPC function to the server. */
|
609
591
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
610
592
|
/** Unfollow one or more users from their status updates. */
|
611
593
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
612
594
|
/** Update a chat message on a chat channel in the server. */
|
613
|
-
updateChatMessage(clan_id: string,
|
595
|
+
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): Promise<ChannelMessageAck>;
|
614
596
|
/** Update the status for the current user online. */
|
615
597
|
updateStatus(status?: string): Promise<void>;
|
616
598
|
/** Send a chat message to a chat channel on the server. */
|
617
|
-
writeChatMessage(clan_id: string,
|
599
|
+
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): Promise<ChannelMessageAck>;
|
618
600
|
/** Send message typing */
|
619
|
-
writeMessageTyping(clan_id: string,
|
601
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
620
602
|
/** Send message reaction */
|
621
|
-
writeMessageReaction(id: string, clan_id: string,
|
603
|
+
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): Promise<ApiMessageReaction>;
|
622
604
|
/** Send last seen message */
|
623
605
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
624
606
|
/** Send last pin message */
|
625
|
-
writeLastPinMessage(clan_id: string,
|
607
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
626
608
|
/** Send custom user status */
|
627
609
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
628
610
|
/** send voice joined */
|
@@ -772,18 +754,18 @@ export declare class DefaultSocket implements Socket {
|
|
772
754
|
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
|
773
755
|
followUsers(userIds: string[]): Promise<Status>;
|
774
756
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
775
|
-
joinChat(clan_id: string,
|
776
|
-
leaveChat(clan_id: string,
|
777
|
-
removeChatMessage(clan_id: string,
|
757
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
758
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
759
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
778
760
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
779
761
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
780
|
-
updateChatMessage(clan_id: string,
|
762
|
+
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): Promise<ChannelMessageAck>;
|
781
763
|
updateStatus(status?: string): Promise<void>;
|
782
|
-
writeChatMessage(clan_id: string,
|
783
|
-
writeMessageReaction(id: string, clan_id: string,
|
784
|
-
writeMessageTyping(clan_id: string,
|
764
|
+
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): Promise<ChannelMessageAck>;
|
765
|
+
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): Promise<ApiMessageReaction>;
|
766
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
785
767
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
786
|
-
writeLastPinMessage(clan_id: string,
|
768
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
787
769
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
788
770
|
writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
|
789
771
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -75,10 +75,6 @@ interface ChannelJoin {
|
|
75
75
|
hidden: boolean;
|
76
76
|
// is public
|
77
77
|
is_public: boolean;
|
78
|
-
// parent id
|
79
|
-
parent_id: string;
|
80
|
-
// parent public
|
81
|
-
is_parent_public: boolean;
|
82
78
|
};
|
83
79
|
}
|
84
80
|
|
@@ -93,10 +89,6 @@ interface ChannelLeave {
|
|
93
89
|
channel_label: string;
|
94
90
|
// Is public
|
95
91
|
is_public: boolean;
|
96
|
-
// parent id
|
97
|
-
parent_id: string;
|
98
|
-
// parent public
|
99
|
-
is_parent_public: boolean;
|
100
92
|
};
|
101
93
|
}
|
102
94
|
|
@@ -138,10 +130,6 @@ export interface UserChannelAddedEvent {
|
|
138
130
|
channel_type: number;
|
139
131
|
// is public
|
140
132
|
is_public: boolean;
|
141
|
-
// parent id
|
142
|
-
parent_id: string;
|
143
|
-
// parent public
|
144
|
-
is_parent_public: boolean;
|
145
133
|
}
|
146
134
|
|
147
135
|
export interface UserChannelRemovedEvent {
|
@@ -176,10 +164,6 @@ export interface LastPinMessageEvent {
|
|
176
164
|
operation: number;
|
177
165
|
// Is public
|
178
166
|
is_public: boolean;
|
179
|
-
// The parent id to sent to.
|
180
|
-
parent_id?: string;
|
181
|
-
// is parent public
|
182
|
-
is_parent_public?: string;
|
183
167
|
}
|
184
168
|
|
185
169
|
/** Last seen message by user */
|
@@ -208,10 +192,6 @@ export interface MessageTypingEvent {
|
|
208
192
|
sender_id: string;
|
209
193
|
// Is public
|
210
194
|
is_public: boolean;
|
211
|
-
// The parent id to sent to.
|
212
|
-
parent_id?: string;
|
213
|
-
// is parent public
|
214
|
-
is_parent_public?: string;
|
215
195
|
}
|
216
196
|
|
217
197
|
// user profile updated event
|
@@ -275,10 +255,6 @@ interface ChannelMessageSend {
|
|
275
255
|
avatar: string;
|
276
256
|
// Is public
|
277
257
|
is_public: boolean;
|
278
|
-
// The parent id to sent to.
|
279
|
-
parent_id?: string;
|
280
|
-
// is parent public
|
281
|
-
is_parent_public?: boolean;
|
282
258
|
};
|
283
259
|
}
|
284
260
|
|
@@ -299,10 +275,6 @@ interface ChannelMessageUpdate {
|
|
299
275
|
mode: number;
|
300
276
|
// Is public
|
301
277
|
is_public: boolean;
|
302
|
-
// The parent id to sent to.
|
303
|
-
parent_id?: string;
|
304
|
-
// is parent public
|
305
|
-
is_parent_public?: boolean;
|
306
278
|
};
|
307
279
|
}
|
308
280
|
|
@@ -321,10 +293,6 @@ interface ChannelMessageRemove {
|
|
321
293
|
message_id: string;
|
322
294
|
// Is public
|
323
295
|
is_public: boolean;
|
324
|
-
// The parent id to sent to.
|
325
|
-
parent_id?: string;
|
326
|
-
// is parent public
|
327
|
-
is_parent_public?: boolean;
|
328
296
|
};
|
329
297
|
}
|
330
298
|
|
@@ -445,10 +413,6 @@ export interface ChannelCreatedEvent {
|
|
445
413
|
channel_type: number;
|
446
414
|
// status
|
447
415
|
status: number;
|
448
|
-
// parent
|
449
|
-
parent_id: string;
|
450
|
-
// parent public
|
451
|
-
is_parent_public: boolean;
|
452
416
|
// app url
|
453
417
|
app_url: string;
|
454
418
|
}
|
@@ -849,13 +813,13 @@ export interface Socket {
|
|
849
813
|
joinClanChat(clan_id: string) : Promise<ClanJoin>;
|
850
814
|
|
851
815
|
/** Join a chat channel on the server. */
|
852
|
-
joinChat(clan_id: string,
|
816
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<Channel>;
|
853
817
|
|
854
818
|
/** Leave a chat channel on the server. */
|
855
|
-
leaveChat(clan_id: string,
|
819
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
|
856
820
|
|
857
821
|
/** Remove a chat message from a chat channel on the server. */
|
858
|
-
removeChatMessage(clan_id: string,
|
822
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
|
859
823
|
|
860
824
|
/** Execute an RPC function to the server. */
|
861
825
|
rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
|
@@ -864,25 +828,25 @@ export interface Socket {
|
|
864
828
|
unfollowUsers(user_ids : string[]) : Promise<void>;
|
865
829
|
|
866
830
|
/** Update a chat message on a chat channel in the server. */
|
867
|
-
updateChatMessage(clan_id: string,
|
831
|
+
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) : Promise<ChannelMessageAck>;
|
868
832
|
|
869
833
|
/** Update the status for the current user online. */
|
870
834
|
updateStatus(status?: string) : Promise<void>;
|
871
835
|
|
872
836
|
/** Send a chat message to a chat channel on the server. */
|
873
|
-
writeChatMessage(clan_id: string,
|
837
|
+
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) : Promise<ChannelMessageAck>;
|
874
838
|
|
875
839
|
/** Send message typing */
|
876
|
-
writeMessageTyping(clan_id: string,
|
840
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean) : Promise<MessageTypingEvent>;
|
877
841
|
|
878
842
|
/** Send message reaction */
|
879
|
-
writeMessageReaction(id: string, clan_id: string,
|
843
|
+
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) : Promise<ApiMessageReaction>;
|
880
844
|
|
881
845
|
/** Send last seen message */
|
882
846
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number) : Promise<LastSeenMessageEvent>;
|
883
847
|
|
884
848
|
/** Send last pin message */
|
885
|
-
writeLastPinMessage(clan_id: string,
|
849
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
|
886
850
|
|
887
851
|
/** Send custom user status */
|
888
852
|
writeCustomStatus(clan_id: string, status: string) : Promise<CustomStatusEvent>;
|
@@ -1589,16 +1553,14 @@ export class DefaultSocket implements Socket {
|
|
1589
1553
|
return response.clan_join;
|
1590
1554
|
}
|
1591
1555
|
|
1592
|
-
async joinChat(clan_id: string,
|
1556
|
+
async joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel> {
|
1593
1557
|
|
1594
1558
|
const response = await this.send({
|
1595
1559
|
channel_join: {
|
1596
1560
|
clan_id: clan_id,
|
1597
|
-
parent_id: parent_id,
|
1598
1561
|
channel_id: channel_id,
|
1599
1562
|
channel_type: channel_type,
|
1600
|
-
is_public: is_public
|
1601
|
-
is_parent_public: is_parent_public
|
1563
|
+
is_public: is_public
|
1602
1564
|
}
|
1603
1565
|
}
|
1604
1566
|
);
|
@@ -1606,21 +1568,19 @@ export class DefaultSocket implements Socket {
|
|
1606
1568
|
return response.channel;
|
1607
1569
|
}
|
1608
1570
|
|
1609
|
-
leaveChat(clan_id: string,
|
1610
|
-
return this.send({channel_leave: {clan_id: clan_id,
|
1571
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
|
1572
|
+
return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
|
1611
1573
|
}
|
1612
1574
|
|
1613
|
-
async removeChatMessage(clan_id: string,
|
1575
|
+
async removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
|
1614
1576
|
const response = await this.send(
|
1615
1577
|
{
|
1616
1578
|
channel_message_remove: {
|
1617
1579
|
clan_id: clan_id,
|
1618
|
-
parent_id: parent_id,
|
1619
1580
|
channel_id: channel_id,
|
1620
1581
|
mode: mode,
|
1621
1582
|
message_id: message_id,
|
1622
1583
|
is_public: is_public,
|
1623
|
-
is_parent_public: is_parent_public
|
1624
1584
|
}
|
1625
1585
|
}
|
1626
1586
|
);
|
@@ -1645,8 +1605,8 @@ export class DefaultSocket implements Socket {
|
|
1645
1605
|
return this.send({status_unfollow: {user_ids: user_ids}});
|
1646
1606
|
}
|
1647
1607
|
|
1648
|
-
async updateChatMessage(clan_id: string,
|
1649
|
-
const response = await this.send({channel_message_update: {clan_id: clan_id,
|
1608
|
+
async 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): Promise<ChannelMessageAck> {
|
1609
|
+
const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode, is_public: is_public, hide_editted: hideEditted}});
|
1650
1610
|
return response.channel_message_ack;
|
1651
1611
|
}
|
1652
1612
|
|
@@ -1654,18 +1614,18 @@ export class DefaultSocket implements Socket {
|
|
1654
1614
|
return this.send({status_update: {status: status}});
|
1655
1615
|
}
|
1656
1616
|
|
1657
|
-
async writeChatMessage(clan_id: string,
|
1658
|
-
const response = await this.send({channel_message_send: {clan_id: clan_id,
|
1617
|
+
async 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 ): Promise<ChannelMessageAck> {
|
1618
|
+
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone: mention_everyone, avatar: avatar}});
|
1659
1619
|
return response.channel_message_ack;
|
1660
1620
|
}
|
1661
1621
|
|
1662
|
-
async writeMessageReaction(id: string, clan_id: string,
|
1663
|
-
const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id,
|
1622
|
+
async 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): Promise<ApiMessageReaction> {
|
1623
|
+
const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, emoji_id: emoji_id, emoji: emoji, count: count, message_sender_id: message_sender_id, action: action_delete}});
|
1664
1624
|
return response.message_reaction_event
|
1665
1625
|
}
|
1666
1626
|
|
1667
|
-
async writeMessageTyping(clan_id: string,
|
1668
|
-
const response = await this.send({message_typing_event: {clan_id: clan_id,
|
1627
|
+
async writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent> {
|
1628
|
+
const response = await this.send({message_typing_event: {clan_id: clan_id, channel_id: channel_id, mode:mode, is_public: is_public}});
|
1669
1629
|
return response.message_typing_event
|
1670
1630
|
}
|
1671
1631
|
|
@@ -1674,8 +1634,8 @@ export class DefaultSocket implements Socket {
|
|
1674
1634
|
return response.last_seen_message_event
|
1675
1635
|
}
|
1676
1636
|
|
1677
|
-
async writeLastPinMessage(clan_id: string,
|
1678
|
-
const response = await this.send({last_pin_message_event: {clan_id: clan_id,
|
1637
|
+
async writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
|
1638
|
+
const response = await this.send({last_pin_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
|
1679
1639
|
return response.last_pin_message_event
|
1680
1640
|
}
|
1681
1641
|
|