Options
All
  • Public
  • Public/Protected
  • All
Menu

Module QChatRoleServiceInterface

Index

Type Aliases

AddChannelCategoryMemberRoleOptions: { accid: string; categoryId: string; serverId: string }

Type declaration

  • accid: string

    account ID, 账号

  • categoryId: string

    频道分组 ID

  • serverId: string

    服务器 ID

AddChannelCategoryRoleOptions: { categoryId: string; parentRoleId: string; serverId: string }

Type declaration

  • categoryId: string

    频道分组 ID

  • parentRoleId: string

    服务器身份组 ID

  • serverId: string

    服务器 ID

AddChannelRoleOptions: { channelId: string; parentRoleId: string; serverId: string }

Type declaration

  • channelId: string
  • parentRoleId: string

    继承服务器的身份组id

  • serverId: string
AddMemberRoleOptions: { accid: string; channelId: string; serverId: string }

Type declaration

  • accid: string

    account ID, 账号

  • channelId: string
  • serverId: string
AddMembersToServerRoleOptions: { accids: string[]; roleId: string; serverId: string }

Type declaration

  • accids: string[]

    account ID, 账号列表

  • roleId: string

    身份组 id

  • serverId: string
AddMembersToServerRoleResult: { failedAccids: string[]; successAccids: string[] }

Type declaration

  • failedAccids: string[]

    添加失败的数组

  • successAccids: string[]

    添加成功的数组

CheckPermissionOptions: { auth: QChatRoleAuthKey; channelId?: string; serverId: string }

Type declaration

  • auth: QChatRoleAuthKey

    查询的权限

  • Optional channelId?: string

    频道ID 不填则表示查询服务器权限

  • serverId: string

    服务器 ID

CreateServerRoleOptions: { antispamTag?: AntispamTag; ext?: string; icon?: string; name: string; priority: number; serverId: string }

Type declaration

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • Optional ext?: string

    扩展字段

  • Optional icon?: string

    身份组图片url

  • name: string

    角色名

  • priority: number

    身份组优先级

    everyone 最低为 0。

    数字越大优先级越高

  • serverId: string
DeleteServerRoleOptions: { roleId: string; serverId: string }

Type declaration

  • roleId: string

    身份组 id

  • serverId: string
GetChannelCategoryMemberRoleOptions: { categoryId: string; limit?: number; serverId: string; timetag?: number }

Type declaration

  • categoryId: string

    频道分组 ID

  • Optional limit?: number

    数量

  • serverId: string

    服务器 ID

  • Optional timetag?: number

    时间戳

GetChannelCategoryRoleOptions: { categoryId: string; limit?: number; serverId: string; timetag?: number }

Type declaration

  • categoryId: string

    频道分组 ID

  • Optional limit?: number

    数量

  • serverId: string

    服务器 ID

  • Optional timetag?: number

    时间戳

GetChannelRolesOptions: { channelId: string; limit?: number; serverId: string; timetag: number }

Type declaration

  • channelId: string
  • Optional limit?: number

    分页页码

  • serverId: string
  • timetag: number

    分页起始时间

GetExistingAccidsInServerRoleOptions: { accids: string[]; roleId: string; serverId: string }

Type declaration

  • accids: string[]

    account id 列表

  • roleId: string
  • serverId: string
GetExistingAccidsOfMemberRolesOptions: { accids: string[]; channelId: string; serverId: string }

Type declaration

  • accids: string[]

    account id 列表

  • channelId: string
  • serverId: string
GetExistingChannelRolesByServerRoleIdsOptions: { channelId: string; roleIds: string[]; serverId: string }

Type declaration

  • channelId: string
  • roleIds: string[]

    服务器身份组的 id 列表

  • serverId: string
GetExistingServerRolesByAccidsOptions: { accids: string[]; serverId: string }

Type declaration

  • accids: string[]
  • serverId: string
GetExistingServerRolesByAccidsResult: {}

