mezon-js 2.11.18 → 2.11.20

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
@@ -2997,19 +2997,6 @@ export interface ApiGenerateMeetTokenResponse {
2997
2997
  token?: string;
2998
2998
  }
2999
2999
 
3000
- /** */
3001
- export interface ApiHandleParticipantMeetStateRequest {
3002
- // clan id
3003
- clan_id?: string;
3004
- // channel id
3005
- channel_id?: string;
3006
- // user id
3007
- user_id?: string;
3008
- // display name
3009
- display_name?: string;
3010
- // state (0: join, 1: leave)
3011
- state?: number;
3012
- }
3013
3000
 
3014
3001
  /** */
3015
3002
  export interface ApiMezonOauthClient {
@@ -11267,44 +11254,6 @@ export class MezonApi {
11267
11254
  ]);
11268
11255
  }
11269
11256
 
11270
- /** Handle participant meet state */
11271
- handleParticipantMeetState(
11272
- bearerToken: string,
11273
- body:ApiHandleParticipantMeetStateRequest,
11274
- options: any = {}
11275
- ): Promise<any> {
11276
-
11277
- if (body === null || body === undefined) {
11278
- throw new Error("'body' is a required parameter but is null or undefined.");
11279
- }
11280
- const urlPath = "/v2/meet/handle_participant_state";
11281
- const queryParams = new Map<string, any>();
11282
-
11283
- let bodyJson : string = "";
11284
- bodyJson = JSON.stringify(body || {});
11285
-
11286
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11287
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
11288
- if (bearerToken) {
11289
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11290
- }
11291
-
11292
- return Promise.race([
11293
- fetch(fullUrl, fetchOptions).then((response) => {
11294
- if (response.status == 204) {
11295
- return response;
11296
- } else if (response.status >= 200 && response.status < 300) {
11297
- return response.json();
11298
- } else {
11299
- throw response;
11300
- }
11301
- }),
11302
- new Promise((_, reject) =>
11303
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11304
- ),
11305
- ]);
11306
- }
11307
-
11308
11257
  /** Create mezon OAuth client */
