mezon-js 2.12.56 → 2.12.58

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
@@ -751,7 +751,7 @@ export interface ApiChannelDescription {
751
751
  //
752
752
  is_online?: Array<boolean>;
753
753
  //
754
- topic?: string;
754
+ avatar_url?: string;
755
755
  //The channel type.
756
756
  type?: number;
757
757
  //
@@ -3303,6 +3303,20 @@ export interface ApiClanDiscoverRequest {
3303
3303
  page_number?: number;
3304
3304
  }
3305
3305
 
3306
+ /** */
3307
+ export interface ApiIsFollowerRequest {
3308
+ //
3309
+ username?: string;
3310
+ }
3311
+
3312
+ /** */
3313
+ export interface ApiIsFollowerResponse {
3314
+ //
3315
+ is_follower?: boolean;
3316
+ //
3317
+ username?: string;
3318
+ }
3319
+
3306
3320
  export class MezonApi {
3307
3321
  basePath: string;
3308
3322
  constructor(
@@ -11118,4 +11132,40 @@ export class MezonApi {
11118
11132
  ]);
11119
11133
  }
11120
11134
 
11135
+ /** */
11136
+ isFollower(bearerToken: string,
11137
+ body:ApiIsFollowerRequest,
11138
+ options: any = {}): Promise<ApiIsFollowerResponse> {
11139
+
11140
+ if (body === null || body === undefined) {
11141
+ throw new Error("'body' is a required parameter but is null or undefined.");
11142
+ }
11143
+ const urlPath = "/v2/follower";
11144
+ const queryParams = new Map<string, any>();
11145
+
11146
+ let bodyJson : string = "";
11147
+ bodyJson = JSON.stringify(body || {});
11148
+
11149
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11150
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
11151
+ if (bearerToken) {
11152
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11153
+ }
11154
+
11155
+ return Promise.race([
11156
+ fetch(fullUrl, fetchOptions).then((response) => {
11157
+ if (response.status == 204) {
11158
+ return response;
11159
+ } else if (response.status >= 200 && response.status < 300) {
11160
+ return response.json();
11161
+ } else {
11162
+ throw response;
11163
+ }
11164
+ }),
11165
+ new Promise((_, reject) =>
11166
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
11167
+ ),
11168
+ ]);
11169
+ }
11170
+
11121
11171
  }
package/client.ts CHANGED
@@ -169,6 +169,8 @@ import {
169
169
  ApiUnlockedItemRequest,
170
170
  ApiForSaleItemList,
171
171
  ApiUnlockedItemResponse,
172
+ ApiIsFollowerResponse,
173
+ ApiIsFollowerRequest,
172
174
  } from "./api.gen";
173
175
 
174
176
  import { Session } from "./session";
@@ -476,7 +478,7 @@ export interface ApiUpdateChannelDescRequest {
476
478
  //
477
479
  e2ee?: number;
478
480
  //
479
- topic?: string;
481
+ avatar_url?: string;
480
482
  //
481
483
  age_restricted?: number;
482
484
  }
@@ -4851,4 +4853,21 @@ export class Client {
4851
4853
  });
4852
4854
  }
4853
4855
 
4856
+ async isFollower(session: Session,
4857
+ req: ApiIsFollowerRequest): Promise<ApiIsFollowerResponse> {
4858
+ if (
4859
+ this.autoRefreshSession &&
4860
+ session.refresh_token &&
4861
+ session.isexpired(Date.now() / 1000)
4862
+ ) {
4863
+ await this.sessionRefresh(session);
4864
+ }
4865
+
4866
+ return this.apiClient
4867
+ .isFollower(session.token, req)
4868
+ .then((response: ApiIsFollowerResponse) => {
4869
+ return Promise.resolve(response);
4870
+ });
4871
+ }
4872
+
4854
4873
  }
package/dist/api.gen.d.ts CHANGED
@@ -429,7 +429,7 @@ export interface ApiChannelDescription {
429
429
  meeting_uri?: string;
430
430
  parent_id?: string;
431
431
  is_online?: Array<boolean>;
432
- topic?: string;
432
+ avatar_url?: string;
433
433
  type?: number;
434
434
  update_time_seconds?: number;
435
435
  user_id?: Array<string>;
@@ -1891,6 +1891,15 @@ export interface ApiClanDiscoverRequest {
1891
1891
  item_per_page?: number;
1892
1892
  page_number?: number;
1893
1893
  }
1894
+ /** */
1895
+ export interface ApiIsFollowerRequest {
1896
+ username?: string;
1897
+ }
1898
+ /** */
1899
+ export interface ApiIsFollowerResponse {
1900
+ is_follower?: boolean;
1901
+ username?: string;
1902
+ }
1894
1903
  export declare class MezonApi {
1895
1904
  readonly serverKey: string;
1896
1905
  readonly timeoutMs: number;
@@ -2290,4 +2299,6 @@ export declare class MezonApi {
2290
2299
  unlockItem(bearerToken: string, body: ApiUnlockedItemRequest, options?: any): Promise<ApiUnlockedItemResponse>;
2291
2300
  /** For sale items */
2292
2301
  listForSaleItems(bearerToken: string, page?: number, options?: any): Promise<ApiForSaleItemList>;
2302
+ /** */
2303
+ isFollower(bearerToken: string, body: ApiIsFollowerRequest, options?: any): Promise<ApiIsFollowerResponse>;
2293
2304
  }
package/dist/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse } from "./api.gen";
16
+ import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse, ApiIsFollowerResponse, ApiIsFollowerRequest } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -264,7 +264,7 @@ export interface ApiUpdateChannelDescRequest {
264
264
  /** The app url of channel */
265
265
  app_id: string | undefined;
266
266
  e2ee?: number;
267
- topic?: string;
267
+ avatar_url?: string;
268
268
  age_restricted?: number;
269
269
  }