Type declaration

  • [key: string]: QChatServerRole[]

    accid (account ID) 作为 key 值,values 就是服务器身份组的列表(QChatServerRole[])

GetMemberRolesOptions: { channelId: string; limit: number; serverId: string; timetag: number }

Type declaration

  • channelId: string
  • limit: number

    分页页码

  • serverId: string
  • timetag: number

    分页起始时间,即查询创建时间在这个时间之后的 member role

GetMembersFromServerRoleOptions: { accid?: string; limit?: number; roleId: string; serverId: string; timetag?: number }

Type declaration

  • Optional accid?: string

    分页条件-的起始 account ID, 账号

  • Optional limit?: number

    分页条件-页码(一页显示多少条)

  • roleId: string

    身份组 id

  • serverId: string
  • Optional timetag?: number

    分页条件-起始时间

GetServerRolesByAccidOptions: { accid: string; limit: number; serverId: string; timetag: number }

Type declaration

  • accid: string

    分页条件-的起始 account ID, 账号

  • limit: number

    分页条件-页码(一页显示多少条)

  • serverId: string
  • timetag: number

    分页条件-起始时间

GetServerRolesOptions: { categoryId?: string; channelId?: string; limit?: number; priority?: number; serverId: string }

Type declaration

  • Optional categoryId?: string

    以 categoryId 的名义查询。

    注:传入这个字段,可以允许拥有“频道分组”维度的 {@link QChatRoleAuth.manageRole | manageRole} 权限的人查询。否则角色需要有 {@link QChatRoleAuth.manageRole | manageRole} 权限才能允许查询

  • Optional channelId?: string

    以 channelId 的名义查询。

    注:传入这个字段,可以允许拥有“频道”维度的 {@link QChatRoleAuth.manageRole | manageRole} 权限的人查询。否则角色需要有 {@link QChatRoleAuth.manageRole | manageRole} 权限才能允许查询

  • Optional limit?: number

    分页页码

  • Optional priority?: number

    分页的起始优先级,起始页为 0

  • serverId: string

    服务器 ID

GetServerRolesResult: { isMemberRoles: string[]; roles: QChatServerRole[] }

Type declaration

  • isMemberRoles: string[]

    返回自己所在的身份组列表

  • roles: QChatServerRole[]

    返回全部的 QChatServerRole

QChatChannelCategoryMemberRole: { accid: string; auths: QChatRoleAuth; avatar?: string; categoryId: string; createTime: number; ext?: string; id: string; inviter: string; joinTime: number; memberType: TMemberType; nick?: string; serverId: string; updateTime: number; validFlag: boolean }

某成员在“频道分组”的定制权限

Type declaration

  • accid: string

    服务器成员的 account id

  • auths: QChatRoleAuth

    权限

  • Optional avatar?: string

    服务器成员的头像

  • categoryId: string

    频道分组 ID

  • createTime: number

    创建时间

  • Optional ext?: string

    服务器成员自定义扩展

  • id: string
  • inviter: string

    服务器成员的邀请者的 account ID

  • joinTime: number

    服务器成员加入时间

  • memberType: TMemberType

    服务器成员类型

  • Optional nick?: string

    服务器成员的昵称

  • serverId: string

    服务器 ID

  • updateTime: number

    更新时间

  • validFlag: boolean

    有效标志:false-无效,true-有效

QChatChannelCategoryRole: { auths: QChatRoleAuth; categoryId: string; createTime: number; ext?: string; icon?: string; name: string; parentRoleId: string; roleId: string; serverId: string; type: TRoleType; updateTime: number; validFlag: boolean }

Type declaration

  • auths: QChatRoleAuth

    权限

  • categoryId: string

    频道分组 ID

  • createTime: number

    创建时间

  • Optional ext?: string

    身份组自定义扩展

  • Optional icon?: string

    身份组图标

  • name: string

    身份组名称

  • parentRoleId: string

    服务器身份组 ID

  • roleId: string

    身份组 ID

  • serverId: string

    服务器 ID

  • type: TRoleType

    身份组类型: everyone 标志所有人都适用的身份组, custom 表示针对个人可定制的身份组

  • updateTime: number

    更新时间

  • validFlag: boolean

    有效标志:false-无效,true-有效

QChatChannelRole: { auths: QChatRoleAuth; channelId: string; createTime: number; ext?: string; icon?: string; name: string; parentRoleId: string; roleId: string; serverId: string; type: TRoleType; updateTime: number }

频道身份组

Type declaration

  • auths: QChatRoleAuth

    权限对象

  • channelId: string
  • createTime: number
  • Optional ext?: string

    身份组扩展字段

  • Optional icon?: string

    身份组图标

  • name: string

    身份组名称

  • parentRoleId: string

    继承服务器的身份组id

  • roleId: string

    身份组 id

  • serverId: string
  • type: TRoleType

    身份组类型: everyone 标志所有人都适用的身份组, custom 表示针对个人可定制的身份组

  • updateTime: number
QChatCheckPermissionsOptions: { auths: QChatRoleAuthKey[]; channelId?: string; serverId: string }

Type declaration

  • auths: QChatRoleAuthKey[]

    查询的权限列表

  • Optional channelId?: string

    频道 ID 如果不填则表示查询服务器权限

  • serverId: string

    服务器 ID

QChatCheckPermissionsResult: QChatRoleAuth
QChatMemberRole: { accid: string; auths: QChatRoleAuth; avatar?: string; channelId: string; createTime: number; ext?: string; id: string; inviter: string; joinTime: number; memberType: TMemberType; nick?: string; serverId: string; updateTime: number }

(某频道下给某人)定制权限

Type declaration

  • accid: string

    成员的 account id

  • auths: QChatRoleAuth

    权限

  • Optional avatar?: string

    头像

  • channelId: string
  • createTime: number
  • Optional ext?: string

    扩展

  • id: string
  • inviter: string

    邀请者的 account ID

  • joinTime: number

    加入时间

  • memberType: TMemberType

    成员类型

  • Optional nick?: string

    昵称

  • serverId: string
  • updateTime: number
QChatRoleAuth: { RTCChannelCloseOtherShareScreen?: TRoleAuthType; RTCChannelConnect?: TRoleAuthType; RTCChannelDisconnectOther?: TRoleAuthType; RTCChannelOpenCamera?: TRoleAuthType; RTCChannelOpenCloseEveryoneCamera?: TRoleAuthType; RTCChannelOpenCloseEveryoneMicrophone?: TRoleAuthType; RTCChannelOpenCloseOtherCamera?: TRoleAuthType; RTCChannelOpenCloseOtherMicrophone?: TRoleAuthType; RTCChannelOpenMicrophone?: TRoleAuthType; RTCChannelOpenShareScreen?: TRoleAuthType; accountInfoOther?: TRoleAuthType; accountInfoSelf?: TRoleAuthType; banServerMember?: TRoleAuthType; deleteMsg?: TRoleAuthType; inviteServer?: TRoleAuthType; kickServer?: TRoleAuthType; manageBlackWhiteList?: TRoleAuthType; manageChannel?: TRoleAuthType; manageInviteApply?: TRoleAuthType; manageInviteApplyHistory?: TRoleAuthType; manageRole?: TRoleAuthType; manageServer?: TRoleAuthType; mentionedRole?: TRoleAuthType; recallMsg?: TRoleAuthType; remindEveryone?: TRoleAuthType; remindOther?: TRoleAuthType; sendMsg?: TRoleAuthType }

