mezon-js 2.7.11 → 2.7.13

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/api.gen.ts CHANGED
@@ -814,6 +814,8 @@ export interface ApiStorageObjects {
814
814
 
815
815
  /** Update a user's account details. */
816
816
  export interface ApiUpdateAccountRequest {
817
+ //
818
+ about_me?: string;
817
819
  //A URL for an avatar image.
818
820
  avatar_url?: string;
819
821
  //The display name of the user.
@@ -868,6 +870,8 @@ export interface ApiUploadAttachmentRequest {
868
870
 
869
871
  /** A user in the server. */
870
872
  export interface ApiUser {
873
+ //
874
+ about_me?: string;
871
875
  //The Apple Sign In ID in the user's account.
872
876
  apple_id?: string;
873
877
  //A URL for an avatar image.
package/dist/api.gen.d.ts CHANGED
@@ -471,6 +471,7 @@ export interface ApiStorageObjects {
471
471
  }
472
472
  /** Update a user's account details. */
473
473
  export interface ApiUpdateAccountRequest {
474
+ about_me?: string;
474
475
  avatar_url?: string;
475
476
  display_name?: string;
476
477
  lang_tag?: string;
@@ -503,6 +504,7 @@ export interface ApiUploadAttachmentRequest {
503
504
  }
504
505
  /** A user in the server. */
505
506
  export interface ApiUser {
507
+ about_me?: string;
506
508
  apple_id?: string;
507
509
  avatar_url?: string;
508
510
  create_time?: string;
@@ -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
  }
@@ -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>): Promise<ChannelMessageAck>;
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>): Promise<ChannelMessageAck>;
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.11",
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.13",
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>) : Promise<ChannelMessageAck>;
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> ): Promise<ChannelMessageAck> {
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