mezon-js 2.12.70 → 2.12.72

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,14 @@ 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
+
1424
1432
  /** */
1425
1433
  export interface ApiGetPubKeysResponse {
1426
1434
  //
@@ -4698,38 +4706,37 @@ export class MezonApi {
4698
4706
  }
4699
4707
 
4700
4708
  /** List all attachment that are part of a channel. */
4701
- listChannelAttachment(
4702
- bearerToken: string,
4703
- channelId: string,
4704
- clanId?: string,
4705
- fileType?: string,
4706
- limit?: number,
4707
- state?: number,
4708
- cursor?: string,
4709
- options: any = {}
4710
- ): Promise<ApiChannelAttachmentList> {
4709
+ listChannelAttachment(bearerToken: string,
4710
+ channelId:string,
4711
+ clanId?:string,
4712
+ fileType?:string,
4713
+ limit?:number,
4714
+ state?:number,
4715
+ before?:number,
4716
+ after?:number,
4717
+ around?:number,
4718
+ options: any = {}): Promise<ApiChannelAttachmentList> {
4719
+
4711
4720
  if (channelId === null || channelId === undefined) {
4712
- throw new Error(
4713
- "'channelId' is a required parameter but is null or undefined."
4714
- );
4721
+ throw new Error("'channelId' is a required parameter but is null or undefined.");
4715
4722
  }
4716
- const urlPath = "/v2/channel/{channelId}/attachment".replace(
4717
- "{channelId}",
4718
- encodeURIComponent(String(channelId))
4719
- );
4723
+ const urlPath = "/v2/channel/{channelId}/attachment"
4724
+ .replace("{channelId}", encodeURIComponent(String(channelId)));
4720
4725
  const queryParams = new Map<string, any>();
4721
4726
  queryParams.set("clan_id", clanId);
4722
4727
  queryParams.set("file_type", fileType);
4723
4728
  queryParams.set("limit", limit);
4724
4729
  queryParams.set("state", state);
4725
- queryParams.set("cursor", cursor);
4730
+ queryParams.set("before", before);
4731
+ queryParams.set("after", after);
4732
+ queryParams.set("around", around);
4726
4733
 
4727
- let bodyJson: string = "";
4734
+ let bodyJson : string = "";
4728
4735
 
4729
4736
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4730
4737
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4731
4738
  if (bearerToken) {
4732
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4739
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4733
4740
  }
4734
4741
 
4735
4742
  return Promise.race([
@@ -10751,6 +10758,78 @@ export class MezonApi {
10751
10758
  ]);
10752
10759
  }
10753
10760
 
10761
+ /** mute participant in the room */
10762
+ muteParticipantMezonMeet(bearerToken: string,
10763
+ body:ApiMeetParticipantRequest,
10764
+ options: any = {}): Promise<any> {
10765
+
10766
+ if (body === null || body === undefined) {
10767
+ throw new Error("'body' is a required parameter but is null or undefined.");
10768
+ }
10769
+ const urlPath = "/v2/meet/participant/mute";
10770
+ const queryParams = new Map<string, any>();
10771
+
10772
+ let bodyJson : string = "";
10773
+ bodyJson = JSON.stringify(body || {});
10774
+
10775
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10776
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10777
+ if (bearerToken) {
10778
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10779
+ }
10780
+
10781
+ return Promise.race([
10782
+ fetch(fullUrl, fetchOptions).then((response) => {
10783
+ if (response.status == 204) {
10784
+ return response;
10785
+ } else if (response.status >= 200 && response.status < 300) {
10786
+ return response.json();
10787
+ } else {
10788
+ throw response;
10789
+ }
10790
+ }),
10791
+ new Promise((_, reject) =>
10792
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10793
+ ),
10794
+ ]);
10795
+ }
10796
+
10797
+ /** Remove participant out the room */
10798
+ removeParticipantMezonMeet(bearerToken: string,
10799
+ body:ApiMeetParticipantRequest,
10800
+ options: any = {}): Promise<any> {
10801
+
10802
+ if (body === null || body === undefined) {
10803
+ throw new Error("'body' is a required parameter but is null or undefined.");
10804
+ }
10805
+ const urlPath = "/v2/meet/participant/remove";
10806
+ const queryParams = new Map<string, any>();
10807
+
10808
+ let bodyJson : string = "";
10809
+ bodyJson = JSON.stringify(body || {});
10810
+
10811
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10812
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10813
+ if (bearerToken) {
10814
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10815
+ }
10816
+
10817
+ return Promise.race([
10818
+ fetch(fullUrl, fetchOptions).then((response) => {
10819
+ if (response.status == 204) {
10820
+ return response;
10821
+ } else if (response.status >= 200 && response.status < 300) {
10822
+ return response.json();
10823
+ } else {
10824
+ throw response;
10825
+ }
10826
+ }),
10827
+ new Promise((_, reject) =>
10828
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10829
+ ),
10830
+ ]);
10831
+ }
10832
+
10754
10833
  /** List channels detail */
10755
10834
  listChannelDetail(bearerToken: string,
10756
10835
  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";
@@ -1435,7 +1436,8 @@ export class Client {
1435
1436
  fileType: string,
1436
1437
  state?: number,
1437
1438
  limit?: number,
1438
- cursor?: string
1439
+ before?: number,
1440
+ after?: number,
1439
1441
  ): Promise<ApiChannelAttachmentList> {
1440
1442
  if (
1441
1443
  this.autoRefreshSession &&
@@ -1453,7 +1455,8 @@ export class Client {
1453
1455
  fileType,
1454
1456
  limit,
1455
1457
  state,
1456
- cursor
1458
+ before,
1459
+ after,
1457
1460
  )
1458
1461
  .then((response: ApiChannelAttachmentList) => {
1459
1462
  var result: ApiChannelAttachmentList = {
@@ -4645,7 +4648,7 @@ export class Client {
4645
4648
 
4646
4649
  return this.apiClient
4647
4650
  .deleteAccount(session.token)
4648
- .then((response: ApiMezonOauthClientList) => {
4651
+ .then((response: any) => {
4649
4652
  return Promise.resolve(response);
4650
4653
  });
4651
4654
  }
@@ -4681,6 +4684,44 @@ export class Client {
4681
4684
  });
4682
4685
  }
4683
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
+
4684
4725
  /** Update clan order to view. */
4685
4726
  async updateClanOrder(
4686
4727
  session: Session,
package/dist/api.gen.d.ts CHANGED
@@ -808,6 +808,11 @@ 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
+ }
815
+ /** */
811
816
  export interface ApiGetPubKeysResponse {
812
817
  pub_keys?: Array<GetPubKeysResponseUserPubKey>;
813
818
  }
@@ -1977,7 +1982,7 @@ export declare class MezonApi {
1977
1982
  /** Add users to a channel. */
1978
1983
  addChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
1979
1984
  /** List all attachment that are part of a channel. */
1980
- listChannelAttachment(bearerToken: string, channelId: string, clanId?: string, fileType?: string, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiChannelAttachmentList>;
1985
+ listChannelAttachment(bearerToken: string, channelId: string, clanId?: string, fileType?: string, limit?: number, state?: number, before?: number, after?: number, around?: number, options?: any): Promise<ApiChannelAttachmentList>;
1981
1986
  /** get channel encryption method */
1982
1987
  getChanEncryptionMethod(bearerToken: string, channelId: string, method?: string, options?: any): Promise<ApiChanEncryptionMethod>;
1983
1988
  /** store channel encryption method */
@@ -2279,6 +2284,10 @@ export declare class MezonApi {
2279
2284
  createExternalMezonMeet(bearerToken: string, options?: any): Promise<ApiGenerateMezonMeetResponse>;
2280
2285
  /** handler external mezon meet */
2281
2286
  generateMeetTokenExternal(bearerToken: string, basePath: string, token: string, displayName?: string, isGuest?: boolean, options?: any): Promise<ApiGenerateMeetTokenExternalResponse>;
2287
+ /** mute participant in the room */
2288
+ muteParticipantMezonMeet(bearerToken: string, body: ApiMeetParticipantRequest, options?: any): Promise<any>;
2289
+ /** Remove participant out the room */
2290
+ removeParticipantMezonMeet(bearerToken: string, body: ApiMeetParticipantRequest, options?: any): Promise<any>;
2282
2291
  /** List channels detail */
2283
2292
  listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
2284
2293
  /** */
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";
@@ -409,7 +409,7 @@ export declare class Client {
409
409
  /** List a channel's users. */
410
410
  listChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiChannelUserList>;
411
411
  /** List a channel's attachment. */
412
- listChannelAttachments(session: Session, clanId: string, channelId: string, fileType: string, state?: number, limit?: number, cursor?: string): Promise<ApiChannelAttachmentList>;
412
+ listChannelAttachments(session: Session, clanId: string, channelId: string, fileType: string, state?: number, limit?: number, before?: number, after?: number): Promise<ApiChannelAttachmentList>;
413
413
  /** List a channel's users. */
414
414
  listClanUsers(session: Session, clanId: string): Promise<ApiClanUserList>;
415
415
  /** List channels. */
@@ -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. */
@@ -1813,22 +1813,19 @@ var MezonApi = class {
1813
1813
  ]);
1814
1814
  }
1815
1815
  /** List all attachment that are part of a channel. */
1816
- listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, cursor, options = {}) {
1816
+ listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, before, after, around, options = {}) {
1817
1817
  if (channelId === null || channelId === void 0) {
1818
- throw new Error(
1819
- "'channelId' is a required parameter but is null or undefined."
1820
- );
1818
+ throw new Error("'channelId' is a required parameter but is null or undefined.");
1821
1819
  }
1822
- const urlPath = "/v2/channel/{channelId}/attachment".replace(
1823
- "{channelId}",
1824
- encodeURIComponent(String(channelId))
1825
- );
1820
+ const urlPath = "/v2/channel/{channelId}/attachment".replace("{channelId}", encodeURIComponent(String(channelId)));
1826
1821
  const queryParams = /* @__PURE__ */ new Map();
1827
1822
  queryParams.set("clan_id", clanId);
1828
1823
  queryParams.set("file_type", fileType);
1829
1824
  queryParams.set("limit", limit);
1830
1825
  queryParams.set("state", state);
1831
- queryParams.set("cursor", cursor);
1826
+ queryParams.set("before", before);
1827
+ queryParams.set("after", after);
1828
+ queryParams.set("around", around);
1832
1829
  let bodyJson = "";
1833
1830
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
1834
1831
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -6530,6 +6527,64 @@ var MezonApi = class {
6530
6527
  )
6531
6528
  ]);
6532
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
+ }
6533
6588
  /** List channels detail */
6534
6589
  listChannelDetail(bearerToken, channelId, options = {}) {
6535
6590
  if (channelId === null || channelId === void 0) {
@@ -8694,7 +8749,7 @@ var Client = class {
8694
8749
  });
8695
8750
  }
8696
8751
  /** List a channel's attachment. */
8697
- listChannelAttachments(session, clanId, channelId, fileType, state, limit, cursor) {
8752
+ listChannelAttachments(session, clanId, channelId, fileType, state, limit, before, after) {
8698
8753
  return __async(this, null, function* () {
8699
8754
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
8700
8755
  yield this.sessionRefresh(session);
@@ -8706,7 +8761,8 @@ var Client = class {
8706
8761
  fileType,
8707
8762
  limit,
8708
8763
  state,
8709
- cursor
8764
+ before,
8765
+ after
8710
8766
  ).then((response) => {
8711
8767
  var result = {
8712
8768
  attachments: []
@@ -10568,6 +10624,26 @@ var Client = class {
10568
10624
  });
10569
10625
  });
10570
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
+ }
10571
10647
  /** Update clan order to view. */
10572
10648
  updateClanOrder(session, request) {
10573
10649
  return __async(this, null, function* () {
@@ -1779,22 +1779,19 @@ var MezonApi = class {
1779
1779
  ]);
1780
1780
  }
1781
1781
  /** List all attachment that are part of a channel. */
1782
- listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, cursor, options = {}) {
1782
+ listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, before, after, around, options = {}) {
1783
1783
  if (channelId === null || channelId === void 0) {
1784
- throw new Error(
1785
- "'channelId' is a required parameter but is null or undefined."
1786
- );
1784
+ throw new Error("'channelId' is a required parameter but is null or undefined.");
1787
1785
  }
1788
- const urlPath = "/v2/channel/{channelId}/attachment".replace(
1789
- "{channelId}",
1790
- encodeURIComponent(String(channelId))
1791
- );
1786
+ const urlPath = "/v2/channel/{channelId}/attachment".replace("{channelId}", encodeURIComponent(String(channelId)));
1792
1787
  const queryParams = /* @__PURE__ */ new Map();
1793
1788
  queryParams.set("clan_id", clanId);
1794
1789
  queryParams.set("file_type", fileType);
1795
1790
  queryParams.set("limit", limit);
1796
1791
  queryParams.set("state", state);
1797
- queryParams.set("cursor", cursor);
1792
+ queryParams.set("before", before);
1793
+ queryParams.set("after", after);
1794
+ queryParams.set("around", around);
1798
1795
  let bodyJson = "";
1799
1796
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
1800
1797
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -6496,6 +6493,64 @@ var MezonApi = class {
6496
6493
  )
6497
6494
  ]);
6498
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
+ }
6499
6554
  /** List channels detail */
6500
6555
  listChannelDetail(bearerToken, channelId, options = {}) {
6501
6556
  if (channelId === null || channelId === void 0) {
@@ -8660,7 +8715,7 @@ var Client = class {
8660
8715
  });
8661
8716
  }
8662
8717
  /** List a channel's attachment. */
8663
- listChannelAttachments(session, clanId, channelId, fileType, state, limit, cursor) {
8718
+ listChannelAttachments(session, clanId, channelId, fileType, state, limit, before, after) {
8664
8719
  return __async(this, null, function* () {
8665
8720
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
8666
8721
  yield this.sessionRefresh(session);
@@ -8672,7 +8727,8 @@ var Client = class {
8672
8727
  fileType,
8673
8728
  limit,
8674
8729
  state,
8675
- cursor
8730
+ before,
8731
+ after
8676
8732
  ).then((response) => {
8677
8733
  var result = {
8678
8734
  attachments: []
@@ -10534,6 +10590,26 @@ var Client = class {
10534
10590
  });
10535
10591
  });
10536
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
+ }
10537
10613
  /** Update clan order to view. */
10538
10614
  updateClanOrder(session, request) {
10539
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.70",
3
+ "version": "2.12.72",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },