mezon-js 2.10.76 → 2.10.77

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -2822,6 +2822,20 @@ export interface ApiOnboardingSteps {
2822
2822
  user_id?: string;
2823
2823
  }
2824
2824
 
2825
+ /** */
2826
+ export interface ApiGetJoinMezonMeetResponse {
2827
+ //
2828
+ channel_id?: string;
2829
+ //
2830
+ room_name?: string;
2831
+ //
2832
+ token?: string;
2833
+ //
2834
+ user_id?: string;
2835
+ //
2836
+ user_name?: string;
2837
+ }
2838
+
2825
2839
  export class MezonApi {
2826
2840
  constructor(
2827
2841
  readonly serverKey: string,
@@ -10796,4 +10810,40 @@ export class MezonApi {
10796
10810
  ),
10797
10811
  ]);
10798
10812
  }
10813
+
10814
+ /** GetJoinMezonMeet */
10815
+ getJoinMezonMeet(
10816
+ bearerToken: string,
10817
+ channelId?:string,
10818
+ roomName?:string,
10819
+ options: any = {}): Promise<ApiGetJoinMezonMeetResponse> {
10820
+
10821
+ const urlPath = "/v2/mezonmeet/join";
10822
+ const queryParams = new Map<string, any>();
10823
+ queryParams.set("channel_id", channelId);
10824
+ queryParams.set("room_name", roomName);
10825
+
10826
+ let bodyJson : string = "";
10827
+
10828
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10829
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10830
+ if (bearerToken) {
10831
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10832
+ }
10833
+
10834
+ return Promise.race([
10835
+ fetch(fullUrl, fetchOptions).then((response) => {
10836
+ if (response.status == 204) {
10837
+ return response;
10838
+ } else if (response.status >= 200 && response.status < 300) {
10839
+ return response.json();
10840
+ } else {
10841
+ throw response;
10842
+ }
10843
+ }),
10844
+ new Promise((_, reject) =>
10845
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10846
+ ),
10847
+ ]);
10848
+ }
10799
10849
  }
package/client.ts CHANGED
@@ -158,6 +158,7 @@ import {
158
158
  ApiSdTopic,
159
159
  MezonUpdateEventBody,
160
160
  ApiTransactionDetail,
161
+ ApiGetJoinMezonMeetResponse,
161
162
  } from "./api.gen";
162
163
 
163
164
  import { Session } from "./session";
@@ -4867,4 +4868,25 @@ export class Client {
4867
4868
  return Promise.resolve(response);
4868
4869
  });
4869
4870
  }
4871
+
4872
+ //**list sd topic */
4873
+ async getJoinMezonMeet(
4874
+ session: Session,
4875
+ channelId?:string,
4876
+ roomName?:string,
4877
+ ): Promise<ApiGetJoinMezonMeetResponse> {
4878
+ if (
4879
+ this.autoRefreshSession &&
4880
+ session.refresh_token &&
4881
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4882
+ ) {
4883
+ await this.sessionRefresh(session);
4884
+ }
4885
+
4886
+ return this.apiClient
4887
+ .getJoinMezonMeet(session.token, channelId, roomName)
4888
+ .then((response: ApiGetJoinMezonMeetResponse) => {
4889
+ return Promise.resolve(response);
4890
+ });
4891
+ }
4870
4892
  }
package/dist/api.gen.d.ts CHANGED
@@ -1633,6 +1633,14 @@ export interface ApiOnboardingSteps {
1633
1633
  onboarding_step?: number;
1634
1634
  user_id?: string;
1635
1635
  }
