Replace eslint and prettier with Biome

This commit is contained in:
Jesse Wierzbinski 2024-04-06 19:30:49 -10:00
parent 4a5a2ea590
commit af0d627f19
No known key found for this signature in database
199 changed files with 16493 additions and 16361 deletions

View file

@ -1,141 +1,141 @@
export type APActivityPubContext =
| "https://www.w3.org/ns/activitystreams"
| {
ostatus: string;
atomUri: string;
inReplyToAtomUri: string;
conversation: string;
sensitive: string;
toot: string;
votersCount: string;
litepub: string;
directMessage: string;
};
| "https://www.w3.org/ns/activitystreams"
| {
ostatus: string;
atomUri: string;
inReplyToAtomUri: string;
conversation: string;
sensitive: string;
toot: string;
votersCount: string;
litepub: string;
directMessage: string;
};
export interface APActivityPubObject {
id: string;
type: string;
summary?: string;
inReplyTo?: string;
published: string;
url: string;
attributedTo: string;
to: string[];
cc: string[];
sensitive?: boolean;
atomUri: string;
inReplyToAtomUri?: string;
conversation: string;
content: string;
contentMap: Record<string, string>;
attachment: APActivityPubAttachment[];
tag: APTag[];
context?: string;
quoteUri?: string;
quoteUrl?: string;
source?: {
content: string;
mediaType: string;
};
id: string;
type: string;
summary?: string;
inReplyTo?: string;
published: string;
url: string;
attributedTo: string;
to: string[];
cc: string[];
sensitive?: boolean;
atomUri: string;
inReplyToAtomUri?: string;
conversation: string;
content: string;
contentMap: Record<string, string>;
attachment: APActivityPubAttachment[];
tag: APTag[];
context?: string;
quoteUri?: string;
quoteUrl?: string;
source?: {
content: string;
mediaType: string;
};
}
export interface APActivityPubAttachment {
type?: string;
mediaType?: string;
url?: string;
name?: string;
type?: string;
mediaType?: string;
url?: string;
name?: string;
}
export interface APActivityPubCollection {
id: string;
type: string;
first?: {
type: string;
next: string;
partOf: string;
items: any[]; // replace any with your item type
};
export interface APActivityPubCollection<T> {
id: string;
type: string;
first?: {
type: string;
next: string;
partOf: string;
items: T[];
};
}
export interface APActivityPubNote extends APActivityPubObject {
type: "Note";
type: "Note";
}
export interface APActivityPubActivity {
"@context": APActivityPubContext[];
id: string;
type: string;
actor: string;
published: string;
to: string[];
cc: string[];
object: APActivityPubNote;
"@context": APActivityPubContext[];
id: string;
type: string;
actor: string;
published: string;
to: string[];
cc: string[];
object: APActivityPubNote;
}
export type APActorContext =
| "https://www.w3.org/ns/activitystreams"
| "https://w3id.org/security/v1"
| Record<
string,
| string
| { "@id": string; "@type": string }
| { "@container": string; "@id": string }
>;
| "https://www.w3.org/ns/activitystreams"
| "https://w3id.org/security/v1"
| Record<
string,
| string
| { "@id": string; "@type": string }
| { "@container": string; "@id": string }
>;
export interface APActorPublicKey {
id: string;
owner: string;
publicKeyPem: string;
id: string;
owner: string;
publicKeyPem: string;
}
export interface APActorEndpoints {
sharedInbox: string;
sharedInbox: string;
}
export interface APActorIcon {
type: string;
mediaType: string;
url: string;
type: string;
mediaType: string;
url: string;
}
export interface APActor {
"@context": APActorContext[];
id: string;
type: string;
following: string;
followers: string;
inbox: string;
outbox: string;
featured: string;
featuredTags: string;
preferredUsername: string;
name: string;
summary: string;
url: string;
manuallyApprovesFollowers: boolean;
discoverable: boolean;
indexable: boolean;
published: string;
memorial: boolean;
devices: string;
publicKey: APActorPublicKey;
tag: APTag[];
attachment: APAttachment[];
endpoints: APActorEndpoints;
icon: APActorIcon;
"@context": APActorContext[];
id: string;
type: string;
following: string;
followers: string;
inbox: string;
outbox: string;
featured: string;
featuredTags: string;
preferredUsername: string;
name: string;
summary: string;
url: string;
manuallyApprovesFollowers: boolean;
discoverable: boolean;
indexable: boolean;
published: string;
memorial: boolean;
devices: string;
publicKey: APActorPublicKey;
tag: APTag[];
attachment: APAttachment[];
endpoints: APActorEndpoints;
icon: APActorIcon;
}
export interface APTag {
type: string;
href: string;
name: string;
type: string;
href: string;
name: string;
}
export interface APAttachment {
type: string;
mediaType: string;
url: string;
name?: string;
blurhash?: string;
description?: string;
type: string;
mediaType: string;
url: string;
name?: string;
blurhash?: string;
description?: string;
}

View file

@ -1,13 +1,13 @@
export interface APIRouteMeta {
allowedMethods: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
ratelimits: {
max: number;
duration: number;
};
route: string;
auth: {
required: boolean;
requiredOnMethods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
oauthPermissions?: string[];
};
allowedMethods: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
ratelimits: {
max: number;
duration: number;
};
route: string;
auth: {
required: boolean;
requiredOnMethods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
oauthPermissions?: string[];
};
}

View file

@ -4,32 +4,32 @@ import type { APIRole } from "./role";
import type { APISource } from "./source";
export interface APIAccount {
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: APIEmoji[];
moved: APIAccount | null;
fields: APIField[];
bot: boolean;
source?: APISource;
role?: APIRole;
mute_expires_at?: string;
pleroma?: any;
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: APIEmoji[];
moved: APIAccount | null;
fields: APIField[];
bot: boolean;
source?: APISource;
role?: APIRole;
mute_expires_at?: string;
pleroma?: object;
}

View file

@ -1,6 +1,6 @@
export interface APIActivity {
week: string;
statuses: string;
logins: string;
registrations: string;
week: string;
statuses: string;
logins: string;
registrations: string;
}

View file

@ -2,38 +2,38 @@ import type { APIEmoji } from "./emoji";
import type { APIStatusTag } from "./status";
export interface APIAnnouncement {
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 | null;
mentions: AnnouncementAccount[];
statuses: AnnouncementStatus[];
tags: APIStatusTag[];
emojis: APIEmoji[];
reactions: AnnouncementReaction[];
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 | null;
mentions: AnnouncementAccount[];
statuses: AnnouncementStatus[];
tags: APIStatusTag[];
emojis: APIEmoji[];
reactions: AnnouncementReaction[];
}
export interface AnnouncementAccount {
id: string;
username: string;
url: string;
acct: string;
id: string;
username: string;
url: string;
acct: string;
}
export interface AnnouncementStatus {
id: string;
url: string;
id: string;
url: string;
}
export interface AnnouncementReaction {
name: string;
count: number;
me: boolean | null;
url: string | null;
static_url: string | null;
name: string;
count: number;
me: boolean | null;
url: string | null;
static_url: string | null;
}

View file

@ -1,5 +1,5 @@
export interface APIApplication {
name: string;
website?: string | null;
vapid_key?: string | null;
name: string;
website?: string | null;
vapid_key?: string | null;
}

View file

@ -1,13 +1,13 @@
import type { APIMeta } from "./attachment";
export interface APIAsyncAttachment {
id: string;
type: "unknown" | "image" | "gifv" | "video" | "audio";
url: string | null;
remote_url: string | null;
preview_url: string;
text_url: string | null;
meta: APIMeta | null;
description: string | null;
blurhash: string | null;
id: string;
type: "unknown" | "image" | "gifv" | "video" | "audio";
url: string | null;
remote_url: string | null;
preview_url: string;
text_url: string | null;
meta: APIMeta | null;
description: string | null;
blurhash: string | null;
}

View file

@ -1,47 +1,47 @@
export interface APISub {
// For Image, Gifv, and Video
width?: number;
height?: number;
size?: string;
aspect?: number;
// 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 interface APIFocus {
x: number;
y: number;
x: number;
y: number;
}
export interface APIMeta {
original?: APISub;
small?: APISub;
focus?: APIFocus;
length?: string;
duration?: number;
fps?: number;
size?: string;
width?: number;
height?: number;
aspect?: number;
audio_encode?: string;
audio_bitrate?: string;
audio_channel?: string;
original?: APISub;
small?: APISub;
focus?: APIFocus;
length?: string;
duration?: number;
fps?: number;
size?: string;
width?: number;
height?: number;
aspect?: number;
audio_encode?: string;
audio_bitrate?: string;
audio_channel?: string;
}
export interface APIAttachment {
id: string;
type: "unknown" | "image" | "gifv" | "video" | "audio";
url: string;
remote_url: string | null;
preview_url: string | null;
text_url: string | null;
meta: APIMeta | null;
description: string | null;
blurhash: string | null;
id: string;
type: "unknown" | "image" | "gifv" | "video" | "audio";
url: string;
remote_url: string | null;
preview_url: string | null;
text_url: string | null;
meta: APIMeta | null;
description: string | null;
blurhash: string | null;
}

View file

@ -1,16 +1,16 @@
export interface APICard {
url: string;
title: string;
description: string;
type: "link" | "photo" | "video" | "rich";
image: string | null;
author_name: string;
author_url: string;
provider_name: string;
provider_url: string;
html: string;
width: number;
height: number;
embed_url: string;
blurhash: string | null;
url: string;
title: string;
description: string;
type: "link" | "photo" | "video" | "rich";
image: string | null;
author_name: string;
author_url: string;
provider_name: string;
provider_url: string;
html: string;
width: number;
height: number;
embed_url: string;
blurhash: string | null;
}

View file

@ -1,6 +1,6 @@
import type { APIStatus } from "./status";
export interface APIContext {
ancestors: APIStatus[];
descendants: APIStatus[];
ancestors: APIStatus[];
descendants: APIStatus[];
}

View file

@ -2,8 +2,8 @@ import type { APIAccount } from "./account";
import type { APIStatus } from "./status";
export interface APIConversation {
id: string;
accounts: APIAccount[];
last_status: APIStatus | null;
unread: boolean;
id: string;
accounts: APIAccount[];
last_status: APIStatus | null;
unread: boolean;
}

View file

@ -1,7 +1,7 @@
export interface APIEmoji {
shortcode: string;
static_url: string;
url: string;
visible_in_picker: boolean;
category?: string;
shortcode: string;
static_url: string;
url: string;
visible_in_picker: boolean;
category?: string;
}

View file

@ -1,6 +1,6 @@
export interface APIFeaturedTag {
id: string;
name: string;
statuses_count: number;
last_status_at: string;
id: string;
name: string;
statuses_count: number;
last_status_at: string;
}

View file

@ -1,5 +1,5 @@
export interface APIField {
name: string;
value: string;
verified_at: string | null;
name: string;
value: string;
verified_at: string | null;
}

View file

@ -1,10 +1,10 @@
export interface APIFilter {
id: string;
phrase: string;
context: FilterContext[];
expires_at: string | null;
irreversible: boolean;
whole_word: boolean;
id: string;
phrase: string;
context: FilterContext[];
expires_at: string | null;
irreversible: boolean;
whole_word: boolean;
}
export type FilterContext = string;

View file

@ -1,5 +1,5 @@
export interface APIHistory {
day: string;
uses: number;
accounts: number;
day: string;
uses: number;
accounts: number;
}

View file

@ -1,7 +1,7 @@
export interface APIIdentityProof {
provider: string;
provider_username: string;
updated_at: string;
proof_url: string;
profile_url: string;
provider: string;
provider_username: string;
updated_at: string;
proof_url: string;
profile_url: string;
}

View file

@ -3,46 +3,46 @@ import type { APIStats } from "./stats";
import type { APIURLs } from "./urls";
export interface APIInstance {
tos_url: string | undefined;
uri: string;
title: string;
description: string;
email: string;
version: string;
thumbnail: string | null;
urls: APIURLs;
stats: APIStats;
languages: string[];
registrations: boolean;
approval_required: boolean;
invites_enabled: boolean;
max_toot_chars?: number;
configuration: {
statuses: {
max_characters: number;
max_media_attachments: number;
characters_reserved_per_url: number;
};
media_attachments: {
supported_mime_types: 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;
};
};
contact_account: APIAccount;
rules: APIInstanceRule[];
tos_url: string | undefined;
uri: string;
title: string;
description: string;
email: string;
version: string;
thumbnail: string | null;
urls: APIURLs;
stats: APIStats;
languages: string[];
registrations: boolean;
approval_required: boolean;
invites_enabled: boolean;
max_toot_chars?: number;
configuration: {
statuses: {
max_characters: number;
max_media_attachments: number;
characters_reserved_per_url: number;
};
media_attachments: {
supported_mime_types: 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;
};
};
contact_account: APIAccount;
rules: APIInstanceRule[];
}
export interface APIInstanceRule {
id: string;
text: string;
id: string;
text: string;
}

View file

@ -1,7 +1,7 @@
export interface APIList {
id: string;
title: string;
replies_policy: APIRepliesPolicy;
id: string;
title: string;
replies_policy: APIRepliesPolicy;
}
export type APIRepliesPolicy = "followed" | "list" | "none";

View file

@ -1,12 +1,12 @@
export interface APIMarker {
home: {
last_read_id: string;
version: number;
updated_at: string;
};
notifications: {
last_read_id: string;
version: number;
updated_at: string;
};
home: {
last_read_id: string;
version: number;
updated_at: string;
};
notifications: {
last_read_id: string;
version: number;
updated_at: string;
};
}

View file

@ -1,6 +1,6 @@
export interface APIMention {
id: string;
username: string;
url: string;
acct: string;
id: string;
username: string;
url: string;
acct: string;
}

View file

@ -2,11 +2,11 @@ import type { APIAccount } from "./account";
import type { APIStatus } from "./status";
export interface APINotification {
account: APIAccount;
created_at: string;
id: string;
status?: APIStatus;
type: APINotificationType;
account: APIAccount;
created_at: string;
id: string;
status?: APIStatus;
type: APINotificationType;
}
export type APINotificationType = string;

View file

@ -1,11 +1,11 @@
import type { APIPollOption } from "./poll_option";
export interface APIPoll {
id: string;
expires_at: string | null;
expired: boolean;
multiple: boolean;
votes_count: number;
options: APIPollOption[];
voted: boolean;
id: string;
expires_at: string | null;
expired: boolean;
multiple: boolean;
votes_count: number;
options: APIPollOption[];
voted: boolean;
}

View file

@ -1,4 +1,4 @@
export interface APIPollOption {
title: string;
votes_count: number | null;
title: string;
votes_count: number | null;
}

View file

@ -1,7 +1,7 @@
export interface APIPreferences {
"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;
"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;
}

View file

@ -1,14 +1,14 @@
export interface APIAlerts {
follow: boolean;
favourite: boolean;
mention: boolean;
reblog: boolean;
poll: boolean;
follow: boolean;
favourite: boolean;
mention: boolean;
reblog: boolean;
poll: boolean;
}
export interface APIPushSubscription {
id: string;
endpoint: string;
server_key: string;
alerts: APIAlerts;
id: string;
endpoint: string;
server_key: string;
alerts: APIAlerts;
}

View file

@ -1,16 +1,16 @@
export interface APIRelationship {
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;
languages: string[];
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;
languages: string[];
}

View file

@ -1,15 +1,15 @@
import type { APIAccount } from "./account";
export interface APIReport {
id: string;
action_taken: boolean;
action_taken_at: string | null;
category: APICategory;
comment: string;
forwarded: boolean;
status_ids: string[] | null;
rule_ids: string[] | null;
target_account: APIAccount;
id: string;
action_taken: boolean;
action_taken_at: string | null;
category: APICategory;
comment: string;
forwarded: boolean;
status_ids: string[] | null;
rule_ids: string[] | null;
target_account: APIAccount;
}
export type APICategory = "spam" | "violation" | "other";

View file

@ -3,7 +3,7 @@ import type { APIStatus } from "./status";
import type { APITag } from "./tag";
export interface APIResults {
accounts: APIAccount[];
statuses: APIStatus[];
hashtags: APITag[];
accounts: APIAccount[];
statuses: APIStatus[];
hashtags: APITag[];
}

View file

@ -1,3 +1,3 @@
export interface APIRole {
name: string;
name: string;
}

View file

@ -2,8 +2,8 @@ import type { APIAttachment } from "./attachment";
import type { APIStatusParams } from "./status_params";
export interface APIScheduledStatus {
id: string;
scheduled_at: string;
params: APIStatusParams;
media_attachments: APIAttachment[];
id: string;
scheduled_at: string;
params: APIStatusParams;
media_attachments: APIAttachment[];
}

View file

@ -1,9 +1,9 @@
import type { APIField } from "./field";
export interface APISource {
privacy: string | null;
sensitive: boolean | null;
language: string | null;
note: string;
fields: APIField[];
privacy: string | null;
sensitive: boolean | null;
language: string | null;
note: string;
fields: APIField[];
}

View file

@ -1,5 +1,5 @@
export interface APIStats {
user_count: number;
status_count: number;
domain_count: number;
user_count: number;
status_count: number;
domain_count: number;
}

View file

@ -7,40 +7,40 @@ import type { APIMention } from "./mention";
import type { APIPoll } from "./poll";
export interface APIStatus {
id: string;
uri: string;
url: string;
account: APIAccount;
in_reply_to_id: string | null;
in_reply_to_account_id: string | null;
reblog: APIStatus | null;
content: string;
created_at: string;
emojis: APIEmoji[];
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: APIAttachment[];
mentions: APIMention[];
tags: APIStatusTag[];
card: APICard | null;
poll: APIPoll | null;
application: APIApplication | null;
language: string | null;
pinned: boolean | null;
bookmarked?: boolean;
// These parameters are unique parameters in fedibird.com for quote.
quote_id?: string;
quote?: APIStatus | null;
id: string;
uri: string;
url: string;
account: APIAccount;
in_reply_to_id: string | null;
in_reply_to_account_id: string | null;
reblog: APIStatus | null;
content: string;
created_at: string;
emojis: APIEmoji[];
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: APIAttachment[];
mentions: APIMention[];
tags: APIStatusTag[];
card: APICard | null;
poll: APIPoll | null;
application: APIApplication | null;
language: string | null;
pinned: boolean | null;
bookmarked?: boolean;
// These parameters are unique parameters in fedibird.com for quote.
quote_id?: string;
quote?: APIStatus | null;
}
export interface APIStatusTag {
name: string;
url: string;
name: string;
url: string;
}

View file

@ -1,10 +1,10 @@
export interface APIStatusParams {
text: string;
in_reply_to_id: string | null;
media_ids: string[] | null;
sensitive: boolean | null;
spoiler_text: string | null;
visibility: "public" | "unlisted" | "private" | "direct" | null;
scheduled_at: string | null;
application_id: number;
text: string;
in_reply_to_id: string | null;
media_ids: string[] | null;
sensitive: boolean | null;
spoiler_text: string | null;
visibility: "public" | "unlisted" | "private" | "direct" | null;
scheduled_at: string | null;
application_id: number;
}

View file

@ -1,5 +1,5 @@
export interface APIStatusSource {
id: string;
text: string;
spoiler_text: string;
id: string;
text: string;
spoiler_text: string;
}

View file

@ -1,8 +1,8 @@
import type { APIHistory } from "./history";
export interface APITag {
name: string;
url: string;
history: APIHistory[];
following?: boolean;
name: string;
url: string;
history: APIHistory[];
following?: boolean;
}

View file

@ -1,6 +1,6 @@
export interface APIToken {
access_token: string;
token_type: string;
scope: string;
created_at: number;
access_token: string;
token_type: string;
scope: string;
created_at: number;
}

View file

@ -1,3 +1,3 @@
export interface APIURLs {
streaming_api: string;
streaming_api: string;
}

View file

@ -1,6 +1,6 @@
import type { LysandObjectType } from "./Object";
export interface ExtensionType extends LysandObjectType {
type: "Extension";
extension_type: string;
type: "Extension";
extension_type: string;
}

View file

@ -1,177 +1,177 @@
import type { Emoji } from "./extensions/org.lysand/custom_emojis";
export interface LysandObjectType {
type: string;
id: string; // Either a UUID or some kind of time-based UUID-compatible system
uri: string; // URI to the note
created_at: string;
extensions?: {
// Should be in the format
// "organization:extension_name": value
// Example: "org.joinmastodon:spoiler_text": "This is a spoiler!"
"org.lysand:custom_emojis"?: {
emojis: Emoji[];
};
"org.lysand:reactions"?: {
reactions: string;
};
"org.lysand:polls"?: {
poll: {
options: ContentFormat[][];
votes: number[];
expires_at: string;
multiple_choice: boolean;
};
};
type: string;
id: string; // Either a UUID or some kind of time-based UUID-compatible system
uri: string; // URI to the note
created_at: string;
extensions?: {
// Should be in the format
// "organization:extension_name": value
// Example: "org.joinmastodon:spoiler_text": "This is a spoiler!"
"org.lysand:custom_emojis"?: {
emojis: Emoji[];
};
"org.lysand:reactions"?: {
reactions: string;
};
"org.lysand:polls"?: {
poll: {
options: ContentFormat[][];
votes: number[];
expires_at: string;
multiple_choice: boolean;
};
};
[key: string]: any;
};
[key: string]: Record<string, unknown> | undefined;
};
}
export interface ActorPublicKeyData {
public_key: string;
actor: string;
public_key: string;
actor: string;
}
export interface Collection<T> {
first: string;
last: string;
next?: string;
prev?: string;
items: T[];
first: string;
last: string;
next?: string;
prev?: string;
items: T[];
}
export interface LysandUser extends LysandObjectType {
type: "User";
bio: ContentFormat[];
type: "User";
bio: ContentFormat[];
inbox: string;
outbox: string;
followers: string;
following: string;
liked: string;
disliked: string;
featured: string;
inbox: string;
outbox: string;
followers: string;
following: string;
liked: string;
disliked: string;
featured: string;
indexable: boolean;
fields?: {
key: ContentFormat[];
value: ContentFormat[];
}[];
display_name?: string;
public_key?: ActorPublicKeyData;
username: string;
avatar?: ContentFormat[];
header?: ContentFormat[];
indexable: boolean;
fields?: {
key: ContentFormat[];
value: ContentFormat[];
}[];
display_name?: string;
public_key?: ActorPublicKeyData;
username: string;
avatar?: ContentFormat[];
header?: ContentFormat[];
}
export interface LysandPublication extends LysandObjectType {
type: "Note" | "Patch";
author: string;
contents: ContentFormat[];
mentions: string[];
replies_to: string[];
quotes: string[];
is_sensitive: boolean;
subject: string;
attachments: ContentFormat[][];
type: "Note" | "Patch";
author: string;
contents: ContentFormat[];
mentions: string[];
replies_to: string[];
quotes: string[];
is_sensitive: boolean;
subject: string;
attachments: ContentFormat[][];
}
export interface LysandAction extends LysandObjectType {
type:
| "Like"
| "Dislike"
| "Follow"
| "FollowAccept"
| "FollowReject"
| "Announce"
| "Undo"
| "Extension";
author: string;
type:
| "Like"
| "Dislike"
| "Follow"
| "FollowAccept"
| "FollowReject"
| "Announce"
| "Undo"
| "Extension";
author: string;
}
/**
* A Note is a publication on the network, such as a post or comment
*/
export interface Note extends LysandPublication {
type: "Note";
type: "Note";
}
/**
* A Patch is an edit to a Note
*/
export interface Patch extends LysandPublication {
type: "Patch";
patched_id: string;
patched_at: string;
type: "Patch";
patched_id: string;
patched_at: string;
}
export interface Like extends LysandAction {
type: "Like";
object: string;
type: "Like";
object: string;
}
export interface Dislike extends LysandAction {
type: "Dislike";
object: string;
type: "Dislike";
object: string;
}
export interface Announce extends LysandAction {
type: "Announce";
object: string;
type: "Announce";
object: string;
}
export interface Undo extends LysandAction {
type: "Undo";
object: string;
type: "Undo";
object: string;
}
export interface Follow extends LysandAction {
type: "Follow";
followee: string;
type: "Follow";
followee: string;
}
export interface FollowAccept extends LysandAction {
type: "FollowAccept";
follower: string;
type: "FollowAccept";
follower: string;
}
export interface FollowReject extends LysandAction {
type: "FollowReject";
follower: string;
type: "FollowReject";
follower: string;
}
export interface ServerMetadata extends LysandObjectType {
type: "ServerMetadata";
name: string;
version?: string;
description?: string;
website?: string;
moderators?: string[];
admins?: string[];
logo?: ContentFormat[];
banner?: ContentFormat[];
supported_extensions?: string[];
type: "ServerMetadata";
name: string;
version?: string;
description?: string;
website?: string;
moderators?: string[];
admins?: string[];
logo?: ContentFormat[];
banner?: ContentFormat[];
supported_extensions?: string[];
}
/**
* Content format is an array of objects that contain the content and the content type.
*/
export interface ContentFormat {
content: string;
content_type: string;
description?: string;
size?: number;
hash?: {
md5?: string;
sha1?: string;
sha256?: string;
sha512?: string;
[key: string]: string | undefined;
};
blurhash?: string;
fps?: number;
width?: number;
height?: number;
duration?: number;
content: string;
content_type: string;
description?: string;
size?: number;
hash?: {
md5?: string;
sha1?: string;
sha256?: string;
sha512?: string;
[key: string]: string | undefined;
};
blurhash?: string;
fps?: number;
width?: number;
height?: number;
duration?: number;
}

View file

@ -1,7 +1,7 @@
import type { ContentFormat } from "../../Object";
export interface Emoji {
name: string;
url: ContentFormat[];
alt?: string;
name: string;
url: ContentFormat[];
alt?: string;
}

View file

@ -1,14 +1,14 @@
import type { ExtensionType } from "../../Extension";
export interface OrgLysandPollsVoteType extends ExtensionType {
extension_type: "org.lysand:polls/Vote";
author: string;
poll: string;
option: number;
extension_type: "org.lysand:polls/Vote";
author: string;
poll: string;
option: number;
}
export interface OrgLysandPollsVoteResultType extends ExtensionType {
extension_type: "org.lysand:polls/VoteResult";
poll: string;
votes: number[];
extension_type: "org.lysand:polls/VoteResult";
poll: string;
votes: number[];
}

View file

@ -1,8 +1,8 @@
import type { ExtensionType } from "../../Extension";
export interface OrgLysandReactionsType extends ExtensionType {
extension_type: "org.lysand:reactions/Reaction";
author: string;
object: string;
content: string;
extension_type: "org.lysand:reactions/Reaction";
author: string;
object: string;
content: string;
}