First commit

This commit is contained in:
2025-08-16 22:03:31 +03:00
Unverified
commit b561e85419
34 changed files with 3907 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
export type Headers = {[x: string]: string}
export interface ErrorResponse {
message: string;
}
// App types
export interface Message {
id: number;
username: string;
content: string;
is_read: boolean;
is_author: boolean;
timestamp: string;
}
export interface Messages {
messages: Message[];
}
export interface User {
username: string;
}
// ----------
// API models
// ----------
// Requests
export interface LoginRequest {
username: string;
password: string;
}
export interface RegisterRequest {
username: string;
password: string;
confirm_password: string;
}
// Responses
export interface LoginResponse {
username: string;
token: string;
}