@cutls/megalodon
Version:
Mastodon, Pleroma, Misskey API client for node.js and browser
92 lines (91 loc) • 2.25 kB
TypeScript
import { Account } from './account.js';
export type InstanceRule = {
id: string;
text: string;
hint?: string;
translations?: Record<string, {
text: string;
hint: string;
}>;
};
export type Instance = {
domain: string;
title: string;
version: string;
source_url: string;
description: string;
usage: {
users: {
active_month: number;
};
};
thumbnail: {
url: string;
blurhash?: string;
versions?: {
'@1x'?: string;
'@2x'?: string;
};
};
icon?: Array<{
src: string;
size: string;
}>;
languages: string[];
configuration: {
urls: {
streaming: string;
status?: string | null;
about?: string;
privacy_policy?: string | null;
terms_of_service?: string | null;
};
vapid?: {
public_key: string;
};
accounts: {
max_featured_tags: number;
max_pinned_statuses?: number;
};
statuses: {
max_characters: number;
max_media_attachments: number;
characters_reserved_per_url: number;
};
media_attachments: {
supported_mime_types: string[];
description_limit?: number;
image_size_limit: number;
image_matrix_limit: number;
video_size_limit: number;
video_frame_rate_limit: number;
video_matrix_limit: number;
};
polls: {
max_options: number;
max_characters_per_option: number;
min_expiration: number;
max_expiration: number;
};
translation: {
enabled: boolean;
};
limited_federation?: boolean;
};
registrations: {
enabled: boolean;
approval_required: boolean;
message: string | null;
min_age?: number | null;
reason_required?: boolean | null;
url?: string | null;
};
api_versions?: {
mastodon: number;
};
contact: {
email: string;
account: Account | null;
};
rules: InstanceRule[];
};