mezon-js 2.9.89 → 2.9.91
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.cjs.js +3 -2
- package/dist/mezon-js.esm.mjs +3 -2
- package/dist/socket.d.ts +5 -2
- package/package.json +1 -1
- package/socket.ts +11 -2
package/dist/mezon-js.cjs.js
CHANGED
@@ -7485,7 +7485,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7485
7485
|
updateStatus(status) {
|
7486
7486
|
return this.send({ status_update: { status } });
|
7487
7487
|
}
|
7488
|
-
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
7488
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
|
7489
7489
|
return __async(this, null, function* () {
|
7490
7490
|
const response = yield this.send({
|
7491
7491
|
channel_message_send: {
|
@@ -7499,7 +7499,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7499
7499
|
references,
|
7500
7500
|
anonymous_message,
|
7501
7501
|
mention_everyone,
|
7502
|
-
avatar
|
7502
|
+
avatar,
|
7503
|
+
code
|
7503
7504
|
}
|
7504
7505
|
});
|
7505
7506
|
return response.channel_message_ack;
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -7455,7 +7455,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7455
7455
|
updateStatus(status) {
|
7456
7456
|
return this.send({ status_update: { status } });
|
7457
7457
|
}
|
7458
|
-
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
7458
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
|
7459
7459
|
return __async(this, null, function* () {
|
7460
7460
|
const response = yield this.send({
|
7461
7461
|
channel_message_send: {
|
@@ -7469,7 +7469,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7469
7469
|
references,
|
7470
7470
|
anonymous_message,
|
7471
7471
|
mention_everyone,
|
7472
|
-
avatar
|
7472
|
+
avatar,
|
7473
|
+
code
|
7473
7474
|
}
|
7474
7475
|
});
|
7475
7476
|
return response.channel_message_ack;
|
package/dist/socket.d.ts
CHANGED
@@ -197,6 +197,7 @@ interface ChannelMessageSend {
|
|
197
197
|
mention_everyone?: boolean;
|
198
198
|
avatar: string;
|
199
199
|
is_public: boolean;
|
200
|
+
code: number;
|
200
201
|
};
|
201
202
|
}
|
202
203
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -288,6 +289,8 @@ export interface ChannelUpdatedEvent {
|
|
288
289
|
is_error: boolean;
|
289
290
|
app_url: string;
|
290
291
|
e2ee: number;
|
292
|
+
topic: string;
|
293
|
+
age_restricted: number;
|
291
294
|
}
|
292
295
|
export interface ChannelCreatedEvent {
|
293
296
|
clan_id: string;
|
@@ -654,7 +657,7 @@ export interface Socket {
|
|
654
657
|
/** Update the status for the current user online. */
|
655
658
|
updateStatus(status?: string): Promise<void>;
|
656
659
|
/** Send a chat message to a chat channel on the server. */
|
657
|
-
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>;
|
660
|
+
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): Promise<ChannelMessageAck>;
|
658
661
|
/** Send message typing */
|
659
662
|
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
660
663
|
/** Send message reaction */
|
@@ -841,7 +844,7 @@ export declare class DefaultSocket implements Socket {
|
|
841
844
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
842
845
|
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>;
|
843
846
|
updateStatus(status?: string): Promise<void>;
|
844
|
-
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>;
|
847
|
+
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): Promise<ChannelMessageAck>;
|
845
848
|
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>;
|
846
849
|
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
847
850
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -284,6 +284,8 @@ interface ChannelMessageSend {
|
|
284
284
|
avatar: string;
|
285
285
|
// Is public
|
286
286
|
is_public: boolean;
|
287
|
+
// code
|
288
|
+
code: number;
|
287
289
|
};
|
288
290
|
}
|
289
291
|
|
@@ -423,6 +425,10 @@ export interface ChannelUpdatedEvent {
|
|
423
425
|
app_url: string;
|
424
426
|
// e2ee
|
425
427
|
e2ee: number;
|
428
|
+
//
|
429
|
+
topic: string;
|
430
|
+
//
|
431
|
+
age_restricted: number;
|
426
432
|
}
|
427
433
|
|
428
434
|
export interface ChannelCreatedEvent {
|
@@ -965,7 +971,8 @@ export interface Socket {
|
|
965
971
|
references?: Array<ApiMessageRef>,
|
966
972
|
anonymous_message?: boolean,
|
967
973
|
mention_everyone?: boolean,
|
968
|
-
avatar?: string
|
974
|
+
avatar?: string,
|
975
|
+
code?: number
|
969
976
|
): Promise<ChannelMessageAck>;
|
970
977
|
|
971
978
|
/** Send message typing */
|
@@ -2052,7 +2059,8 @@ export class DefaultSocket implements Socket {
|
|
2052
2059
|
references?: Array<ApiMessageRef>,
|
2053
2060
|
anonymous_message?: boolean,
|
2054
2061
|
mention_everyone?: Boolean,
|
2055
|
-
avatar?: string
|
2062
|
+
avatar?: string,
|
2063
|
+
code?: number,
|
2056
2064
|
): Promise<ChannelMessageAck> {
|
2057
2065
|
const response = await this.send({
|
2058
2066
|
channel_message_send: {
|
@@ -2067,6 +2075,7 @@ export class DefaultSocket implements Socket {
|
|
2067
2075
|
anonymous_message: anonymous_message,
|
2068
2076
|
mention_everyone: mention_everyone,
|
2069
2077
|
avatar: avatar,
|
2078
|
+
code: code,
|
2070
2079
|
},
|
2071
2080
|
});
|
2072
2081
|
return response.channel_message_ack;
|