mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-06 19:10:54 +01:00
🏷️ Split user into common shared type
This commit is contained in:
parent
4983e1a58e
commit
fcc47649f6
1 changed files with 6 additions and 10 deletions
16
src/types/types.d.ts
vendored
16
src/types/types.d.ts
vendored
|
@ -58,14 +58,15 @@ interface APITranslate {
|
||||||
source_lang_en: string;
|
source_lang_en: string;
|
||||||
target_lang: string;
|
target_lang: string;
|
||||||
}
|
}
|
||||||
|
interface BaseUser {
|
||||||
interface APIAuthor {
|
|
||||||
name?: string;
|
name?: string;
|
||||||
screen_name?: string;
|
screen_name?: string;
|
||||||
avatar_url?: string;
|
avatar_url?: string;
|
||||||
avatar_color: string;
|
|
||||||
banner_url?: string;
|
banner_url?: string;
|
||||||
}
|
}
|
||||||
|
interface APITweetAuthor extends BaseUser {
|
||||||
|
avatar_color: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface APIExternalMedia {
|
interface APIExternalMedia {
|
||||||
type: 'video';
|
type: 'video';
|
||||||
|
@ -129,7 +130,7 @@ interface APITweet {
|
||||||
quote?: APITweet;
|
quote?: APITweet;
|
||||||
poll?: APIPoll;
|
poll?: APIPoll;
|
||||||
translation?: APITranslate;
|
translation?: APITranslate;
|
||||||
author: APIAuthor;
|
author: APITweetAuthor;
|
||||||
|
|
||||||
media?: {
|
media?: {
|
||||||
external?: APIExternalMedia;
|
external?: APIExternalMedia;
|
||||||
|
@ -148,13 +149,8 @@ interface APITweet {
|
||||||
twitter_card: 'tweet' | 'summary' | 'summary_large_image' | 'player';
|
twitter_card: 'tweet' | 'summary' | 'summary_large_image' | 'player';
|
||||||
}
|
}
|
||||||
|
|
||||||
interface APIUser {
|
interface APIUser extends BaseUser {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
|
||||||
screen_name: string;
|
|
||||||
avatar_url: string;
|
|
||||||
banner_url: string;
|
|
||||||
avatar_color: string;
|
|
||||||
description: string;
|
description: string;
|
||||||
location: string;
|
location: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
Loading…
Add table
Reference in a new issue