mezon-js 2.12.47 → 2.12.49

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
@@ -3291,21 +3291,6 @@ export interface ApiClanDiscoverRequest {
3291
3291
  page_number?: number;
3292
3292
  }
3293
3293
 
3294
- /** */
3295
- export interface ApiChannelMemberDetail {
3296
- //
3297
- added_by?: string;
3298
- //
3299
- member_id?: string;
3300
- }
3301
-
3302
- /** */
3303
- export interface ApiChannelMemberList {
3304
- //
3305
- channel_members?: Array<ApiChannelMemberDetail>;
3306
- }
3307
-
3308
-
3309
3294
  export class MezonApi {
3310
3295
  basePath: string;
3311
3296
  constructor(
@@ -11113,38 +11098,4 @@ export class MezonApi {
11113
11098
  ]);
11114
11099
  }
11115
11100
 
11116
- /** */
11117
- listChannelMember(bearerToken: string,
11118
- channelId?:string,
11119
- clanId?:string,
11120
- options: any = {}): Promise<ApiChannelMemberList> {
11121
-
11122
- const urlPath = "/v2/listchannelmember";
11123
- const queryParams = new Map<string, any>();
11124
- queryParams.set("channel_id", channelId);
11125
- queryParams.set("clan_id", clanId);
11126
-
11127
- let bodyJson : string = "";
11128
-
11129
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11130
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
11131
- if (bearerToken) {
11132
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11133
- }
11134
-
11135
- return Promise.race([
11136
- fetch(fullUrl, fetchOptions).then((response) => {
11137
- if (response.status == 204) {
11138
- return response;
11139
- } else if (response.status >= 200 && response.status < 300) {
11140
- return response.json();
11141
- } else {
11142
- throw response;
11143
- }
11144
- }),
11145
- new Promise((_, reject) =>
11146
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11147
- ),
11148
- ]);
11149
- }
11150
11101
  }
package/client.ts CHANGED
@@ -169,7 +169,6 @@ import {
169
169
  ApiUnlockedItemRequest,
170
170
  ApiForSaleItemList,
171
171
  ApiUnlockedItemResponse,
172
- ApiChannelMemberList,
173
172
  } from "./api.gen";
174
173
 
175
174
  import { Session } from "./session";
@@ -1411,6 +1410,7 @@ export class Client {
1411
1410
  clan_nick: gu.clan_nick,
1412
1411
  id: gu.id,
1413
1412
  clan_id: gu.clan_id,
1413
+ added_by: gu.added_by
1414
1414
  });
1415
1415
  });
1416
1416
  return Promise.resolve(result);
@@ -4753,7 +4753,8 @@ export class Client {
4753
4753
  async listQuickMenuAccess(
4754
4754
  session: Session,
4755
4755
  botId: string,
4756
- channelId: string
4756
+ channelId: string,
4757
+ menuType: number
4757
4758
  ): Promise<ApiQuickMenuAccessList> {
4758
4759
  if (
4759
4760
  this.autoRefreshSession &&
@@ -4764,7 +4765,7 @@ export class Client {
4764
4765
  }
4765
4766
 
4766
4767
  return this.apiClient
4767
- .listQuickMenuAccess(session.token, botId, channelId)
4768
+ .listQuickMenuAccess(session.token, botId, channelId, menuType)
4768
4769
  .then((response: ApiQuickMenuAccessList) => {
4769
4770
  return Promise.resolve(response);
4770
4771
  });
@@ -4860,23 +4861,4 @@ export class Client {
4860
4861
  });
4861
4862
  }
4862
4863
 
4863
- async listChannelMember(
4864
- session: Session,
4865
- channelId:string,
4866
- clanId:string,
4867
- ): Promise<ApiChannelMemberList> {
4868
- if (
4869
- this.autoRefreshSession &&
4870
- session.refresh_token &&
4871
- session.isexpired(Date.now() / 1000)
4872
- ) {
4873
- await this.sessionRefresh(session);
4874
- }
4875
-
4876
- return this.apiClient
4877
- .listChannelMember(session.token, channelId, clanId)
4878
- .then((response: ApiChannelMemberList) => {
4879
- return Promise.resolve(response);
4880
- });
4881
- }
4882
4864
  }
package/dist/api.gen.d.ts CHANGED
@@ -1885,15 +1885,6 @@ export interface ApiClanDiscoverRequest {
1885
1885
  item_per_page?: number;
1886
1886
  page_number?: number;
1887
1887
  }
1888
- /** */
1889
- export interface ApiChannelMemberDetail {
1890
- added_by?: string;
1891
- member_id?: string;
1892
- }
1893
- /** */
1894
- export interface ApiChannelMemberList {
1895
- channel_members?: Array<ApiChannelMemberDetail>;
1896
- }
1897
1888
  export declare class MezonApi {
1898
1889
  readonly serverKey: string;
1899
1890
  readonly timeoutMs: number;
@@ -2293,6 +2284,4 @@ export declare class MezonApi {
2293
2284
  unlockItem(bearerToken: string, body: ApiUnlockedItemRequest, options?: any): Promise<ApiUnlockedItemResponse>;
2294
2285
  /** For sale items */
2295
2286
  listForSaleItems(bearerToken: string, page?: number, options?: any): Promise<ApiForSaleItemList>;
2296
- /** */
2297
- listChannelMember(bearerToken: string, channelId?: string, clanId?: string, options?: any): Promise<ApiChannelMemberList>;
2298
2287
  }
package/dist/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse, ApiChannelMemberList } from "./api.gen";
16
+ import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -625,11 +625,10 @@ export declare class Client {
625
625
  updateClanOrder(session: Session, request: ApiUpdateClanOrderRequest): Promise<boolean>;
626
626
  /** list clan discover. */
627
627
  listClanDiscover(basePath: string, request: ApiClanDiscoverRequest): Promise<ApiListClanDiscover>;
628
- listQuickMenuAccess(session: Session, botId: string, channelId: string): Promise<ApiQuickMenuAccessList>;
628
+ listQuickMenuAccess(session: Session, botId: string, channelId: string, menuType: number): Promise<ApiQuickMenuAccessList>;
629
629
  deleteQuickMenuAccess(session: Session, id: string): Promise<any>;
630
630
  addQuickMenuAccess(session: Session, request: ApiQuickMenuAccessRequest): Promise<any>;
631
631
  updateQuickMenuAccess(session: Session, request: ApiQuickMenuAccessRequest): Promise<any>;
632
632
  unlockItem(session: Session, request: ApiUnlockedItemRequest): Promise<ApiUnlockedItemResponse>;
633
633
  listForSaleItems(session: Session, page?: number): Promise<ApiForSaleItemList>;
634
- listChannelMember(session: Session, channelId: string, clanId: string): Promise<ApiChannelMemberList>;
635
634
  }
@@ -6828,33 +6828,6 @@ var MezonApi = class {
6828
6828
  )
6829
6829
  ]);
6830
6830
  }
6831
- /** */
6832
- listChannelMember(bearerToken, channelId, clanId, options = {}) {
6833
- const urlPath = "/v2/listchannelmember";
6834
- const queryParams = /* @__PURE__ */ new Map();
6835
- queryParams.set("channel_id", channelId);
6836
- queryParams.set("clan_id", clanId);
6837
- let bodyJson = "";
6838
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6839
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
6840
- if (bearerToken) {
6841
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6842
- }
6843
- return Promise.race([
6844
- fetch(fullUrl, fetchOptions).then((response) => {
6845
- if (response.status == 204) {
6846
- return response;
6847
- } else if (response.status >= 200 && response.status < 300) {
6848
- return response.json();
6849
- } else {
6850
- throw response;
6851
- }
6852
- }),
6853
- new Promise(
6854
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6855
- )
6856
- ]);
6857
- }
6858
6831
  };
6859
6832
 
6860
6833
  // session.ts
@@ -8674,7 +8647,8 @@ var Client = class {
8674
8647
  clan_avatar: gu.clan_avatar,
8675
8648
  clan_nick: gu.clan_nick,
8676
8649
  id: gu.id,
8677
- clan_id: gu.clan_id
8650
+ clan_id: gu.clan_id,
8651
+ added_by: gu.added_by
8678
8652
  });
