2024-04-12 04:59:44 +02:00
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
|
2024-04-25 07:49:32 +02:00
|
|
|
export const SECOND: number
|
|
|
|
export const MINUTE: number
|
|
|
|
export const HOUR: number
|
|
|
|
export const DAY: number
|
|
|
|
export const USER_ONLINE_THRESHOLD: number
|
|
|
|
export const USER_ACTIVE_THRESHOLD: number
|
|
|
|
/**
|
|
|
|
* List of file types allowed to be viewed directly in the browser
|
|
|
|
* Anything not included here will be responded as application/octet-stream
|
|
|
|
* SVG is not allowed because it generates XSS <- we need to fix this and later allow it to be viewed directly
|
2024-05-24 15:20:40 +02:00
|
|
|
* * <https://github.com/sindresorhus/file-type/blob/main/supported.js>
|
|
|
|
* * <https://github.com/sindresorhus/file-type/blob/main/core.js>
|
|
|
|
* * <https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers>
|
2024-04-25 07:49:32 +02:00
|
|
|
*/
|
|
|
|
export const FILE_TYPE_BROWSERSAFE: string[]
|
2024-04-15 10:28:20 +02:00
|
|
|
export interface EnvConfig {
|
|
|
|
onlyQueue: boolean
|
|
|
|
onlyServer: boolean
|
|
|
|
noDaemons: boolean
|
|
|
|
disableClustering: boolean
|
|
|
|
verbose: boolean
|
|
|
|
withLogTime: boolean
|
|
|
|
slow: boolean
|
|
|
|
}
|
2024-04-19 19:07:08 +02:00
|
|
|
export function loadEnv(): EnvConfig
|
2024-04-12 07:25:27 +02:00
|
|
|
export interface ServerConfig {
|
|
|
|
url: string
|
|
|
|
port: number
|
2024-05-27 13:59:23 +02:00
|
|
|
/** the host address to bind to */
|
2024-04-12 07:25:27 +02:00
|
|
|
bind?: string
|
|
|
|
disableHsts?: boolean
|
2024-05-27 13:59:23 +02:00
|
|
|
/** PostgreSQL configurations */
|
2024-04-12 07:25:27 +02:00
|
|
|
db: DbConfig
|
2024-05-27 13:59:23 +02:00
|
|
|
/** Redis configurations */
|
2024-04-12 07:25:27 +02:00
|
|
|
redis: RedisConfig
|
2024-05-27 13:59:23 +02:00
|
|
|
/** secondary Redis server configurations */
|
2024-04-12 07:25:27 +02:00
|
|
|
cacheServer?: RedisConfig
|
2024-05-27 13:59:23 +02:00
|
|
|
/** proxy host used for HTTP requests */
|
2024-04-12 07:25:27 +02:00
|
|
|
proxy?: string
|
2024-05-27 13:59:23 +02:00
|
|
|
/** proxy host used for SMTP requests */
|
2024-04-12 07:25:27 +02:00
|
|
|
proxySmtp?: string
|
2024-05-27 13:59:23 +02:00
|
|
|
/** hosts to bypass the proxy */
|
2024-04-12 07:25:27 +02:00
|
|
|
proxyBypassHosts?: Array<string>
|
|
|
|
allowedPrivateNetworks?: Array<string>
|
2024-05-27 13:59:23 +02:00
|
|
|
/** maximum file size that can be uploaded to the drive (in bytes) */
|
2024-04-12 07:25:27 +02:00
|
|
|
maxFileSize?: number
|
|
|
|
accessLog?: string
|
2024-04-19 19:17:03 +02:00
|
|
|
clusterLimits?: WorkerConfigInternal
|
2024-04-12 07:25:27 +02:00
|
|
|
cuid?: IdConfig
|
|
|
|
outgoingAddress?: string
|
|
|
|
deliverJobConcurrency?: number
|
|
|
|
inboxJobConcurrency?: number
|
|
|
|
deliverJobPerSec?: number
|
|
|
|
inboxJobPerSec?: number
|
|
|
|
deliverJobMaxAttempts?: number
|
|
|
|
inboxJobMaxAttempts?: number
|
2024-05-27 13:59:23 +02:00
|
|
|
/** deprecated in favor of `max_log_level` */
|
2024-04-12 07:25:27 +02:00
|
|
|
logLevel?: Array<string>
|
2024-05-27 13:59:23 +02:00
|
|
|
/** verbosity of the server log. `error`, `warn`, `info`, `debug`, or `trace` */
|
2024-04-24 19:18:37 +02:00
|
|
|
maxLogLevel?: string
|
2024-04-12 07:25:27 +02:00
|
|
|
syslog?: SysLogConfig
|
|
|
|
proxyRemoteFiles?: boolean
|
|
|
|
mediaProxy?: string
|
|
|
|
summalyProxyUrl?: string
|
|
|
|
reservedUsernames?: Array<string>
|
|
|
|
maxUserSignups?: number
|
|
|
|
isManagedHosting?: boolean
|
|
|
|
maxNoteLength?: number
|
|
|
|
maxCaptionLength?: number
|
|
|
|
deepl?: DeepLConfig
|
|
|
|
libreTranslate?: LibreTranslateConfig
|
|
|
|
email?: EmailConfig
|
|
|
|
objectStorage?: ObjectStorageConfig
|
|
|
|
}
|
|
|
|
export interface DbConfig {
|
|
|
|
host: string
|
|
|
|
port: number
|
|
|
|
db: string
|
|
|
|
user: string
|
|
|
|
pass: string
|
|
|
|
disableCache?: boolean
|
|
|
|
extra?: any
|
|
|
|
}
|
|
|
|
export interface RedisConfig {
|
|
|
|
host: string
|
|
|
|
port: number
|
|
|
|
family?: number
|
|
|
|
user?: string
|
|
|
|
pass?: string
|
|
|
|
tls?: TlsConfig
|
|
|
|
db: number
|
2024-04-19 23:52:27 +02:00
|
|
|
prefix?: string
|
2024-04-12 07:25:27 +02:00
|
|
|
}
|
|
|
|
export interface TlsConfig {
|
|
|
|
host: string
|
|
|
|
rejectUnauthorized: boolean
|
|
|
|
}
|
2024-04-19 19:07:08 +02:00
|
|
|
export interface WorkerConfig {
|
|
|
|
web: number
|
|
|
|
queue: number
|
|
|
|
}
|
2024-04-19 19:17:03 +02:00
|
|
|
export interface WorkerConfigInternal {
|
2024-04-12 07:25:27 +02:00
|
|
|
web?: number
|
|
|
|
queue?: number
|
|
|
|
}
|
|
|
|
export interface IdConfig {
|
|
|
|
length?: number
|
|
|
|
fingerprint?: string
|
|
|
|
}
|
|
|
|
export interface SysLogConfig {
|
|
|
|
host: string
|
|
|
|
port: number
|
|
|
|
}
|
|
|
|
export interface DeepLConfig {
|
|
|
|
managed?: boolean
|
|
|
|
authKey?: string
|
|
|
|
isPro?: boolean
|
|
|
|
}
|
|
|
|
export interface LibreTranslateConfig {
|
|
|
|
managed?: boolean
|
|
|
|
apiUrl?: string
|
|
|
|
apiKey?: string
|
|
|
|
}
|
|
|
|
export interface EmailConfig {
|
|
|
|
managed?: boolean
|
|
|
|
address?: string
|
|
|
|
host?: string
|
|
|
|
port?: number
|
|
|
|
user?: string
|
|
|
|
pass?: string
|
|
|
|
useImplicitSslTls?: boolean
|
|
|
|
}
|
|
|
|
export interface ObjectStorageConfig {
|
|
|
|
managed?: boolean
|
|
|
|
baseUrl?: string
|
|
|
|
bucket?: string
|
|
|
|
prefix?: string
|
|
|
|
endpoint?: string
|
|
|
|
region?: string
|
|
|
|
accessKey?: string
|
|
|
|
secretKey?: string
|
|
|
|
useSsl?: boolean
|
|
|
|
connnectOverProxy?: boolean
|
|
|
|
setPublicReadOnUpload?: boolean
|
|
|
|
s3ForcePathStyle?: boolean
|
|
|
|
}
|
2024-04-19 19:07:08 +02:00
|
|
|
export interface Config {
|
|
|
|
url: string
|
|
|
|
port: number
|
|
|
|
bind?: string
|
|
|
|
disableHsts?: boolean
|
|
|
|
db: DbConfig
|
|
|
|
redis: RedisConfig
|
|
|
|
cacheServer?: RedisConfig
|
|
|
|
proxy?: string
|
|
|
|
proxySmtp?: string
|
|
|
|
proxyBypassHosts?: Array<string>
|
|
|
|
allowedPrivateNetworks?: Array<string>
|
|
|
|
maxFileSize?: number
|
|
|
|
accessLog?: string
|
|
|
|
clusterLimits: WorkerConfig
|
|
|
|
cuid?: IdConfig
|
|
|
|
outgoingAddress?: string
|
|
|
|
deliverJobConcurrency?: number
|
|
|
|
inboxJobConcurrency?: number
|
|
|
|
deliverJobPerSec?: number
|
|
|
|
inboxJobPerSec?: number
|
|
|
|
deliverJobMaxAttempts?: number
|
|
|
|
inboxJobMaxAttempts?: number
|
2024-04-24 19:18:37 +02:00
|
|
|
/** deprecated */
|
2024-04-19 19:07:08 +02:00
|
|
|
logLevel?: Array<string>
|
2024-04-24 19:18:37 +02:00
|
|
|
maxLogLevel?: string
|
2024-04-19 19:07:08 +02:00
|
|
|
syslog?: SysLogConfig
|
|
|
|
proxyRemoteFiles?: boolean
|
|
|
|
mediaProxy?: string
|
|
|
|
summalyProxyUrl?: string
|
|
|
|
reservedUsernames?: Array<string>
|
|
|
|
maxUserSignups?: number
|
|
|
|
isManagedHosting?: boolean
|
2024-04-25 07:49:32 +02:00
|
|
|
maxNoteLength: number
|
|
|
|
maxCaptionLength: number
|
2024-04-19 19:07:08 +02:00
|
|
|
deepl?: DeepLConfig
|
|
|
|
libreTranslate?: LibreTranslateConfig
|
|
|
|
email?: EmailConfig
|
|
|
|
objectStorage?: ObjectStorageConfig
|
|
|
|
version: string
|
|
|
|
host: string
|
|
|
|
hostname: string
|
2024-04-19 23:52:27 +02:00
|
|
|
redisKeyPrefix: string
|
2024-04-19 19:07:08 +02:00
|
|
|
scheme: string
|
|
|
|
wsScheme: string
|
|
|
|
apiUrl: string
|
|
|
|
wsUrl: string
|
|
|
|
authUrl: string
|
|
|
|
driveUrl: string
|
|
|
|
userAgent: string
|
|
|
|
}
|
|
|
|
export function loadConfig(): Config
|
2024-04-12 04:59:44 +02:00
|
|
|
export interface Acct {
|
|
|
|
username: string
|
|
|
|
host: string | null
|
|
|
|
}
|
|
|
|
export function stringToAcct(acct: string): Acct
|
|
|
|
export function acctToString(acct: Acct): string
|
2024-05-28 12:42:52 +02:00
|
|
|
export function fetchNodeinfo(host: string): Promise<Nodeinfo>
|
|
|
|
export function nodeinfo_2_1(): Promise<any>
|
|
|
|
export function nodeinfo_2_0(): Promise<any>
|
|
|
|
/** NodeInfo schema version 2.0. <https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.0> */
|
|
|
|
export interface Nodeinfo {
|
|
|
|
/** The schema version, must be 2.0. */
|
|
|
|
version: string
|
|
|
|
/** Metadata about server software in use. */
|
|
|
|
software: Software20
|
|
|
|
/** The protocols supported on this server. */
|
|
|
|
protocols: Array<Protocol>
|
|
|
|
/** The third party sites this server can connect to via their application API. */
|
|
|
|
services: Services
|
|
|
|
/** Whether this server allows open self-registration. */
|
|
|
|
openRegistrations: boolean
|
|
|
|
/** Usage statistics for this server. */
|
|
|
|
usage: Usage
|
|
|
|
/** Free form key value pairs for software specific values. Clients should not rely on any specific key present. */
|
|
|
|
metadata: Record<string, any>
|
|
|
|
}
|
|
|
|
/** Metadata about server software in use (version 2.0). */
|
|
|
|
export interface Software20 {
|
|
|
|
/** The canonical name of this server software. */
|
|
|
|
name: string
|
|
|
|
/** The version of this server software. */
|
|
|
|
version: string
|
|
|
|
}
|
|
|
|
export enum Protocol {
|
|
|
|
Activitypub = 'activitypub',
|
|
|
|
Buddycloud = 'buddycloud',
|
|
|
|
Dfrn = 'dfrn',
|
|
|
|
Diaspora = 'diaspora',
|
|
|
|
Libertree = 'libertree',
|
|
|
|
Ostatus = 'ostatus',
|
|
|
|
Pumpio = 'pumpio',
|
|
|
|
Tent = 'tent',
|
|
|
|
Xmpp = 'xmpp',
|
|
|
|
Zot = 'zot'
|
|
|
|
}
|
|
|
|
/** The third party sites this server can connect to via their application API. */
|
|
|
|
export interface Services {
|
|
|
|
/** The third party sites this server can retrieve messages from for combined display with regular traffic. */
|
|
|
|
inbound: Array<Inbound>
|
|
|
|
/** The third party sites this server can publish messages to on the behalf of a user. */
|
|
|
|
outbound: Array<Outbound>
|
|
|
|
}
|
|
|
|
/** The third party sites this server can retrieve messages from for combined display with regular traffic. */
|
|
|
|
export enum Inbound {
|
|
|
|
Atom1 = 'atom1',
|
|
|
|
Gnusocial = 'gnusocial',
|
|
|
|
Imap = 'imap',
|
|
|
|
Pnut = 'pnut',
|
|
|
|
Pop3 = 'pop3',
|
|
|
|
Pumpio = 'pumpio',
|
|
|
|
Rss2 = 'rss2',
|
|
|
|
Twitter = 'twitter'
|
|
|
|
}
|
|
|
|
/** The third party sites this server can publish messages to on the behalf of a user. */
|
|
|
|
export enum Outbound {
|
|
|
|
Atom1 = 'atom1',
|
|
|
|
Blogger = 'blogger',
|
|
|
|
Buddycloud = 'buddycloud',
|
|
|
|
Diaspora = 'diaspora',
|
|
|
|
Dreamwidth = 'dreamwidth',
|
|
|
|
Drupal = 'drupal',
|
|
|
|
Facebook = 'facebook',
|
|
|
|
Friendica = 'friendica',
|
|
|
|
Gnusocial = 'gnusocial',
|
|
|
|
Google = 'google',
|
|
|
|
Insanejournal = 'insanejournal',
|
|
|
|
Libertree = 'libertree',
|
|
|
|
Linkedin = 'linkedin',
|
|
|
|
Livejournal = 'livejournal',
|
|
|
|
Mediagoblin = 'mediagoblin',
|
|
|
|
Myspace = 'myspace',
|
|
|
|
Pinterest = 'pinterest',
|
|
|
|
Pnut = 'pnut',
|
|
|
|
Posterous = 'posterous',
|
|
|
|
Pumpio = 'pumpio',
|
|
|
|
Redmatrix = 'redmatrix',
|
|
|
|
Rss2 = 'rss2',
|
|
|
|
Smtp = 'smtp',
|
|
|
|
Tent = 'tent',
|
|
|
|
Tumblr = 'tumblr',
|
|
|
|
Twitter = 'twitter',
|
|
|
|
Wordpress = 'wordpress',
|
|
|
|
Xmpp = 'xmpp'
|
|
|
|
}
|
|
|
|
/** Usage statistics for this server. */
|
|
|
|
export interface Usage {
|
|
|
|
users: Users
|
|
|
|
localPosts: number | null
|
|
|
|
localComments: number | null
|
|
|
|
}
|
|
|
|
/** statistics about the users of this server. */
|
|
|
|
export interface Users {
|
|
|
|
total: number | null
|
|
|
|
activeHalfyear: number | null
|
|
|
|
activeMonth: number | null
|
|
|
|
}
|
2024-05-18 11:13:19 +02:00
|
|
|
export function greet(): void
|
2024-05-15 21:57:48 +02:00
|
|
|
export function initializeRustLogger(): void
|
2024-05-17 00:32:02 +02:00
|
|
|
export function showServerInfo(): void
|
2024-04-22 01:31:28 +02:00
|
|
|
/**
|
2024-05-05 14:22:57 +02:00
|
|
|
* Checks if a server is blocked.
|
|
|
|
*
|
|
|
|
* ## Argument
|
|
|
|
* `host` - punycoded instance host
|
|
|
|
*/
|
2024-04-22 01:31:28 +02:00
|
|
|
export function isBlockedServer(host: string): Promise<boolean>
|
|
|
|
/**
|
2024-05-05 14:22:57 +02:00
|
|
|
* Checks if a server is silenced.
|
|
|
|
*
|
|
|
|
* ## Argument
|
|
|
|
* `host` - punycoded instance host
|
|
|
|
*/
|
2024-04-22 01:31:28 +02:00
|
|
|
export function isSilencedServer(host: string): Promise<boolean>
|
|
|
|
/**
|
2024-05-05 14:22:57 +02:00
|
|
|
* Checks if a server is allowlisted.
|
|
|
|
* Returns `Ok(true)` if private mode is disabled.
|
|
|
|
*
|
|
|
|
* ## Argument
|
|
|
|
* `host` - punycoded instance host
|
|
|
|
*/
|
2024-04-22 01:31:28 +02:00
|
|
|
export function isAllowedServer(host: string): Promise<boolean>
|
2024-05-17 10:59:45 +02:00
|
|
|
export function checkWordMute(note: NoteLike, mutedWords: Array<string>, mutedPatterns: Array<string>): Promise<boolean>
|
2024-04-12 10:13:57 +02:00
|
|
|
export function getFullApAccount(username: string, host?: string | undefined | null): string
|
|
|
|
export function isSelfHost(host?: string | undefined | null): boolean
|
|
|
|
export function isSameOrigin(uri: string): boolean
|
|
|
|
export function extractHost(uri: string): string
|
|
|
|
export function toPuny(host: string): string
|
2024-04-14 22:13:35 +02:00
|
|
|
export function isUnicodeEmoji(s: string): boolean
|
2024-04-14 13:29:44 +02:00
|
|
|
export function sqlLikeEscape(src: string): string
|
2024-05-24 01:54:40 +02:00
|
|
|
export function sqlRegexEscape(src: string): string
|
2024-04-14 13:29:44 +02:00
|
|
|
export function safeForSql(src: string): boolean
|
2024-04-14 07:53:25 +02:00
|
|
|
/** Convert milliseconds to a human readable string */
|
|
|
|
export function formatMilliseconds(milliseconds: number): string
|
2024-04-25 12:06:16 +02:00
|
|
|
export interface ImageSize {
|
|
|
|
width: number
|
|
|
|
height: number
|
|
|
|
}
|
|
|
|
export function getImageSizeFromUrl(url: string): Promise<ImageSize>
|
2024-05-17 10:59:45 +02:00
|
|
|
export interface NoteLikeForAllTexts {
|
|
|
|
fileIds: Array<string>
|
|
|
|
userId: string
|
|
|
|
text: string | null
|
|
|
|
cw: string | null
|
|
|
|
renoteId: string | null
|
|
|
|
replyId: string | null
|
|
|
|
}
|
2024-04-17 22:02:00 +02:00
|
|
|
export interface NoteLikeForGetNoteSummary {
|
|
|
|
fileIds: Array<string>
|
|
|
|
text: string | null
|
|
|
|
cw: string | null
|
|
|
|
hasPoll: boolean
|
|
|
|
}
|
|
|
|
export function getNoteSummary(note: NoteLikeForGetNoteSummary): string
|
2024-05-24 03:07:16 +02:00
|
|
|
export interface NoteLikeForIsQuote {
|
|
|
|
renoteId: string | null
|
|
|
|
text: string | null
|
|
|
|
hasPoll: boolean
|
|
|
|
fileIds: Array<string>
|
|
|
|
}
|
|
|
|
export function isQuote(note: NoteLikeForIsQuote): boolean
|
2024-05-06 17:56:37 +02:00
|
|
|
export function isSafeUrl(url: string): boolean
|
2024-05-04 07:44:20 +02:00
|
|
|
export function latestVersion(): Promise<string>
|
2024-04-14 13:16:22 +02:00
|
|
|
export function fetchMeta(useCache: boolean): Promise<Meta>
|
|
|
|
export interface PugArgs {
|
|
|
|
img: string | null
|
|
|
|
title: string
|
|
|
|
instanceName: string
|
|
|
|
desc: string | null
|
|
|
|
icon: string | null
|
|
|
|
splashIcon: string | null
|
|
|
|
themeColor: string | null
|
|
|
|
randomMotd: string
|
|
|
|
privateMode: boolean | null
|
|
|
|
}
|
|
|
|
export function metaToPugArgs(meta: Meta): PugArgs
|
2024-04-12 04:59:44 +02:00
|
|
|
export function nyaify(text: string, lang?: string | undefined | null): string
|
2024-04-14 07:41:01 +02:00
|
|
|
export function hashPassword(password: string): string
|
|
|
|
export function verifyPassword(password: string, hash: string): boolean
|
|
|
|
export function isOldPasswordAlgorithm(hash: string): boolean
|
2024-04-15 03:02:44 +02:00
|
|
|
export interface DecodedReaction {
|
|
|
|
reaction: string
|
|
|
|
name: string | null
|
|
|
|
host: string | null
|
|
|
|
}
|
|
|
|
export function decodeReaction(reaction: string): DecodedReaction
|
|
|
|
export function countReactions(reactions: Record<string, number>): Record<string, number>
|
|
|
|
export function toDbReaction(reaction?: string | undefined | null, host?: string | undefined | null): Promise<string>
|
2024-04-23 23:39:40 +02:00
|
|
|
/** Delete all entries in the "attestation_challenge" table created at more than 5 minutes ago */
|
|
|
|
export function removeOldAttestationChallenges(): Promise<void>
|
2024-05-17 00:32:02 +02:00
|
|
|
export interface Cpu {
|
|
|
|
model: string
|
|
|
|
cores: number
|
|
|
|
}
|
|
|
|
export interface Memory {
|
|
|
|
/** Total memory amount in bytes */
|
|
|
|
total: number
|
|
|
|
/** Used memory amount in bytes */
|
|
|
|
used: number
|
|
|
|
/** Available (for (re)use) memory amount in bytes */
|
|
|
|
available: number
|
|
|
|
}
|
|
|
|
export interface Storage {
|
|
|
|
/** Total storage space in bytes */
|
|
|
|
total: number
|
|
|
|
/** Used storage space in bytes */
|
|
|
|
used: number
|
|
|
|
}
|
|
|
|
export function cpuInfo(): Cpu
|
|
|
|
export function cpuUsage(): number
|
|
|
|
export function memoryUsage(): Memory
|
|
|
|
export function storageUsage(): Storage | null
|
2024-04-12 04:59:44 +02:00
|
|
|
export interface AbuseUserReport {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
targetUserId: string
|
|
|
|
reporterId: string
|
|
|
|
assigneeId: string | null
|
|
|
|
resolved: boolean
|
|
|
|
comment: string
|
|
|
|
targetUserHost: string | null
|
|
|
|
reporterHost: string | null
|
|
|
|
forwarded: boolean
|
|
|
|
}
|
|
|
|
export interface AccessToken {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
token: string
|
|
|
|
hash: string
|
2024-05-29 16:40:56 +02:00
|
|
|
userId: string | null
|
2024-04-12 04:59:44 +02:00
|
|
|
appId: string | null
|
2024-05-19 12:15:58 +02:00
|
|
|
lastUsedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
session: string | null
|
|
|
|
name: string | null
|
|
|
|
description: string | null
|
|
|
|
iconUrl: string | null
|
|
|
|
permission: Array<string>
|
|
|
|
fetched: boolean
|
|
|
|
}
|
|
|
|
export interface Ad {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
expiresAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
place: string
|
|
|
|
priority: string
|
|
|
|
url: string
|
|
|
|
imageUrl: string
|
|
|
|
memo: string
|
|
|
|
ratio: number
|
|
|
|
}
|
|
|
|
export interface Announcement {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
text: string
|
|
|
|
title: string
|
|
|
|
imageUrl: string | null
|
2024-05-19 12:15:58 +02:00
|
|
|
updatedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
showPopup: boolean
|
|
|
|
isGoodNews: boolean
|
|
|
|
}
|
|
|
|
export interface AnnouncementRead {
|
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
announcementId: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface Antenna {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
name: string
|
2024-05-23 13:49:49 +02:00
|
|
|
src: AntennaSrc
|
2024-04-12 04:59:44 +02:00
|
|
|
userListId: string | null
|
|
|
|
withFile: boolean
|
|
|
|
expression: string | null
|
|
|
|
notify: boolean
|
|
|
|
caseSensitive: boolean
|
|
|
|
withReplies: boolean
|
|
|
|
userGroupJoiningId: string | null
|
|
|
|
users: Array<string>
|
2024-05-17 10:59:45 +02:00
|
|
|
instances: Array<string>
|
|
|
|
keywords: Array<string>
|
|
|
|
excludeKeywords: Array<string>
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface App {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string | null
|
|
|
|
secret: string
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
permission: Array<string>
|
|
|
|
callbackUrl: string | null
|
|
|
|
}
|
|
|
|
export interface AttestationChallenge {
|
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
challenge: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
registrationChallenge: boolean
|
|
|
|
}
|
|
|
|
export interface AuthSession {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
token: string
|
|
|
|
userId: string | null
|
|
|
|
appId: string
|
|
|
|
}
|
|
|
|
export interface Blocking {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
blockeeId: string
|
|
|
|
blockerId: string
|
|
|
|
}
|
|
|
|
export interface Channel {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
lastNotedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string | null
|
|
|
|
name: string
|
|
|
|
description: string | null
|
|
|
|
bannerId: string | null
|
|
|
|
notesCount: number
|
|
|
|
usersCount: number
|
|
|
|
}
|
|
|
|
export interface ChannelFollowing {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
followeeId: string
|
|
|
|
followerId: string
|
|
|
|
}
|
|
|
|
export interface ChannelNotePining {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
channelId: string
|
|
|
|
noteId: string
|
|
|
|
}
|
|
|
|
export interface Clip {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
name: string
|
|
|
|
isPublic: boolean
|
|
|
|
description: string | null
|
|
|
|
}
|
|
|
|
export interface ClipNote {
|
|
|
|
id: string
|
|
|
|
noteId: string
|
|
|
|
clipId: string
|
|
|
|
}
|
|
|
|
export interface DriveFile {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string | null
|
|
|
|
userHost: string | null
|
|
|
|
md5: string
|
|
|
|
name: string
|
|
|
|
type: string
|
|
|
|
size: number
|
|
|
|
comment: string | null
|
|
|
|
properties: Json
|
|
|
|
storedInternal: boolean
|
|
|
|
url: string
|
|
|
|
thumbnailUrl: string | null
|
|
|
|
webpublicUrl: string | null
|
|
|
|
accessKey: string | null
|
|
|
|
thumbnailAccessKey: string | null
|
|
|
|
webpublicAccessKey: string | null
|
|
|
|
uri: string | null
|
|
|
|
src: string | null
|
|
|
|
folderId: string | null
|
|
|
|
isSensitive: boolean
|
|
|
|
isLink: boolean
|
|
|
|
blurhash: string | null
|
|
|
|
webpublicType: string | null
|
|
|
|
requestHeaders: Json | null
|
|
|
|
requestIp: string | null
|
2024-05-23 13:49:49 +02:00
|
|
|
usageHint: DriveFileUsageHint | null
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface DriveFolder {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
name: string
|
|
|
|
userId: string | null
|
|
|
|
parentId: string | null
|
|
|
|
}
|
|
|
|
export interface Emoji {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
updatedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
name: string
|
|
|
|
host: string | null
|
|
|
|
originalUrl: string
|
|
|
|
uri: string | null
|
|
|
|
type: string | null
|
|
|
|
aliases: Array<string>
|
|
|
|
category: string | null
|
|
|
|
publicUrl: string
|
|
|
|
license: string | null
|
|
|
|
width: number | null
|
|
|
|
height: number | null
|
|
|
|
}
|
|
|
|
export interface FollowRequest {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
followeeId: string
|
|
|
|
followerId: string
|
|
|
|
requestId: string | null
|
|
|
|
followerHost: string | null
|
|
|
|
followerInbox: string | null
|
|
|
|
followerSharedInbox: string | null
|
|
|
|
followeeHost: string | null
|
|
|
|
followeeInbox: string | null
|
|
|
|
followeeSharedInbox: string | null
|
|
|
|
}
|
|
|
|
export interface Following {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
followeeId: string
|
|
|
|
followerId: string
|
|
|
|
followerHost: string | null
|
|
|
|
followerInbox: string | null
|
|
|
|
followerSharedInbox: string | null
|
|
|
|
followeeHost: string | null
|
|
|
|
followeeInbox: string | null
|
|
|
|
followeeSharedInbox: string | null
|
|
|
|
}
|
|
|
|
export interface GalleryLike {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
postId: string
|
|
|
|
}
|
|
|
|
export interface GalleryPost {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
updatedAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
title: string
|
|
|
|
description: string | null
|
|
|
|
userId: string
|
|
|
|
fileIds: Array<string>
|
|
|
|
isSensitive: boolean
|
|
|
|
likedCount: number
|
|
|
|
tags: Array<string>
|
|
|
|
}
|
|
|
|
export interface Hashtag {
|
|
|
|
id: string
|
|
|
|
name: string
|
|
|
|
mentionedUserIds: Array<string>
|
|
|
|
mentionedUsersCount: number
|
|
|
|
mentionedLocalUserIds: Array<string>
|
|
|
|
mentionedLocalUsersCount: number
|
|
|
|
mentionedRemoteUserIds: Array<string>
|
|
|
|
mentionedRemoteUsersCount: number
|
|
|
|
attachedUserIds: Array<string>
|
|
|
|
attachedUsersCount: number
|
|
|
|
attachedLocalUserIds: Array<string>
|
|
|
|
attachedLocalUsersCount: number
|
|
|
|
attachedRemoteUserIds: Array<string>
|
|
|
|
attachedRemoteUsersCount: number
|
|
|
|
}
|
|
|
|
export interface Instance {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
caughtAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
host: string
|
|
|
|
usersCount: number
|
|
|
|
notesCount: number
|
|
|
|
followingCount: number
|
|
|
|
followersCount: number
|
2024-05-19 12:15:58 +02:00
|
|
|
latestRequestSentAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
latestStatus: number | null
|
2024-05-19 12:15:58 +02:00
|
|
|
latestRequestReceivedAt: DateTimeWithTimeZone | null
|
|
|
|
lastCommunicatedAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
isNotResponding: boolean
|
|
|
|
softwareName: string | null
|
|
|
|
softwareVersion: string | null
|
|
|
|
openRegistrations: boolean | null
|
|
|
|
name: string | null
|
|
|
|
description: string | null
|
|
|
|
maintainerName: string | null
|
|
|
|
maintainerEmail: string | null
|
2024-05-19 12:15:58 +02:00
|
|
|
infoUpdatedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
isSuspended: boolean
|
|
|
|
iconUrl: string | null
|
|
|
|
themeColor: string | null
|
|
|
|
faviconUrl: string | null
|
|
|
|
}
|
|
|
|
export interface MessagingMessage {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
recipientId: string | null
|
|
|
|
text: string | null
|
|
|
|
isRead: boolean
|
|
|
|
fileId: string | null
|
|
|
|
groupId: string | null
|
|
|
|
reads: Array<string>
|
|
|
|
uri: string | null
|
|
|
|
}
|
|
|
|
export interface Meta {
|
|
|
|
id: string
|
|
|
|
name: string | null
|
|
|
|
description: string | null
|
|
|
|
maintainerName: string | null
|
|
|
|
maintainerEmail: string | null
|
|
|
|
disableRegistration: boolean
|
|
|
|
disableLocalTimeline: boolean
|
|
|
|
disableGlobalTimeline: boolean
|
|
|
|
useStarForReactionFallback: boolean
|
|
|
|
langs: Array<string>
|
|
|
|
hiddenTags: Array<string>
|
|
|
|
blockedHosts: Array<string>
|
|
|
|
mascotImageUrl: string | null
|
|
|
|
bannerUrl: string | null
|
|
|
|
errorImageUrl: string | null
|
|
|
|
iconUrl: string | null
|
|
|
|
cacheRemoteFiles: boolean
|
|
|
|
enableRecaptcha: boolean
|
|
|
|
recaptchaSiteKey: string | null
|
|
|
|
recaptchaSecretKey: string | null
|
|
|
|
localDriveCapacityMb: number
|
|
|
|
remoteDriveCapacityMb: number
|
|
|
|
summalyProxy: string | null
|
|
|
|
enableEmail: boolean
|
|
|
|
email: string | null
|
|
|
|
smtpSecure: boolean
|
|
|
|
smtpHost: string | null
|
|
|
|
smtpPort: number | null
|
|
|
|
smtpUser: string | null
|
|
|
|
smtpPass: string | null
|
|
|
|
enableServiceWorker: boolean
|
|
|
|
swPublicKey: string | null
|
|
|
|
swPrivateKey: string | null
|
|
|
|
pinnedUsers: Array<string>
|
|
|
|
tosUrl: string | null
|
|
|
|
repositoryUrl: string
|
|
|
|
feedbackUrl: string | null
|
|
|
|
useObjectStorage: boolean
|
|
|
|
objectStorageBucket: string | null
|
|
|
|
objectStoragePrefix: string | null
|
|
|
|
objectStorageBaseUrl: string | null
|
|
|
|
objectStorageEndpoint: string | null
|
|
|
|
objectStorageRegion: string | null
|
|
|
|
objectStorageAccessKey: string | null
|
|
|
|
objectStorageSecretKey: string | null
|
|
|
|
objectStoragePort: number | null
|
|
|
|
objectStorageUseSsl: boolean
|
|
|
|
proxyAccountId: string | null
|
|
|
|
objectStorageUseProxy: boolean
|
|
|
|
enableHcaptcha: boolean
|
|
|
|
hcaptchaSiteKey: string | null
|
|
|
|
hcaptchaSecretKey: string | null
|
|
|
|
objectStorageSetPublicRead: boolean
|
|
|
|
pinnedPages: Array<string>
|
|
|
|
backgroundImageUrl: string | null
|
|
|
|
logoImageUrl: string | null
|
|
|
|
pinnedClipId: string | null
|
|
|
|
objectStorageS3ForcePathStyle: boolean
|
|
|
|
allowedHosts: Array<string> | null
|
|
|
|
secureMode: boolean | null
|
|
|
|
privateMode: boolean | null
|
|
|
|
deeplAuthKey: string | null
|
|
|
|
deeplIsPro: boolean
|
|
|
|
emailRequiredForSignup: boolean
|
|
|
|
themeColor: string | null
|
|
|
|
defaultLightTheme: string | null
|
|
|
|
defaultDarkTheme: string | null
|
|
|
|
enableIpLogging: boolean
|
|
|
|
enableActiveEmailValidation: boolean
|
|
|
|
customMotd: Array<string>
|
|
|
|
customSplashIcons: Array<string>
|
|
|
|
disableRecommendedTimeline: boolean
|
|
|
|
recommendedInstances: Array<string>
|
|
|
|
enableGuestTimeline: boolean
|
|
|
|
defaultReaction: string
|
|
|
|
libreTranslateApiUrl: string | null
|
|
|
|
libreTranslateApiKey: string | null
|
|
|
|
silencedHosts: Array<string>
|
|
|
|
experimentalFeatures: Json
|
|
|
|
enableServerMachineStats: boolean
|
|
|
|
enableIdenticonGeneration: boolean
|
|
|
|
donationLink: string | null
|
|
|
|
moreUrls: Json
|
|
|
|
markLocalFilesNsfwByDefault: boolean
|
2024-04-22 01:31:28 +02:00
|
|
|
antennaLimit: number
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface Migrations {
|
|
|
|
id: number
|
|
|
|
timestamp: number
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
export interface ModerationLog {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
type: string
|
|
|
|
info: Json
|
|
|
|
}
|
|
|
|
export interface MutedNote {
|
|
|
|
id: string
|
|
|
|
noteId: string
|
|
|
|
userId: string
|
2024-05-23 13:49:49 +02:00
|
|
|
reason: MutedNoteReason
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface Muting {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
muteeId: string
|
|
|
|
muterId: string
|
2024-05-19 12:15:58 +02:00
|
|
|
expiresAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface Note {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
replyId: string | null
|
|
|
|
renoteId: string | null
|
|
|
|
text: string | null
|
|
|
|
name: string | null
|
|
|
|
cw: string | null
|
|
|
|
userId: string
|
|
|
|
localOnly: boolean
|
|
|
|
renoteCount: number
|
|
|
|
repliesCount: number
|
|
|
|
reactions: Json
|
2024-05-23 13:49:49 +02:00
|
|
|
visibility: NoteVisibility
|
2024-04-12 04:59:44 +02:00
|
|
|
uri: string | null
|
|
|
|
score: number
|
|
|
|
fileIds: Array<string>
|
|
|
|
attachedFileTypes: Array<string>
|
|
|
|
visibleUserIds: Array<string>
|
|
|
|
mentions: Array<string>
|
|
|
|
mentionedRemoteUsers: string
|
|
|
|
emojis: Array<string>
|
|
|
|
tags: Array<string>
|
|
|
|
hasPoll: boolean
|
|
|
|
userHost: string | null
|
|
|
|
replyUserId: string | null
|
|
|
|
replyUserHost: string | null
|
|
|
|
renoteUserId: string | null
|
|
|
|
renoteUserHost: string | null
|
|
|
|
url: string | null
|
|
|
|
channelId: string | null
|
|
|
|
threadId: string | null
|
2024-05-19 12:15:58 +02:00
|
|
|
updatedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
lang: string | null
|
|
|
|
}
|
|
|
|
export interface NoteEdit {
|
|
|
|
id: string
|
|
|
|
noteId: string
|
|
|
|
text: string | null
|
|
|
|
cw: string | null
|
|
|
|
fileIds: Array<string>
|
2024-05-19 12:15:58 +02:00
|
|
|
updatedAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
emojis: Array<string>
|
|
|
|
}
|
|
|
|
export interface NoteFavorite {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
}
|
|
|
|
export interface NoteFile {
|
|
|
|
serialNo: number
|
|
|
|
noteId: string
|
|
|
|
fileId: string
|
|
|
|
}
|
|
|
|
export interface NoteReaction {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
reaction: string
|
|
|
|
}
|
|
|
|
export interface NoteThreadMuting {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
threadId: string
|
|
|
|
}
|
|
|
|
export interface NoteUnread {
|
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
noteUserId: string
|
|
|
|
isSpecified: boolean
|
|
|
|
isMentioned: boolean
|
|
|
|
noteChannelId: string | null
|
|
|
|
}
|
|
|
|
export interface NoteWatching {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
noteUserId: string
|
|
|
|
}
|
|
|
|
export interface Notification {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
notifieeId: string
|
|
|
|
notifierId: string | null
|
|
|
|
isRead: boolean
|
|
|
|
noteId: string | null
|
|
|
|
reaction: string | null
|
|
|
|
choice: number | null
|
|
|
|
followRequestId: string | null
|
2024-05-23 13:49:49 +02:00
|
|
|
type: NotificationType
|
2024-04-12 04:59:44 +02:00
|
|
|
userGroupInvitationId: string | null
|
|
|
|
customBody: string | null
|
|
|
|
customHeader: string | null
|
|
|
|
customIcon: string | null
|
|
|
|
appAccessTokenId: string | null
|
|
|
|
}
|
|
|
|
export interface Page {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
updatedAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
title: string
|
|
|
|
name: string
|
|
|
|
summary: string | null
|
|
|
|
alignCenter: boolean
|
|
|
|
font: string
|
|
|
|
userId: string
|
|
|
|
eyeCatchingImageId: string | null
|
|
|
|
content: Json
|
|
|
|
variables: Json
|
2024-05-23 13:49:49 +02:00
|
|
|
visibility: PageVisibility
|
2024-04-12 04:59:44 +02:00
|
|
|
visibleUserIds: Array<string>
|
|
|
|
likedCount: number
|
|
|
|
hideTitleWhenPinned: boolean
|
|
|
|
script: string
|
|
|
|
isPublic: boolean
|
|
|
|
}
|
|
|
|
export interface PageLike {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
pageId: string
|
|
|
|
}
|
|
|
|
export interface PasswordResetRequest {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
token: string
|
|
|
|
userId: string
|
|
|
|
}
|
|
|
|
export interface Poll {
|
|
|
|
noteId: string
|
2024-05-19 12:15:58 +02:00
|
|
|
expiresAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
multiple: boolean
|
|
|
|
choices: Array<string>
|
|
|
|
votes: Array<number>
|
2024-05-23 13:49:49 +02:00
|
|
|
noteVisibility: PollNoteVisibility
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
userHost: string | null
|
|
|
|
}
|
|
|
|
export interface PollVote {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
choice: number
|
|
|
|
}
|
|
|
|
export interface PromoNote {
|
|
|
|
noteId: string
|
2024-05-19 12:15:58 +02:00
|
|
|
expiresAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
}
|
|
|
|
export interface PromoRead {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
}
|
|
|
|
export interface RegistrationTicket {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
code: string
|
|
|
|
}
|
|
|
|
export interface RegistryItem {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
updatedAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
key: string
|
|
|
|
scope: Array<string>
|
|
|
|
domain: string | null
|
|
|
|
value: Json | null
|
|
|
|
}
|
|
|
|
export interface Relay {
|
|
|
|
id: string
|
|
|
|
inbox: string
|
2024-05-23 13:49:49 +02:00
|
|
|
status: RelayStatus
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface RenoteMuting {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
muteeId: string
|
|
|
|
muterId: string
|
|
|
|
}
|
|
|
|
export interface ReplyMuting {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
muteeId: string
|
|
|
|
muterId: string
|
|
|
|
}
|
2024-05-19 13:01:31 +02:00
|
|
|
export interface ScheduledNote {
|
|
|
|
id: string
|
|
|
|
noteId: string
|
|
|
|
userId: string
|
|
|
|
scheduledAt: DateTimeWithTimeZone
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum AntennaSrc {
|
2024-04-19 14:59:12 +02:00
|
|
|
All = 'all',
|
|
|
|
Group = 'group',
|
|
|
|
Home = 'home',
|
|
|
|
Instances = 'instances',
|
|
|
|
List = 'list',
|
|
|
|
Users = 'users'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum DriveFileUsageHint {
|
2024-04-21 03:45:47 +02:00
|
|
|
UserAvatar = 'userAvatar',
|
|
|
|
UserBanner = 'userBanner'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum MutedNoteReason {
|
2024-04-19 14:59:12 +02:00
|
|
|
Manual = 'manual',
|
|
|
|
Other = 'other',
|
|
|
|
Spam = 'spam',
|
|
|
|
Word = 'word'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum NoteVisibility {
|
2024-04-19 14:59:12 +02:00
|
|
|
Followers = 'followers',
|
|
|
|
Hidden = 'hidden',
|
|
|
|
Home = 'home',
|
|
|
|
Public = 'public',
|
|
|
|
Specified = 'specified'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum NotificationType {
|
2024-04-19 14:59:12 +02:00
|
|
|
App = 'app',
|
|
|
|
Follow = 'follow',
|
|
|
|
FollowRequestAccepted = 'followRequestAccepted',
|
|
|
|
GroupInvited = 'groupInvited',
|
|
|
|
Mention = 'mention',
|
|
|
|
PollEnded = 'pollEnded',
|
|
|
|
PollVote = 'pollVote',
|
|
|
|
Quote = 'quote',
|
|
|
|
Reaction = 'reaction',
|
|
|
|
ReceiveFollowRequest = 'receiveFollowRequest',
|
|
|
|
Renote = 'renote',
|
|
|
|
Reply = 'reply'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum PageVisibility {
|
2024-04-19 14:59:12 +02:00
|
|
|
Followers = 'followers',
|
|
|
|
Public = 'public',
|
|
|
|
Specified = 'specified'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum PollNoteVisibility {
|
2024-04-19 14:59:12 +02:00
|
|
|
Followers = 'followers',
|
|
|
|
Home = 'home',
|
|
|
|
Public = 'public',
|
|
|
|
Specified = 'specified'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum RelayStatus {
|
2024-04-19 14:59:12 +02:00
|
|
|
Accepted = 'accepted',
|
|
|
|
Rejected = 'rejected',
|
|
|
|
Requesting = 'requesting'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum UserEmojiModPerm {
|
2024-04-19 14:59:12 +02:00
|
|
|
Add = 'add',
|
|
|
|
Full = 'full',
|
|
|
|
Mod = 'mod',
|
|
|
|
Unauthorized = 'unauthorized'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum UserProfileFfvisibility {
|
2024-04-19 14:59:12 +02:00
|
|
|
Followers = 'followers',
|
|
|
|
Private = 'private',
|
|
|
|
Public = 'public'
|
|
|
|
}
|
2024-05-23 13:49:49 +02:00
|
|
|
export enum UserProfileMutingNotificationTypes {
|
2024-04-19 14:59:12 +02:00
|
|
|
App = 'app',
|
|
|
|
Follow = 'follow',
|
|
|
|
FollowRequestAccepted = 'followRequestAccepted',
|
|
|
|
GroupInvited = 'groupInvited',
|
|
|
|
Mention = 'mention',
|
|
|
|
PollEnded = 'pollEnded',
|
|
|
|
PollVote = 'pollVote',
|
|
|
|
Quote = 'quote',
|
|
|
|
Reaction = 'reaction',
|
|
|
|
ReceiveFollowRequest = 'receiveFollowRequest',
|
|
|
|
Renote = 'renote',
|
|
|
|
Reply = 'reply'
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface Signin {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
ip: string
|
|
|
|
headers: Json
|
|
|
|
success: boolean
|
|
|
|
}
|
|
|
|
export interface SwSubscription {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
endpoint: string
|
|
|
|
auth: string
|
|
|
|
publickey: string
|
|
|
|
sendReadMessage: boolean
|
2024-05-29 16:40:56 +02:00
|
|
|
appAccessTokenId: string | null
|
|
|
|
subscriptionTypes: Array<string>
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface UsedUsername {
|
|
|
|
username: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface User {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
|
|
|
updatedAt: DateTimeWithTimeZone | null
|
|
|
|
lastFetchedAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
username: string
|
|
|
|
usernameLower: string
|
|
|
|
name: string | null
|
|
|
|
followersCount: number
|
|
|
|
followingCount: number
|
|
|
|
notesCount: number
|
|
|
|
avatarId: string | null
|
|
|
|
bannerId: string | null
|
|
|
|
tags: Array<string>
|
|
|
|
isSuspended: boolean
|
|
|
|
isSilenced: boolean
|
|
|
|
isLocked: boolean
|
|
|
|
isBot: boolean
|
|
|
|
isCat: boolean
|
|
|
|
isAdmin: boolean
|
|
|
|
isModerator: boolean
|
|
|
|
emojis: Array<string>
|
|
|
|
host: string | null
|
|
|
|
inbox: string | null
|
|
|
|
sharedInbox: string | null
|
|
|
|
featured: string | null
|
|
|
|
uri: string | null
|
|
|
|
token: string | null
|
|
|
|
isExplorable: boolean
|
|
|
|
followersUri: string | null
|
2024-05-19 12:15:58 +02:00
|
|
|
lastActiveDate: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
hideOnlineStatus: boolean
|
|
|
|
isDeleted: boolean
|
|
|
|
driveCapacityOverrideMb: number | null
|
|
|
|
movedToUri: string | null
|
|
|
|
speakAsCat: boolean
|
2024-05-23 13:49:49 +02:00
|
|
|
emojiModPerm: UserEmojiModPerm
|
2024-04-12 04:59:44 +02:00
|
|
|
isIndexable: boolean
|
2024-04-26 05:14:34 +02:00
|
|
|
alsoKnownAs: Array<string> | null
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface UserGroup {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
name: string
|
|
|
|
userId: string
|
|
|
|
isPrivate: boolean
|
|
|
|
}
|
|
|
|
export interface UserGroupInvitation {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
userGroupId: string
|
|
|
|
}
|
|
|
|
export interface UserGroupInvite {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
userGroupId: string
|
|
|
|
}
|
|
|
|
export interface UserGroupJoining {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
userGroupId: string
|
|
|
|
}
|
|
|
|
export interface UserIp {
|
|
|
|
id: number
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
ip: string
|
|
|
|
}
|
|
|
|
export interface UserKeypair {
|
|
|
|
userId: string
|
|
|
|
publicKey: string
|
|
|
|
privateKey: string
|
|
|
|
}
|
|
|
|
export interface UserList {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
export interface UserListJoining {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
userListId: string
|
|
|
|
}
|
|
|
|
export interface UserNotePining {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
noteId: string
|
|
|
|
}
|
|
|
|
export interface UserPending {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
code: string
|
|
|
|
username: string
|
|
|
|
email: string
|
|
|
|
password: string
|
|
|
|
}
|
|
|
|
export interface UserProfile {
|
|
|
|
userId: string
|
|
|
|
location: string | null
|
|
|
|
birthday: string | null
|
|
|
|
description: string | null
|
|
|
|
fields: Json
|
|
|
|
url: string | null
|
|
|
|
email: string | null
|
|
|
|
emailVerifyCode: string | null
|
|
|
|
emailVerified: boolean
|
|
|
|
twoFactorTempSecret: string | null
|
|
|
|
twoFactorSecret: string | null
|
|
|
|
twoFactorEnabled: boolean
|
|
|
|
password: string | null
|
|
|
|
autoAcceptFollowed: boolean
|
|
|
|
alwaysMarkNsfw: boolean
|
|
|
|
carefulBot: boolean
|
|
|
|
userHost: string | null
|
|
|
|
securityKeysAvailable: boolean
|
|
|
|
usePasswordLessLogin: boolean
|
|
|
|
pinnedPageId: string | null
|
|
|
|
injectFeaturedNote: boolean
|
|
|
|
enableWordMute: boolean
|
2024-05-23 13:49:49 +02:00
|
|
|
mutingNotificationTypes: Array<UserProfileMutingNotificationTypes>
|
2024-04-12 04:59:44 +02:00
|
|
|
noCrawle: boolean
|
|
|
|
receiveAnnouncementEmail: boolean
|
|
|
|
emailNotificationTypes: Json
|
|
|
|
publicReactions: boolean
|
2024-05-23 13:49:49 +02:00
|
|
|
ffVisibility: UserProfileFfvisibility
|
2024-04-12 04:59:44 +02:00
|
|
|
moderationNote: string
|
|
|
|
preventAiLearning: boolean
|
|
|
|
isIndexable: boolean
|
|
|
|
mutedPatterns: Array<string>
|
2024-05-29 16:40:56 +02:00
|
|
|
mentions: Json
|
2024-05-17 10:59:45 +02:00
|
|
|
mutedInstances: Array<string>
|
|
|
|
mutedWords: Array<string>
|
2024-05-06 16:13:31 +02:00
|
|
|
lang: string | null
|
2024-04-12 04:59:44 +02:00
|
|
|
}
|
|
|
|
export interface UserPublickey {
|
|
|
|
userId: string
|
|
|
|
keyId: string
|
|
|
|
keyPem: string
|
|
|
|
}
|
|
|
|
export interface UserSecurityKey {
|
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
publicKey: string
|
2024-05-19 12:15:58 +02:00
|
|
|
lastUsed: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
name: string
|
|
|
|
}
|
|
|
|
export interface Webhook {
|
|
|
|
id: string
|
2024-05-19 12:15:58 +02:00
|
|
|
createdAt: DateTimeWithTimeZone
|
2024-04-12 04:59:44 +02:00
|
|
|
userId: string
|
|
|
|
name: string
|
|
|
|
on: Array<string>
|
|
|
|
url: string
|
|
|
|
secret: string
|
|
|
|
active: boolean
|
2024-05-19 12:15:58 +02:00
|
|
|
latestSentAt: DateTimeWithTimeZone | null
|
2024-04-12 04:59:44 +02:00
|
|
|
latestStatus: number | null
|
|
|
|
}
|
2024-05-17 10:59:45 +02:00
|
|
|
export function updateAntennasOnNewNote(note: Note, noteAuthor: Acct, noteMutedUsers: Array<string>): Promise<void>
|
2024-04-24 06:16:25 +02:00
|
|
|
export function watchNote(watcherId: string, noteAuthorId: string, noteId: string): Promise<void>
|
|
|
|
export function unwatchNote(watcherId: string, noteId: string): Promise<void>
|
2024-05-16 00:19:58 +02:00
|
|
|
export enum PushNotificationKind {
|
|
|
|
Generic = 'generic',
|
|
|
|
Chat = 'chat',
|
|
|
|
ReadAllChats = 'readAllChats',
|
|
|
|
ReadAllChatsInTheRoom = 'readAllChatsInTheRoom',
|
|
|
|
ReadNotifications = 'readNotifications',
|
2024-05-19 05:19:43 +02:00
|
|
|
ReadAllNotifications = 'readAllNotifications',
|
|
|
|
Mastodon = 'mastodon'
|
2024-05-16 00:19:58 +02:00
|
|
|
}
|
|
|
|
export function sendPushNotification(receiverUserId: string, kind: PushNotificationKind, content: any): Promise<void>
|
2024-05-18 00:36:52 +02:00
|
|
|
export function publishToChannelStream(channelId: string, userId: string): Promise<void>
|
2024-04-23 21:13:29 +02:00
|
|
|
export enum ChatEvent {
|
|
|
|
Message = 'message',
|
|
|
|
Read = 'read',
|
|
|
|
Deleted = 'deleted',
|
|
|
|
Typing = 'typing'
|
|
|
|
}
|
2024-05-18 00:36:52 +02:00
|
|
|
export function publishToChatStream(senderUserId: string, receiverUserId: string, kind: ChatEvent, object: any): Promise<void>
|
2024-04-26 06:11:11 +02:00
|
|
|
export enum ChatIndexEvent {
|
|
|
|
Message = 'message',
|
|
|
|
Read = 'read'
|
|
|
|
}
|
2024-05-18 00:36:52 +02:00
|
|
|
export function publishToChatIndexStream(userId: string, kind: ChatIndexEvent, object: any): Promise<void>
|
2024-04-26 06:30:13 +02:00
|
|
|
export interface PackedEmoji {
|
|
|
|
id: string
|
|
|
|
aliases: Array<string>
|
|
|
|
name: string
|
|
|
|
category: string | null
|
|
|
|
host: string | null
|
|
|
|
url: string
|
|
|
|
license: string | null
|
|
|
|
width: number | null
|
|
|
|
height: number | null
|
|
|
|
}
|
2024-05-18 00:36:52 +02:00
|
|
|
export function publishToBroadcastStream(emoji: PackedEmoji): Promise<void>
|
|
|
|
export function publishToGroupChatStream(groupId: string, kind: ChatEvent, object: any): Promise<void>
|
2024-04-25 22:44:37 +02:00
|
|
|
export interface AbuseUserReportLike {
|
|
|
|
id: string
|
|
|
|
targetUserId: string
|
|
|
|
reporterId: string
|
|
|
|
comment: string
|
|
|
|
}
|
2024-05-18 00:36:52 +02:00
|
|
|
export function publishToModerationStream(moderatorId: string, report: AbuseUserReportLike): Promise<void>
|
2024-04-12 04:59:44 +02:00
|
|
|
export function getTimestamp(id: string): number
|
|
|
|
/**
|
|
|
|
* The generated ID results in the form of `[8 chars timestamp] + [cuid2]`.
|
|
|
|
* The minimum and maximum lengths are 16 and 24, respectively.
|
|
|
|
* With the length of 16, namely 8 for cuid2, roughly 1427399 IDs are needed
|
|
|
|
* in the same millisecond to reach 50% chance of collision.
|
|
|
|
*
|
2024-05-29 16:40:56 +02:00
|
|
|
* Ref: <https://github.com/paralleldrive/cuid2#parameterized-length>
|
2024-04-12 04:59:44 +02:00
|
|
|
*/
|
2024-04-24 00:02:06 +02:00
|
|
|
export function genId(): string
|
|
|
|
/** Generate an ID using a specific datetime */
|
|
|
|
export function genIdAt(date: Date): string
|
2024-05-09 14:49:56 +02:00
|
|
|
/** Generate random string based on [thread_rng] and [Alphanumeric]. */
|
|
|
|
export function generateSecureRandomString(length: number): string
|
|
|
|
export function generateUserToken(): string
|