mezon-js 2.12.27 → 2.12.28

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
@@ -2676,7 +2676,6 @@ export interface ApiUserActivity {
2676
2676
  user_id?: string;
2677
2677
  }
2678
2678
 
2679
-
2680
2679
  /** */
2681
2680
  export interface ApiQuickMenuAccess {
2682
2681
  //
@@ -2686,6 +2685,10 @@ export interface ApiQuickMenuAccess {
2686
2685
  //
2687
2686
  bot_id?: string;
2688
2687
  //
2688
+ channel_id?: string;
2689
+ //
2690
+ clan_id?:string;
2691
+ //
2689
2692
  id?: string;
2690
2693
  //
2691
2694
  menu_name?: string;
@@ -2704,6 +2707,12 @@ export interface ApiQuickMenuAccessRequest {
2704
2707
  //
2705
2708
  background?: string;
2706
2709
  //
2710
+ bot_id?: string;
2711
+ //
2712
+ channel_id?: string;
2713
+ //
2714
+ clan_id?: string;
2715
+ //
2707
2716
  id?: string;
2708
2717
  //
2709
2718
  menu_name?: string;
@@ -10874,11 +10883,13 @@ export class MezonApi {
10874
10883
  /** */
10875
10884
  listQuickMenuAccess(bearerToken: string,
10876
10885
  botId?:string,
10886
+ channelId?:string,
10877
10887
  options: any = {}): Promise<ApiQuickMenuAccessList> {
10878
10888
 
10879
10889
  const urlPath = "/v2/quickmenuaccess";
10880
10890
  const queryParams = new Map<string, any>();
10881
10891
  queryParams.set("bot_id", botId);
10892
+ queryParams.set("channel_id", channelId);
10882
10893
 
10883
10894
  let bodyJson : string = "";
10884
10895
 
@@ -10902,7 +10913,7 @@ export class MezonApi {
10902
10913
  setTimeout(reject, this.timeoutMs, "Request timed out.")
10903
10914
  ),
10904
10915
  ]);
10905
- }
10916
+ }
10906
10917
 
10907
10918
  /** */
10908
10919
  addQuickMenuAccess(bearerToken: string,
package/client.ts CHANGED
@@ -4749,7 +4749,8 @@ export class Client {
4749
4749
 
4750
4750
  async listQuickMenuAccess(
4751
4751
  session: Session,
4752
- botId: string
4752
+ botId: string,
4753
+ channelId: string
4753
4754
  ): Promise<ApiQuickMenuAccessList> {
4754
4755
  if (
4755
4756
  this.autoRefreshSession &&
@@ -4760,7 +4761,7 @@ export class Client {
4760
4761
  }
4761
4762
 
4762
4763
  return this.apiClient
4763
- .listQuickMenuAccess(session.token, botId)
4764
+ .listQuickMenuAccess(session.token, botId, channelId)
4764
4765
  .then((response: ApiQuickMenuAccessList) => {
4765
4766
  return Promise.resolve(response);
4766
4767
  });
package/dist/api.gen.d.ts CHANGED
@@ -1535,6 +1535,8 @@ export interface ApiQuickMenuAccess {
1535
1535
  action_msg?: string;
1536
1536
  background?: string;
1537
1537
  bot_id?: string;
1538
+ channel_id?: string;
1539
+ clan_id?: string;
1538
1540
  id?: string;
1539
1541
  menu_name?: string;
1540
1542
  }
@@ -1546,6 +1548,9 @@ export interface ApiQuickMenuAccessList {
1546
1548
  export interface ApiQuickMenuAccessRequest {
1547
1549
  action_msg?: string;
1548
1550
  background?: string;
1551
+ bot_id?: string;
1552
+ channel_id?: string;
1553
+ clan_id?: string;
1549
1554
  id?: string;
1550
1555
  menu_name?: string;
1551
1556
  }
@@ -2246,7 +2251,7 @@ export declare class MezonApi {
2246
2251
  /** */
2247
2252
  deleteQuickMenuAccess(bearerToken: string, id?: string, menuName?: string, background?: string, actionMsg?: string, options?: any): Promise<any>;
2248
2253
  /** */
2249
- listQuickMenuAccess(bearerToken: string, botId?: string, options?: any): Promise<ApiQuickMenuAccessList>;
2254
+ listQuickMenuAccess(bearerToken: string, botId?: string, channelId?: string, options?: any): Promise<ApiQuickMenuAccessList>;
2250
2255
  /** */
2251
2256
  addQuickMenuAccess(bearerToken: string, body: ApiQuickMenuAccessRequest, options?: any): Promise<any>;
2252
2257
  /** */
package/dist/client.d.ts CHANGED
@@ -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): Promise<ApiQuickMenuAccessList>;
628
+ listQuickMenuAccess(session: Session, botId: string, channelId: string): 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>;
@@ -6689,10 +6689,11 @@ var MezonApi = class {
6689
6689
  ]);
6690
6690
  }
6691
6691
  /** */
6692
- listQuickMenuAccess(bearerToken, botId, options = {}) {
6692
+ listQuickMenuAccess(bearerToken, botId, channelId, options = {}) {
6693
6693
  const urlPath = "/v2/quickmenuaccess";
6694
6694
  const queryParams = /* @__PURE__ */ new Map();
6695
6695
  queryParams.set("bot_id", botId);
6696
+ queryParams.set("channel_id", channelId);
6696
6697
  let bodyJson = "";
6697
6698
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6698
6699
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -10495,12 +10496,12 @@ var Client = class {
10495
10496
  });
10496
10497
  });
10497
10498
  }
10498
- listQuickMenuAccess(session, botId) {
10499
+ listQuickMenuAccess(session, botId, channelId) {
10499
10500
  return __async(this, null, function* () {
10500
10501
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10501
10502
  yield this.sessionRefresh(session);
10502
10503
  }
10503
- return this.apiClient.listQuickMenuAccess(session.token, botId).then((response) => {
10504
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10504
10505
  return Promise.resolve(response);
10505
10506
  });
10506
10507
  });
@@ -6655,10 +6655,11 @@ var MezonApi = class {
6655
6655
  ]);
6656
6656
  }
6657
6657
  /** */
6658
- listQuickMenuAccess(bearerToken, botId, options = {}) {
6658
+ listQuickMenuAccess(bearerToken, botId, channelId, options = {}) {
6659
6659
  const urlPath = "/v2/quickmenuaccess";
6660
6660
  const queryParams = /* @__PURE__ */ new Map();
6661
6661
  queryParams.set("bot_id", botId);
6662
+ queryParams.set("channel_id", channelId);
6662
6663
  let bodyJson = "";
6663
6664
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6664
6665
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -10461,12 +10462,12 @@ var Client = class {
10461
10462
  });
10462
10463
  });
10463
10464
  }
10464
- listQuickMenuAccess(session, botId) {
10465
+ listQuickMenuAccess(session, botId, channelId) {
10465
10466
  return __async(this, null, function* () {
10466
10467
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
10467
10468
  yield this.sessionRefresh(session);
10468
10469
  }
10469
- return this.apiClient.listQuickMenuAccess(session.token, botId).then((response) => {
10470
+ return this.apiClient.listQuickMenuAccess(session.token, botId, channelId).then((response) => {
10470
10471
  return Promise.resolve(response);
10471
10472
  });
10472
10473
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.12.27",
4
+ "version": "2.12.28",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"