8679
8653
  });
8680
8654
  return Promise.resolve(result);
@@ -10600,12 +10574,12 @@ var Client = class {
10600
10574
  });
10601
10575
  });
10602
10576
  }
10603
- listQuickMenuAccess(session, botId, channelId) {
10577
+ listQuickMenuAccess(session, botId, channelId, menuType) {
10604
10578
  return __async(this, null, function* () {
10605
10579
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10606
10580
  yield this.sessionRefresh(session);
10607
10581
  }
10608
- return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10582
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId, menuType).then((response) => {
10609
10583
  return Promise.resolve(response);
10610
10584
  });
10611
10585
  });
@@ -10660,14 +10634,4 @@ var Client = class {
10660
10634
  });
10661
10635
  });
10662
10636
  }
10663
- listChannelMember(session, channelId, clanId) {
10664
- return __async(this, null, function* () {
10665
- if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10666
- yield this.sessionRefresh(session);
10667
- }
10668
- return this.apiClient.listChannelMember(session.token, channelId, clanId).then((response) => {
10669
- return Promise.resolve(response);
10670
- });
10671
- });
10672
- }
10673
10637
  };
@@ -6794,33 +6794,6 @@ var MezonApi = class {
6794
6794
  )
6795
6795
  ]);
6796
6796
  }
6797
- /** */
6798
- listChannelMember(bearerToken, channelId, clanId, options = {}) {
6799
- const urlPath = "/v2/listchannelmember";
6800
- const queryParams = /* @__PURE__ */ new Map();
6801
- queryParams.set("channel_id", channelId);
6802
- queryParams.set("clan_id", clanId);
6803
- let bodyJson = "";
6804
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6805
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
6806
- if (bearerToken) {
6807
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6808
- }
6809
- return Promise.race([
6810
- fetch(fullUrl, fetchOptions).then((response) => {
6811
- if (response.status == 204) {
6812
- return response;
6813
- } else if (response.status >= 200 && response.status < 300) {
6814
- return response.json();
6815
- } else {
6816
- throw response;
6817
- }
6818
- }),
6819
- new Promise(
6820
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6821
- )
6822
- ]);
6823
- }
6824
6797
  };
6825
6798
 
6826
6799
  // session.ts
@@ -8640,7 +8613,8 @@ var Client = class {
8640
8613
  clan_avatar: gu.clan_avatar,
8641
8614
  clan_nick: gu.clan_nick,
8642
8615
  id: gu.id,
8643
- clan_id: gu.clan_id
8616
+ clan_id: gu.clan_id,
8617
+ added_by: gu.added_by
8644
8618
  });
8645
8619
  });
8646
8620
  return Promise.resolve(result);
@@ -10566,12 +10540,12 @@ var Client = class {
10566
10540
  });
10567
10541
  });
10568
10542
  }
10569
- listQuickMenuAccess(session, botId, channelId) {
10543
+ listQuickMenuAccess(session, botId, channelId, menuType) {
10570
10544
  return __async(this, null, function* () {
10571
10545
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10572
10546
  yield this.sessionRefresh(session);
10573
10547
  }
10574
- return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10548
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId, menuType).then((response) => {
10575
10549
  return Promise.resolve(response);
10576
10550
  });
10577
10551
  });
@@ -10626,16 +10600,6 @@ var Client = class {
10626
10600
  });
10627
10601
  });
10628
10602
  }
10629
- listChannelMember(session, channelId, clanId) {
10630
- return __async(this, null, function* () {
10631
- if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10632
- yield this.sessionRefresh(session);
10633
- }
10634
- return this.apiClient.listChannelMember(session.token, channelId, clanId).then((response) => {
10635
- return Promise.resolve(response);
10636
- });
10637
- });
10638
- }
10639
10603
  };
10640
10604
  export {
10641
10605
  ChannelStreamMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.12.47",
3
+ "version": "2.12.49",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },