mezon-js 2.10.22 → 2.10.24
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 +2 -0
- package/dist/api.gen.d.ts +1 -0
- package/dist/mezon-js.cjs.js +3 -2
- package/dist/mezon-js.esm.mjs +3 -2
- package/dist/socket.d.ts +12 -5
- package/package.json +1 -1
- package/socket.ts +15 -7
package/api.gen.ts
CHANGED
package/dist/api.gen.d.ts
CHANGED
package/dist/mezon-js.cjs.js
CHANGED
@@ -7720,7 +7720,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7720
7720
|
}
|
7721
7721
|
});
|
7722
7722
|
}
|
7723
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
7723
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
|
7724
7724
|
return __async(this, null, function* () {
|
7725
7725
|
const response = yield this.send({
|
7726
7726
|
channel_message_remove: {
|
@@ -7728,7 +7728,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7728
7728
|
channel_id,
|
7729
7729
|
mode,
|
7730
7730
|
message_id,
|
7731
|
-
is_public
|
7731
|
+
is_public,
|
7732
|
+
has_attachment
|
7732
7733
|
}
|
7733
7734
|
});
|
7734
7735
|
return response.channel_message_ack;
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -7686,7 +7686,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7686
7686
|
}
|
7687
7687
|
});
|
7688
7688
|
}
|
7689
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
7689
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
|
7690
7690
|
return __async(this, null, function* () {
|
7691
7691
|
const response = yield this.send({
|
7692
7692
|
channel_message_remove: {
|
@@ -7694,7 +7694,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7694
7694
|
channel_id,
|
7695
7695
|
mode,
|
7696
7696
|
message_id,
|
7697
|
-
is_public
|
7697
|
+
is_public,
|
7698
|
+
has_attachment
|
7698
7699
|
}
|
7699
7700
|
});
|
7700
7701
|
return response.channel_message_ack;
|
package/dist/socket.d.ts
CHANGED
@@ -99,12 +99,10 @@ export interface UserProfileRedis {
|
|
99
99
|
}
|
100
100
|
/** UserChannelAddedEvent */
|
101
101
|
export interface UserChannelAddedEvent {
|
102
|
-
|
102
|
+
channel_desc: ChannelDescription;
|
103
103
|
users: UserProfileRedis[];
|
104
104
|
status: string;
|
105
105
|
clan_id: string;
|
106
|
-
channel_type: number;
|
107
|
-
is_public: boolean;
|
108
106
|
}
|
109
107
|
export interface UserChannelRemovedEvent {
|
110
108
|
channel_id: string;
|
@@ -231,6 +229,8 @@ interface ChannelMessageRemove {
|
|
231
229
|
/** A unique ID for the chat message to be removed. */
|
232
230
|
message_id: string;
|
233
231
|
is_public: boolean;
|
232
|
+
/** attachments */
|
233
|
+
has_attachment?: boolean;
|
234
234
|
};
|
235
235
|
}
|
236
236
|
/** Presence update for a particular realtime chat channel. */
|
@@ -438,6 +438,10 @@ export interface RoleEvent {
|
|
438
438
|
role: ApiRole;
|
439
439
|
status: number;
|
440
440
|
user_id: string;
|
441
|
+
user_add_ids: Array<string>;
|
442
|
+
user_remove_ids: Array<string>;
|
443
|
+
active_permission_ids: Array<string>;
|
444
|
+
remove_permission_ids: Array<string>;
|
441
445
|
}
|
442
446
|
export interface EventEmoji {
|
443
447
|
id: string;
|
@@ -582,6 +586,9 @@ export interface PermissionSet {
|
|
582
586
|
export interface PermissionChangedEvent {
|
583
587
|
user_id: string;
|
584
588
|
channel_id: string;
|
589
|
+
add_permissions: ApiPermissionUpdate[];
|
590
|
+
remove_permissions: ApiPermissionUpdate[];
|
591
|
+
default_permissions: ApiPermissionUpdate[];
|
585
592
|
}
|
586
593
|
export interface DropdownBoxSelected {
|
587
594
|
message_id: string;
|
@@ -684,7 +691,7 @@ export interface Socket {
|
|
684
691
|
/** Leave a chat channel on the server. */
|
685
692
|
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
686
693
|
/** Remove a chat message from a chat channel on the server. */
|
687
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
694
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
|
688
695
|
/** Execute an RPC function to the server. */
|
689
696
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
690
697
|
/** Unfollow one or more users from their status updates. */
|
@@ -882,7 +889,7 @@ export declare class DefaultSocket implements Socket {
|
|
882
889
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
883
890
|
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
884
891
|
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
885
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
892
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
|
886
893
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
887
894
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
888
895
|
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>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -140,17 +140,13 @@ export interface UserProfileRedis {
|
|
140
140
|
/** UserChannelAddedEvent */
|
141
141
|
export interface UserChannelAddedEvent {
|
142
142
|
// the channel id
|
143
|
-
|
143
|
+
channel_desc: ChannelDescription;
|
144
144
|
// the user
|
145
145
|
users: UserProfileRedis[];
|
146
146
|
// the custom status
|
147
147
|
status: string;
|
148
148
|
// the clan id
|
149
149
|
clan_id: string;
|
150
|
-
// the channel type
|
151
|
-
channel_type: number;
|
152
|
-
// is public
|
153
|
-
is_public: boolean;
|
154
150
|
}
|
155
151
|
|
156
152
|
export interface UserChannelRemovedEvent {
|
@@ -327,6 +323,8 @@ interface ChannelMessageRemove {
|
|
327
323
|
message_id: string;
|
328
324
|
// Is public
|
329
325
|
is_public: boolean;
|
326
|
+
/** attachments */
|
327
|
+
has_attachment?: boolean;
|
330
328
|
};
|
331
329
|
}
|
332
330
|
|
@@ -637,6 +635,10 @@ export interface RoleEvent {
|
|
637
635
|
role: ApiRole;
|
638
636
|
status: number;
|
639
637
|
user_id: string;
|
638
|
+
user_add_ids: Array<string>;
|
639
|
+
user_remove_ids: Array<string>;
|
640
|
+
active_permission_ids: Array<string>;
|
641
|
+
remove_permission_ids: Array<string>;
|
640
642
|
}
|
641
643
|
|
642
644
|
export interface EventEmoji {
|
@@ -831,6 +833,9 @@ export interface PermissionSet {
|
|
831
833
|
export interface PermissionChangedEvent {
|
832
834
|
user_id: string;
|
833
835
|
channel_id: string;
|
836
|
+
add_permissions: ApiPermissionUpdate[];
|
837
|
+
remove_permissions: ApiPermissionUpdate[];
|
838
|
+
default_permissions: ApiPermissionUpdate[];
|
834
839
|
}
|
835
840
|
|
836
841
|
export interface DropdownBoxSelected {
|
@@ -974,7 +979,8 @@ export interface Socket {
|
|
974
979
|
channel_id: string,
|
975
980
|
mode: number,
|
976
981
|
is_public: boolean,
|
977
|
-
message_id: string
|
982
|
+
message_id: string,
|
983
|
+
has_attachment?: boolean
|
978
984
|
): Promise<ChannelMessageAck>;
|
979
985
|
|
980
986
|
/** Execute an RPC function to the server. */
|
@@ -2056,7 +2062,8 @@ export class DefaultSocket implements Socket {
|
|
2056
2062
|
channel_id: string,
|
2057
2063
|
mode: number,
|
2058
2064
|
is_public: boolean,
|
2059
|
-
message_id: string
|
2065
|
+
message_id: string,
|
2066
|
+
has_attachment?: boolean
|
2060
2067
|
): Promise<ChannelMessageAck> {
|
2061
2068
|
const response = await this.send({
|
2062
2069
|
channel_message_remove: {
|
@@ -2065,6 +2072,7 @@ export class DefaultSocket implements Socket {
|
|
2065
2072
|
mode: mode,
|
2066
2073
|
message_id: message_id,
|
2067
2074
|
is_public: is_public,
|
2075
|
+
has_attachment: has_attachment
|
2068
2076
|
},
|
2069
2077
|
});
|
2070
2078
|
|