11309
11258
  getMezonOauthClient(bearerToken: string,
11310
11259
  clientId?:string,
package/client.ts CHANGED
@@ -161,7 +161,6 @@ import {
161
161
  MezonapiCreateRoomChannelApps,
162
162
  ApiGenerateMeetTokenRequest,
163
163
  ApiGenerateMeetTokenResponse,
164
- ApiHandleParticipantMeetStateRequest,
165
164
  ApiMezonOauthClientList,
166
165
  ApiMezonOauthClient,
167
166
  ApiCreateHashChannelAppsResponse,
@@ -535,12 +534,6 @@ export interface ApiUpdateClanProfileRequest {
535
534
  export interface ApiUpdateRoleRequest {
536
535
  /** The ID of the role to update. */
537
536
  role_id: string;
538
- title: string | undefined;
539
- color: string | undefined;
540
- role_icon: string | undefined;
541
- description: string | undefined;
542
- display_online: number | undefined;
543
- allow_mention: number | undefined;
544
537
  /** The users to add. */
545
538
  add_user_ids: string[];
546
539
  /** The permissions to add. */
@@ -552,6 +545,12 @@ export interface ApiUpdateRoleRequest {
552
545
  //
553
546
  clan_id: string;
554
547
  max_permission_id: string;
548
+ title?: string | undefined;
549
+ color?: string | undefined;
550
+ role_icon?: string | undefined;
551
+ description?: string | undefined;
552
+ display_online?: number | undefined;
553
+ allow_mention?: number | undefined;
555
554
  }
556
555
 
557
556
  /** A client for Mezon server. */
@@ -4972,26 +4971,6 @@ export class Client {
4972
4971
  });
4973
4972
  }
4974
4973
 
4975
- /** Handle participant meet state */
4976
- async handleParticipantMeetState(
4977
- session: Session,
4978
- body:ApiHandleParticipantMeetStateRequest,
4979
- ): Promise<any> {
4980
- if (
4981
- this.autoRefreshSession &&
4982
- session.refresh_token &&
4983
- session.isexpired(Date.now() / 1000)
4984
- ) {
4985
- await this.sessionRefresh(session);
4986
- }
4987
-
4988
- return this.apiClient
4989
- .handleParticipantMeetState(session.token, body)
4990
- .then((response: any) => {
4991
- return Promise.resolve(response);
4992
- });
4993
- }
4994
-
4995
4974
  //**list webhook belong to the clan */
4996
4975
  async listMezonOauthClient(
4997
4976
  session: Session
package/dist/api.gen.d.ts CHANGED
@@ -1727,14 +1727,6 @@ export interface ApiGenerateMeetTokenResponse {
1727
1727
  token?: string;
1728
1728
  }
1729
1729
  /** */
1730
- export interface ApiHandleParticipantMeetStateRequest {
1731
- clan_id?: string;
1732
- channel_id?: string;
1733
- user_id?: string;
1734
- display_name?: string;
1735
- state?: number;
1736
- }
1737
- /** */
1738
1730
  export interface ApiMezonOauthClient {
1739
1731
  access_token_strategy?: string;
1740
1732
  allowed_cors_origins?: Array<string>;
@@ -2203,8 +2195,6 @@ export declare class MezonApi {
2203
2195
  createRoomChannelApps(bearerToken: string, body: MezonapiCreateRoomChannelApps, options?: any): Promise<MezonapiCreateRoomChannelApps>;
2204
2196
  /** Generate Meet Token */
2205
2197
  generateMeetToken(bearerToken: string, body: ApiGenerateMeetTokenRequest, options?: any): Promise<ApiGenerateMeetTokenResponse>;
2206
- /** Handle participant meet state */
2207
- handleParticipantMeetState(bearerToken: string, body: ApiHandleParticipantMeetStateRequest, options?: any): Promise<any>;
2208
2198
  /** Create mezon OAuth client */
2209
2199
  getMezonOauthClient(bearerToken: string, clientId?: string, clientName?: string, options?: any): Promise<ApiMezonOauthClient>;
2210
2200
  /** update mezon OAuth */
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, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, 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, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiHandleParticipantMeetStateRequest, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest } from "./api.gen";
16
+ import { ApiAccount, ApiAccountMezon, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, 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, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -318,12 +318,6 @@ export interface ApiUpdateClanProfileRequest {
318
318
  export interface ApiUpdateRoleRequest {
319
319
  /** The ID of the role to update. */
320
320
  role_id: string;
321
- title: string | undefined;
322
- color: string | undefined;
323
- role_icon: string | undefined;
324
- description: string | undefined;
325
- display_online: number | undefined;
326
- allow_mention: number | undefined;
327
321
  /** The users to add. */
328
322
  add_user_ids: string[];
329
323
  /** The permissions to add. */
@@ -334,6 +328,12 @@ export interface ApiUpdateRoleRequest {
334
328
  remove_permission_ids: string[];
335
329
  clan_id: string;
336
330
  max_permission_id: string;
331
+ title?: string | undefined;
332
+ color?: string | undefined;
333
+ role_icon?: string | undefined;
334
+ description?: string | undefined;
335
+ display_online?: number | undefined;
336
+ allow_mention?: number | undefined;
337
337
  }
338
338
  /** A client for Mezon server. */
339
339
  export declare class Client {
@@ -643,8 +643,6 @@ export declare class Client {
643
643
  createRoomChannelApps(session: Session, body: MezonapiCreateRoomChannelApps): Promise<MezonapiCreateRoomChannelApps>;
644
644
  /** Generate Meet Token */
645
645
  generateMeetToken(session: Session, body: ApiGenerateMeetTokenRequest): Promise<ApiGenerateMeetTokenResponse>;
646
- /** Handle participant meet state */
647
- handleParticipantMeetState(session: Session, body: ApiHandleParticipantMeetStateRequest): Promise<any>;
648
646
  listMezonOauthClient(session: Session): Promise<ApiMezonOauthClientList>;
649
647
  getMezonOauthClient(session: Session, clientId?: string, clientName?: string): Promise<ApiMezonOauthClient>;
650
648
  updateMezonOauthClient(session: Session, body: ApiMezonOauthClient): Promise<ApiMezonOauthClient>;
@@ -7089,35 +7089,6 @@ var MezonApi = class {
7089
7089
  )
7090
7090
  ]);
7091
7091
  }
7092
- /** Handle participant meet state */
7093
- handleParticipantMeetState(bearerToken, body, options = {}) {
7094
- if (body === null || body === void 0) {
7095
- throw new Error("'body' is a required parameter but is null or undefined.");
7096
- }
7097
- const urlPath = "/v2/meet/handle_participant_state";
7098
- const queryParams = /* @__PURE__ */ new Map();
7099
- let bodyJson = "";
7100
- bodyJson = JSON.stringify(body || {});
7101
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
7102
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
7103
- if (bearerToken) {
7104
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7105
- }
7106
- return Promise.race([
7107
- fetch(fullUrl, fetchOptions).then((response) => {
7108
- if (response.status == 204) {
7109
- return response;
7110
- } else if (response.status >= 200 && response.status < 300) {
7111
- return response.json();
7112
- } else {
7113
- throw response;
7114
- }
7115
- }),
7116
- new Promise(
7117
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
7118
- )
7119
- ]);
7120
- }
7121
7092
  /** Create mezon OAuth client */
7122
7093
  getMezonOauthClient(bearerToken, clientId, clientName, options = {}) {
7123
7094
  const urlPath = "/v2/mznoauthclient";
@@ -8094,6 +8065,19 @@ var _DefaultSocket = class _DefaultSocket {
8094
8065
  return response.channel;
8095
8066
  });
8096
8067
  }
8068
+ handleParticipantMeetState(clan_id, channel_id, display_name, state) {
8069
+ return __async(this, null, function* () {
8070
+ const response = yield this.send({
8071
+ handle_participant_meet_state_event: {
8072
+ clan_id,
8073
+ channel_id,
8074
+ display_name,
8075
+ state
8076
+ }
8077
+ });
8078
+ return response.handle_participant_meet_state_event;
8079
+ });
8080
+ }
8097
8081
  leaveChat(clan_id, channel_id, channel_type, is_public) {
8098
8082
  return this.send({
8099
8083
  channel_leave: {
@@ -11061,17 +11045,6 @@ var Client = class {
11061
11045
  });
11062
11046
  });
11063
11047
  }
11064
- /** Handle participant meet state */
11065
- handleParticipantMeetState(session, body) {
11066
- return __async(this, null, function* () {
11067
- if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
11068
- yield this.sessionRefresh(session);
11069
- }
11070
- return this.apiClient.handleParticipantMeetState(session.token, body).then((response) => {
11071
- return Promise.resolve(response);
11072
- });
11073
- });
11074
- }
11075
11048
  //**list webhook belong to the clan */
11076
11049
  listMezonOauthClient(session) {
11077
11050
  return __async(this, null, function* () {
@@ -7055,35 +7055,6 @@ var MezonApi = class {
7055
7055
  )
7056
7056
  ]);
7057
7057
  }
7058
- /** Handle participant meet state */
7059
- handleParticipantMeetState(bearerToken, body, options = {}) {
7060
- if (body === null || body === void 0) {
7061
- throw new Error("'body' is a required parameter but is null or undefined.");
7062
- }
7063
- const urlPath = "/v2/meet/handle_participant_state";
7064
- const queryParams = /* @__PURE__ */ new Map();
7065
- let bodyJson = "";
7066
- bodyJson = JSON.stringify(body || {});
7067
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
7068
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
7069
- if (bearerToken) {
7070
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7071
- }
7072
- return Promise.race([
7073
- fetch(fullUrl, fetchOptions).then((response) => {
7074
- if (response.status == 204) {
7075
- return response;
7076
- } else if (response.status >= 200 && response.status < 300) {
7077
- return response.json();
7078
- } else {
7079
- throw response;
7080
- }
7081
- }),
7082
- new Promise(
7083
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
7084
- )
7085
- ]);
7086
- }
7087
7058
  /** Create mezon OAuth client */
7088
7059
  getMezonOauthClient(bearerToken, clientId, clientName, options = {}) {
7089
7060
  const urlPath = "/v2/mznoauthclient";
@@ -8060,6 +8031,19 @@ var _DefaultSocket = class _DefaultSocket {
8060
8031
  return response.channel;
8061
8032
  });
8062
8033
  }
8034
+ handleParticipantMeetState(clan_id, channel_id, display_name, state) {
8035
+ return __async(this, null, function* () {
8036
+ const response = yield this.send({
8037
+ handle_participant_meet_state_event: {
8038
+ clan_id,
8039
+ channel_id,
8040
+ display_name,
8041
+ state
8042
+ }
8043
+ });
8044
+ return response.handle_participant_meet_state_event;
8045
+ });
8046
+ }
8063
8047
  leaveChat(clan_id, channel_id, channel_type, is_public) {
8064
8048
  return this.send({
8065
8049
  channel_leave: {
@@ -11027,17 +11011,6 @@ var Client = class {
11027
11011
  });
11028
11012
  });
11029
11013
  }
11030
- /** Handle participant meet state */
11031
- handleParticipantMeetState(session, body) {
11032
- return __async(this, null, function* () {
11033
- if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
11034
- yield this.sessionRefresh(session);
11035
- }
11036
- return this.apiClient.handleParticipantMeetState(session.token, body).then((response) => {
11037
- return Promise.resolve(response);
11038
- });
11039
- });
11040
- }
11041
11014
  //**list webhook belong to the clan */
11042
11015
  listMezonOauthClient(session) {
11043
11016
  return __async(this, null, function* () {
package/dist/socket.d.ts CHANGED
@@ -640,6 +640,16 @@ export interface ChannelAppEvent {
640
640
  channel_id: string;
641
641
  action: number;
642
642
  }
643
+ export interface HandleParticipantMeetStateEvent {
644
+ /** clan id */
645
+ clan_id: string;
646
+ /** channel id */
647
+ channel_id: string;
648
+ /** display name */
649
+ display_name: string;
650
+ /** state (0: join, 1: leave) */
651
+ state: number;
652
+ }
643
653
  export interface PermissionSet {
644
654
  /** Role ID */
645
655
  role_id: string;
@@ -744,6 +754,8 @@ export interface Socket {
744
754
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
745
755
  /** Leave a chat channel on the server. */
746
756
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
757
+ /** handle user join/leave channel voice on the server. */
758
+ handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number): Promise<void>;
747
759
  /** Remove a chat message from a chat channel on the server. */
748
760
  removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
749
761
  /** Execute an RPC function to the server. */
@@ -955,6 +967,7 @@ export declare class DefaultSocket implements Socket {
955
967
  joinClanChat(clan_id: string): Promise<ClanJoin>;
956
968
  follower(): Promise<void>;
957
969
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
970
+ handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number): Promise<void>;
958
971
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
959
972
  removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
960
973
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.11.18",
4
+ "version": "2.11.20",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -924,6 +924,17 @@ export interface ChannelAppEvent {
924
924
  action: number;
925
925
  }
926
926
 
927
+ export interface HandleParticipantMeetStateEvent {
928
+ /** clan id */
929
+ clan_id: string;
930
+ /** channel id */
931
+ channel_id: string;
932
+ /** display name */
933
+ display_name: string;
934
+ /** state (0: join, 1: leave) */
935
+ state: number;
936
+ }
937
+
927
938
  export interface PermissionSet {
928
939
  /** Role ID */
929
940
  role_id: string;
@@ -1072,6 +1083,14 @@ export interface Socket {
1072
1083
  is_public: boolean
1073
1084
  ): Promise<void>;
1074
1085
 
1086
+ /** handle user join/leave channel voice on the server. */
1087
+ handleParticipantMeetState (
1088
+ clan_id: string,
1089
+ channel_id: string,
1090
+ display_name: string,
1091
+ state: number
1092
+ ): Promise<void>
1093
+
1075
1094
  /** Remove a chat message from a chat channel on the server. */
1076
1095
  removeChatMessage(
1077
1096
  clan_id: string,
@@ -2225,6 +2244,24 @@ export class DefaultSocket implements Socket {
2225
2244
  return response.channel;
2226
2245
  }
2227
2246
 
2247
+ async handleParticipantMeetState (
2248
+ clan_id: string,
2249
+ channel_id: string,
2250
+ display_name: string,
2251
+ state: number
2252
+ ): Promise<void> {
2253
+ const response = await this.send({
2254
+ handle_participant_meet_state_event: {
2255
+ clan_id: clan_id,
2256
+ channel_id: channel_id,
2257
+ display_name: display_name,
2258
+ state: state,
2259
+ },
2260
+ });
2261
+
2262
+ return response.handle_participant_meet_state_event;
2263
+ }
2264
+
2228
2265
  leaveChat(
2229
2266
  clan_id: string,
2230
2267
  channel_id: string,