Options
All
  • Public
  • Public/Protected
  • All
Menu

Module QChatServerServiceInterface

Index

Type Aliases

AcceptServerApplyOptions: { accid: string; recordInfo: { requestId: string }; serverId: string }

Type declaration

  • accid: string

    用户账号

  • recordInfo: { requestId: string }

    申请记录的信息

    • requestId: string

      申请记录的唯一标识

  • serverId: string

    服务器ID

AcceptServerInviteOptions: { accid: string; recordInfo: { requestId: string }; serverId: string }

Type declaration

  • accid: string

    用户账号

  • recordInfo: { requestId: string }

    邀请记录的信息

    • requestId: string

      邀请记录的唯一标识

  • serverId: string

    服务器ID

AntispamTag: { antiSpamBusinessId: { picbid: string; textbid: string } }

反垃圾相关字段

Type declaration

ApplyServerJoinOptions: { params: { ttl: number }; ps: string; serverId: string }

Type declaration

  • params: { ttl: number }

    本申请记录的额外参数

    • ttl: number

      有效时长,单位: 毫秒

  • ps: string

    附言(最长5000)

  • serverId: string

    服务器ID

BanServerMemberOptions: { accid: string; ext?: string; serverId: string }

Type declaration

  • accid: string

    目标用户accid

  • Optional ext?: string

    自定义扩展

  • serverId: string

    服务器ID

CreateServerOptions: { antispamTag?: AntispamTag; applyMode: 0 | 1; ext?: string; icon: string; inviteMode: 0 | 1; name: string; searchEnable?: boolean; searchType?: number }

Type declaration

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • applyMode: 0 | 1

    申请模式:0-申请不需要同意(默认),1-申请需要同意

  • Optional ext?: string

    自定义扩展

  • icon: string

    图标

  • inviteMode: 0 | 1

    邀请模式:0-邀请需要同意(默认),1-邀请不需要同意

  • name: string

    名称

  • Optional searchEnable?: boolean

    服务器是否允许被搜索,true允许,false不允许,默认允许

  • Optional searchType?: number

    服务器搜索类型,客户自定义,大于等于0的整数 0代表无类型 参见 {@link ServerInfo.searchType | searchType}

DeleteServerOptions: { serverId: string }

Type declaration

  • serverId: string

    服务器ID

GetBannedMembersByPageOptions: { limit: number; serverId: string; timetag: number }

Type declaration

  • limit: number

    数量

  • serverId: string

    服务器ID

  • timetag: number

    时间戳 传0取当前时间

GetBannedMembersByPageResult: { datas: ServerMemberBanInfo[]; listQueryTag: { hasMore: boolean; nextTimetag: number } }

Type declaration

  • datas: ServerMemberBanInfo[]
  • listQueryTag: { hasMore: boolean; nextTimetag: number }

    分页便捷选项

    • hasMore: boolean

      是否还有下一页

    • nextTimetag: number

      下一次翻页时的起始时间戳

GetServerMembersByPageOptions: { limit: number; serverId: string; timetag: number }

Type declaration

  • limit: number

    数量

  • serverId: string

    服务器ID

  • timetag: number

    时间戳 传0取当前时间

GetServerMembersByPageResult: { datas: MemberInfo[]; listQueryTag: { hasMore: boolean; nextTimetag: number } }

Type declaration

  • datas: MemberInfo[]
  • listQueryTag: { hasMore: boolean; nextTimetag: number }

    分页便捷选项

    • hasMore: boolean

      是否还有下一页

    • nextTimetag: number

      下一次翻页时的起始时间戳

GetServerMembersOptions: { accids: { accid: string; serverId: string }[] }

Type declaration

  • accids: { accid: string; serverId: string }[]
GetServersByPageOptions: { limit?: number; timestamp: number }

Type declaration

  • Optional limit?: number

    条数

  • timestamp: number

    时间戳 传0取当前时间

GetServersByPageResult: { datas: ServerInfo[]; listQueryTag: { hasMore: boolean; nextTimetag: number } }

Type declaration

  • datas: ServerInfo[]
  • listQueryTag: { hasMore: boolean; nextTimetag: number }

    分页便捷选项

    • hasMore: boolean

      是否还有下一页

    • nextTimetag: number

      下一次翻页时的起始时间戳

