mezon-js 2.11.11 → 2.11.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 +51 -5
- package/client.ts +203 -189
- package/dist/api.gen.d.ts +14 -3
- package/dist/client.d.ts +2 -3
- package/dist/mezon-js.cjs.js +222 -189
- package/dist/mezon-js.esm.mjs +222 -189
- package/dist/socket.d.ts +2 -2
- package/package.json +1 -1
- package/socket.ts +5 -2
package/api.gen.ts
CHANGED
@@ -1300,6 +1300,16 @@ export interface ApiEmojiListedResponse {
|
|
1300
1300
|
emoji_list?: Array<ApiClanEmoji>;
|
1301
1301
|
}
|
1302
1302
|
|
1303
|
+
/** */
|
1304
|
+
export interface ApiEmojiRecent {
|
1305
|
+
//ID of the emoji.
|
1306
|
+
emoji_recents_id?: string;
|
1307
|
+
//
|
1308
|
+
emoji_id?: string;
|
1309
|
+
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the emoji was created.
|
1310
|
+
update_time?: string;
|
1311
|
+
}
|
1312
|
+
|
1303
1313
|
/** */
|
1304
1314
|
export interface ApiEventList {
|
1305
1315
|
//A list of event.
|
@@ -1630,6 +1640,8 @@ export interface ApiMessageReaction {
|
|
1630
1640
|
message_id: string;
|
1631
1641
|
//
|
1632
1642
|
topic_id?: string;
|
1643
|
+
//
|
1644
|
+
emoji_recent_id?: string;
|
1633
1645
|
}
|
1634
1646
|
|
1635
1647
|
export interface ApiListChannelAppsResponse {
|
@@ -2732,6 +2744,13 @@ export interface ApiWithdrawTokenRequest {
|
|
2732
2744
|
amount?: number;
|
2733
2745
|
}
|
2734
2746
|
|
2747
|
+
/** A collection of zero or more notifications. */
|
2748
|
+
export interface MezonapiEmojiRecentList {
|
2749
|
+
//Collection of emojiRecents.
|
2750
|
+
emoji_recents?: Array<ApiEmojiRecent>;
|
2751
|
+
}
|
2752
|
+
|
2753
|
+
|
2735
2754
|
/** Represents an event to be passed through the server to registered event handlers. */
|
2736
2755
|
export interface MezonapiEvent {
|
2737
2756
|
//True if the event came directly from a client call, false otherwise.
|
@@ -3083,11 +3102,7 @@ export interface ApiMezonOauthClient {
|
|
3083
3102
|
/** */
|
3084
3103
|
export interface ApiCreateHashChannelAppsResponse {
|
3085
3104
|
//
|
3086
|
-
|
3087
|
-
//
|
3088
|
-
user_id?: string;
|
3089
|
-
//
|
3090
|
-
auth_date?: string;
|
3105
|
+
web_app_data?: string;
|
3091
3106
|
}
|
3092
3107
|
|
3093
3108
|
export class MezonApi {
|
@@ -6674,6 +6689,37 @@ export class MezonApi {
|
|
6674
6689
|
]);
|
6675
6690
|
}
|
6676
6691
|
|
6692
|
+
/** get list emoji recent by user id */
|
6693
|
+
emojiRecentList(bearerToken: string,
|
6694
|
+
options: any = {}): Promise<MezonapiEmojiRecentList> {
|
6695
|
+
|
6696
|
+
const urlPath = "/v2/emojirecents";
|
6697
|
+
const queryParams = new Map<string, any>();
|
6698
|
+
|
6699
|
+
let bodyJson : string = "";
|
6700
|
+
|
6701
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6702
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6703
|
+
if (bearerToken) {
|
6704
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6705
|
+
}
|
6706
|
+
|
6707
|
+
return Promise.race([
|
6708
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6709
|
+
if (response.status == 204) {
|
6710
|
+
return response;
|
6711
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6712
|
+
return response.json();
|
6713
|
+
} else {
|
6714
|
+
throw response;
|
6715
|
+
}
|
6716
|
+
}),
|
6717
|
+
new Promise((_, reject) =>
|
6718
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6719
|
+
),
|
6720
|
+
]);
|
6721
|
+
}
|
6722
|
+
|
6677
6723
|
/** get list emoji by user id */
|
6678
6724
|
getListEmojisByUserId(
|
6679
6725
|
bearerToken: string,
|