mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
134 lines
2.3 KiB
TypeScript
134 lines
2.3 KiB
TypeScript
export interface Post {
|
|
id: string;
|
|
authorId: string;
|
|
authorDisplayName: string;
|
|
authorImageUrl: string;
|
|
authorName: string;
|
|
content: string;
|
|
imageUrl?: string;
|
|
image?: File | null;
|
|
parentPostId?: string;
|
|
likesCount: number;
|
|
repliesCount: number;
|
|
createdAt: string;
|
|
updatedAt?: Date;
|
|
isEdited: boolean;
|
|
visibility: string;
|
|
hashtags?: string[];
|
|
isLiked: boolean;
|
|
}
|
|
|
|
export interface User {
|
|
_id: string;
|
|
displayName: string;
|
|
username: string;
|
|
email: string;
|
|
passwordHash: string;
|
|
bio?: string;
|
|
profileImageUrl?: string;
|
|
createdAt: Date;
|
|
followersCount: number;
|
|
followingCount: number;
|
|
refreshTokens: RefreshToken[];
|
|
}
|
|
|
|
export interface Sesion {
|
|
accessToken: string?;
|
|
message: string;
|
|
url: string;
|
|
displayName: string;
|
|
username: string;
|
|
isAdmin: boolean;
|
|
email: string;
|
|
isFirebase: boolean;
|
|
}
|
|
|
|
export interface LoginDto {
|
|
username: string?;
|
|
password: string?;
|
|
}
|
|
|
|
export interface LoginSsoDto {
|
|
accessToken: string;
|
|
uid: string;
|
|
}
|
|
|
|
export interface RegisterDto {
|
|
username: string;
|
|
email: string;
|
|
password: string?;
|
|
displayName: string;
|
|
}
|
|
|
|
export interface RegisterSsoDto {
|
|
username: string;
|
|
email: string;
|
|
displayName: string;
|
|
token: string;
|
|
uid: string;
|
|
}
|
|
|
|
export interface CreatePostDto {
|
|
content: string;
|
|
imageUrl: string?;
|
|
parentPostId: string?;
|
|
}
|
|
|
|
export interface PostResponseDto {
|
|
id: string;
|
|
authorId: string;
|
|
authorImageUrl: string?;
|
|
authorDisplayName: string;
|
|
authorName: string;
|
|
content: string;
|
|
imageUrl: string?;
|
|
parentPostId: string?;
|
|
likesCount: number;
|
|
repliesCount: number;
|
|
createdAt: string;
|
|
updatedAt: string?;
|
|
isEdited: boolean;
|
|
visibility: string;
|
|
hashtags: string[]?;
|
|
isLiked: boolean?;
|
|
}
|
|
|
|
export interface UserResponseDto {
|
|
id: string;
|
|
username: string;
|
|
displayName: string;
|
|
email: string;
|
|
bio: string;
|
|
imageUrl: string?;
|
|
profileImageUrl: string;
|
|
followersCount: number;
|
|
followingCount: number;
|
|
createdAt: string;
|
|
postsCount: number;
|
|
isAdmin?: bool;
|
|
}
|
|
export interface UsersResponseDto {
|
|
response: {
|
|
id: string;
|
|
username: string;
|
|
displayName: string;
|
|
email: string;
|
|
bio: string;
|
|
imageUrl?: string;
|
|
profileImageUrl: string;
|
|
followersCount: number;
|
|
followingCount: number;
|
|
createdAt: string;
|
|
postsCount: number;
|
|
}[];
|
|
totalCount: number;
|
|
}
|
|
|
|
export interface UpdateUserRequest {
|
|
username: string?;
|
|
displayName: string?;
|
|
bio: string?;
|
|
email: string?;
|
|
profileImage: File?;
|
|
}
|