GetServersOptions: { serverIds: string[] }

Type declaration

  • serverIds: string[]

    服务器ID列表

InviteServerMembersOptions: { accids: string[]; params: { ttl: number }; ps: string; serverId: string }

Type declaration

  • accids: string[]

    用户账号列表

  • params: { ttl: number }

    本邀请记录的额外参数

    • ttl: number

      有效时长,单位: 毫秒

  • ps: string

    附言(最长5000)

  • serverId: string

    服务器ID

InviteServerMembersResult: { failByBanAccids: string[]; failByOverAccids: string[]; recordInfo: { expireTime: number; requestId: string } }

Type declaration

  • failByBanAccids: string[]

    因为用户被服务器封禁导致失败的accid列表

  • failByOverAccids: string[]

    因为用户服务器数量超限导致失败的accid列表

  • recordInfo: { expireTime: number; requestId: string }

    邀请记录的信息

    • expireTime: number

      时间戳,表示邀请过期的截止日期

    • requestId: string

      邀请记录唯一标识

KickServerMembersOptions: { accids: string[]; serverId: string }

Type declaration

  • accids: string[]

    用户账号列表

  • serverId: string

    服务器ID

LeaveServerOptions: { serverId: string }

Type declaration

  • serverId: string

    服务器ID

MemberInfo: { accid: string; avatar: string; createTime: number; ext?: string; inviter: string; joinTime: number; nick: string; serverId: string; type: 0 | 1; updateTime: number; validFlag: 0 | 1 }

Type declaration

  • accid: string

    用户accid

  • avatar: string

    头像

  • createTime: number

    创建时间

  • Optional ext?: string

    自定义扩展

  • inviter: string

    邀请模人

  • joinTime: number

    加入时间

  • nick: string

    昵称

  • serverId: string

    服务器ID

  • type: 0 | 1

    类型:0-普通成员,1-所有者

  • updateTime: number

    更新时间

  • validFlag: 0 | 1

    有效标志:0-无效,1-有效

QChatServerApplyRecordInfo: { expireTime: number; requestId: string }

申请加入服务器的记录的信息

Type declaration

  • expireTime: number

    时间戳,表示邀请过期的截止日期

  • requestId: string

    申请记录的唯一标识

QChatServerGenerateInviteCodeOptions: { serverId: string; ttl?: number }

Type declaration

  • serverId: string

    服务器 id

  • Optional ttl?: number

    有效时长,单位: 毫秒。默认 30 天

QChatServerGetInviteApplyRecordOfSelfOptions: { cursor?: string; fromTime: number; limit?: number; reverse?: boolean; toTime: number }

Type declaration

  • Optional cursor?: string

    游标 id,id 的来源参照 {@link QChatServerInviteApplyRecord.recordId | recordId}

    注:若有多条记录有相同的时间,需要借助这个参数才能精准的分页。

  • fromTime: number

    开始时间戳

  • Optional limit?: number

    分页大小

  • Optional reverse?: boolean

    排列顺序。默认为 false

    为 true 则代表按时间戳升序查询,从 fromTime 开始查询到 toTime 之间的 limit 条记录

    为 false 则代表按时间戳降序查询,从 toTime 开始查询到 fromTime 之间的 limit 条记录

  • toTime: number

    结束时间戳

QChatServerGetInviteApplyRecordOfServerOptions: { cursor?: string; fromTime: number; limit?: number; reverse?: boolean; serverId: string; toTime: number }

Type declaration

  • Optional cursor?: string

    游标 id,id 的来源参照 {@link QChatServerInviteApplyRecord.recordId | recordId}

    注:若有多条记录有相同的时间,需要借助这个参数才能精准的分页。

  • fromTime: number

    开始时间戳

  • Optional limit?: number

    分页大小

  • Optional reverse?: boolean

    排列顺序。默认为 false

    为 true 则代表按时间戳升序查询,从 fromTime 开始查询到 toTime 之间的 limit 条记录

    为 false 则代表按时间戳降序查询,从 toTime 开始查询到 fromTime 之间的 limit 条记录

  • serverId: string

    服务器 id

  • toTime: number

    结束时间戳

