add user interface definition from dale
This commit is contained in:
parent
c224b081fa
commit
da9a3a801a
4 changed files with 56 additions and 0 deletions
33
src/models/IUser.ts
Normal file
33
src/models/IUser.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { IUserContent } from './user/IUserContent';
|
||||
|
||||
export interface IUser {
|
||||
badge?: {
|
||||
id: string,
|
||||
name: string;
|
||||
};
|
||||
content: IUserContent;
|
||||
counts: {
|
||||
bookmarks: number,
|
||||
clients: number,
|
||||
followers: number,
|
||||
following: number,
|
||||
posts: number,
|
||||
users: number;
|
||||
};
|
||||
created_at: string;
|
||||
follows_you: boolean;
|
||||
id: string;
|
||||
locale: string;
|
||||
name: string;
|
||||
timezone: string;
|
||||
type: string;
|
||||
username: string;
|
||||
you_blocked: boolean;
|
||||
you_can_follow: boolean;
|
||||
you_follow: boolean;
|
||||
you_muted: boolean;
|
||||
verified: {
|
||||
domain: string,
|
||||
link: string;
|
||||
};
|
||||
}
|
6
src/models/user/IUserAvatarImage.ts
Normal file
6
src/models/user/IUserAvatarImage.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export interface IUserAvatarImage {
|
||||
is_default: boolean;
|
||||
height: number;
|
||||
link: string;
|
||||
width: number;
|
||||
}
|
11
src/models/user/IUserContent.ts
Normal file
11
src/models/user/IUserContent.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { IUserAvatarImage } from './IUserAvatarImage';
|
||||
import { IUserCoverImage } from './IUserCoverImage';
|
||||
|
||||
export interface IUserContent {
|
||||
avatar_image: IUserAvatarImage;
|
||||
cover_image: IUserCoverImage;
|
||||
entities?: {};
|
||||
html: string;
|
||||
markdown_text: string;
|
||||
text: string;
|
||||
}
|
6
src/models/user/IUserCoverImage.ts
Normal file
6
src/models/user/IUserCoverImage.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export interface IUserCoverImage {
|
||||
link: string;
|
||||
is_default: boolean;
|
||||
width: number;
|
||||
heigth: number;
|
||||
}
|
Reference in a new issue