270
270
  /** Add users to a channel. */
@@ -619,4 +619,5 @@ export declare class Client {
619
619
  updateQuickMenuAccess(session: Session, request: ApiQuickMenuAccessRequest): Promise<any>;
620
620
  unlockItem(session: Session, request: ApiUnlockedItemRequest): Promise<ApiUnlockedItemResponse>;
621
621
  listForSaleItems(session: Session, page?: number): Promise<ApiForSaleItemList>;
622
+ isFollower(session: Session, req: ApiIsFollowerRequest): Promise<ApiIsFollowerResponse>;
622
623
  }
@@ -6832,6 +6832,35 @@ var MezonApi = class {
6832
6832
  )
6833
6833
  ]);
6834
6834
  }
6835
+ /** */
6836
+ isFollower(bearerToken, body, options = {}) {
6837
+ if (body === null || body === void 0) {
6838
+ throw new Error("'body' is a required parameter but is null or undefined.");
6839
+ }
6840
+ const urlPath = "/v2/follower";
6841
+ const queryParams = /* @__PURE__ */ new Map();
6842
+ let bodyJson = "";
6843
+ bodyJson = JSON.stringify(body || {});
6844
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6845
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6846
+ if (bearerToken) {
6847
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6848
+ }
6849
+ return Promise.race([
6850
+ fetch(fullUrl, fetchOptions).then((response) => {
6851
+ if (response.status == 204) {
6852
+ return response;
6853
+ } else if (response.status >= 200 && response.status < 300) {
6854
+ return response.json();
6855
+ } else {
6856
+ throw response;
6857
+ }
6858
+ }),
6859
+ new Promise(
6860
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6861
+ )
6862
+ ]);
6863
+ }
6835
6864
  };
6836
6865
 
6837
6866
  // session.ts
@@ -7772,7 +7801,7 @@ var _DefaultSocket = class _DefaultSocket {
7772
7801
  unfollowUsers(user_ids) {
7773
7802
  return this.send({ status_unfollow: { user_ids } });
7774
7803
  }
7775
- updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, is_update_msg_topic) {
7804
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, is_update_msg_topic, old_mentions) {
7776
7805
  return __async(this, null, function* () {
7777
7806
  const response = yield this.send({
7778
7807
  channel_message_update: {
@@ -7786,7 +7815,8 @@ var _DefaultSocket = class _DefaultSocket {
7786
7815
  is_public,
7787
7816
  hide_editted: hideEditted,
7788
7817
  topic_id,
7789
- is_update_msg_topic
7818
+ is_update_msg_topic,
7819
+ old_mentions
7790
7820
  }
7791
7821
  });
7792
7822
  return response.channel_message_ack;
@@ -10640,4 +10670,14 @@ var Client = class {
10640
10670
  });
10641
10671
  });
10642
10672
  }
10673
+ isFollower(session, req) {
10674
+ return __async(this, null, function* () {
10675
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10676
+ yield this.sessionRefresh(session);
10677
+ }
10678
+ return this.apiClient.isFollower(session.token, req).then((response) => {
10679
+ return Promise.resolve(response);
10680
+ });
10681
+ });
10682
+ }
10643
10683
  };
@@ -6798,6 +6798,35 @@ var MezonApi = class {
6798
6798
  )
6799
6799
  ]);
6800
6800
  }
6801
+ /** */
6802
+ isFollower(bearerToken, body, options = {}) {
6803
+ if (body === null || body === void 0) {
6804
+ throw new Error("'body' is a required parameter but is null or undefined.");
6805
+ }
6806
+ const urlPath = "/v2/follower";
6807
+ const queryParams = /* @__PURE__ */ new Map();
6808
+ let bodyJson = "";
6809
+ bodyJson = JSON.stringify(body || {});
6810
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6811
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6812
+ if (bearerToken) {
6813
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6814
+ }
6815
+ return Promise.race([
6816
+ fetch(fullUrl, fetchOptions).then((response) => {
6817
+ if (response.status == 204) {
6818
+ return response;
6819
+ } else if (response.status >= 200 && response.status < 300) {
6820
+ return response.json();
6821
+ } else {
6822
+ throw response;
6823
+ }
6824
+ }),
6825
+ new Promise(
6826
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6827
+ )
6828
+ ]);
6829
+ }
6801
6830
  };