QChatServerInviteAndApplyDataWithType1: { applyPostscript?: string; updateAccid?: string; updatePostscript?: string }

Type declaration

  • Optional applyPostscript?: string

    申请时的附言

  • Optional updateAccid?: string

    该申请的同意人

  • Optional updatePostscript?: string

    同意/拒绝申请时的附言

QChatServerInviteAndApplyDataWithType2: { invitePostscript?: string; inviteUsers: { accid: string; status: number; updatePostscript?: string; updateTime: number }[] }

Type declaration

  • Optional invitePostscript?: string

    邀请时的附加信息

  • inviteUsers: { accid: string; status: number; updatePostscript?: string; updateTime: number }[]

    受邀请者的信息

QChatServerInviteAndApplyDataWithType3: { invitePostscript?: string; updatePostscript?: string }

Type declaration

  • Optional invitePostscript?: string

    邀请时的附加信息

  • Optional updatePostscript?: string

    同意/拒绝时的附加信息

QChatServerInviteAndApplyDataWithType4: { inviteCode: string; invitePostscript?: string; inviteUserCount?: number }

Type declaration

  • inviteCode: string

    邀请码

  • Optional invitePostscript?: string

    邀请码的附加信息

  • Optional inviteUserCount?: number

    该邀请码的使用人数

QChatServerInviteAndApplyDataWithType5: { inviteCode: string; updatePostscript?: string }

Type declaration

  • inviteCode: string

    邀请码

  • Optional updatePostscript?: string

    附言

QChatServerInviteApplyRecord: { accid: string; createTime: number; data: QChatServerInviteAndApplyDataWithType1 & QChatServerInviteAndApplyDataWithType2 & QChatServerInviteAndApplyDataWithType3 & QChatServerInviteAndApplyDataWithType4 & QChatServerInviteAndApplyDataWithType5; expireTime: number; recordId: string; requestId: string; serverId: string; status: number; type: number; updateTime: number }

Type declaration

  • accid: string

    account ID,操作者/申请者的账号 id

  • createTime: number

    创建时间

  • data: QChatServerInviteAndApplyDataWithType1 & QChatServerInviteAndApplyDataWithType2 & QChatServerInviteAndApplyDataWithType3 & QChatServerInviteAndApplyDataWithType4 & QChatServerInviteAndApplyDataWithType5

    内容数据,对应上文 type 的类型有以下四种定义

  • expireTime: number

    过期时间

  • recordId: string

    这条数据的唯一标识,仅用于分页查询使用。

  • requestId: string

    申请/邀请的唯一标识

  • serverId: string

    服务器 id

  • status: number

    状态。0表示初始状态

    1 表示同意

    2 表示拒绝

    3 表示通过其他 申请/邀请 同意了,

    4 表示通过其他 申请/邀请 拒绝了

    5 表示邀请/申请时自动加入

    6 表示过期

  • type: number

    邀请/申请的类型:

    1 表示申请,也能表示申请记录的拒绝与同意

    2 表示邀请记录,仅查询服务器下的记录能查到这种类型, 接口为 {@link QChatServerServiceInterface.getInviteAndApplyRecord | getInviteAndApplyRecord}

    3 表示邀请记录的同意/拒绝的记录

    4 表示邀请码生成,仅查询服务器下的记录能查到这种类型, 接口为 {@link QChatServerServiceInterface.getInviteAndApplyRecord | getInviteAndApplyRecord}

    5 表示通过邀请码加入

  • updateTime: number

    修改时间

QChatServerInviteCode: { expireTime: number; inviteCode: string; requestId: string; serverId: string }

Type declaration

  • expireTime: number

    时间戳,表示邀请过期的截止日期

  • inviteCode: string

    邀请码

  • requestId: string

    唯一标识

  • serverId: string

    服务器 id

QChatServerJoinByInviteCodeOptions: { inviteCode: string; ps?: string; serverId: string }

Type declaration

  • inviteCode: string

    邀请码

  • Optional ps?: string

    附言

  • serverId: string

    服务器 id

