mezon-js 2.10.15 → 2.10.16
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/client.ts +4 -1
- package/dist/api.gen.d.ts +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/mezon-js.cjs.js +4 -2
- package/dist/mezon-js.esm.mjs +4 -2
- package/dist/socket.d.ts +3 -2
- package/package.json +1 -1
- package/socket.ts +7 -2
package/api.gen.ts
CHANGED
package/client.ts
CHANGED
@@ -197,10 +197,11 @@ export enum NotificationType {
|
|
197
197
|
}
|
198
198
|
|
199
199
|
export enum WebrtcSignalingType {
|
200
|
+
WEBRTC_SDP_INIT = 0,
|
200
201
|
WEBRTC_SDP_OFFER = 1,
|
201
202
|
WEBRTC_SDP_ANSWER = 2,
|
202
203
|
WEBRTC_ICE_CANDIDATE = 3,
|
203
|
-
WEBRTC_SDP_QUIT = 4
|
204
|
+
WEBRTC_SDP_QUIT = 4
|
204
205
|
}
|
205
206
|
|
206
207
|
/** Response for an RPC function executed on the server. */
|
@@ -269,6 +270,8 @@ export interface ChannelMessage {
|
|
269
270
|
hide_editted?: boolean;
|
270
271
|
//
|
271
272
|
is_public?: boolean;
|
273
|
+
//
|
274
|
+
topic_id?: string;
|
272
275
|
}
|
273
276
|
|
274
277
|
/** A list of channel messages, usually a result of a list operation. */
|
package/dist/api.gen.d.ts
CHANGED
package/dist/client.d.ts
CHANGED
@@ -41,6 +41,7 @@ export declare enum NotificationType {
|
|
41
41
|
NOTHING_MESSAGE = 3
|
42
42
|
}
|
43
43
|
export declare enum WebrtcSignalingType {
|
44
|
+
WEBRTC_SDP_INIT = 0,
|
44
45
|
WEBRTC_SDP_OFFER = 1,
|
45
46
|
WEBRTC_SDP_ANSWER = 2,
|
46
47
|
WEBRTC_ICE_CANDIDATE = 3,
|
@@ -83,6 +84,7 @@ export interface ChannelMessage {
|
|
83
84
|
message_id?: string;
|
84
85
|
hide_editted?: boolean;
|
85
86
|
is_public?: boolean;
|
87
|
+
topic_id?: string;
|
86
88
|
}
|
87
89
|
/** A list of channel messages, usually a result of a list operation. */
|
88
90
|
export interface ChannelMessageList {
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -7765,7 +7765,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7765
7765
|
updateStatus(status) {
|
7766
7766
|
return this.send({ status_update: { status } });
|
7767
7767
|
}
|
7768
|
-
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
|
7768
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code, topic_id) {
|
7769
7769
|
return __async(this, null, function* () {
|
7770
7770
|
const response = yield this.send({
|
7771
7771
|
channel_message_send: {
|
@@ -7780,7 +7780,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7780
7780
|
anonymous_message,
|
7781
7781
|
mention_everyone,
|
7782
7782
|
avatar,
|
7783
|
-
code
|
7783
|
+
code,
|
7784
|
+
topic_id
|
7784
7785
|
}
|
7785
7786
|
});
|
7786
7787
|
return response.channel_message_ack;
|
@@ -8039,6 +8040,7 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
8039
8040
|
return NotificationType2;
|
8040
8041
|
})(NotificationType || {});
|
8041
8042
|
var WebrtcSignalingType = /* @__PURE__ */ ((WebrtcSignalingType2) => {
|
8043
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_INIT"] = 0] = "WEBRTC_SDP_INIT";
|
8042
8044
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_OFFER"] = 1] = "WEBRTC_SDP_OFFER";
|
8043
8045
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_ANSWER"] = 2] = "WEBRTC_SDP_ANSWER";
|
8044
8046
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_ICE_CANDIDATE"] = 3] = "WEBRTC_ICE_CANDIDATE";
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -7731,7 +7731,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7731
7731
|
updateStatus(status) {
|
7732
7732
|
return this.send({ status_update: { status } });
|
7733
7733
|
}
|
7734
|
-
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
|
7734
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code, topic_id) {
|
7735
7735
|
return __async(this, null, function* () {
|
7736
7736
|
const response = yield this.send({
|
7737
7737
|
channel_message_send: {
|
@@ -7746,7 +7746,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7746
7746
|
anonymous_message,
|
7747
7747
|
mention_everyone,
|
7748
7748
|
avatar,
|
7749
|
-
code
|
7749
|
+
code,
|
7750
|
+
topic_id
|
7750
7751
|
}
|
7751
7752
|
});
|
7752
7753
|
return response.channel_message_ack;
|
@@ -8005,6 +8006,7 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
8005
8006
|
return NotificationType2;
|
8006
8007
|
})(NotificationType || {});
|
8007
8008
|
var WebrtcSignalingType = /* @__PURE__ */ ((WebrtcSignalingType2) => {
|
8009
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_INIT"] = 0] = "WEBRTC_SDP_INIT";
|
8008
8010
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_OFFER"] = 1] = "WEBRTC_SDP_OFFER";
|
8009
8011
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_ANSWER"] = 2] = "WEBRTC_SDP_ANSWER";
|
8010
8012
|
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_ICE_CANDIDATE"] = 3] = "WEBRTC_ICE_CANDIDATE";
|
package/dist/socket.d.ts
CHANGED
@@ -198,6 +198,7 @@ interface ChannelMessageSend {
|
|
198
198
|
avatar: string;
|
199
199
|
is_public: boolean;
|
200
200
|
code: number;
|
201
|
+
topic_id?: string;
|
201
202
|
};
|
202
203
|
}
|
203
204
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -693,7 +694,7 @@ export interface Socket {
|
|
693
694
|
/** Update the status for the current user online. */
|
694
695
|
updateStatus(status?: string): Promise<void>;
|
695
696
|
/** Send a chat message to a chat channel on the server. */
|
696
|
-
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>;
|
697
|
+
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, topic_id?: string): Promise<ChannelMessageAck>;
|
697
698
|
/** Send message typing */
|
698
699
|
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
699
700
|
/** Send message reaction */
|
@@ -886,7 +887,7 @@ export declare class DefaultSocket implements Socket {
|
|
886
887
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
887
888
|
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>;
|
888
889
|
updateStatus(status?: string): Promise<void>;
|
889
|
-
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>;
|
890
|
+
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, topic_id?: string): Promise<ChannelMessageAck>;
|
890
891
|
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>;
|
891
892
|
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
892
893
|
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
@@ -287,6 +287,8 @@ interface ChannelMessageSend {
|
|
287
287
|
is_public: boolean;
|
288
288
|
// code
|
289
289
|
code: number;
|
290
|
+
//
|
291
|
+
topic_id?: string;
|
290
292
|
};
|
291
293
|
}
|
292
294
|
|
@@ -1010,7 +1012,8 @@ export interface Socket {
|
|
1010
1012
|
anonymous_message?: boolean,
|
1011
1013
|
mention_everyone?: boolean,
|
1012
1014
|
avatar?: string,
|
1013
|
-
code?: number
|
1015
|
+
code?: number,
|
1016
|
+
topic_id?: string,
|
1014
1017
|
): Promise<ChannelMessageAck>;
|
1015
1018
|
|
1016
1019
|
/** Send message typing */
|
@@ -2126,7 +2129,8 @@ export class DefaultSocket implements Socket {
|
|
2126
2129
|
anonymous_message?: boolean,
|
2127
2130
|
mention_everyone?: Boolean,
|
2128
2131
|
avatar?: string,
|
2129
|
-
code?: number
|
2132
|
+
code?: number,
|
2133
|
+
topic_id?: string,
|
2130
2134
|
): Promise<ChannelMessageAck> {
|
2131
2135
|
const response = await this.send({
|
2132
2136
|
channel_message_send: {
|
@@ -2142,6 +2146,7 @@ export class DefaultSocket implements Socket {
|
|
2142
2146
|
mention_everyone: mention_everyone,
|
2143
2147
|
avatar: avatar,
|
2144
2148
|
code: code,
|
2149
|
+
topic_id: topic_id,
|
2145
2150
|
},
|
2146
2151
|
});
|
2147
2152
|
return response.channel_message_ack;
|