mezon-js 2.12.71 → 2.12.73

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
@@ -1421,6 +1421,16 @@ export interface ApiGenerateMeetTokenExternalResponse {
1421
1421
  guest_access_token?: string;
1422
1422
  }
1423
1423
 
1424
+ /** */
1425
+ export interface ApiMeetParticipantRequest {
1426
+ //
1427
+ room_name?: string;
1428
+ //
1429
+ user_id?: string;
1430
+ //
1431
+ clan_id?: string;
1432
+ }
1433
+
1424
1434
  /** */
1425
1435
  export interface ApiGetPubKeysResponse {
1426
1436
  //
@@ -10750,6 +10760,78 @@ export class MezonApi {
10750
10760
  ]);
10751
10761
  }
10752
10762
 
10763
+ /** mute participant in the room */
10764
+ muteParticipantMezonMeet(bearerToken: string,
10765
+ body:ApiMeetParticipantRequest,
10766
+ options: any = {}): Promise<any> {
10767
+
10768
+ if (body === null || body === undefined) {
10769
+ throw new Error("'body' is a required parameter but is null or undefined.");
10770
+ }
10771
+ const urlPath = "/v2/meet/participant/mute";
10772
+ const queryParams = new Map<string, any>();
10773
+
10774
+ let bodyJson : string = "";
10775
+ bodyJson = JSON.stringify(body || {});
10776
+
10777
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10778
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10779
+ if (bearerToken) {
10780
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10781
+ }
10782
+
10783
+ return Promise.race([
10784
+ fetch(fullUrl, fetchOptions).then((response) => {
10785
+ if (response.status == 204) {
10786
+ return response;
10787
+ } else if (response.status >= 200 && response.status < 300) {
10788
+ return response.json();
10789
+ } else {
10790
+ throw response;
10791
+ }
10792
+ }),
10793
+ new Promise((_, reject) =>
10794
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10795
+ ),
10796
+ ]);
10797
+ }
10798
+
10799
+ /** Remove participant out the room */
10800
+ removeParticipantMezonMeet(bearerToken: string,
10801
+ body:ApiMeetParticipantRequest,
10802
+ options: any = {}): Promise<any> {
10803
+
10804
+ if (body === null || body === undefined) {
10805
+ throw new Error("'body' is a required parameter but is null or undefined.");
10806
+ }
10807
+ const urlPath = "/v2/meet/participant/remove";
10808
+ const queryParams = new Map<string, any>();
10809
+
10810
+ let bodyJson : string = "";
10811
+ bodyJson = JSON.stringify(body || {});
10812
+
10813
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10814
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10815
+ if (bearerToken) {
10816
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10817
+ }
10818
+
10819
+ return Promise.race([
10820
+ fetch(fullUrl, fetchOptions).then((response) => {
10821
+ if (response.status == 204) {
10822
+ return response;
10823
+ } else if (response.status >= 200 && response.status < 300) {
10824
+ return response.json();
10825
+ } else {
10826
+ throw response;
10827
+ }
10828
+ }),
10829
+ new Promise((_, reject) =>
10830
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10831
+ ),
10832
+ ]);
10833
+ }
10834
+
10753
10835
  /** List channels detail */
10754
10836
  listChannelDetail(bearerToken: string,
10755
10837
  channelId:string,
package/client.ts CHANGED
@@ -171,6 +171,7 @@ import {
171
171
  ApiIsFollowerResponse,
172
172
  ApiIsFollowerRequest,
173
173
  ApiTransferOwnershipRequest,
174
+ ApiMeetParticipantRequest,
174
175
  } from "./api.gen";
175
176
 
176
177
  import { Session } from "./session";
@@ -4647,7 +4648,7 @@ export class Client {
4647
4648
 
4648
4649
  return this.apiClient
4649
4650
  .deleteAccount(session.token)
4650
- .then((response: ApiMezonOauthClientList) => {
4651
+ .then((response: any) => {
4651
4652
  return Promise.resolve(response);
4652
4653
  });
4653
4654
  }
@@ -4683,6 +4684,44 @@ export class Client {
4683
4684
  });
4684
4685
  }
4685
4686
 
4687
+ async removeMezonMeetParticipant(
4688
+ session: Session,
4689
+ request: ApiMeetParticipantRequest
4690
+ ): Promise<any> {
4691
+ if (
4692
+ this.autoRefreshSession &&
4693
+ session.refresh_token &&
4694
+ session.isexpired(Date.now() / 1000)
4695
+ ) {
4696
+ await this.sessionRefresh(session);
4697
+ }
4698
+
4699
+ return this.apiClient
4700
+ .removeParticipantMezonMeet(session.token, request)
4701
+ .then((response: any) => {
4702
+ return Promise.resolve(response);
4703
+ });
4704
+ }
4705
+
4706
+ async muteMezonMeetParticipant(
4707
+ session: Session,
4708
+ request: ApiMeetParticipantRequest
4709
+ ): Promise<any> {
4710
+ if (
4711
+ this.autoRefreshSession &&
4712
+ session.refresh_token &&
4713
+ session.isexpired(Date.now() / 1000)
4714
+ ) {
4715
+ await this.sessionRefresh(session);
4716
+ }
4717
+
4718
+ return this.apiClient
4719
+ .muteParticipantMezonMeet(session.token, request)
4720
+ .then((response: any) => {
4721
+ return Promise.resolve(response);
4722
+ });
4723
+ }
4724
+
4686
4725
  /** Update clan order to view. */
4687
4726
  async updateClanOrder(
4688
4727
  session: Session,
package/dist/api.gen.d.ts CHANGED
@@ -808,6 +808,12 @@ export interface ApiGenerateMeetTokenExternalResponse {
808
808
  guest_access_token?: string;
809
809
  }
810
810
  /** */
811
+ export interface ApiMeetParticipantRequest {
812
+ room_name?: string;
813
+ user_id?: string;
814
+ clan_id?: string;
815
+ }
816
+ /** */
811
817
  export interface ApiGetPubKeysResponse {
812
818
  pub_keys?: Array<GetPubKeysResponseUserPubKey>;
813
819
  }
@@ -2279,6 +2285,10 @@ export declare class MezonApi {
2279
2285
  createExternalMezonMeet(bearerToken: string, options?: any): Promise<ApiGenerateMezonMeetResponse>;
2280
2286
  /** handler external mezon meet */
2281
2287
  generateMeetTokenExternal(bearerToken: string, basePath: string, token: string, displayName?: string, isGuest?: boolean, options?: any): Promise<ApiGenerateMeetTokenExternalResponse>;
2288
+ /** mute participant in the room */
2289
+ muteParticipantMezonMeet(bearerToken: string, body: ApiMeetParticipantRequest, options?: any): Promise<any>;
2290
+ /** Remove participant out the room */
2291
+ removeParticipantMezonMeet(bearerToken: string, body: ApiMeetParticipantRequest, options?: any): Promise<any>;
2282
2292
  /** List channels detail */
2283
2293
  listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
2284
2294
  /** */
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, 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, ApiTransferOwnershipRequest } 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, 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, ApiTransferOwnershipRequest, ApiMeetParticipantRequest } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -607,6 +607,8 @@ export declare class Client {
607
607
  deleteAccount(session: Session): Promise<any>;
608
608
  createExternalMezonMeet(session: Session): Promise<ApiGenerateMezonMeetResponse>;
609
609
  generateMeetTokenExternal(basePath: string, token: string, displayName?: string, isGuest?: boolean): Promise<ApiGenerateMeetTokenExternalResponse>;
610
+ removeMezonMeetParticipant(session: Session, request: ApiMeetParticipantRequest): Promise<any>;
611
+ muteMezonMeetParticipant(session: Session, request: ApiMeetParticipantRequest): Promise<any>;
610
612
  /** Update clan order to view. */
611
613
  updateClanOrder(session: Session, request: ApiUpdateClanOrderRequest): Promise<boolean>;
612
614
  /** list clan discover. */
@@ -6527,6 +6527,64 @@ var MezonApi = class {
6527
6527
  )
6528
6528
  ]);
6529
6529
  }
6530
+ /** mute participant in the room */
6531
+ muteParticipantMezonMeet(bearerToken, body, options = {}) {
6532
+ if (body === null || body === void 0) {
6533
+ throw new Error("'body' is a required parameter but is null or undefined.");
6534
+ }
6535
+ const urlPath = "/v2/meet/participant/mute";
6536
+ const queryParams = /* @__PURE__ */ new Map();
6537
+ let bodyJson = "";
6538
+ bodyJson = JSON.stringify(body || {});
6539
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6540
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6541
+ if (bearerToken) {
6542
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6543
+ }
6544
+ return Promise.race([
6545
+ fetch(fullUrl, fetchOptions).then((response) => {
6546
+ if (response.status == 204) {
6547
+ return response;
6548
+ } else if (response.status >= 200 && response.status < 300) {
6549
+ return response.json();
6550
+ } else {
6551
+ throw response;
6552
+ }
6553
+ }),
6554
+ new Promise(
6555
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6556
+ )
6557
+ ]);
6558
+ }
6559
+ /** Remove participant out the room */
6560
+ removeParticipantMezonMeet(bearerToken, body, options = {}) {
6561
+ if (body === null || body === void 0) {
6562
+ throw new Error("'body' is a required parameter but is null or undefined.");
6563
+ }
6564
+ const urlPath = "/v2/meet/participant/remove";
6565
+ const queryParams = /* @__PURE__ */ new Map();
6566
+ let bodyJson = "";
6567
+ bodyJson = JSON.stringify(body || {});
6568
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6569
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6570
+ if (bearerToken) {
6571
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6572
+ }
6573
+ return Promise.race([
6574
+ fetch(fullUrl, fetchOptions).then((response) => {
6575
+ if (response.status == 204) {
6576
+ return response;
6577
+ } else if (response.status >= 200 && response.status < 300) {
6578
+ return response.json();
6579
+ } else {
6580
+ throw response;
6581
+ }
6582
+ }),
6583
+ new Promise(
6584
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6585
+ )
6586
+ ]);
6587
+ }
6530
6588
  /** List channels detail */
