mezon-js 2.12.99 → 2.13.2
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 +9 -15
- package/client.ts +1 -1
- package/dist/api.gen.d.ts +7 -10
- package/dist/mezon-js.cjs.js +5 -4
- package/dist/mezon-js.esm.mjs +5 -4
- package/dist/socket.d.ts +3 -2
- package/package.json +1 -1
- package/socket.ts +7 -2
package/api.gen.ts
CHANGED
@@ -744,8 +744,6 @@ export interface ApiChannelDescription {
|
|
744
744
|
category_id?: string;
|
745
745
|
//
|
746
746
|
category_name?: string;
|
747
|
-
//
|
748
|
-
channel_avatar?: Array<string>;
|
749
747
|
//The channel this message belongs to.
|
750
748
|
channel_id?: string;
|
751
749
|
//
|
@@ -777,31 +775,27 @@ export interface ApiChannelDescription {
|
|
777
775
|
//
|
778
776
|
meeting_code?: string;
|
779
777
|
//
|
780
|
-
|
778
|
+
channel_avatar?: string;
|
781
779
|
//The parent channel this message belongs to.
|
782
780
|
parent_id?: string;
|
783
|
-
//
|
784
|
-
is_online?: Array<boolean>;
|
785
|
-
//
|
786
|
-
topic?: string;
|
787
781
|
//The channel type.
|
788
782
|
type?: number;
|
789
783
|
//
|
790
784
|
update_time_seconds?: number;
|
791
785
|
//
|
792
|
-
|
793
|
-
//
|
794
|
-
usernames?: Array<string>;
|
786
|
+
app_id?: string;
|
795
787
|
//
|
796
|
-
|
788
|
+
topic?: string;
|
797
789
|
//
|
798
|
-
|
790
|
+
user_ids?: Array<string>;
|
799
791
|
//
|
800
|
-
|
792
|
+
usernames?: Array<string>;
|
801
793
|
//
|
802
794
|
display_names?: Array<string>;
|
803
795
|
//
|
804
|
-
|
796
|
+
onlines?: Array<boolean>;
|
797
|
+
// DM status
|
798
|
+
avatars?: Array<string>;
|
805
799
|
}
|
806
800
|
|
807
801
|
/** A message sent on a channel. */
|
@@ -3916,7 +3910,7 @@ export class MezonApi {
|
|
3916
3910
|
}
|
3917
3911
|
|
3918
3912
|
/** */
|
3919
|
-
|
3913
|
+
confirmAuthenticateOTP(
|
3920
3914
|
basicAuthUsername: string,
|
3921
3915
|
basicAuthPassword: string,
|
3922
3916
|
body:ApiLinkAccountConfirmRequest,
|
package/client.ts
CHANGED
@@ -665,7 +665,7 @@ export class Client {
|
|
665
665
|
request: ApiLinkAccountConfirmRequest,
|
666
666
|
): Promise<Session> {
|
667
667
|
return this.apiClient
|
668
|
-
.
|
668
|
+
.confirmAuthenticateOTP(this.serverkey, "", request)
|
669
669
|
.then((apiSession: ApiSession) => {
|
670
670
|
return new Session(
|
671
671
|
apiSession.token || "",
|
package/dist/api.gen.d.ts
CHANGED
@@ -429,7 +429,6 @@ export interface ApiChannelDescription {
|
|
429
429
|
age_restricted?: number;
|
430
430
|
category_id?: string;
|
431
431
|
category_name?: string;
|
432
|
-
channel_avatar?: Array<string>;
|
433
432
|
channel_id?: string;
|
434
433
|
channel_label?: string;
|
435
434
|
channel_private?: number;
|
@@ -445,19 +444,17 @@ export interface ApiChannelDescription {
|
|
445
444
|
last_seen_message?: ApiChannelMessageHeader;
|
446
445
|
last_sent_message?: ApiChannelMessageHeader;
|
447
446
|
meeting_code?: string;
|
448
|
-
|
447
|
+
channel_avatar?: string;
|
449
448
|
parent_id?: string;
|
450
|
-
is_online?: Array<boolean>;
|
451
|
-
topic?: string;
|
452
449
|
type?: number;
|
453
450
|
update_time_seconds?: number;
|
454
|
-
|
451
|
+
app_id?: string;
|
452
|
+
topic?: string;
|
453
|
+
user_ids?: Array<string>;
|
455
454
|
usernames?: Array<string>;
|
456
|
-
status?: number;
|
457
|
-
metadata?: Array<string>;
|
458
|
-
about_me?: Array<string>;
|
459
455
|
display_names?: Array<string>;
|
460
|
-
|
456
|
+
onlines?: Array<boolean>;
|
457
|
+
avatars?: Array<string>;
|
461
458
|
}
|
462
459
|
/** A message sent on a channel. */
|
463
460
|
export interface ApiChannelMessage {
|
@@ -1974,7 +1971,7 @@ export declare class MezonApi {
|
|
1974
1971
|
/** */
|
1975
1972
|
confirmLinkMezonOTP(bearerToken: string, body: ApiLinkAccountConfirmRequest, options?: any): Promise<ApiSession>;
|
1976
1973
|
/** */
|
1977
|
-
|
1974
|
+
confirmAuthenticateOTP(basicAuthUsername: string, basicAuthPassword: string, body: ApiLinkAccountConfirmRequest, options?: any): Promise<ApiSession>;
|
1978
1975
|
/** Authenticate a user with an email+password against the server. */
|
1979
1976
|
registrationEmail(bearerToken: string, body: ApiRegistrationEmailRequest, options?: any): Promise<ApiSession>;
|
1980
1977
|
/** Refresh a user's session using a refresh token retrieved from a previous authentication request. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -1143,7 +1143,7 @@ var MezonApi = class {
|
|
1143
1143
|
]);
|
1144
1144
|
}
|
1145
1145
|
/** */
|
1146
|
-
|
1146
|
+
confirmAuthenticateOTP(basicAuthUsername, basicAuthPassword, body, options = {}) {
|
1147
1147
|
if (body === null || body === void 0) {
|
1148
1148
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
1149
1149
|
}
|
@@ -8086,7 +8086,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
8086
8086
|
return response.message_reaction_event;
|
8087
8087
|
});
|
8088
8088
|
}
|
8089
|
-
writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name) {
|
8089
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name, topic_id) {
|
8090
8090
|
return __async(this, null, function* () {
|
8091
8091
|
const response = yield this.send({
|
8092
8092
|
message_typing_event: {
|
@@ -8094,7 +8094,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
8094
8094
|
channel_id,
|
8095
8095
|
mode,
|
8096
8096
|
is_public,
|
8097
|
-
sender_display_name
|
8097
|
+
sender_display_name,
|
8098
|
+
topic_id
|
8098
8099
|
}
|
8099
8100
|
});
|
8100
8101
|
return response.message_typing_event;
|
@@ -8397,7 +8398,7 @@ var Client = class {
|
|
8397
8398
|
}
|
8398
8399
|
confirmEmailOTP(request) {
|
8399
8400
|
return __async(this, null, function* () {
|
8400
|
-
return this.apiClient.
|
8401
|
+
return this.apiClient.confirmAuthenticateOTP(this.serverkey, "", request).then((apiSession) => {
|
8401
8402
|
return new Session(
|
8402
8403
|
apiSession.token || "",
|
8403
8404
|
apiSession.refresh_token || "",
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -1109,7 +1109,7 @@ var MezonApi = class {
|
|
1109
1109
|
]);
|
1110
1110
|
}
|
1111
1111
|
/** */
|
1112
|
-
|
1112
|
+
confirmAuthenticateOTP(basicAuthUsername, basicAuthPassword, body, options = {}) {
|
1113
1113
|
if (body === null || body === void 0) {
|
1114
1114
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
1115
1115
|
}
|
@@ -8052,7 +8052,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
8052
8052
|
return response.message_reaction_event;
|
8053
8053
|
});
|
8054
8054
|
}
|
8055
|
-
writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name) {
|
8055
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name, topic_id) {
|
8056
8056
|
return __async(this, null, function* () {
|
8057
8057
|
const response = yield this.send({
|
8058
8058
|
message_typing_event: {
|
@@ -8060,7 +8060,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
8060
8060
|
channel_id,
|
8061
8061
|
mode,
|
8062
8062
|
is_public,
|
8063
|
-
sender_display_name
|
8063
|
+
sender_display_name,
|
8064
|
+
topic_id
|
8064
8065
|
}
|
8065
8066
|
});
|
8066
8067
|
return response.message_typing_event;
|
@@ -8363,7 +8364,7 @@ var Client = class {
|
|
8363
8364
|
}
|
8364
8365
|
confirmEmailOTP(request) {
|
8365
8366
|
return __async(this, null, function* () {
|
8366
|
-
return this.apiClient.
|
8367
|
+
return this.apiClient.confirmAuthenticateOTP(this.serverkey, "", request).then((apiSession) => {
|
8367
8368
|
return new Session(
|
8368
8369
|
apiSession.token || "",
|
8369
8370
|
apiSession.refresh_token || "",
|
package/dist/socket.d.ts
CHANGED
@@ -193,6 +193,7 @@ export interface MessageTypingEvent {
|
|
193
193
|
is_public: boolean;
|
194
194
|
sender_username: string;
|
195
195
|
sender_display_name: string;
|
196
|
+
topic_id?: string;
|
196
197
|
}
|
197
198
|
export interface UserProfileUpdatedEvent {
|
198
199
|
user_id: string;
|
@@ -935,7 +936,7 @@ export interface Socket {
|
|
935
936
|
/** Send a quick menu event to a chat channel on the server. */
|
936
937
|
writeQuickMenuEvent(menu_name: string, 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<QuickMenuEvent>;
|
937
938
|
/** Send message typing */
|
938
|
-
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string): Promise<MessageTypingEvent>;
|
939
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
|
939
940
|
/** Send message reaction */
|
940
941
|
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, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
|
941
942
|
/** Send last seen message */
|
@@ -1157,7 +1158,7 @@ export declare class DefaultSocket implements Socket {
|
|
1157
1158
|
writeEphemeralMessage(receiver_id: string, 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>;
|
1158
1159
|
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>;
|
1159
1160
|
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, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
|
1160
|
-
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string): Promise<MessageTypingEvent>;
|
1161
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
|
1161
1162
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, badge_count: number): Promise<LastSeenMessageEvent>;
|
1162
1163
|
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number, message_sender_avatar: string, message_sender_id: string, message_sender_username: string, message_content: string, message_attachment: string, message_created_time: string): Promise<LastPinMessageEvent>;
|
1163
1164
|
writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -317,6 +317,8 @@ export interface MessageTypingEvent {
|
|
317
317
|
sender_username: string;
|
318
318
|
// sender display name
|
319
319
|
sender_display_name: string;
|
320
|
+
// topic id
|
321
|
+
topic_id?: string;
|
320
322
|
}
|
321
323
|
|
322
324
|
// user profile updated event
|
@@ -1513,6 +1515,7 @@ export interface Socket {
|
|
1513
1515
|
mode: number,
|
1514
1516
|
is_public: boolean,
|
1515
1517
|
sender_display_name: string,
|
1518
|
+
topic_id?: string
|
1516
1519
|
): Promise<MessageTypingEvent>;
|
1517
1520
|
|
1518
1521
|
/** Send message reaction */
|
@@ -2905,7 +2908,8 @@ export class DefaultSocket implements Socket {
|
|
2905
2908
|
channel_id: string,
|
2906
2909
|
mode: number,
|
2907
2910
|
is_public: boolean,
|
2908
|
-
sender_display_name: string
|
2911
|
+
sender_display_name: string,
|
2912
|
+
topic_id?: string
|
2909
2913
|
): Promise<MessageTypingEvent> {
|
2910
2914
|
const response = await this.send({
|
2911
2915
|
message_typing_event: {
|
@@ -2913,7 +2917,8 @@ export class DefaultSocket implements Socket {
|
|
2913
2917
|
channel_id: channel_id,
|
2914
2918
|
mode: mode,
|
2915
2919
|
is_public: is_public,
|
2916
|
-
sender_display_name: sender_display_name
|
2920
|
+
sender_display_name: sender_display_name,
|
2921
|
+
topic_id: topic_id
|
2917
2922
|
},
|
2918
2923
|
});
|
2919
2924
|
return response.message_typing_event;
|