1636
+ /** */
1637
+ export interface ApiGetJoinMezonMeetResponse {
1638
+ channel_id?: string;
1639
+ room_name?: string;
1640
+ token?: string;
1641
+ user_id?: string;
1642
+ user_name?: string;
1643
+ }
1636
1644
  export declare class MezonApi {
1637
1645
  readonly serverKey: string;
1638
1646
  readonly basePath: string;
@@ -2033,4 +2041,6 @@ export declare class MezonApi {
2033
2041
  listOnboardingStep(bearerToken: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingStepResponse>;
2034
2042
  /** Update onboarding step. */
2035
2043
  updateOnboardingStepByClanId(bearerToken: string, clanId: string, body: MezonUpdateOnboardingStepByClanIdBody, options?: any): Promise<any>;
2044
+ /** GetJoinMezonMeet */
2045
+ getJoinMezonMeet(bearerToken: string, channelId?: string, roomName?: string, options?: any): Promise<ApiGetJoinMezonMeetResponse>;
2036
2046
  }
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, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, 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, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, 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, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, ApiGetJoinMezonMeetResponse } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -639,4 +639,5 @@ export declare class Client {
639
639
  listSdTopic(session: Session, clanId?: string, limit?: number): Promise<ApiSdTopicList>;
640
640
  createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
641
641
  getTopicDetail(session: Session, topicId?: string): Promise<ApiSdTopic>;
642
+ getJoinMezonMeet(session: Session, channelId?: string, roomName?: string): Promise<ApiGetJoinMezonMeetResponse>;
642
643
  }
@@ -6957,6 +6957,33 @@ var MezonApi = class {
6957
6957
  )
6958
6958
  ]);
6959
6959
  }
6960
+ /** GetJoinMezonMeet */
6961
+ getJoinMezonMeet(bearerToken, channelId, roomName, options = {}) {
6962
+ const urlPath = "/v2/mezonmeet/join";
6963
+ const queryParams = /* @__PURE__ */ new Map();
6964
+ queryParams.set("channel_id", channelId);
6965
+ queryParams.set("room_name", roomName);
6966
+ let bodyJson = "";
6967
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6968
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
6969
+ if (bearerToken) {
6970
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6971
+ }
6972
+ return Promise.race([
6973
+ fetch(fullUrl, fetchOptions).then((response) => {
6974
+ if (response.status == 204) {
6975
+ return response;
6976
+ } else if (response.status >= 200 && response.status < 300) {
6977
+ return response.json();
6978
+ } else {
6979
+ throw response;
6980
+ }
6981
+ }),
6982
+ new Promise(
6983
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6984
+ )
6985
+ ]);
6986
+ }
6960
6987
  };
6961
6988
 
6962
6989
  // session.ts
@@ -7762,7 +7789,7 @@ var _DefaultSocket = class _DefaultSocket {
7762
7789
  }
7763
7790
  });
7764
7791
  }
7765
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
7792
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
7766
7793
  return __async(this, null, function* () {
7767
7794
  const response = yield this.send({
7768
7795
  channel_message_remove: {
@@ -7771,7 +7798,8 @@ var _DefaultSocket = class _DefaultSocket {
7771
7798
  mode,
7772
7799
  message_id,
7773
7800
  is_public,
7774
- has_attachment
7801
+ has_attachment,
7802
+ topic_id
7775
7803
  }
7776
7804
  });
7777
7805
  return response.channel_message_ack;
@@ -7792,7 +7820,7 @@ var _DefaultSocket = class _DefaultSocket {
7792
7820
  unfollowUsers(user_ids) {
7793
7821
  return this.send({ status_unfollow: { user_ids } });
7794
7822
  }
7795
- updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id) {
7823
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, mess_topic_id) {
7796
7824
  return __async(this, null, function* () {
7797
7825
  const response = yield this.send({
7798
7826
  channel_message_update: {
@@ -7805,7 +7833,8 @@ var _DefaultSocket = class _DefaultSocket {
7805
7833
  mode,
7806
7834
  is_public,
7807
7835
  hide_editted: hideEditted,
7808
- topic_id
7836
+ topic_id,
7837
+ mess_topic_id
7809
7838
  }
7810
7839
  });
7811
7840
  return response.channel_message_ack;
@@ -10652,4 +10681,15 @@ var Client = class {
10652
10681
  });
10653
10682
  });
10654
10683
  }
10684
+ //**list sd topic */
10685
+ getJoinMezonMeet(session, channelId, roomName) {
10686
+ return __async(this, null, function* () {
10687
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10688
+ yield this.sessionRefresh(session);
10689
+ }
10690
+ return this.apiClient.getJoinMezonMeet(session.token, channelId, roomName).then((response) => {
10691
+ return Promise.resolve(response);
10692
+ });
10693
+ });
10694
+ }
10655
10695
  };
@@ -6923,6 +6923,33 @@ var MezonApi = class {
6923
6923
  )
6924
6924
  ]);
6925
6925
  }
