mezon-js 2.8.95 → 2.8.97

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -5959,6 +5959,8 @@ export class MezonApi {
5959
5959
  deleteRole(bearerToken: string,
5960
5960
  roleId:string,
5961
5961
  channelId?:string,
5962
+ clanId?:string,
5963
+ maxPermissionsLevel?:string,
5962
5964
  options: any = {}): Promise<any> {
5963
5965
 
5964
5966
  if (roleId === null || roleId === undefined) {
@@ -5968,6 +5970,8 @@ export class MezonApi {
5968
5970
  .replace("{roleId}", encodeURIComponent(String(roleId)));
5969
5971
  const queryParams = new Map<string, any>();
5970
5972
  queryParams.set("channel_id", channelId);
5973
+ queryParams.set("clan_id", clanId);
5974
+ queryParams.set("max_permissions_level", maxPermissionsLevel);
5971
5975
 
5972
5976
  let bodyJson : string = "";
5973
5977
 
package/dist/api.gen.d.ts CHANGED
@@ -1271,7 +1271,7 @@ export declare class MezonApi {
1271
1271
  /** Update a role when Delete a role by ID. */
1272
1272
  updateRoleDelete(bearerToken: string, roleId: string, body: MezonUpdateRoleDeleteBody, options?: any): Promise<any>;
1273
1273
  /** Delete a role by ID. */
1274
- deleteRole(bearerToken: string, roleId: string, channelId?: string, options?: any): Promise<any>;
1274
+ deleteRole(bearerToken: string, roleId: string, channelId?: string, clanId?: string, maxPermissionsLevel?: string, options?: any): Promise<any>;
1275
1275
  /** Update fields in a given role. */
1276
1276
  updateRole(bearerToken: string, roleId: string, body: MezonUpdateRoleBody, options?: any): Promise<any>;
1277
1277
  /** List role permissions */
@@ -3941,13 +3941,15 @@ var MezonApi = class {
3941
3941
  ]);
3942
3942
  }
3943
3943
  /** Delete a role by ID. */
3944
- deleteRole(bearerToken, roleId, channelId, options = {}) {
3944
+ deleteRole(bearerToken, roleId, channelId, clanId, maxPermissionsLevel, 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
  }
3948
3948
  const urlPath = "/v2/roles/{roleId}".replace("{roleId}", encodeURIComponent(String(roleId)));
3949
3949
  const queryParams = /* @__PURE__ */ new Map();
3950
3950
  queryParams.set("channel_id", channelId);
3951
+ queryParams.set("clan_id", clanId);
3952
+ queryParams.set("max_permissions_level", maxPermissionsLevel);
3951
3953
  let bodyJson = "";
3952
3954
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3953
3955
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
@@ -3912,13 +3912,15 @@ var MezonApi = class {
3912
3912
  ]);
3913
3913
  }
3914
3914
  /** Delete a role by ID. */
3915
- deleteRole(bearerToken, roleId, channelId, options = {}) {
3915
+ deleteRole(bearerToken, roleId, channelId, clanId, maxPermissionsLevel, 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
  }
3919
3919
  const urlPath = "/v2/roles/{roleId}".replace("{roleId}", encodeURIComponent(String(roleId)));
3920
3920
  const queryParams = /* @__PURE__ */ new Map();
3921
3921
  queryParams.set("channel_id", channelId);
3922
+ queryParams.set("clan_id", clanId);
3923
+ queryParams.set("max_permissions_level", maxPermissionsLevel);
3922
3924
  let bodyJson = "";
3923
3925
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3924
3926
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
package/dist/socket.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 { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiPermissionList, ApiRoleList, ApiRpc, ApiUser } from "./api.gen";
16
+ import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { ChannelMessage, Notification } from "./client";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -458,15 +458,9 @@ export interface RoleListEvent {
458
458
  roles: ApiRoleList;
459
459
  }
460
460
  export interface RoleEvent {
461
- clan_id: string;
462
- role_id: string;
463
- creator_id: string;
464
- user_ids_assigned: Array<string>;
465
- permission_ids_assigned: Array<string>;
466
- user_ids_removed: Array<string>;
467
- permission_ids_removed: Array<string>;
468
- role_title: string;
469
- status: string;
461
+ role: ApiRole;
462
+ status: number;
463
+ user_id: string;
470
464
  }
471
465
  export interface EventEmoji {
472
466
  id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.8.95",
4
+ "version": "2.8.97",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiPermissionList, ApiRoleList, ApiRpc, ApiUser} from "./api.gen";
17
+ import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser} from "./api.gen";
18
18
  import {Session} from "./session";
19
19
  import {ChannelMessage, Notification} from "./client";
20
20
  import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
@@ -667,15 +667,9 @@ export interface RoleListEvent {
667
667
  }
668
668
 
669
669
  export interface RoleEvent {
670
- clan_id: string;
671
- role_id: string;
672
- creator_id: string;
673
- user_ids_assigned: Array<string>;
674
- permission_ids_assigned: Array<string>;
675
- user_ids_removed: Array<string>;
676
- permission_ids_removed: Array<string>;
677
- role_title: string;
678
- status: string;
670
+ role: ApiRole;
671
+ status: number;
672
+ user_id: string;
679
673
  }
680
674
 
681
675
  export interface EventEmoji {