6531
6589
  listChannelDetail(bearerToken, channelId, options = {}) {
6532
6590
  if (channelId === null || channelId === void 0) {
@@ -10566,6 +10624,26 @@ var Client = class {
10566
10624
  });
10567
10625
  });
10568
10626
  }
10627
+ removeMezonMeetParticipant(session, request) {
10628
+ return __async(this, null, function* () {
10629
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10630
+ yield this.sessionRefresh(session);
10631
+ }
10632
+ return this.apiClient.removeParticipantMezonMeet(session.token, request).then((response) => {
10633
+ return Promise.resolve(response);
10634
+ });
10635
+ });
10636
+ }
10637
+ muteMezonMeetParticipant(session, request) {
10638
+ return __async(this, null, function* () {
10639
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10640
+ yield this.sessionRefresh(session);
10641
+ }
10642
+ return this.apiClient.muteParticipantMezonMeet(session.token, request).then((response) => {
10643
+ return Promise.resolve(response);
10644
+ });
10645
+ });
10646
+ }
10569
10647
  /** Update clan order to view. */
10570
10648
  updateClanOrder(session, request) {
10571
10649
  return __async(this, null, function* () {
@@ -6493,6 +6493,64 @@ var MezonApi = class {
6493
6493
  )
6494
6494
  ]);
6495
6495
  }
6496
+ /** mute participant in the room */
6497
+ muteParticipantMezonMeet(bearerToken, body, options = {}) {
6498
+ if (body === null || body === void 0) {
6499
+ throw new Error("'body' is a required parameter but is null or undefined.");
6500
+ }
6501
+ const urlPath = "/v2/meet/participant/mute";
6502
+ const queryParams = /* @__PURE__ */ new Map();
6503
+ let bodyJson = "";
6504
+ bodyJson = JSON.stringify(body || {});
6505
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6506
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6507
+ if (bearerToken) {
6508
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6509
+ }
6510
+ return Promise.race([
6511
+ fetch(fullUrl, fetchOptions).then((response) => {
6512
+ if (response.status == 204) {
6513
+ return response;
6514
+ } else if (response.status >= 200 && response.status < 300) {
6515
+ return response.json();
6516
+ } else {
6517
+ throw response;
6518
+ }
6519
+ }),
6520
+ new Promise(
6521
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6522
+ )
6523
+ ]);
6524
+ }
6525
+ /** Remove participant out the room */
6526
+ removeParticipantMezonMeet(bearerToken, body, options = {}) {
6527
+ if (body === null || body === void 0) {
6528
+ throw new Error("'body' is a required parameter but is null or undefined.");
6529
+ }
6530
+ const urlPath = "/v2/meet/participant/remove";
6531
+ const queryParams = /* @__PURE__ */ new Map();
6532
+ let bodyJson = "";
6533
+ bodyJson = JSON.stringify(body || {});
6534
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6535
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6536
+ if (bearerToken) {
6537
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6538
+ }
6539
+ return Promise.race([
6540
+ fetch(fullUrl, fetchOptions).then((response) => {
6541
+ if (response.status == 204) {
6542
+ return response;
6543
+ } else if (response.status >= 200 && response.status < 300) {
6544
+ return response.json();
6545
+ } else {
6546
+ throw response;
6547
+ }
6548
+ }),
6549
+ new Promise(
6550
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6551
+ )
6552
+ ]);
6553
+ }
6496
6554
  /** List channels detail */
6497
6555
  listChannelDetail(bearerToken, channelId, options = {}) {
6498
6556
  if (channelId === null || channelId === void 0) {
@@ -10532,6 +10590,26 @@ var Client = class {
10532
10590
  });
10533
10591
  });
10534
10592
  }
10593
+ removeMezonMeetParticipant(session, request) {
10594
+ return __async(this, null, function* () {
10595
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10596
+ yield this.sessionRefresh(session);
10597
+ }
10598
+ return this.apiClient.removeParticipantMezonMeet(session.token, request).then((response) => {
10599
+ return Promise.resolve(response);
10600
+ });
10601
+ });
10602
+ }
10603
+ muteMezonMeetParticipant(session, request) {
10604
+ return __async(this, null, function* () {
10605
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10606
+ yield this.sessionRefresh(session);
10607
+ }
10608
+ return this.apiClient.muteParticipantMezonMeet(session.token, request).then((response) => {
10609
+ return Promise.resolve(response);
10610
+ });
10611
+ });
10612
+ }
10535
10613
  /** Update clan order to view. */
10536
10614
  updateClanOrder(session, request) {
10537
10615
  return __async(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.12.71",
3
+ "version": "2.12.73",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },