chore: 提取公共类
This commit is contained in:
5
client-protocol/bean/BaseChatSettingsBean.ts
Normal file
5
client-protocol/bean/BaseChatSettingsBean.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
interface BaseChatSettings {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export default BaseChatSettings
|
||||
@@ -1,3 +1,4 @@
|
||||
import BaseChatSettingsBean from "./BaseChatSettingsBean.ts"
|
||||
import ChatType from "./ChatType.ts"
|
||||
|
||||
export default class ChatBean {
|
||||
@@ -5,7 +6,7 @@ export default class ChatBean {
|
||||
declare id: string
|
||||
declare title: string
|
||||
declare avatar_file_hash?: string
|
||||
declare settings?: { [key: string]: unknown }
|
||||
declare settings?: BaseChatSettingsBean
|
||||
|
||||
declare is_member: boolean
|
||||
declare is_admin: boolean
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
interface GroupSettingsBean {
|
||||
import BaseChatSettings from "./BaseChatSettingsBean.ts"
|
||||
|
||||
interface GroupSettingsBean extends BaseChatSettings {
|
||||
allow_new_member_join?: boolean
|
||||
allow_new_member_from_invitation?: boolean
|
||||
new_member_join_method?: 'disabled' | 'allowed_by_admin' | 'answered_and_allowed_by_admin'
|
||||
@@ -7,8 +9,6 @@ interface GroupSettingsBean {
|
||||
// 下面两个比较特殊, 由服务端给予
|
||||
group_title: string
|
||||
group_name: string
|
||||
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export default GroupSettingsBean
|
||||
|
||||
Reference in New Issue
Block a user