@@ -16,15 +16,13 @@ export interface RoomUser {
16
16
status : UserStatus
17
17
}
18
18
19
- export type RoomUsers = RoomUser [ ]
20
-
21
19
export interface MessageFile {
22
20
name : string
23
21
type : string
24
22
extension : string
25
23
url : string
26
- localUrl : string
27
- preview : string
24
+ localUrl ? : string
25
+ preview ? : string
28
26
size ?: number
29
27
audio ?: boolean
30
28
duration ?: number
@@ -48,28 +46,26 @@ export interface Room {
48
46
roomId : string
49
47
roomName : string
50
48
avatar : string
51
- users : RoomUsers
49
+ users : RoomUser [ ]
52
50
unreadCount ?: number
53
51
index ?: StringNumber | Date
54
52
lastMessage ?: LastMessage
55
53
typingUsers ?: string [ ]
56
54
}
57
55
58
- export type Rooms = Room [ ]
59
-
60
56
export interface MessageReactions {
61
57
[ key : string ] : StringNumber [ ]
62
58
}
63
59
64
60
export interface Message {
65
61
_id : string
66
- indexId ?: StringNumber
67
- content : string
68
62
senderId : string
63
+ indexId ?: StringNumber
64
+ content ?: string
69
65
username ?: string
70
66
avatar ?: string
71
- date : string
72
- timestamp : string
67
+ date ? : string
68
+ timestamp ? : string
73
69
system ?: boolean
74
70
saved ?: boolean
75
71
distributed ?: boolean
@@ -83,23 +79,17 @@ export interface Message {
83
79
replyMessage ?: Message
84
80
}
85
81
86
- export type Messages = Message [ ]
87
-
88
82
export interface CustomAction {
89
83
name : string
90
84
title : string
91
85
}
92
86
93
- export type CustomActions = CustomAction [ ]
94
-
95
87
export interface MessageAction {
96
88
name : string
97
89
title : string
98
90
onlyMe ?: boolean
99
91
}
100
92
101
- export type MessageActions = MessageAction [ ]
102
-
103
93
export interface TextFormatting {
104
94
disabled ?: boolean
105
95
italic ?: string
@@ -111,8 +101,6 @@ export interface TextFormatting {
111
101
}
112
102
export type TemplateText = { tag : string ; text : string }
113
103
114
- export type TemplatesText = TemplateText [ ]
115
-
116
104
export interface AutoScroll {
117
105
send ?: {
118
106
new ?: boolean
@@ -138,21 +126,21 @@ export interface LinkOptions {
138
126
export interface Props {
139
127
height ?: string
140
128
'current-user-id' : string
141
- rooms : Rooms
129
+ rooms : Room [ ]
142
130
'rooms-order' ?: 'desc' | 'asc'
143
131
'loading-rooms' ?: boolean
144
132
'rooms-loaded' ?: boolean
145
133
'room-id' ?: string
146
134
'load-first-room' ?: boolean
147
135
'rooms-list-opened' ?: boolean
148
- messages : Messages
136
+ messages : Message [ ]
149
137
'room-message' ?: string
150
138
'username-options' ?: UsernameOptions
151
139
'messages-loaded' ?: boolean
152
- 'room-actions' ?: CustomActions
153
- 'menu-actions' ?: CustomActions
140
+ 'room-actions' ?: CustomAction [ ]
141
+ 'menu-actions' ?: CustomAction [ ]
154
142
'message-actions' ?: MessageActions
155
- 'message-selection-actions' ?: CustomActions
143
+ 'message-selection-actions' ?: CustomAction [ ]
156
144
'templates-text' ?: TemplatesText
157
145
'auto-scroll' ?: AutoScroll
158
146
'show-search' ?: boolean
@@ -188,8 +176,8 @@ export interface AdvancedChatOptions {
188
176
}
189
177
190
178
export class VueAdvancedChat extends Vue {
191
- rooms : Rooms
192
- messages : Messages
179
+ rooms : Room [ ]
180
+ messages : Message [ ]
193
181
194
182
$props : Props
195
183
0 commit comments