6926
+ /** GetJoinMezonMeet */
6927
+ getJoinMezonMeet(bearerToken, channelId, roomName, options = {}) {
6928
+ const urlPath = "/v2/mezonmeet/join";
6929
+ const queryParams = /* @__PURE__ */ new Map();
6930
+ queryParams.set("channel_id", channelId);
6931
+ queryParams.set("room_name", roomName);
6932
+ let bodyJson = "";
6933
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6934
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
6935
+ if (bearerToken) {
6936
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6937
+ }
6938
+ return Promise.race([
6939
+ fetch(fullUrl, fetchOptions).then((response) => {
6940
+ if (response.status == 204) {
6941
+ return response;
6942
+ } else if (response.status >= 200 && response.status < 300) {
6943
+ return response.json();
6944
+ } else {
6945
+ throw response;
6946
+ }
6947
+ }),
6948
+ new Promise(
6949
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6950
+ )
6951
+ ]);
6952
+ }
6926
6953
  };
6927
6954
 
6928
6955
  // session.ts
@@ -7728,7 +7755,7 @@ var _DefaultSocket = class _DefaultSocket {
7728
7755
  }
7729
7756
  });
7730
7757
  }
7731
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
7758
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
7732
7759
  return __async(this, null, function* () {
7733
7760
  const response = yield this.send({
7734
7761
  channel_message_remove: {
@@ -7737,7 +7764,8 @@ var _DefaultSocket = class _DefaultSocket {
7737
7764
  mode,
7738
7765
  message_id,
7739
7766
  is_public,
7740
- has_attachment
7767
+ has_attachment,
7768
+ topic_id
7741
7769
  }
7742
7770
  });
7743
7771
  return response.channel_message_ack;
@@ -7758,7 +7786,7 @@ var _DefaultSocket = class _DefaultSocket {
7758
7786
  unfollowUsers(user_ids) {
7759
7787
  return this.send({ status_unfollow: { user_ids } });
7760
7788
  }
7761
- updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id) {
7789
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, mess_topic_id) {
7762
7790
  return __async(this, null, function* () {
7763
7791
  const response = yield this.send({
7764
7792
  channel_message_update: {
@@ -7771,7 +7799,8 @@ var _DefaultSocket = class _DefaultSocket {
7771
7799
  mode,
7772
7800
  is_public,
7773
7801
  hide_editted: hideEditted,
7774
- topic_id
7802
+ topic_id,
7803
+ mess_topic_id
7775
7804
  }
7776
7805
  });
7777
7806
  return response.channel_message_ack;
@@ -10618,6 +10647,17 @@ var Client = class {
10618
10647
  });
10619
10648
  });
10620
10649
  }
10650
+ //**list sd topic */
10651
+ getJoinMezonMeet(session, channelId, roomName) {
10652
+ return __async(this, null, function* () {
10653
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10654
+ yield this.sessionRefresh(session);
10655
+ }
10656
+ return this.apiClient.getJoinMezonMeet(session.token, channelId, roomName).then((response) => {
10657
+ return Promise.resolve(response);
10658
+ });
10659
+ });
10660
+ }
10621
10661
  };
10622
10662
  export {
10623
10663
  ChannelStreamMode,
package/dist/socket.d.ts CHANGED
@@ -221,6 +221,7 @@ interface ChannelMessageUpdate {
221
221
  mode: number;
222
222
  is_public: boolean;
223
223
  topic_id?: string;
224
+ mess_topic_id?: string;
224
225
  };
225
226
  }
226
227
  /** Remove a message previously sent to a realtime chat channel. */
@@ -237,6 +238,7 @@ interface ChannelMessageRemove {
237
238
  is_public: boolean;
238
239
  /** attachments */
239
240
  has_attachment?: boolean;
241
+ topic_id?: string;
240
242
  };
241
243
  }
242
244
  /** Presence update for a particular realtime chat channel. */
@@ -302,6 +304,7 @@ export interface ChannelUpdatedEvent {
302
304
  e2ee: number;
303
305
  topic: string;
304
306
  age_restricted: number;
307
+ is_active_thread: boolean;
305
308
  }
306
309
  export interface ChannelCreatedEvent {
307
310
  clan_id: string;
@@ -677,13 +680,13 @@ export interface Socket {
677
680
  /** Leave a chat channel on the server. */
678
681
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
679
682
  /** Remove a chat message from a chat channel on the server. */
680
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
683
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
681
684
  /** Execute an RPC function to the server. */
682
685
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
683
686
  /** Unfollow one or more users from their status updates. */
684
687
  unfollowUsers(user_ids: string[]): Promise<void>;
685
688
  /** Update a chat message on a chat channel in the server. */
686
- 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): Promise<ChannelMessageAck>;
689
+ 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, mess_topic_id?: string): Promise<ChannelMessageAck>;
687
690
  /** Update the status for the current user online. */