Type declaration

  • [key: number]: TRoleAuthType
  • Optional RTCChannelCloseOtherShareScreen?: TRoleAuthType

    RTC频道:关闭他人屏幕共享的权限

  • Optional RTCChannelConnect?: TRoleAuthType

    RTC频道:连接的权限

  • Optional RTCChannelDisconnectOther?: TRoleAuthType

    RTC频道:断开他人连接的权限

  • Optional RTCChannelOpenCamera?: TRoleAuthType

    RTC频道:开启摄像头的权限

  • Optional RTCChannelOpenCloseEveryoneCamera?: TRoleAuthType

    RTC频道:开启/关闭全员摄像头的权限

  • Optional RTCChannelOpenCloseEveryoneMicrophone?: TRoleAuthType

    RTC频道:开启/关闭全员麦克风的权限

  • Optional RTCChannelOpenCloseOtherCamera?: TRoleAuthType

    RTC频道:开启/关闭他人摄像头的权限

  • Optional RTCChannelOpenCloseOtherMicrophone?: TRoleAuthType

    RTC频道:开启/关闭他人麦克风的权限

  • Optional RTCChannelOpenMicrophone?: TRoleAuthType

    RTC频道:开启麦克风的权限

  • Optional RTCChannelOpenShareScreen?: TRoleAuthType

    RTC频道:打开自己共享屏幕的权限

  • Optional accountInfoOther?: TRoleAuthType

    修改他人在该server的服务器成员信息,仅 server 的身份组有此权限可配置

  • Optional accountInfoSelf?: TRoleAuthType

    修改自己在该server的服务器成员信息,仅 server 的身份组有此权限可配置

  • Optional banServerMember?: TRoleAuthType

    封禁他人的权限,仅server有,允许成员永久封禁其他成员访问此服务器

  • Optional deleteMsg?: TRoleAuthType

    删除他人消息的权限,server 和 channel 的身份组都有此权限配置

  • Optional inviteServer?: TRoleAuthType

    邀请他人进入server的,仅 server 的身份组有此权限可配置

  • Optional kickServer?: TRoleAuthType

    踢除他人的权限,仅 server 的身份组有此权限可配置

  • Optional manageBlackWhiteList?: TRoleAuthType

    管理黑白名单的权限,server和channel都有

  • Optional manageChannel?: TRoleAuthType

    管理频道,server 和 channel 的身份组都有此权限配置

    注意,channel 下定制的个人权限里,打开此权限,只能够编辑、删除此频道,无法新建。

  • Optional manageInviteApply?: TRoleAuthType

    申请邀请管理权限,仅 server 有这个权限。

  • Optional manageInviteApplyHistory?: TRoleAuthType
  • Optional manageRole?: TRoleAuthType

    管理角色的权限,server 和 channel 的身份组都有此权限配置

  • Optional manageServer?: TRoleAuthType

    管理服务器:修改服务器。仅 server 的身份组有此权限可配置

  • Optional mentionedRole?: TRoleAuthType
  • Optional recallMsg?: TRoleAuthType

    撤回他人消息的权限,server 和 channel 的身份组都有此权限配置

  • Optional remindEveryone?: TRoleAuthType

    @ everyone,server 和 channel 的身份组都有此权限配置

  • Optional remindOther?: TRoleAuthType

    @ 他人的权限,server 和 channel 的身份组都有此权限配置

  • Optional sendMsg?: TRoleAuthType

    发送消息,server 和 channel 的身份组都有此权限配置

QChatRoleAuthKey: keyof QChatRoleAuth
QChatServerRole: { auths: QChatRoleAuth; createTime: number; ext?: string; icon: string; memberCount: number; name: string; priority: number; roleId: string; serverId: string; type: TRoleType; updateTime: number }

服务器身份组

Type declaration

  • auths: QChatRoleAuth

    权限对象,key-value 形式提供,格式如

    { key1: 'ignore', key2: 'allow', key3: 'deny' }

  • createTime: number
  • Optional ext?: string

    扩展字段

  • icon: string

    图标 url

  • memberCount: number

    拥有的成员数量

  • name: string

    身份组别名

  • priority: number

    权限优先级,数字越小,优先级越高。

  • roleId: string

    主键标识

  • serverId: string
  • type: TRoleType

    类型

    "everyone" 代表所有成员都适用的默认规则

    "custom" 代表用户自行设置的身份组

  • updateTime: number
