@@ -7,7 +7,7 @@ export type Rooms = Room[]
7
7
export interface Room {
8
8
roomId : StringNumber
9
9
roomName : string
10
- users : Users [ ]
10
+ users : RoomUsers
11
11
unreadCount ?: StringNumber
12
12
index ?: StringNumber | Date
13
13
lastMessage ?: LastMessage
@@ -25,7 +25,9 @@ export interface LastMessage {
25
25
new ?: boolean
26
26
}
27
27
28
- export interface Users {
28
+ export type RoomUsers = RoomUser [ ]
29
+
30
+ export interface RoomUser {
29
31
_id : StringNumber
30
32
username : string
31
33
avatar : string
@@ -59,7 +61,7 @@ export interface Message {
59
61
export interface MessageFile {
60
62
name : string
61
63
type : string
62
- url : 'https://firebasestorage.googleapis.com/...'
64
+ url : string
63
65
size ?: number
64
66
audio ?: boolean
65
67
duration ?: number
@@ -107,6 +109,13 @@ export interface Slots {
107
109
[ key : string ] : VNode [ ]
108
110
}
109
111
112
+ export interface CustomAction {
113
+ name : string
114
+ title : string
115
+ }
116
+
117
+ export type CustomActions = CustomAction [ ]
118
+
110
119
export interface AdvancedChatOptions {
111
120
props ?: {
112
121
height : string
@@ -119,9 +128,9 @@ export interface AdvancedChatOptions {
119
128
messages : Messages
120
129
'room-message' : string
121
130
'messages-loaded' : boolean
122
- 'room-actions' : any [ ]
123
- 'menu-actions' : any [ ]
124
- 'message-actions' : any [ ]
131
+ 'room-actions' : CustomActions
132
+ 'menu-actions' : CustomActions
133
+ 'message-actions' : CustomActions
125
134
'show-add-room' : boolean
126
135
'show-send-icon' : boolean
127
136
'show-files' : boolean
@@ -136,7 +145,7 @@ export interface AdvancedChatOptions {
136
145
'single-room' : boolean
137
146
theme : string
138
147
'accepted-files' : string
139
- styles : { }
148
+ styles : { [ key : string ] : string }
140
149
}
141
150
142
151
slots ?: Slots
0 commit comments