[Glitch] Add Typescript types for some API objects
Port 57f592fed5
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
a3a58c041e
commit
3b7caa00e2
|
@ -0,0 +1,45 @@
|
||||||
|
import type { ApiCustomEmojiJSON } from './custom_emoji';
|
||||||
|
|
||||||
|
export interface ApiAccountFieldJSON {
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
verified_at: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiAccountRoleJSON {
|
||||||
|
color: string;
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See app/serializers/rest/account_serializer.rb
|
||||||
|
export interface ApiAccountJSON {
|
||||||
|
acct: string;
|
||||||
|
avatar: string;
|
||||||
|
avatar_static: string;
|
||||||
|
bot: boolean;
|
||||||
|
created_at: string;
|
||||||
|
discoverable: boolean;
|
||||||
|
display_name: string;
|
||||||
|
emojis: ApiCustomEmojiJSON[];
|
||||||
|
fields: ApiAccountFieldJSON[];
|
||||||
|
followers_count: number;
|
||||||
|
following_count: number;
|
||||||
|
group: boolean;
|
||||||
|
header: string;
|
||||||
|
header_static: string;
|
||||||
|
id: string;
|
||||||
|
last_status_at: string;
|
||||||
|
locked: boolean;
|
||||||
|
noindex: boolean;
|
||||||
|
note: string;
|
||||||
|
roles: ApiAccountJSON[];
|
||||||
|
statuses_count: number;
|
||||||
|
uri: string;
|
||||||
|
url: string;
|
||||||
|
username: string;
|
||||||
|
moved?: ApiAccountJSON;
|
||||||
|
suspended?: boolean;
|
||||||
|
limited?: boolean;
|
||||||
|
memorial?: boolean;
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
// See app/serializers/rest/account_serializer.rb
|
||||||
|
export interface ApiCustomEmojiJSON {
|
||||||
|
shortcode: string;
|
||||||
|
static_url: string;
|
||||||
|
url: string;
|
||||||
|
category?: string;
|
||||||
|
visible_in_picker: boolean;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
// See app/serializers/rest/relationship_serializer.rb
|
||||||
|
export interface ApiRelationshipJSON {
|
||||||
|
blocked_by: boolean;
|
||||||
|
blocking: boolean;
|
||||||
|
domain_blocking: boolean;
|
||||||
|
endorsed: boolean;
|
||||||
|
followed_by: boolean;
|
||||||
|
following: boolean;
|
||||||
|
id: string;
|
||||||
|
languages: string[] | null;
|
||||||
|
muting_notifications: boolean;
|
||||||
|
muting: boolean;
|
||||||
|
note: string;
|
||||||
|
notifying: boolean;
|
||||||
|
requested_by: boolean;
|
||||||
|
requested: boolean;
|
||||||
|
showing_reblogs: boolean;
|
||||||
|
}
|
Loading…
Reference in New Issue