upd: megalodon to v7
This commit is contained in:
parent
b4674ce65c
commit
afda15260f
234 changed files with 21334 additions and 7675 deletions
|
|
@ -1,27 +1,35 @@
|
|||
/// <reference path="emoji.ts" />
|
||||
/// <reference path="source.ts" />
|
||||
/// <reference path="field.ts" />
|
||||
/// <reference path="role.ts" />
|
||||
namespace Entity {
|
||||
export type Account = {
|
||||
id: string;
|
||||
username: string;
|
||||
acct: string;
|
||||
display_name: string;
|
||||
locked: boolean;
|
||||
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: Array<Emoji>;
|
||||
moved: Account | null;
|
||||
fields: Array<Field>;
|
||||
bot: boolean | null;
|
||||
source?: Source;
|
||||
};
|
||||
export type Account = {
|
||||
id: string
|
||||
username: string
|
||||
acct: string
|
||||
display_name: string
|
||||
locked: boolean
|
||||
discoverable?: boolean
|
||||
group: boolean | null
|
||||
noindex: boolean | null
|
||||
suspended: boolean | null
|
||||
limited: boolean | null
|
||||
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: Array<Emoji>
|
||||
moved: Account | null
|
||||
fields: Array<Field>
|
||||
bot: boolean | null
|
||||
source?: Source
|
||||
role?: Role
|
||||
mute_expires_at?: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
namespace Entity {
|
||||
export type Activity = {
|
||||
week: string;
|
||||
statuses: string;
|
||||
logins: string;
|
||||
registrations: string;
|
||||
};
|
||||
export type Activity = {
|
||||
week: string
|
||||
statuses: string
|
||||
logins: string
|
||||
registrations: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,40 @@
|
|||
/// <reference path="tag.ts" />
|
||||
/// <reference path="emoji.ts" />
|
||||
/// <reference path="reaction.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Announcement = {
|
||||
id: string;
|
||||
content: string;
|
||||
starts_at: string | null;
|
||||
ends_at: string | null;
|
||||
published: boolean;
|
||||
all_day: boolean;
|
||||
published_at: string;
|
||||
updated_at: string;
|
||||
read?: boolean;
|
||||
mentions: Array<AnnouncementAccount>;
|
||||
statuses: Array<AnnouncementStatus>;
|
||||
tags: Array<Tag>;
|
||||
emojis: Array<Emoji>;
|
||||
reactions: Array<Reaction>;
|
||||
};
|
||||
export type Announcement = {
|
||||
id: string
|
||||
content: string
|
||||
starts_at: string | null
|
||||
ends_at: string | null
|
||||
published: boolean
|
||||
all_day: boolean
|
||||
published_at: string
|
||||
updated_at: string | null
|
||||
read: boolean | null
|
||||
mentions: Array<AnnouncementAccount>
|
||||
statuses: Array<AnnouncementStatus>
|
||||
tags: Array<StatusTag>
|
||||
emojis: Array<Emoji>
|
||||
reactions: Array<AnnouncementReaction>
|
||||
}
|
||||
|
||||
export type AnnouncementAccount = {
|
||||
id: string;
|
||||
username: string;
|
||||
url: string;
|
||||
acct: string;
|
||||
};
|
||||
export type AnnouncementAccount = {
|
||||
id: string
|
||||
username: string
|
||||
url: string
|
||||
acct: string
|
||||
}
|
||||
|
||||
export type AnnouncementStatus = {
|
||||
id: string;
|
||||
url: string;
|
||||
};
|
||||
export type AnnouncementStatus = {
|
||||
id: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export type AnnouncementReaction = {
|
||||
name: string
|
||||
count: number
|
||||
me: boolean | null
|
||||
url: string | null
|
||||
static_url: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace Entity {
|
||||
export type Application = {
|
||||
name: string;
|
||||
website?: string | null;
|
||||
vapid_key?: string | null;
|
||||
};
|
||||
export type Application = {
|
||||
name: string
|
||||
website?: string | null
|
||||
vapid_key?: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
/// <reference path="attachment.ts" />
|
||||
namespace Entity {
|
||||
export type AsyncAttachment = {
|
||||
id: string;
|
||||
type: "unknown" | "image" | "gifv" | "video" | "audio";
|
||||
url: string | null;
|
||||
remote_url: string | null;
|
||||
preview_url: string;
|
||||
text_url: string | null;
|
||||
meta: Meta | null;
|
||||
description: string | null;
|
||||
blurhash: string | null;
|
||||
};
|
||||
export type AsyncAttachment = {
|
||||
id: string
|
||||
type: 'unknown' | 'image' | 'gifv' | 'video' | 'audio'
|
||||
url: string | null
|
||||
remote_url: string | null
|
||||
preview_url: string
|
||||
text_url: string | null
|
||||
meta: Meta | null
|
||||
description: string | null
|
||||
blurhash: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,49 @@
|
|||
namespace Entity {
|
||||
export type Sub = {
|
||||
// For Image, Gifv, and Video
|
||||
width?: number;
|
||||
height?: number;
|
||||
size?: string;
|
||||
aspect?: number;
|
||||
export type Sub = {
|
||||
// For Image, Gifv, and Video
|
||||
width?: number
|
||||
height?: number
|
||||
size?: string
|
||||
aspect?: number
|
||||
|
||||
// For Gifv and Video
|
||||
frame_rate?: string;
|
||||
// For Gifv and Video
|
||||
frame_rate?: string
|
||||
|
||||
// For Audio, Gifv, and Video
|
||||
duration?: number;
|
||||
bitrate?: number;
|
||||
};
|
||||
// For Audio, Gifv, and Video
|
||||
duration?: number
|
||||
bitrate?: number
|
||||
}
|
||||
|
||||
export type Focus = {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
export type Focus = {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
export type Meta = {
|
||||
original?: Sub;
|
||||
small?: Sub;
|
||||
focus?: Focus;
|
||||
length?: string;
|
||||
duration?: number;
|
||||
fps?: number;
|
||||
size?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
aspect?: number;
|
||||
audio_encode?: string;
|
||||
audio_bitrate?: string;
|
||||
audio_channel?: string;
|
||||
};
|
||||
export type Meta = {
|
||||
original?: Sub
|
||||
small?: Sub
|
||||
focus?: Focus
|
||||
length?: string
|
||||
duration?: number
|
||||
fps?: number
|
||||
size?: string
|
||||
width?: number
|
||||
height?: number
|
||||
aspect?: number
|
||||
audio_encode?: string
|
||||
audio_bitrate?: string
|
||||
audio_channel?: string
|
||||
}
|
||||
|
||||
export type Attachment = {
|
||||
id: string;
|
||||
type: "unknown" | "image" | "gifv" | "video" | "audio";
|
||||
url: string;
|
||||
remote_url: string | null;
|
||||
preview_url: string | null;
|
||||
text_url: string | null;
|
||||
meta: Meta | null;
|
||||
description: string | null;
|
||||
blurhash: string | null;
|
||||
};
|
||||
export type Attachment = {
|
||||
id: string
|
||||
type: 'unknown' | 'image' | 'gifv' | 'video' | 'audio'
|
||||
url: string
|
||||
remote_url: string | null
|
||||
preview_url: string | null
|
||||
text_url: string | null
|
||||
meta: Meta | null
|
||||
description: string | null
|
||||
blurhash: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
namespace Entity {
|
||||
export type Card = {
|
||||
url: string;
|
||||
title: string;
|
||||
description: string;
|
||||
type: "link" | "photo" | "video" | "rich";
|
||||
image?: string;
|
||||
author_name?: string;
|
||||
author_url?: string;
|
||||
provider_name?: string;
|
||||
provider_url?: string;
|
||||
html?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
};
|
||||
export type Card = {
|
||||
url: string
|
||||
title: string
|
||||
description: string
|
||||
type: 'link' | 'photo' | 'video' | 'rich'
|
||||
image: string | null
|
||||
author_name: string | null
|
||||
author_url: string | null
|
||||
provider_name: string | null
|
||||
provider_url: string | null
|
||||
html: string | null
|
||||
width: number | null
|
||||
height: number | null
|
||||
embed_url: string | null
|
||||
blurhash: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/// <reference path="status.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Context = {
|
||||
ancestors: Array<Status>;
|
||||
descendants: Array<Status>;
|
||||
};
|
||||
export type Context = {
|
||||
ancestors: Array<Status>
|
||||
descendants: Array<Status>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
/// <reference path="status.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Conversation = {
|
||||
id: string;
|
||||
accounts: Array<Account>;
|
||||
last_status: Status | null;
|
||||
unread: boolean;
|
||||
};
|
||||
export type Conversation = {
|
||||
id: string
|
||||
accounts: Array<Account>
|
||||
last_status: Status | null
|
||||
unread: boolean
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
namespace Entity {
|
||||
export type Emoji = {
|
||||
shortcode: string;
|
||||
static_url: string;
|
||||
url: string;
|
||||
visible_in_picker: boolean;
|
||||
category: string;
|
||||
};
|
||||
export type Emoji = {
|
||||
shortcode: string
|
||||
static_url: string
|
||||
url: string
|
||||
visible_in_picker: boolean
|
||||
category?: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
namespace Entity {
|
||||
export type FeaturedTag = {
|
||||
id: string;
|
||||
name: string;
|
||||
statuses_count: number;
|
||||
last_status_at: string;
|
||||
};
|
||||
export type FeaturedTag = {
|
||||
id: string
|
||||
name: string
|
||||
statuses_count: number
|
||||
last_status_at: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace Entity {
|
||||
export type Field = {
|
||||
name: string;
|
||||
value: string;
|
||||
verified_at: string | null;
|
||||
};
|
||||
export type Field = {
|
||||
name: string
|
||||
value: string
|
||||
verified_at: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
namespace Entity {
|
||||
export type Filter = {
|
||||
id: string;
|
||||
phrase: string;
|
||||
context: Array<FilterContext>;
|
||||
expires_at: string | null;
|
||||
irreversible: boolean;
|
||||
whole_word: boolean;
|
||||
};
|
||||
export type Filter = {
|
||||
id: string
|
||||
phrase: string
|
||||
context: Array<FilterContext>
|
||||
expires_at: string | null
|
||||
irreversible: boolean
|
||||
whole_word: boolean
|
||||
}
|
||||
|
||||
export type FilterContext = string;
|
||||
export type FilterContext = string
|
||||
}
|
||||
|
|
|
|||
27
packages/megalodon/src/entities/follow_request.ts
Normal file
27
packages/megalodon/src/entities/follow_request.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/// <reference path="emoji.ts" />
|
||||
/// <reference path="field.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type FollowRequest = {
|
||||
id: number
|
||||
username: string
|
||||
acct: string
|
||||
display_name: string
|
||||
locked: boolean
|
||||
bot: boolean
|
||||
discoverable?: boolean
|
||||
group: boolean
|
||||
created_at: string
|
||||
note: string
|
||||
url: string
|
||||
avatar: string
|
||||
avatar_static: string
|
||||
header: string
|
||||
header_static: string
|
||||
followers_count: number
|
||||
following_count: number
|
||||
statuses_count: number
|
||||
emojis: Array<Emoji>
|
||||
fields: Array<Field>
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
namespace Entity {
|
||||
export type History = {
|
||||
day: string;
|
||||
uses: number;
|
||||
accounts: number;
|
||||
};
|
||||
export type History = {
|
||||
day: string
|
||||
uses: number
|
||||
accounts: number
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
namespace Entity {
|
||||
export type IdentityProof = {
|
||||
provider: string;
|
||||
provider_username: string;
|
||||
updated_at: string;
|
||||
proof_url: string;
|
||||
profile_url: string;
|
||||
};
|
||||
export type IdentityProof = {
|
||||
provider: string
|
||||
provider_username: string
|
||||
updated_at: string
|
||||
proof_url: string
|
||||
profile_url: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,39 +3,38 @@
|
|||
/// <reference path="stats.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Instance = {
|
||||
uri: string;
|
||||
title: string;
|
||||
description: string;
|
||||
email: string;
|
||||
version: string;
|
||||
thumbnail: string | null;
|
||||
urls: URLs;
|
||||
stats: Stats;
|
||||
languages: Array<string>;
|
||||
contact_account: Account | null;
|
||||
max_toot_chars?: number;
|
||||
registrations?: boolean;
|
||||
configuration?: {
|
||||
statuses: {
|
||||
max_characters: number;
|
||||
max_media_attachments: number;
|
||||
characters_reserved_per_url: number;
|
||||
};
|
||||
media_attachments: {
|
||||
supported_mime_types: Array<string>;
|
||||
image_size_limit: number;
|
||||
image_matrix_limit: number;
|
||||
video_size_limit: number;
|
||||
video_frame_limit: number;
|
||||
video_matrix_limit: number;
|
||||
};
|
||||
polls: {
|
||||
max_options: number;
|
||||
max_characters_per_option: number;
|
||||
min_expiration: number;
|
||||
max_expiration: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type Instance = {
|
||||
uri: string
|
||||
title: string
|
||||
description: string
|
||||
email: string
|
||||
version: string
|
||||
thumbnail: string | null
|
||||
urls: URLs | null
|
||||
stats: Stats
|
||||
languages: Array<string>
|
||||
registrations: boolean
|
||||
approval_required: boolean
|
||||
invites_enabled?: boolean
|
||||
configuration: {
|
||||
statuses: {
|
||||
max_characters: number
|
||||
max_media_attachments?: number
|
||||
characters_reserved_per_url?: number
|
||||
}
|
||||
polls?: {
|
||||
max_options: number
|
||||
max_characters_per_option: number
|
||||
min_expiration: number
|
||||
max_expiration: number
|
||||
}
|
||||
}
|
||||
contact_account?: Account
|
||||
rules?: Array<InstanceRule>
|
||||
}
|
||||
|
||||
export type InstanceRule = {
|
||||
id: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
namespace Entity {
|
||||
export type List = {
|
||||
id: string;
|
||||
title: string;
|
||||
};
|
||||
export type List = {
|
||||
id: string
|
||||
title: string
|
||||
replies_policy: RepliesPolicy | null
|
||||
}
|
||||
|
||||
export type RepliesPolicy = 'followed' | 'list' | 'none'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
namespace Entity {
|
||||
export type Marker = {
|
||||
home?: {
|
||||
last_read_id: string;
|
||||
version: number;
|
||||
updated_at: string;
|
||||
};
|
||||
notifications?: {
|
||||
last_read_id: string;
|
||||
version: number;
|
||||
updated_at: string;
|
||||
unread_count?: number;
|
||||
};
|
||||
};
|
||||
export type Marker = {
|
||||
home?: {
|
||||
last_read_id: string
|
||||
version: number
|
||||
updated_at: string
|
||||
}
|
||||
notifications?: {
|
||||
last_read_id: string
|
||||
version: number
|
||||
updated_at: string
|
||||
unread_count?: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
namespace Entity {
|
||||
export type Mention = {
|
||||
id: string;
|
||||
username: string;
|
||||
url: string;
|
||||
acct: string;
|
||||
};
|
||||
export type Mention = {
|
||||
id: string
|
||||
username: string
|
||||
url: string
|
||||
acct: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,15 @@
|
|||
/// <reference path="status.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Notification = {
|
||||
account: Account;
|
||||
created_at: string;
|
||||
id: string;
|
||||
status?: Status;
|
||||
reaction?: Reaction;
|
||||
type: NotificationType;
|
||||
};
|
||||
export type Notification = {
|
||||
account: Account
|
||||
created_at: string
|
||||
id: string
|
||||
status?: Status
|
||||
emoji?: string
|
||||
type: NotificationType
|
||||
target?: Account
|
||||
}
|
||||
|
||||
export type NotificationType = string;
|
||||
export type NotificationType = string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/// <reference path="poll_option.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Poll = {
|
||||
id: string;
|
||||
expires_at: string | null;
|
||||
expired: boolean;
|
||||
multiple: boolean;
|
||||
votes_count: number;
|
||||
options: Array<PollOption>;
|
||||
voted: boolean;
|
||||
own_votes: Array<number>;
|
||||
};
|
||||
export type Poll = {
|
||||
id: string
|
||||
expires_at: string | null
|
||||
expired: boolean
|
||||
multiple: boolean
|
||||
votes_count: number
|
||||
options: Array<PollOption>
|
||||
voted: boolean
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Entity {
|
||||
export type PollOption = {
|
||||
title: string;
|
||||
votes_count: number | null;
|
||||
};
|
||||
export type PollOption = {
|
||||
title: string
|
||||
votes_count: number | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
namespace Entity {
|
||||
export type Preferences = {
|
||||
"posting:default:visibility": "public" | "unlisted" | "private" | "direct";
|
||||
"posting:default:sensitive": boolean;
|
||||
"posting:default:language": string | null;
|
||||
"reading:expand:media": "default" | "show_all" | "hide_all";
|
||||
"reading:expand:spoilers": boolean;
|
||||
};
|
||||
export type Preferences = {
|
||||
'posting:default:visibility': 'public' | 'unlisted' | 'private' | 'direct'
|
||||
'posting:default:sensitive': boolean
|
||||
'posting:default:language': string | null
|
||||
'reading:expand:media': 'default' | 'show_all' | 'hide_all'
|
||||
'reading:expand:spoilers': boolean
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
namespace Entity {
|
||||
export type Alerts = {
|
||||
follow: boolean;
|
||||
favourite: boolean;
|
||||
mention: boolean;
|
||||
reblog: boolean;
|
||||
poll: boolean;
|
||||
};
|
||||
export type Alerts = {
|
||||
follow: boolean
|
||||
favourite: boolean
|
||||
mention: boolean
|
||||
reblog: boolean
|
||||
poll: boolean
|
||||
}
|
||||
|
||||
export type PushSubscription = {
|
||||
id: string;
|
||||
endpoint: string;
|
||||
server_key: string;
|
||||
alerts: Alerts;
|
||||
};
|
||||
export type PushSubscription = {
|
||||
id: string
|
||||
endpoint: string
|
||||
server_key: string
|
||||
alerts: Alerts
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
/// <reference path="account.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Reaction = {
|
||||
count: number;
|
||||
me: boolean;
|
||||
name: string;
|
||||
url?: string;
|
||||
static_url?: string;
|
||||
accounts?: Array<Account>;
|
||||
};
|
||||
export type Reaction = {
|
||||
count: number
|
||||
me: boolean
|
||||
name: string
|
||||
accounts?: Array<Account>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
namespace Entity {
|
||||
export type Relationship = {
|
||||
id: string;
|
||||
following: boolean;
|
||||
followed_by: boolean;
|
||||
delivery_following?: boolean;
|
||||
blocking: boolean;
|
||||
blocked_by: boolean;
|
||||
muting: boolean;
|
||||
muting_notifications: boolean;
|
||||
requested: boolean;
|
||||
domain_blocking: boolean;
|
||||
showing_reblogs: boolean;
|
||||
endorsed: boolean;
|
||||
notifying: boolean;
|
||||
};
|
||||
export type Relationship = {
|
||||
id: string
|
||||
following: boolean
|
||||
followed_by: boolean
|
||||
blocking: boolean
|
||||
blocked_by: boolean
|
||||
muting: boolean
|
||||
muting_notifications: boolean
|
||||
requested: boolean
|
||||
domain_blocking: boolean
|
||||
showing_reblogs: boolean
|
||||
endorsed: boolean
|
||||
notifying: boolean
|
||||
note: string | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,18 @@
|
|||
/// <reference path="account.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Report = {
|
||||
id: string;
|
||||
action_taken: string;
|
||||
comment: string;
|
||||
account_id: string;
|
||||
status_ids: Array<string>;
|
||||
};
|
||||
export type Report = {
|
||||
id: string
|
||||
action_taken: boolean
|
||||
action_taken_at: string | null
|
||||
status_ids: Array<string> | null
|
||||
rule_ids: Array<string> | null
|
||||
// These parameters don't exist in Pleroma
|
||||
category: Category | null
|
||||
comment: string | null
|
||||
forwarded: boolean | null
|
||||
target_account?: Account | null
|
||||
}
|
||||
|
||||
export type Category = 'spam' | 'violation' | 'other'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
/// <reference path="tag.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Results = {
|
||||
accounts: Array<Account>;
|
||||
statuses: Array<Status>;
|
||||
hashtags: Array<Tag>;
|
||||
};
|
||||
export type Results = {
|
||||
accounts: Array<Account>
|
||||
statuses: Array<Status>
|
||||
hashtags: Array<Tag>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
5
packages/megalodon/src/entities/role.ts
Normal file
5
packages/megalodon/src/entities/role.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
namespace Entity {
|
||||
export type Role = {
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/// <reference path="attachment.ts" />
|
||||
/// <reference path="status_params.ts" />
|
||||
namespace Entity {
|
||||
export type ScheduledStatus = {
|
||||
id: string;
|
||||
scheduled_at: string;
|
||||
params: StatusParams;
|
||||
media_attachments: Array<Attachment>;
|
||||
};
|
||||
export type ScheduledStatus = {
|
||||
id: string
|
||||
scheduled_at: string
|
||||
params: StatusParams
|
||||
media_attachments: Array<Attachment> | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/// <reference path="field.ts" />
|
||||
namespace Entity {
|
||||
export type Source = {
|
||||
privacy: string | null;
|
||||
sensitive: boolean | null;
|
||||
language: string | null;
|
||||
note: string;
|
||||
fields: Array<Field>;
|
||||
};
|
||||
export type Source = {
|
||||
privacy: string | null
|
||||
sensitive: boolean | null
|
||||
language: string | null
|
||||
note: string
|
||||
fields: Array<Field>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace Entity {
|
||||
export type Stats = {
|
||||
user_count: number;
|
||||
status_count: number;
|
||||
domain_count: number;
|
||||
};
|
||||
export type Stats = {
|
||||
user_count: number
|
||||
status_count: number
|
||||
domain_count: number
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/// <reference path="account.ts" />
|
||||
/// <reference path="application.ts" />
|
||||
/// <reference path="mention.ts" />
|
||||
/// <reference path="tag.ts" />
|
||||
/// <reference path="attachment.ts" />
|
||||
/// <reference path="emoji.ts" />
|
||||
/// <reference path="card.ts" />
|
||||
|
|
@ -9,37 +8,42 @@
|
|||
/// <reference path="reaction.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Status = {
|
||||
id: string;
|
||||
uri: string;
|
||||
url: string;
|
||||
account: Account;
|
||||
in_reply_to_id: string | null;
|
||||
in_reply_to_account_id: string | null;
|
||||
reblog: Status | null;
|
||||
content: string;
|
||||
plain_content: string | null;
|
||||
created_at: string;
|
||||
emojis: Emoji[];
|
||||
replies_count: number;
|
||||
reblogs_count: number;
|
||||
favourites_count: number;
|
||||
reblogged: boolean | null;
|
||||
favourited: boolean | null;
|
||||
muted: boolean | null;
|
||||
sensitive: boolean;
|
||||
spoiler_text: string;
|
||||
visibility: "public" | "unlisted" | "private" | "direct";
|
||||
media_attachments: Array<Attachment>;
|
||||
mentions: Array<Mention>;
|
||||
tags: Array<Tag>;
|
||||
card: Card | null;
|
||||
poll: Poll | null;
|
||||
application: Application | null;
|
||||
language: string | null;
|
||||
pinned: boolean | null;
|
||||
reactions: Array<Reaction>;
|
||||
quote: Status | null;
|
||||
bookmarked: boolean;
|
||||
};
|
||||
export type Status = {
|
||||
id: string
|
||||
uri: string
|
||||
url: string
|
||||
account: Account
|
||||
in_reply_to_id: string | null
|
||||
in_reply_to_account_id: string | null
|
||||
reblog: Status | null
|
||||
content: string
|
||||
plain_content: string | null
|
||||
created_at: string
|
||||
emojis: Emoji[]
|
||||
replies_count: number
|
||||
reblogs_count: number
|
||||
favourites_count: number
|
||||
reblogged: boolean | null
|
||||
favourited: boolean | null
|
||||
muted: boolean | null
|
||||
sensitive: boolean
|
||||
spoiler_text: string
|
||||
visibility: 'public' | 'unlisted' | 'private' | 'direct'
|
||||
media_attachments: Array<Attachment>
|
||||
mentions: Array<Mention>
|
||||
tags: Array<StatusTag>
|
||||
card: Card | null
|
||||
poll: Poll | null
|
||||
application: Application | null
|
||||
language: string | null
|
||||
pinned: boolean | null
|
||||
emoji_reactions: Array<Reaction>
|
||||
quote: boolean
|
||||
bookmarked: boolean
|
||||
}
|
||||
|
||||
export type StatusTag = {
|
||||
name: string
|
||||
url: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
namespace Entity {
|
||||
export type StatusParams = {
|
||||
text: string;
|
||||
in_reply_to_id: string | null;
|
||||
media_ids: Array<string> | null;
|
||||
sensitive: boolean | null;
|
||||
spoiler_text: string | null;
|
||||
visibility: "public" | "unlisted" | "private" | "direct";
|
||||
scheduled_at: string | null;
|
||||
application_id: string;
|
||||
};
|
||||
export type StatusParams = {
|
||||
text: string
|
||||
in_reply_to_id: string | null
|
||||
media_ids: Array<string> | null
|
||||
sensitive: boolean | null
|
||||
spoiler_text: string | null
|
||||
visibility: 'public' | 'unlisted' | 'private' | 'direct' | null
|
||||
scheduled_at: string | null
|
||||
application_id: number | null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
packages/megalodon/src/entities/status_source.ts
Normal file
7
packages/megalodon/src/entities/status_source.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Entity {
|
||||
export type StatusSource = {
|
||||
id: string
|
||||
text: string
|
||||
spoiler_text: string
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/// <reference path="history.ts" />
|
||||
|
||||
namespace Entity {
|
||||
export type Tag = {
|
||||
name: string;
|
||||
url: string;
|
||||
history: Array<History> | null;
|
||||
following?: boolean;
|
||||
};
|
||||
export type Tag = {
|
||||
name: string
|
||||
url: string
|
||||
history: Array<History>
|
||||
following?: boolean
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
namespace Entity {
|
||||
export type Token = {
|
||||
access_token: string;
|
||||
token_type: string;
|
||||
scope: string;
|
||||
created_at: number;
|
||||
};
|
||||
export type Token = {
|
||||
access_token: string
|
||||
token_type: string
|
||||
scope: string
|
||||
created_at: number
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
namespace Entity {
|
||||
export type URLs = {
|
||||
streaming_api: string;
|
||||
};
|
||||
export type URLs = {
|
||||
streaming_api: string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue