mezon-js 2.8.98 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -188,6 +188,8 @@ export interface MezonUpdateRoleBody {
188
188
  description?: string;
189
189
  //
190
190
  display_online?: number;
191
+ //
192
+ max_permission_id: string;
191
193
  //The permissions to remove.
192
194
  remove_permission_ids?: Array<string>;
193
195
  //The users to remove.
@@ -819,6 +821,8 @@ export interface ApiCreateRoleRequest {
819
821
  //
820
822
  display_online?: number;
821
823
  //
824
+ max_permission_id: string;
825
+ //
822
826
  role_icon?: string;
823
827
  //
824
828
  title?: string;
@@ -1625,7 +1629,9 @@ export interface ApiUpdateCategoryOrderRequest {
1625
1629
  /** */
1626
1630
  export interface ApiUpdateRoleChannelRequest {
1627
1631
  //
1628
- channel_id?: string;
1632
+ channel_id: string;
1633
+ //
1634
+ max_permission_id: string;
1629
1635
  //The permissions to add.
1630
1636
  permission_update?: Array<ApiPermissionUpdate>;
1631
1637
  //The ID of the role to update.
@@ -5960,7 +5966,6 @@ export class MezonApi {
5960
5966
  roleId:string,
5961
5967
  channelId?:string,
5962
5968
  clanId?:string,
5963
- maxPermissionsLevel?:string,
5964
5969
  options: any = {}): Promise<any> {
5965
5970
 
5966
5971
  if (roleId === null || roleId === undefined) {
@@ -5971,8 +5976,6 @@ export class MezonApi {
5971
5976
  const queryParams = new Map<string, any>();
5972
5977
  queryParams.set("channel_id", channelId);
5973
5978
  queryParams.set("clan_id", clanId);
5974
- queryParams.set("max_permissions_level", maxPermissionsLevel);
5975
-
5976
5979
  let bodyJson : string = "";
5977
5980
 
5978
5981
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
package/client.ts CHANGED
@@ -466,6 +466,7 @@ export interface ApiUpdateRoleRequest {
466
466
  remove_permission_ids: string[];
467
467
  //
468
468
  clan_id: string;
469
+ max_permission_id: string;
469
470
  }
470
471
 
471
472
  /** A client for Mezon server. */
package/dist/api.gen.d.ts CHANGED
@@ -107,6 +107,7 @@ export interface MezonUpdateRoleBody {
107
107
  color?: string;
108
108
  description?: string;
109
109
  display_online?: number;
110
+ max_permission_id: string;
110
111
  remove_permission_ids?: Array<string>;
111
112
  remove_user_ids?: Array<string>;
112
113
  role_icon?: string;
@@ -467,6 +468,7 @@ export interface ApiCreateRoleRequest {
467
468
  color?: string;
468
469
  description?: string;
469
470
  display_online?: number;
471
+ max_permission_id: string;
470
472
  role_icon?: string;
471
473
  title?: string;
472
474
  }
@@ -942,7 +944,8 @@ export interface ApiUpdateCategoryOrderRequest {
942
944
  }
943
945
  /** */
944
946
  export interface ApiUpdateRoleChannelRequest {
945
- channel_id?: string;
947
+ channel_id: string;
948
+ max_permission_id: string;
946
949
  permission_update?: Array<ApiPermissionUpdate>;
947
950
  role_id?: string;
948
951
  }
@@ -1271,7 +1274,7 @@ export declare class MezonApi {
1271
1274
  /** Update a role when Delete a role by ID. */
1272
1275
  updateRoleDelete(bearerToken: string, roleId: string, body: MezonUpdateRoleDeleteBody, options?: any): Promise<any>;
1273
1276
  /** Delete a role by ID. */
1274
- deleteRole(bearerToken: string, roleId: string, channelId?: string, clanId?: string, maxPermissionsLevel?: string, options?: any): Promise<any>;
1277
+ deleteRole(bearerToken: string, roleId: string, channelId?: string, clanId?: string, options?: any): Promise<any>;
1275
1278
  /** Update fields in a given role. */
1276
1279
  updateRole(bearerToken: string, roleId: string, body: MezonUpdateRoleBody, options?: any): Promise<any>;
1277
1280
  /** List role permissions */
package/dist/client.d.ts CHANGED
@@ -312,6 +312,7 @@ export interface ApiUpdateRoleRequest {
312
312
  /** The permissions to remove. */
313
313
  remove_permission_ids: string[];
314
314
  clan_id: string;
315
+ max_permission_id: string;
315
316
  }
316
317
  /** A client for Mezon server. */
317
318
  export declare class Client {
@@ -3941,7 +3941,7 @@ var MezonApi = class {
3941
3941
  ]);
3942
3942
  }
3943
3943
  /** Delete a role by ID. */
3944
- deleteRole(bearerToken, roleId, channelId, clanId, maxPermissionsLevel, options = {}) {
3944
+ deleteRole(bearerToken, roleId, channelId, clanId, options = {}) {
3945
3945
  if (roleId === null || roleId === void 0) {
3946
3946
  throw new Error("'roleId' is a required parameter but is null or undefined.");
3947
3947
  }
@@ -3949,7 +3949,6 @@ var MezonApi = class {
3949
3949
  const queryParams = /* @__PURE__ */ new Map();
3950
3950
  queryParams.set("channel_id", channelId);
3951
3951
  queryParams.set("clan_id", clanId);
3952
- queryParams.set("max_permissions_level", maxPermissionsLevel);
3953
3952
  let bodyJson = "";
3954
3953
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3955
3954
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
@@ -3912,7 +3912,7 @@ var MezonApi = class {
3912
3912
  ]);
3913
3913
  }
3914
3914
  /** Delete a role by ID. */
3915
- deleteRole(bearerToken, roleId, channelId, clanId, maxPermissionsLevel, options = {}) {
3915
+ deleteRole(bearerToken, roleId, channelId, clanId, options = {}) {
3916
3916
  if (roleId === null || roleId === void 0) {
3917
3917
  throw new Error("'roleId' is a required parameter but is null or undefined.");
3918
3918
  }
@@ -3920,7 +3920,6 @@ var MezonApi = class {
3920
3920
  const queryParams = /* @__PURE__ */ new Map();
3921
3921
  queryParams.set("channel_id", channelId);
3922
3922
  queryParams.set("clan_id", clanId);
3923
- queryParams.set("max_permissions_level", maxPermissionsLevel);
3924
3923
  let bodyJson = "";
3925
3924
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3926
3925
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.8.98",
4
+ "version": "2.9.0",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"