mezon-js 2.7.11 → 2.7.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +2 -2
- package/dist/mezon-js.esm.mjs +2 -2
- package/dist/socket.d.ts +3 -2
- package/package.json +49 -49
- package/socket.ts +5 -3
package/dist/mezon-js.cjs.js
CHANGED
@@ -3919,9 +3919,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
3919
3919
|
updateStatus(status) {
|
3920
3920
|
return this.send({ status_update: { status } });
|
3921
3921
|
}
|
3922
|
-
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references) {
|
3922
|
+
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message) {
|
3923
3923
|
return __async(this, null, function* () {
|
3924
|
-
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references } });
|
3924
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message } });
|
3925
3925
|
return response.channel_message_ack;
|
3926
3926
|
});
|
3927
3927
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -3891,9 +3891,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
3891
3891
|
updateStatus(status) {
|
3892
3892
|
return this.send({ status_update: { status } });
|
3893
3893
|
}
|
3894
|
-
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references) {
|
3894
|
+
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message) {
|
3895
3895
|
return __async(this, null, function* () {
|
3896
|
-
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references } });
|
3896
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message } });
|
3897
3897
|
return response.channel_message_ack;
|
3898
3898
|
});
|
3899
3899
|
}
|
package/dist/socket.d.ts
CHANGED
@@ -197,6 +197,7 @@ interface ChannelMessageSend {
|
|
197
197
|
content: any;
|
198
198
|
mentions?: Array<MessageMentionEvent>;
|
199
199
|
attachments?: Array<MessageAttachmentEvent>;
|
200
|
+
anonymous_message?: boolean;
|
200
201
|
};
|
201
202
|
}
|
202
203
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -539,7 +540,7 @@ export interface Socket {
|
|
539
540
|
/** Update the status for the current user online. */
|
540
541
|
updateStatus(status?: string): Promise<void>;
|
541
542
|
/** Send a chat message to a chat channel on the server. */
|
542
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef
|
543
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean): Promise<ChannelMessageAck>;
|
543
544
|
/** Send message typing */
|
544
545
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
|
545
546
|
/** Send message reaction */
|
@@ -664,7 +665,7 @@ export declare class DefaultSocket implements Socket {
|
|
664
665
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
665
666
|
updateChatMessage(channel_id: string, channel_label: string, mode: number, message_id: string, content: any): Promise<ChannelMessageAck>;
|
666
667
|
updateStatus(status?: string): Promise<void>;
|
667
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef
|
668
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean): Promise<ChannelMessageAck>;
|
668
669
|
writeMessageReaction(id: string, channel_id: string, channel_label: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
|
669
670
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
|
670
671
|
writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
|
package/package.json
CHANGED
@@ -1,49 +1,49 @@
|
|
1
|
-
{
|
2
|
-
"name": "mezon-js",
|
3
|
-
"version": "2.7.
|
4
|
-
"scripts": {
|
5
|
-
"build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
|
6
|
-
},
|
7
|
-
"description": "JavaScript client for Mezon server written in TypeScript.",
|
8
|
-
"main": "dist/mezon-js.cjs.js",
|
9
|
-
"module": "dist/mezon-js.esm.mjs",
|
10
|
-
"types": "dist/index.d.ts",
|
11
|
-
"exports": {
|
12
|
-
"./package.json": "./package.json",
|
13
|
-
".": {
|
14
|
-
"types": "./dist/index.d.ts",
|
15
|
-
"import": "./dist/mezon-js.esm.mjs",
|
16
|
-
"require": "./dist/mezon-js.cjs.js"
|
17
|
-
}
|
18
|
-
},
|
19
|
-
"keywords": [
|
20
|
-
"app server",
|
21
|
-
"client library",
|
22
|
-
"game server",
|
23
|
-
"mezon",
|
24
|
-
"realtime",
|
25
|
-
"realtime chat"
|
26
|
-
],
|
27
|
-
"repository": {
|
28
|
-
"type": "git",
|
29
|
-
"url": "git+https://github.com/nccasia/mezon-js.git"
|
30
|
-
},
|
31
|
-
"homepage": "https://mezon.vn",
|
32
|
-
"bugs": {
|
33
|
-
"url": "https://github.com/nccasia/mezon-js/issues"
|
34
|
-
},
|
35
|
-
"license": "Apache-2.0",
|
36
|
-
"dependencies": {
|
37
|
-
"@scarf/scarf": "^1.1.1",
|
38
|
-
"base64-arraybuffer": "^1.0.2",
|
39
|
-
"esbuild": "^0.19.11",
|
40
|
-
"js-base64": "^3.7.4",
|
41
|
-
"whatwg-fetch": "^3.6.2"
|
42
|
-
},
|
43
|
-
"devDependencies": {
|
44
|
-
"@rollup/plugin-node-resolve": "^15.0.1",
|
45
|
-
"@rollup/plugin-typescript": "^11.0.0",
|
46
|
-
"rollup": "^3.10.0",
|
47
|
-
"tslib": "^2.4.1"
|
48
|
-
}
|
49
|
-
}
|
1
|
+
{
|
2
|
+
"name": "mezon-js",
|
3
|
+
"version": "2.7.12",
|
4
|
+
"scripts": {
|
5
|
+
"build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
|
6
|
+
},
|
7
|
+
"description": "JavaScript client for Mezon server written in TypeScript.",
|
8
|
+
"main": "dist/mezon-js.cjs.js",
|
9
|
+
"module": "dist/mezon-js.esm.mjs",
|
10
|
+
"types": "dist/index.d.ts",
|
11
|
+
"exports": {
|
12
|
+
"./package.json": "./package.json",
|
13
|
+
".": {
|
14
|
+
"types": "./dist/index.d.ts",
|
15
|
+
"import": "./dist/mezon-js.esm.mjs",
|
16
|
+
"require": "./dist/mezon-js.cjs.js"
|
17
|
+
}
|
18
|
+
},
|
19
|
+
"keywords": [
|
20
|
+
"app server",
|
21
|
+
"client library",
|
22
|
+
"game server",
|
23
|
+
"mezon",
|
24
|
+
"realtime",
|
25
|
+
"realtime chat"
|
26
|
+
],
|
27
|
+
"repository": {
|
28
|
+
"type": "git",
|
29
|
+
"url": "git+https://github.com/nccasia/mezon-js.git"
|
30
|
+
},
|
31
|
+
"homepage": "https://mezon.vn",
|
32
|
+
"bugs": {
|
33
|
+
"url": "https://github.com/nccasia/mezon-js/issues"
|
34
|
+
},
|
35
|
+
"license": "Apache-2.0",
|
36
|
+
"dependencies": {
|
37
|
+
"@scarf/scarf": "^1.1.1",
|
38
|
+
"base64-arraybuffer": "^1.0.2",
|
39
|
+
"esbuild": "^0.19.11",
|
40
|
+
"js-base64": "^3.7.4",
|
41
|
+
"whatwg-fetch": "^3.6.2"
|
42
|
+
},
|
43
|
+
"devDependencies": {
|
44
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
45
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
46
|
+
"rollup": "^3.10.0",
|
47
|
+
"tslib": "^2.4.1"
|
48
|
+
}
|
49
|
+
}
|
package/socket.ts
CHANGED
@@ -272,6 +272,8 @@ interface ChannelMessageSend {
|
|
272
272
|
mentions?: Array<MessageMentionEvent>;
|
273
273
|
//
|
274
274
|
attachments?: Array<MessageAttachmentEvent>;
|
275
|
+
//
|
276
|
+
anonymous_message?: boolean;
|
275
277
|
};
|
276
278
|
}
|
277
279
|
|
@@ -692,7 +694,7 @@ export interface Socket {
|
|
692
694
|
updateStatus(status? : string) : Promise<void>;
|
693
695
|
|
694
696
|
/** Send a chat message to a chat channel on the server. */
|
695
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef
|
697
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean) : Promise<ChannelMessageAck>;
|
696
698
|
|
697
699
|
/** Send message typing */
|
698
700
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number) : Promise<MessageTypingEvent>;
|
@@ -1271,8 +1273,8 @@ export class DefaultSocket implements Socket {
|
|
1271
1273
|
return this.send({status_update: {status: status}});
|
1272
1274
|
}
|
1273
1275
|
|
1274
|
-
async writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef
|
1275
|
-
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, channel_label:channel_label, mode:mode, content: content, mentions: mentions, attachments: attachments, references: references}});
|
1276
|
+
async writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean ): Promise<ChannelMessageAck> {
|
1277
|
+
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, channel_label:channel_label, mode:mode, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message}});
|
1276
1278
|
return response.channel_message_ack;
|
1277
1279
|
}
|
1278
1280
|
|