mezon-js 2.12.48 → 2.12.50

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
@@ -7611,12 +7611,18 @@ export class MezonApi {
7611
7611
  /** */
7612
7612
  deletePinMessage(
7613
7613
  bearerToken: string,
7614
+ id?: string,
7614
7615
  messageId?: string,
7616
+ channelId?: string,
7617
+ clanId?: string,
7615
7618
  options: any = {}
7616
7619
  ): Promise<any> {
7617
7620
  const urlPath = "/v2/pinmessage/delete";
7618
7621
  const queryParams = new Map<string, any>();
7622
+ queryParams.set("id", id);
7619
7623
  queryParams.set("message_id", messageId);
7624
+ queryParams.set("channel_id", channelId);
7625
+ queryParams.set("clan_id", clanId);
7620
7626
 
7621
7627
  let bodyJson: string = "";
7622
7628
 
@@ -10884,6 +10890,7 @@ export class MezonApi {
10884
10890
  /** */
10885
10891
  deleteQuickMenuAccess(bearerToken: string,
10886
10892
  id?:string,
10893
+ botId?:string,
10887
10894
  menuName?:string,
10888
10895
  background?:string,
10889
10896
  actionMsg?:string,
@@ -10892,6 +10899,7 @@ export class MezonApi {
10892
10899
  const urlPath = "/v2/quickmenuaccess";
10893
10900
  const queryParams = new Map<string, any>();
10894
10901
  queryParams.set("id", id);
10902
+ queryParams.set("id", botId);
10895
10903
  queryParams.set("menu_name", menuName);
10896
10904
  queryParams.set("background", background);
10897
10905
  queryParams.set("action_msg", actionMsg);
package/client.ts CHANGED
@@ -2686,7 +2686,10 @@ export class Client {
2686
2686
  //** */
2687
2687
  async deletePinMessage(
2688
2688
  session: Session,
2689
- message_id: string
2689
+ id?: string,
2690
+ messageId?: string,
2691
+ channelId?: string,
2692
+ clanId?: string
2690
2693
  ): Promise<boolean> {
2691
2694
  if (
2692
2695
  this.autoRefreshSession &&
@@ -2697,7 +2700,7 @@ export class Client {
2697
2700
  }
2698
2701
 
2699
2702
  return this.apiClient
2700
- .deletePinMessage(session.token, message_id)
2703
+ .deletePinMessage(session.token, id, messageId, channelId, clanId)
2701
2704
  .then((response: any) => {
2702
2705
  return response !== undefined;
2703
2706
  });
@@ -4753,7 +4756,8 @@ export class Client {
4753
4756
  async listQuickMenuAccess(
4754
4757
  session: Session,
4755
4758
  botId: string,
4756
- channelId: string
4759
+ channelId: string,
4760
+ menuType: number
4757
4761
  ): Promise<ApiQuickMenuAccessList> {
4758
4762
  if (
4759
4763
  this.autoRefreshSession &&
@@ -4764,7 +4768,7 @@ export class Client {
4764
4768
  }
4765
4769
 
4766
4770
  return this.apiClient
4767
- .listQuickMenuAccess(session.token, botId, channelId)
4771
+ .listQuickMenuAccess(session.token, botId, channelId, menuType)
4768
4772
  .then((response: ApiQuickMenuAccessList) => {
4769
4773
  return Promise.resolve(response);
4770
4774
  });
package/dist/api.gen.d.ts CHANGED
@@ -2110,7 +2110,7 @@ export declare class MezonApi {
2110
2110
  /** GetPermissionByRoleIdChannelId */
2111
2111
  getPermissionByRoleIdChannelId(bearerToken: string, roleId?: string, channelId?: string, userId?: string, options?: any): Promise<ApiPermissionRoleChannelListEventResponse>;
2112
2112
  /** */
2113
- deletePinMessage(bearerToken: string, messageId?: string, options?: any): Promise<any>;
2113
+ deletePinMessage(bearerToken: string, id?: string, messageId?: string, channelId?: string, clanId?: string, options?: any): Promise<any>;
2114
2114
  /** */
2115
2115
  getPinMessagesList(bearerToken: string, messageId?: string, channelId?: string, clanId?: string, options?: any): Promise<ApiPinMessagesList>;
2116
2116
  /** create message to inbox. */
@@ -2273,7 +2273,7 @@ export declare class MezonApi {
2273
2273
  /** Discover mezon clan. */
2274
2274
  clanDiscover(basicAuthUsername: string, basicAuthPassword: string, basePath: string, body: ApiClanDiscoverRequest, options?: any): Promise<ApiListClanDiscover>;
2275
2275
  /** */
2276
- deleteQuickMenuAccess(bearerToken: string, id?: string, menuName?: string, background?: string, actionMsg?: string, options?: any): Promise<any>;
2276
+ deleteQuickMenuAccess(bearerToken: string, id?: string, botId?: string, menuName?: string, background?: string, actionMsg?: string, options?: any): Promise<any>;
2277
2277
  /** */
2278
2278
  listQuickMenuAccess(bearerToken: string, botId?: string, channelId?: string, menuType?: number, options?: any): Promise<ApiQuickMenuAccessList>;
2279
2279
  /** */
package/dist/client.d.ts CHANGED
@@ -511,7 +511,7 @@ export declare class Client {
511
511
  /** */
512
512
  createPinMessage(session: Session, request: ApiPinMessageRequest): Promise<ApiChannelMessageHeader>;
513
513
  pinMessagesList(session: Session, messageId: string, channelId: string, clanId: string): Promise<ApiPinMessagesList>;
514
- deletePinMessage(session: Session, message_id: string): Promise<boolean>;
514
+ deletePinMessage(session: Session, id?: string, messageId?: string, channelId?: string, clanId?: string): Promise<boolean>;
515
515
  /** create clan emoji */
516
516
  createClanEmoji(session: Session, request: ApiClanEmojiCreateRequest): Promise<boolean>;
517
517
  updateClanEmojiById(session: Session, id: string, request: MezonUpdateClanEmojiByIdBody): Promise<boolean>;
@@ -625,7 +625,7 @@ 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>;
@@ -4103,10 +4103,13 @@ var MezonApi = class {
4103
4103
  ]);
4104
4104
  }
4105
4105
  /** */
4106
- deletePinMessage(bearerToken, messageId, options = {}) {
4106
+ deletePinMessage(bearerToken, id, messageId, channelId, clanId, options = {}) {
4107
4107
  const urlPath = "/v2/pinmessage/delete";
4108
4108
  const queryParams = /* @__PURE__ */ new Map();
4109
+ queryParams.set("id", id);
4109
4110
  queryParams.set("message_id", messageId);
4111
+ queryParams.set("channel_id", channelId);
4112
+ queryParams.set("clan_id", clanId);
4110
4113
  let bodyJson = "";
4111
4114
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4112
4115
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
@@ -6659,10 +6662,11 @@ var MezonApi = class {
6659
6662
  ]);
6660
6663
  }
6661
6664
  /** */
6662
- deleteQuickMenuAccess(bearerToken, id, menuName, background, actionMsg, options = {}) {
6665
+ deleteQuickMenuAccess(bearerToken, id, botId, menuName, background, actionMsg, options = {}) {
6663
6666
  const urlPath = "/v2/quickmenuaccess";
6664
6667
  const queryParams = /* @__PURE__ */ new Map();
6665
6668
  queryParams.set("id", id);
6669
+ queryParams.set("id", botId);
6666
6670
  queryParams.set("menu_name", menuName);
6667
6671
  queryParams.set("background", background);
6668
6672
  queryParams.set("action_msg", actionMsg);
@@ -9412,12 +9416,12 @@ var Client = class {
9412
9416
  });
9413
9417
  }
9414
9418
  //** */
9415
- deletePinMessage(session, message_id) {
9419
+ deletePinMessage(session, id, messageId, channelId, clanId) {
9416
9420
  return __async(this, null, function* () {
9417
9421
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
9418
9422
  yield this.sessionRefresh(session);
9419
9423
  }
9420
- return this.apiClient.deletePinMessage(session.token, message_id).then((response) => {
9424
+ return this.apiClient.deletePinMessage(session.token, id, messageId, channelId, clanId).then((response) => {
9421
9425
  return response !== void 0;
9422
9426
  });
9423
9427
  });
@@ -10574,12 +10578,12 @@ var Client = class {
10574
10578
  });
10575
10579
  });
10576
10580
  }
10577
- listQuickMenuAccess(session, botId, channelId) {
10581
+ listQuickMenuAccess(session, botId, channelId, menuType) {
10578
10582
  return __async(this, null, function* () {
10579
10583
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10580
10584
  yield this.sessionRefresh(session);
10581
10585
  }
10582
- return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10586
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId, menuType).then((response) => {
10583
10587
  return Promise.resolve(response);
10584
10588
  });
10585
10589
  });
@@ -4069,10 +4069,13 @@ var MezonApi = class {
4069
4069
  ]);
4070
4070
  }
4071
4071
  /** */
4072
- deletePinMessage(bearerToken, messageId, options = {}) {
4072
+ deletePinMessage(bearerToken, id, messageId, channelId, clanId, options = {}) {
4073
4073
  const urlPath = "/v2/pinmessage/delete";
4074
4074
  const queryParams = /* @__PURE__ */ new Map();
4075
+ queryParams.set("id", id);
4075
4076
  queryParams.set("message_id", messageId);
4077
+ queryParams.set("channel_id", channelId);
4078
+ queryParams.set("clan_id", clanId);
4076
4079
  let bodyJson = "";
4077
4080
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4078
4081
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
@@ -6625,10 +6628,11 @@ var MezonApi = class {
6625
6628
  ]);
6626
6629
  }
6627
6630
  /** */
6628
- deleteQuickMenuAccess(bearerToken, id, menuName, background, actionMsg, options = {}) {
6631
+ deleteQuickMenuAccess(bearerToken, id, botId, menuName, background, actionMsg, options = {}) {
6629
6632
  const urlPath = "/v2/quickmenuaccess";
6630
6633
  const queryParams = /* @__PURE__ */ new Map();
6631
6634
  queryParams.set("id", id);
6635
+ queryParams.set("id", botId);
6632
6636
  queryParams.set("menu_name", menuName);
6633
6637
  queryParams.set("background", background);
6634
6638
  queryParams.set("action_msg", actionMsg);
@@ -9378,12 +9382,12 @@ var Client = class {
9378
9382
  });
9379
9383
  }
9380
9384
  //** */
9381
- deletePinMessage(session, message_id) {
9385
+ deletePinMessage(session, id, messageId, channelId, clanId) {
9382
9386
  return __async(this, null, function* () {
9383
9387
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
9384
9388
  yield this.sessionRefresh(session);
9385
9389
  }
9386
- return this.apiClient.deletePinMessage(session.token, message_id).then((response) => {
9390
+ return this.apiClient.deletePinMessage(session.token, id, messageId, channelId, clanId).then((response) => {
9387
9391
  return response !== void 0;
9388
9392
  });
9389
9393
  });
@@ -10540,12 +10544,12 @@ var Client = class {
10540
10544
  });
10541
10545
  });
10542
10546
  }
10543
- listQuickMenuAccess(session, botId, channelId) {
10547
+ listQuickMenuAccess(session, botId, channelId, menuType) {
10544
10548
  return __async(this, null, function* () {
10545
10549
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10546
10550
  yield this.sessionRefresh(session);
10547
10551
  }
10548
- return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10552
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId, menuType).then((response) => {
10549
10553
  return Promise.resolve(response);
10550
10554
  });
10551
10555
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.12.48",
3
+ "version": "2.12.50",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },