2023-05-03 07:32:11 -04:00
|
|
|
import type { Record } from 'immutable';
|
2023-05-08 15:32:26 -04:00
|
|
|
|
2023-05-09 06:09:32 -04:00
|
|
|
type CustomEmoji = Record<{
|
|
|
|
shortcode: string;
|
|
|
|
static_url: string;
|
|
|
|
url: string;
|
|
|
|
}>;
|
|
|
|
|
|
|
|
type AccountField = Record<{
|
|
|
|
name: string;
|
|
|
|
value: string;
|
|
|
|
verified_at: string | null;
|
|
|
|
}>;
|
|
|
|
|
2023-05-10 06:59:29 -04:00
|
|
|
interface AccountApiResponseValues {
|
2023-05-09 06:09:32 -04:00
|
|
|
acct: string;
|
2023-05-08 15:32:26 -04:00
|
|
|
avatar: string;
|
|
|
|
avatar_static: string;
|
2023-05-09 06:09:32 -04:00
|
|
|
bot: boolean;
|
|
|
|
created_at: string;
|
|
|
|
discoverable: boolean;
|
|
|
|
display_name: string;
|
|
|
|
emojis: CustomEmoji[];
|
|
|
|
fields: AccountField[];
|
|
|
|
followers_count: number;
|
|
|
|
following_count: number;
|
|
|
|
group: boolean;
|
|
|
|
header: string;
|
|
|
|
header_static: string;
|
|
|
|
id: string;
|
|
|
|
last_status_at: string;
|
|
|
|
locked: boolean;
|
|
|
|
note: string;
|
|
|
|
statuses_count: number;
|
|
|
|
url: string;
|
|
|
|
username: string;
|
2023-05-10 06:59:29 -04:00
|
|
|
}
|
2023-05-09 06:09:32 -04:00
|
|
|
|
|
|
|
type NormalizedAccountField = Record<{
|
|
|
|
name_emojified: string;
|
|
|
|
value_emojified: string;
|
|
|
|
value_plain: string;
|
|
|
|
}>;
|
|
|
|
|
2023-05-10 06:59:29 -04:00
|
|
|
interface NormalizedAccountValues {
|
2023-05-09 06:09:32 -04:00
|
|
|
display_name_html: string;
|
|
|
|
fields: NormalizedAccountField[];
|
|
|
|
note_emojified: string;
|
|
|
|
note_plain: string;
|
2023-05-10 06:59:29 -04:00
|
|
|
}
|
2023-05-03 07:32:11 -04:00
|
|
|
|
2023-05-09 06:09:32 -04:00
|
|
|
export type Account = Record<
|
|
|
|
AccountApiResponseValues & NormalizedAccountValues
|
|
|
|
>;
|