688
691
  updateStatus(status?: string): Promise<void>;
689
692
  /** Send a chat message to a chat channel on the server. */
@@ -878,10 +881,10 @@ export declare class DefaultSocket implements Socket {
878
881
  follower(): Promise<void>;
879
882
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
880
883
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
881
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
884
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
882
885
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
883
886
  unfollowUsers(user_ids: string[]): Promise<void>;
884
- 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): Promise<ChannelMessageAck>;
887
+ 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, mess_topic_id?: string): Promise<ChannelMessageAck>;
885
888
  updateStatus(status?: string): Promise<void>;
886
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, topic_id?: string): Promise<ChannelMessageAck>;
887
890
  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): Promise<ApiMessageReaction>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.76",
4
+ "version": "2.10.77",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -318,6 +318,8 @@ interface ChannelMessageUpdate {
318
318
  is_public: boolean;
319
319
  //
320
320
  topic_id?: string;
321
+ //
322
+ mess_topic_id?: string;
321
323
  };
322
324
  }
323
325
 
@@ -338,6 +340,8 @@ interface ChannelMessageRemove {
338
340
  is_public: boolean;
339
341
  /** attachments */
340
342
  has_attachment?: boolean;
343
+ //
344
+ topic_id?: string;
341
345
  };
342
346
  }
343
347
 
@@ -447,6 +451,8 @@ export interface ChannelUpdatedEvent {
447
451
  topic: string;
448
452
  //
449
453
  age_restricted: number;
454
+ //
455
+ is_active_thread: boolean;
450
456
  }
451
457
 
452
458
  export interface ChannelCreatedEvent {
@@ -972,7 +978,8 @@ export interface Socket {
972
978
  mode: number,
973
979
  is_public: boolean,
974
980
  message_id: string,
975
- has_attachment?: boolean
981
+ has_attachment?: boolean,
982
+ topic_id?: string
976
983
  ): Promise<ChannelMessageAck>;
977
984
 
978
985
  /** Execute an RPC function to the server. */
@@ -992,7 +999,8 @@ export interface Socket {
992
999
  mentions?: Array<ApiMessageMention>,
993
1000
  attachments?: Array<ApiMessageAttachment>,
994
1001
  hideEditted?: boolean,
995
- topic_id?: string
1002
+ topic_id?: string,
1003
+ mess_topic_id?: string
996
1004
  ): Promise<ChannelMessageAck>;
997
1005
 
998
1006
  /** Update the status for the current user online. */
@@ -2080,7 +2088,8 @@ export class DefaultSocket implements Socket {
2080
2088
  mode: number,
2081
2089
  is_public: boolean,
2082
2090
  message_id: string,
2083
- has_attachment?: boolean
2091
+ has_attachment?: boolean,
2092
+ topic_id?: string,
2084
2093
  ): Promise<ChannelMessageAck> {
2085
2094
  const response = await this.send({
2086
2095
  channel_message_remove: {
@@ -2090,6 +2099,7 @@ export class DefaultSocket implements Socket {
2090
2099
  message_id: message_id,
2091
2100
  is_public: is_public,
2092
2101
  has_attachment: has_attachment,
2102
+ topic_id: topic_id,
2093
2103
  },
2094
2104
  });
2095
2105
 
@@ -2122,7 +2132,8 @@ export class DefaultSocket implements Socket {
2122
2132
  mentions?: Array<ApiMessageMention>,
2123
2133
  attachments?: Array<ApiMessageAttachment>,
2124
2134
  hideEditted?: boolean,
2125
- topic_id?: string
2135
+ topic_id?: string,
2136
+ mess_topic_id?: string
2126
2137
  ): Promise<ChannelMessageAck> {
2127
2138
  const response = await this.send({
2128
2139
  channel_message_update: {
@@ -2136,6 +2147,7 @@ export class DefaultSocket implements Socket {
2136
2147
  is_public: is_public,
2137
2148
  hide_editted: hideEditted,
2138
2149
  topic_id: topic_id,
2150
+ mess_topic_id: mess_topic_id,
2139
2151
  },
2140
2152
  });
2141
2153
  return response.channel_message_ack;