@@ -16,15 +16,13 @@ export interface RoomUser {
1616 status : UserStatus
1717}
1818
19- export type RoomUsers = RoomUser [ ]
20-
2119export interface MessageFile {
2220 name : string
2321 type : string
2422 extension : string
2523 url : string
26- localUrl : string
27- preview : string
24+ localUrl ? : string
25+ preview ? : string
2826 size ?: number
2927 audio ?: boolean
3028 duration ?: number
@@ -48,28 +46,26 @@ export interface Room {
4846 roomId : string
4947 roomName : string
5048 avatar : string
51- users : RoomUsers
49+ users : RoomUser [ ]
5250 unreadCount ?: number
5351 index ?: StringNumber | Date
5452 lastMessage ?: LastMessage
5553 typingUsers ?: string [ ]
5654}
5755
58- export type Rooms = Room [ ]
59-
6056export interface MessageReactions {
6157 [ key : string ] : StringNumber [ ]
6258}
6359
6460export interface Message {
6561 _id : string
66- indexId ?: StringNumber
67- content : string
6862 senderId : string
63+ indexId ?: StringNumber
64+ content ?: string
6965 username ?: string
7066 avatar ?: string
71- date : string
72- timestamp : string
67+ date ? : string
68+ timestamp ? : string
7369 system ?: boolean
7470 saved ?: boolean
7571 distributed ?: boolean
@@ -83,23 +79,17 @@ export interface Message {
8379 replyMessage ?: Message
8480}
8581
86- export type Messages = Message [ ]
87-
8882export interface CustomAction {
8983 name : string
9084 title : string
9185}
9286
93- export type CustomActions = CustomAction [ ]
94-
9587export interface MessageAction {
9688 name : string
9789 title : string
9890 onlyMe ?: boolean
9991}
10092
101- export type MessageActions = MessageAction [ ]
102-
10393export interface TextFormatting {
10494 disabled ?: boolean
10595 italic ?: string
@@ -111,8 +101,6 @@ export interface TextFormatting {
111101}
112102export type TemplateText = { tag : string ; text : string }
113103
114- export type TemplatesText = TemplateText [ ]
115-
116104export interface AutoScroll {
117105 send ?: {
118106 new ?: boolean
@@ -138,21 +126,21 @@ export interface LinkOptions {
138126export interface Props {
139127 height ?: string
140128 'current-user-id' : string
141- rooms : Rooms
129+ rooms : Room [ ]
142130 'rooms-order' ?: 'desc' | 'asc'
143131 'loading-rooms' ?: boolean
144132 'rooms-loaded' ?: boolean
145133 'room-id' ?: string
146134 'load-first-room' ?: boolean
147135 'rooms-list-opened' ?: boolean
148- messages : Messages
136+ messages : Message [ ]
149137 'room-message' ?: string
150138 'username-options' ?: UsernameOptions
151139 'messages-loaded' ?: boolean
152- 'room-actions' ?: CustomActions
153- 'menu-actions' ?: CustomActions
140+ 'room-actions' ?: CustomAction [ ]
141+ 'menu-actions' ?: CustomAction [ ]
154142 'message-actions' ?: MessageActions
155- 'message-selection-actions' ?: CustomActions
143+ 'message-selection-actions' ?: CustomAction [ ]
156144 'templates-text' ?: TemplatesText
157145 'auto-scroll' ?: AutoScroll
158146 'show-search' ?: boolean
@@ -188,8 +176,8 @@ export interface AdvancedChatOptions {
188176}
189177
190178export class VueAdvancedChat extends Vue {
191- rooms : Rooms
192- messages : Messages
179+ rooms : Room [ ]
180+ messages : Message [ ]
193181
194182 $props : Props
195183
0 commit comments