Sengi-Windows-MacOS-Linux/src/app/services/models/mastodon.interfaces.ts

174 lines
3.2 KiB
TypeScript
Raw Normal View History

2018-09-08 05:17:19 +02:00
export interface AppData {
2019-02-24 01:47:39 +01:00
client_id: string;
client_secret: string;
id: string;
name: string;
redirect_uri: string;
website: string;
2018-09-08 05:17:19 +02:00
}
2018-03-17 05:30:43 +01:00
export interface TokenData {
2019-02-24 01:47:39 +01:00
access_token: string;
token_type: string;
scope: string;
created_at: number;
//TODO: Pleroma support this
me: string;
expires_in: number;
refresh_token: string;
2018-03-17 05:30:43 +01:00
}
export interface Account {
2019-02-24 01:47:39 +01:00
id: number;
username: string;
acct: string;
display_name: string;
locked: string;
created_at: string;
followers_count: number;
following_count: number;
statuses_count: number;
note: string;
url: string;
avatar: string;
avatar_static: string;
header: string;
header_static: string;
emojis: Emoji[];
moved: boolean;
fields: Field[];
bot: boolean;
2019-03-11 05:31:56 +01:00
source: AccountInfo;
}
export interface AccountInfo {
privacy: string;
sensitive: boolean;
note: string;
fields: Field[];
2019-02-24 01:47:39 +01:00
}
export interface Emoji {
shortcode: string;
static_url: string;
url: string;
visible_in_picker: boolean;
}
export interface Field {
name: string;
value: string;
verified_at: string;
2018-03-17 05:30:43 +01:00
}
export interface Application {
2019-02-24 01:47:39 +01:00
name: string;
website: string;
2018-03-17 05:30:43 +01:00
}
export interface Attachment {
2019-02-24 01:47:39 +01:00
id: string;
type: 'image' | 'video' | 'gifv';
url: string;
remote_url: string;
preview_url: string;
text_url: string;
2019-03-10 19:36:22 +01:00
meta: any;
description: string;
2018-03-17 05:30:43 +01:00
}
export interface Card {
2019-02-24 01:47:39 +01:00
url: string;
title: string;
description: string;
image: string;
2018-03-17 05:30:43 +01:00
}
export interface Context {
2019-02-24 01:47:39 +01:00
ancestors: Status[];
descendants: Status[];
2018-03-17 05:30:43 +01:00
}
export interface Error {
2019-02-24 01:47:39 +01:00
error: string;
2018-03-17 05:30:43 +01:00
}
export interface Instance {
2019-02-24 01:47:39 +01:00
uri: string;
title: string;
description: string;
email: string;
version: string;
urls: string[];
contact_account: Account;
max_toot_chars: number;
2018-03-17 05:30:43 +01:00
}
export interface Mention {
2019-02-24 01:47:39 +01:00
url: string;
username: string;
acct: string;
id: string;
2018-03-17 05:30:43 +01:00
}
export interface Notification {
2019-02-24 01:47:39 +01:00
id: string;
type: 'mention' | 'reblog' | 'favourite' | 'follow';
created_at: string;
2019-02-24 01:47:39 +01:00
account: Account;
status?: Status;
2018-03-17 05:30:43 +01:00
}
export interface Relationship {
2019-02-24 01:47:39 +01:00
id: number;
following: boolean;
followed_by: boolean;
blocking: boolean;
muting: boolean;
requested: boolean;
2018-03-17 05:30:43 +01:00
}
export interface Report {
2019-02-24 01:47:39 +01:00
id: string;
action_taken: boolean;
2018-03-17 05:30:43 +01:00
}
export interface Results {
2019-02-24 01:47:39 +01:00
accounts: Account[];
statuses: Status[];
hashtags: string[];
2018-03-17 05:30:43 +01:00
}
export interface Status {
2019-02-24 01:47:39 +01:00
id: string;
uri: string;
url: string;
account: Account;
in_reply_to_id: string;
2019-02-24 20:49:02 +01:00
in_reply_to_account_id: number;
2019-02-24 01:47:39 +01:00
reblog: Status;
content: string;
created_at: string;
2019-03-01 06:59:12 +01:00
reblogs_count: number;
replies_count: number;
2019-02-24 01:47:39 +01:00
favourites_count: string;
reblogged: boolean;
favourited: boolean;
sensitive: boolean;
spoiler_text: string;
2019-04-07 21:03:17 +02:00
visibility: 'public' | 'unlisted' | 'private' | 'direct';
2019-02-24 01:47:39 +01:00
media_attachments: Attachment[];
mentions: Mention[];
tags: Tag[];
application: Application;
emojis: any[];
language: string;
pinned: boolean;
2018-03-17 05:30:43 +01:00
}
export interface Tag {
2019-02-24 01:47:39 +01:00
name: string;
url: string;
2018-03-17 05:30:43 +01:00
}