Files
ptpchat-frontend/src/models.ts
joschuatonn c8d5bc5734 Worked on several new features:
- ProfilePictures for users are now pulled from the backend
- added a component for chat settings (WIP)
- added a loading screen when the backend is not available
- reworked the "add chat" feature
- started to implement the general send-message functionality
2024-05-25 13:37:50 +02:00

78 lines
1.2 KiB
TypeScript

export interface ptpUser {
id: string;
firstName: string;
lastName: string;
username: string;
status?: string;
profilePictureUrl?: string;
}
export interface ptpTestUser {
id: string;
firstName: string;
lastName: string;
username: string;
status?: string;
profilePictureUrl?: string;
}
export interface responseModel {
success: boolean;
message: string;
response: any;
}
export interface chat{
id: number;
members: ptpUser[];
messages: message[];
displayName: string;
}
export interface user{
id: string;
firstName: string;
lastName: string;
username: string;
chats: chat[];
}
export interface message {
id: number;
chat: chat;
sender:user;
content: string;
timestamp: string;
isOwn: boolean;
gif: boolean;
link: boolean;
}
export interface tenorGif {
url: string,
duration: number,
preview: string,
dims: Array<number>,
size: number,
}
export interface testType {
nanogif: tenorGif,
mediumgif: tenorGif,
}
export interface tenorResponseElement {
id: string,
title: string,
media_formats: testType,
}
export interface tenorResponse {
results: Array<tenorGif>,
}
export interface profilePicture {
shortName: string;
url: string;
}