QChatServerRoleMember: { accid: string; createTime: number; roleId: string; serverId: string; updateTime: number }

服务器身份组的成员

Type declaration

  • accid: string
  • createTime: number
  • roleId: string
  • serverId: string
  • updateTime: number
RemoveChannelCategoryMemberRoleOptions: { accid: string; categoryId: string; serverId: string }

Type declaration

  • accid: string

    用户 id

  • categoryId: string

    频道分组 ID

  • serverId: string

    服务器 ID

RemoveChannelCategoryRoleOptions: { categoryId: string; roleId: string; serverId: string }

Type declaration

  • categoryId: string

    频道分组 ID

  • roleId: string

    身份组 ID

  • serverId: string

    服务器 ID

RemoveChannelRoleOptions: { channelId: string; roleId: string; serverId: string }

Type declaration

  • channelId: string
  • roleId: string

    身份组 id

  • serverId: string
RemoveMemberRoleOptions: { accid: string; channelId: string; serverId: string }

Type declaration

  • accid: string

    account ID 账号

  • channelId: string
  • serverId: string
RemoveMembersFromServerRoleOptions: { accids: string[]; roleId: string; serverId: string }

Type declaration

  • accids: string[]

    account ID 账号列表

  • roleId: string

    身份组 id

  • serverId: string
RemoveMembersFromServerRoleResult: { failedAccids: string[]; successAccids: string[] }

Type declaration

  • failedAccids: string[]
  • successAccids: string[]
TMemberType: keyof typeof EMemberType
TRoleAuthType: keyof typeof ERoleAuthType
TRoleType: keyof typeof ERoleType
UpdateChannelCategoryMemberRoleOptions: { accid: string; auths: QChatRoleAuth; categoryId: string; serverId: string }

Type declaration

  • accid: string

    用户 id

  • auths: QChatRoleAuth

    权限

  • categoryId: string

    频道分组 ID

  • serverId: string

    服务器 ID

UpdateChannelCategoryRoleOptions: { auths: QChatRoleAuth; categoryId: string; roleId: string; serverId: string }

Type declaration

  • auths: QChatRoleAuth

    权限

  • categoryId: string

    频道分组 ID

  • roleId: string

    身份组 ID

  • serverId: string

    服务器 ID

UpdateChannelRoleOptions: { auths: Partial<QChatRoleAuth>; channelId: string; roleId: string; serverId: string }

Type declaration

  • auths: Partial<QChatRoleAuth>

    权限列表

  • channelId: string
  • roleId: string

    身份组 id

  • serverId: string
UpdateMemberRoleOptions: { accid: string; auths: Partial<QChatRoleAuth>; channelId: string; serverId: string }

Type declaration

  • accid: string
  • auths: Partial<QChatRoleAuth>

    权限列表

  • channelId: string
  • serverId: string
UpdateServerRoleOptions: { antispamTag?: AntispamTag; auths?: QChatRoleAuth; ext?: string; icon?: string; name?: string; priority?: number; roleId: string; serverId: string }

Type declaration

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • Optional auths?: QChatRoleAuth

    权限

  • Optional ext?: string
  • Optional icon?: string
  • Optional name?: string
  • Optional priority?: number

    优先级,越小的数字优先级越高

  • roleId: string
  • serverId: string
UpdateServerRolePrioritiesOptions: { serverId: string; serverRoles: Partial<QChatServerRole>[] }

Type declaration

  • serverId: string
  • serverRoles: Partial<QChatServerRole>[]

    QChatServerRole 中只需要传 serverId, roleId 和 priority。传其他字段如 ext 等会被忽略。

UpdateServerRolesOptions: { serverId: string; value: { ext?: string; icon?: string; name?: string; priority?: number; roleId: string }[] }

Type declaration

  • serverId: string
  • value: { ext?: string; icon?: string; name?: string; priority?: number; roleId: string }[]