6802
6831
 
6803
6832
  // session.ts
@@ -7738,7 +7767,7 @@ var _DefaultSocket = class _DefaultSocket {
7738
7767
  unfollowUsers(user_ids) {
7739
7768
  return this.send({ status_unfollow: { user_ids } });
7740
7769
  }
7741
- updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, is_update_msg_topic) {
7770
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, is_update_msg_topic, old_mentions) {
7742
7771
  return __async(this, null, function* () {
7743
7772
  const response = yield this.send({
7744
7773
  channel_message_update: {
@@ -7752,7 +7781,8 @@ var _DefaultSocket = class _DefaultSocket {
7752
7781
  is_public,
7753
7782
  hide_editted: hideEditted,
7754
7783
  topic_id,
7755
- is_update_msg_topic
7784
+ is_update_msg_topic,
7785
+ old_mentions
7756
7786
  }
7757
7787
  });
7758
7788
  return response.channel_message_ack;
@@ -10606,6 +10636,16 @@ var Client = class {
10606
10636
  });
10607
10637
  });
10608
10638
  }
10639
+ isFollower(session, req) {
10640
+ return __async(this, null, function* () {
10641
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10642
+ yield this.sessionRefresh(session);
10643
+ }
10644
+ return this.apiClient.isFollower(session.token, req).then((response) => {
10645
+ return Promise.resolve(response);
10646
+ });
10647
+ });
10648
+ }
10609
10649
  };
10610
10650
  export {
10611
10651
  ChannelStreamMode,
package/dist/socket.d.ts CHANGED
@@ -306,6 +306,7 @@ interface ChannelMessageUpdate {
306
306
  is_public: boolean;
307
307
  topic_id?: string;
308
308
  is_update_msg_topic?: boolean;
309
+ old_mentions?: string;
309
310
  };
310
311
  }
311
312
  /** Remove a message previously sent to a realtime chat channel. */
@@ -900,7 +901,7 @@ export interface Socket {
900
901
  /** Unfollow one or more users from their status updates. */
901
902
  unfollowUsers(user_ids: string[]): Promise<void>;
902
903
  /** Update a chat message on a chat channel in the server. */
903
- 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, topic_id?: string, is_update_msg_topic?: boolean): Promise<ChannelMessageAck>;
904
+ 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, topic_id?: string, is_update_msg_topic?: boolean, old_mentions?: string): Promise<ChannelMessageAck>;
904
905
  /** Update the status for the current user online. */
905
906
  updateStatus(status?: string): Promise<void>;
906
907
  /** Send a chat message to a chat channel on the server. */
@@ -1118,7 +1119,7 @@ export declare class DefaultSocket implements Socket {
1118
1119
  removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string, mentions?: string, references?: string): Promise<ChannelMessageAck>;
1119
1120
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
1120
1121
  unfollowUsers(user_ids: string[]): Promise<void>;
1121
- 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, topic_id?: string, is_update_msg_topic?: boolean): Promise<ChannelMessageAck>;
1122
+ 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, topic_id?: string, is_update_msg_topic?: boolean, old_mentions?: string): Promise<ChannelMessageAck>;
1122
1123
  updateStatus(status?: string): Promise<void>;
1123
1124
  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>;
1124
1125
  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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.12.56",
3
+ "version": "2.12.58",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -478,6 +478,8 @@ interface ChannelMessageUpdate {
478
478
  topic_id?: string;
479
479
  //
480
480
  is_update_msg_topic?: boolean;
481
+ //
482
+ old_mentions?: string;
481
483
  };
482
484
  }
483
485
 
@@ -1409,7 +1411,8 @@ export interface Socket {
1409
1411
  attachments?: Array<ApiMessageAttachment>,
1410
1412
  hideEditted?: boolean,
1411
1413
  topic_id?: string,
1412
- is_update_msg_topic?: boolean
1414
+ is_update_msg_topic?: boolean,
1415
+ old_mentions?: string
1413
1416
  ): Promise<ChannelMessageAck>;
1414
1417
 
1415
1418
  /** Update the status for the current user online. */
@@ -2644,7 +2647,8 @@ export class DefaultSocket implements Socket {
2644
2647
  attachments?: Array<ApiMessageAttachment>,
2645
2648
  hideEditted?: boolean,
2646
2649
  topic_id?: string,
2647
- is_update_msg_topic?: boolean
2650
+ is_update_msg_topic?: boolean,
2651
+ old_mentions?: string
2648
2652
  ): Promise<ChannelMessageAck> {
2649
2653
  const response = await this.send({
2650
2654
  channel_message_update: {
@@ -2659,6 +2663,7 @@ export class DefaultSocket implements Socket {
2659
2663
  hide_editted: hideEditted,
2660
2664
  topic_id: topic_id,
2661
2665
  is_update_msg_topic: is_update_msg_topic,
2666
+ old_mentions: old_mentions
2662
2667
  },
2663
2668
  });
2664
2669
  return response.channel_message_ack;