Convert Status Normalizer to TypeScript

This commit is contained in:
Alex Gleason 2022-03-09 14:26:57 -06:00
parent 6e61cb525c
commit a2adaf2ffd
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 47 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import { IAccount } from './account'; import { IAccount } from './account';
import { IStatus } from './status';
export { IAccount }; export { IAccount, IStatus };

View file

@ -0,0 +1,45 @@
/**
* Status entity.
* https://docs.joinmastodon.org/entities/status/
**/
interface IStatus {
account: Record<any, any>;
application: Record<string, any> | null;
bookmarked: boolean;
card: Record<string, any> | null;
content: string;
created_at: Date;
emojis: Iterable<any>;
favourited: boolean;
favourites_count: number;
in_reply_to_account_id: string | null;
in_reply_to_id: string | null;
id: string;
language: null;
media_attachments: Iterable<any>;
mentions: Iterable<any>;
muted: boolean;
pinned: boolean;
pleroma: Record<string, any>;
poll: null;
quote: null;
reblog: null;
reblogged: boolean;
reblogs_count: number;
replies_count: number;
sensitive: boolean;
spoiler_text: string;
tags: Iterable<any>;
uri: string;
url: string;
visibility: string;
// Internal fields
contentHtml: string;
hidden: boolean;
search_index: string;
spoilerHtml: string;
}
export { IStatus };