QChatServerMarkReadOptions: { serverIds: string[] }

Type declaration

  • serverIds: string[]

    需要清空服务器id列表

QChatServerMarkReadResult: { ackTimestamp: number; failServerIds: string[]; successServerIds: string[] }

Type declaration

  • ackTimestamp: number

    清空未读的服务器时间戳,这个时间戳之前的频道消息都认为是已读

  • failServerIds: string[]

    清空失败服务器id列表

  • successServerIds: string[]

    清空成功服务器id列表

RejectServerApplyOptions: { accid: string; ps: string; recordInfo: { requestId: string }; serverId: string }

Type declaration

  • accid: string

    用户账号

  • ps: string

    附言(最长5000)

  • recordInfo: { requestId: string }

    申请记录的信息

    • requestId: string

      申请记录的唯一标识

  • serverId: string

    服务器ID

RejectServerInviteOptions: { accid: string; ps: string; recordInfo: { requestId: string }; serverId: string }

Type declaration

  • accid: string

    用户账号

  • ps: string

    附言(最长5000)

  • recordInfo: { requestId: string }

    邀请记录的信息

    • requestId: string

      邀请记录的唯一标识

  • serverId: string

    服务器ID

ServerInfo: { applyMode: 0 | 1; channelNumber: number; createTime: number; ext?: string; icon: string; inviteMode: 0 | 1; memberNumber: string; name: string; owner: string; reorderWeight: string; searchEnable: boolean; searchType: number; serverId: string; updateTime: number; validFlag: 0 | 1 }

Type declaration

  • applyMode: 0 | 1

    申请模式:0-申请不需要同意(默认),1-申请需要同意

  • channelNumber: number

    频道数

  • createTime: number

    创建时间

  • Optional ext?: string

    自定义扩展

  • icon: string

    图标

  • inviteMode: 0 | 1

    邀请模式:0-邀请需要同意(默认),1-邀请不需要同意

  • memberNumber: string

    成员数量

  • name: string

    名称

  • owner: string

    所有者

  • reorderWeight: string

    自定义排序权重值

  • searchEnable: boolean

    服务器是否允许被搜索,true允许,false不允许

  • searchType: number

    服务器搜索类型,客户自定义,大于0的整数 参见 {@link ServerInfo.searchType | searchType}

  • serverId: string

    服务器ID

  • updateTime: number

    更新时间

  • validFlag: 0 | 1

    有效标志:0-无效,1-有效

ServerMemberBanInfo: { accid: string; banTime: string; createTime: number; ext?: string; serverId: string; updateTime: number; validFlag: boolean }

Type declaration

  • accid: string

    用户accid

  • banTime: string

    封禁时间

  • createTime: number

    创建时间

  • Optional ext?: string

    自定义扩展

  • serverId: string

    服务器ID

  • updateTime: number

    更新时间

  • validFlag: boolean

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

ServerMemberSearchByPageOptions: { keyword: string; limit?: number; serverId: string }

Type declaration

  • keyword: string

    关键字

  • Optional limit?: number

    查询数量 最大和默认都是100

  • serverId: string

    服务器ID

ServerMemberSearchByPageResult: { datas: MemberInfo[]; listQueryTag: { hasMore: boolean; nextTimetag: number } }

Type declaration

  • datas: MemberInfo[]
  • listQueryTag: { hasMore: boolean; nextTimetag: number }

    分页便捷选项

    • hasMore: boolean

      是否还有下一页

    • nextTimetag: number

      下一次翻页时的起始时间戳

ServerSearchByPageOptions: { cursor?: string; endTime?: number; keyword: string; limit?: number; order?: TQChatSearchOrder; searchType: TSearchType; serverType?: number[]; sort?: TSortType; startTime?: number }

