@@ -7,7 +7,7 @@ export type Rooms = Room[]
77export interface Room {
88 roomId : StringNumber
99 roomName : string
10- users : Users [ ]
10+ users : RoomUsers
1111 unreadCount ?: StringNumber
1212 index ?: StringNumber | Date
1313 lastMessage ?: LastMessage
@@ -25,7 +25,9 @@ export interface LastMessage {
2525 new ?: boolean
2626}
2727
28- export interface Users {
28+ export type RoomUsers = RoomUser [ ]
29+
30+ export interface RoomUser {
2931 _id : StringNumber
3032 username : string
3133 avatar : string
@@ -59,7 +61,7 @@ export interface Message {
5961export interface MessageFile {
6062 name : string
6163 type : string
62- url : 'https://firebasestorage.googleapis.com/...'
64+ url : string
6365 size ?: number
6466 audio ?: boolean
6567 duration ?: number
@@ -107,6 +109,13 @@ export interface Slots {
107109 [ key : string ] : VNode [ ]
108110}
109111
112+ export interface CustomAction {
113+ name : string
114+ title : string
115+ }
116+
117+ export type CustomActions = CustomAction [ ]
118+
110119export interface AdvancedChatOptions {
111120 props ?: {
112121 height : string
@@ -119,9 +128,9 @@ export interface AdvancedChatOptions {
119128 messages : Messages
120129 'room-message' : string
121130 '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
125134 'show-add-room' : boolean
126135 'show-send-icon' : boolean
127136 'show-files' : boolean
@@ -136,7 +145,7 @@ export interface AdvancedChatOptions {
136145 'single-room' : boolean
137146 theme : string
138147 'accepted-files' : string
139- styles : { }
148+ styles : { [ key : string ] : string }
140149 }
141150
142151 slots ?: Slots
0 commit comments