Type declaration

  • Optional cursor?: string

    排序条件 查询游标,查询的起始位置,上一次查询结果中的listQueryTag字段会返回cursor字段。

  • Optional endTime?: number

    查询时间范围的结束时间,要求比开始时间大

  • keyword: string

    搜索关键字

  • Optional limit?: number

    返回结果的记录数,最大和默认都是100

  • Optional order?: TQChatSearchOrder

    排序规则:ASC-升序 ,DESC-倒序 默认DESC

  • searchType: TSearchType

    搜索场景:square-广场,person-个人服务器

  • Optional serverType?: number[]

    搜索的服务器类型,例如[1,2,3]

  • Optional sort?: TSortType

    排序条件 reorderWeight-自定义权重排序、createTime-创建时间(默认)、totalMember-服务器总人数

  • Optional startTime?: number

    查询时间范围的开始时间

ServerSearchByPageResult: { datas: ServerInfo[]; listQueryTag: { cursor: string; hasMore: boolean; nextTimetag: number } }

Type declaration

  • datas: ServerInfo[]
  • listQueryTag: { cursor: string; hasMore: boolean; nextTimetag: number }

    分页便捷选项

    • cursor: string

      查询游标,下次查询的起始位置

    • hasMore: boolean

      是否还有下一页

    • nextTimetag: number

      下一次翻页时的起始时间戳

SubscribeAllChannelOptions: { serverIds: string[]; type: number }

Type declaration

  • serverIds: string[]

    服务器id列表,最多十个

  • type: number

    订阅类型 :

    1.订阅某个channel的【消息】/【通知】

    2.订阅某个channel的【消息未读数】/【通知】

    3.订阅某个channel的【消息未读状态】/【通知】

SubscribeAllChannelResult: { failServerIds: string[]; unreadInfos: QChatChannelUnreadInfo[] }

Type declaration

  • failServerIds: string[]

    订阅失败服务器id列表

  • unreadInfos: QChatChannelUnreadInfo[]

    订阅成功频道的未读数详情

SubscribeServerOptions: { opeType: 1 | 2; servers: { serverId: string }[]; type: 4 }

Type declaration

  • opeType: 1 | 2

    操作类型 1订阅 2取消订阅

  • servers: { serverId: string }[]

    要订阅的服务器信息

  • type: 4

    订阅类型 :

    4.订阅某个server的【消息】/【通知】,如server基本信息修改、人员进出、权限变更、创建channel等

SubscribeServerResult: { failedServers: { serverId: string }[] }

Type declaration

  • failedServers: { serverId: string }[]

    订阅失败的服务器列表

TQChatSearchOrder: keyof typeof QChatChannelEOrder
TSearchType: keyof typeof ESearchType
TSortType: keyof typeof QChatEServerSortType
UnbanServerMemberOptions: { accid: string; ext?: string; serverId: string }

Type declaration

  • accid: string

    目标用户accid

  • Optional ext?: string

    自定义扩展

  • serverId: string

    服务器ID

UpdateMyMemberInfoOptions: { accid: string; antispamTag?: AntispamTag; avatar: string; ext?: string; nick: string; serverId: string }

Type declaration

  • accid: string

    用户accid

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • avatar: string

    头像

  • Optional ext?: string

    自定义扩展

  • nick: string

    昵称

  • serverId: string

    服务器ID

UpdateServerMemberInfoOptions: { accid: string; antispamTag?: AntispamTag; avatar: string; nick: string; serverId: string }

Type declaration

  • accid: string

    用户accid

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • avatar: string

    头像

  • nick: string

    昵称

  • serverId: string

    服务器ID

UpdateServerOptions: { antispamTag?: AntispamTag; applyMode: 0 | 1; ext?: string; icon: string; inviteMode: 0 | 1; name: string; searchEnable?: boolean; searchType?: number; serverId: string }

Type declaration

  • Optional antispamTag?: AntispamTag

    反垃圾相关字段

  • applyMode: 0 | 1

    申请模式:0-申请不需要同意(默认),1-申请需要同意

  • Optional ext?: string

    自定义扩展

  • icon: string

    图标

  • inviteMode: 0 | 1

    邀请模式:0-邀请需要同意(默认),1-邀请不需要同意

  • name: string

    名称

  • Optional searchEnable?: boolean

    服务器是否允许被搜索,true允许,false不允许,默认允许

  • Optional searchType?: number

    服务器搜索类型,客户自定义,大于等于0的整数 0代表无类型 参见 {@link ServerInfo.searchType | searchType}

  • serverId: string

    服务器ID