2023-09-29 04:29:54 +02:00
|
|
|
import { ModerationLogPayloads, notificationTypes } from './consts.js';
|
2023-09-23 11:28:16 +02:00
|
|
|
|
2023-03-30 02:33:19 +02:00
|
|
|
export type ID = string;
|
|
|
|
export type DateString = string;
|
|
|
|
|
|
|
|
type TODO = Record<string, any>;
|
|
|
|
|
|
|
|
// NOTE: 極力この型を使うのは避け、UserLite か UserDetailed か明示するように
|
|
|
|
export type User = UserLite | UserDetailed;
|
|
|
|
|
|
|
|
export type UserLite = {
|
|
|
|
id: ID;
|
|
|
|
username: string;
|
|
|
|
host: string | null;
|
|
|
|
name: string;
|
|
|
|
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
|
|
|
|
avatarUrl: string;
|
|
|
|
avatarBlurhash: string;
|
|
|
|
emojis: {
|
|
|
|
name: string;
|
|
|
|
url: string;
|
|
|
|
}[];
|
|
|
|
instance?: {
|
|
|
|
name: Instance['name'];
|
|
|
|
softwareName: Instance['softwareName'];
|
|
|
|
softwareVersion: Instance['softwareVersion'];
|
|
|
|
iconUrl: Instance['iconUrl'];
|
|
|
|
faviconUrl: Instance['faviconUrl'];
|
|
|
|
themeColor: Instance['themeColor'];
|
|
|
|
};
|
2023-10-19 04:42:17 +02:00
|
|
|
isCat?: boolean;
|
|
|
|
isBot?: boolean;
|
2023-03-30 02:33:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type UserDetailed = UserLite & {
|
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs
* copy block and mute and update lists when detecting an account has moved
* no need to care promise orders
* refactor updating actor and target
* automatically accept if a locked account had accepted an old account
* fix exception format
* prevent the old account from calling some endpoints
* do not unfollow when moving
* adjust following and follower counts
* check movedToUri when receiving a follow request
* skip if no need to adjust
* Revert "disable account migration"
This reverts commit 2321214c98591bcfe1385c1ab5bf0ff7b471ae1d.
* fix translation specifier
* fix checking alsoKnownAs and uri
* fix updating account
* fix refollowing locked account
* decrease followersCount if followed by the old account
* adjust following and followers counts when unfollowing
* fix copying mutings
* prohibit moved account from moving again
* fix move service
* allow app creation after moving
* fix lint
* remove unnecessary field
* fix cache update
* add e2e test
* add e2e test of accepting the new account automatically
* force follow if any error happens
* remove unnecessary joins
* use Array.map instead of for const of
* ユーザーリストの移行は追加のみを行う
* nanka iroiro
* fix misskey-js?
* :v:
* 移行を行ったアカウントからのフォローリクエストの自動許可を調整
* newUriを外に出す
* newUriを外に出す2
* clean up
* fix newUri
* prevent moving if the destination account has already moved
* set alsoKnownAs via /i/update
* fix database initialization
* add return type
* prohibit updating alsoKnownAs after moving
* skip to add to alsoKnownAs if toUrl is known
* skip adding to the list if it already has
* use Acct.parse instead
* rename error code
* :art:
* 制限を5から10に緩和
* movedTo(Uri), alsoKnownAsはユーザーidを返すように
* test api res
* fix
* 元アカウントはミュートし続ける
* :art:
* unfollow
* fix
* getUserUriをUserEntityServiceに
* ?
* job!
* :art:
* instance => server
* accountMovedShort, forbiddenBecauseYouAreMigrated
* accountMovedShort
* fix test
* import, pin禁止
* 実績を凍結する
* clean up
* :v:
* change message
* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに
* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"
This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.
* validateAlsoKnownAs
* 移行後2時間以内はインポート可能なファイルサイズを拡大
* clean up
* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする
* handle error?
* リモートからの移行処理の条件を是正
* log, port
* fix
* fix
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
* fix indent
* fix
* experimental
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-29 17:09:29 +02:00
|
|
|
alsoKnownAs: string[];
|
2023-03-30 02:33:19 +02:00
|
|
|
bannerBlurhash: string | null;
|
|
|
|
bannerColor: string | null;
|
|
|
|
bannerUrl: string | null;
|
|
|
|
birthday: string | null;
|
|
|
|
createdAt: DateString;
|
|
|
|
description: string | null;
|
|
|
|
ffVisibility: 'public' | 'followers' | 'private';
|
|
|
|
fields: {name: string; value: string}[];
|
2023-09-21 04:58:51 +02:00
|
|
|
verifiedLinks: string[];
|
2023-03-30 02:33:19 +02:00
|
|
|
followersCount: number;
|
|
|
|
followingCount: number;
|
|
|
|
hasPendingFollowRequestFromYou: boolean;
|
|
|
|
hasPendingFollowRequestToYou: boolean;
|
|
|
|
isAdmin: boolean;
|
|
|
|
isBlocked: boolean;
|
|
|
|
isBlocking: boolean;
|
|
|
|
isBot: boolean;
|
|
|
|
isCat: boolean;
|
|
|
|
isFollowed: boolean;
|
|
|
|
isFollowing: boolean;
|
|
|
|
isLocked: boolean;
|
|
|
|
isModerator: boolean;
|
|
|
|
isMuted: boolean;
|
|
|
|
isSilenced: boolean;
|
|
|
|
isSuspended: boolean;
|
|
|
|
lang: string | null;
|
|
|
|
lastFetchedAt?: DateString;
|
|
|
|
location: string | null;
|
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs
* copy block and mute and update lists when detecting an account has moved
* no need to care promise orders
* refactor updating actor and target
* automatically accept if a locked account had accepted an old account
* fix exception format
* prevent the old account from calling some endpoints
* do not unfollow when moving
* adjust following and follower counts
* check movedToUri when receiving a follow request
* skip if no need to adjust
* Revert "disable account migration"
This reverts commit 2321214c98591bcfe1385c1ab5bf0ff7b471ae1d.
* fix translation specifier
* fix checking alsoKnownAs and uri
* fix updating account
* fix refollowing locked account
* decrease followersCount if followed by the old account
* adjust following and followers counts when unfollowing
* fix copying mutings
* prohibit moved account from moving again
* fix move service
* allow app creation after moving
* fix lint
* remove unnecessary field
* fix cache update
* add e2e test
* add e2e test of accepting the new account automatically
* force follow if any error happens
* remove unnecessary joins
* use Array.map instead of for const of
* ユーザーリストの移行は追加のみを行う
* nanka iroiro
* fix misskey-js?
* :v:
* 移行を行ったアカウントからのフォローリクエストの自動許可を調整
* newUriを外に出す
* newUriを外に出す2
* clean up
* fix newUri
* prevent moving if the destination account has already moved
* set alsoKnownAs via /i/update
* fix database initialization
* add return type
* prohibit updating alsoKnownAs after moving
* skip to add to alsoKnownAs if toUrl is known
* skip adding to the list if it already has
* use Acct.parse instead
* rename error code
* :art:
* 制限を5から10に緩和
* movedTo(Uri), alsoKnownAsはユーザーidを返すように
* test api res
* fix
* 元アカウントはミュートし続ける
* :art:
* unfollow
* fix
* getUserUriをUserEntityServiceに
* ?
* job!
* :art:
* instance => server
* accountMovedShort, forbiddenBecauseYouAreMigrated
* accountMovedShort
* fix test
* import, pin禁止
* 実績を凍結する
* clean up
* :v:
* change message
* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに
* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"
This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.
* validateAlsoKnownAs
* 移行後2時間以内はインポート可能なファイルサイズを拡大
* clean up
* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする
* handle error?
* リモートからの移行処理の条件を是正
* log, port
* fix
* fix
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
* fix indent
* fix
* experimental
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-29 17:09:29 +02:00
|
|
|
movedTo: string;
|
2023-03-30 02:33:19 +02:00
|
|
|
notesCount: number;
|
|
|
|
pinnedNoteIds: ID[];
|
|
|
|
pinnedNotes: Note[];
|
|
|
|
pinnedPage: Page | null;
|
|
|
|
pinnedPageId: string | null;
|
|
|
|
publicReactions: boolean;
|
|
|
|
securityKeys: boolean;
|
|
|
|
twoFactorEnabled: boolean;
|
|
|
|
updatedAt: DateString | null;
|
|
|
|
uri: string | null;
|
|
|
|
url: string | null;
|
2023-09-21 11:48:15 +02:00
|
|
|
notify: 'normal' | 'none';
|
2023-03-30 02:33:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type UserGroup = TODO;
|
|
|
|
|
|
|
|
export type UserList = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
name: string;
|
|
|
|
userIds: User['id'][];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type MeDetailed = UserDetailed & {
|
|
|
|
avatarId: DriveFile['id'];
|
|
|
|
bannerId: DriveFile['id'];
|
|
|
|
autoAcceptFollowed: boolean;
|
|
|
|
alwaysMarkNsfw: boolean;
|
|
|
|
carefulBot: boolean;
|
|
|
|
emailNotificationTypes: string[];
|
|
|
|
hasPendingReceivedFollowRequest: boolean;
|
|
|
|
hasUnreadAnnouncement: boolean;
|
|
|
|
hasUnreadAntenna: boolean;
|
|
|
|
hasUnreadMentions: boolean;
|
|
|
|
hasUnreadMessagingMessage: boolean;
|
|
|
|
hasUnreadNotification: boolean;
|
|
|
|
hasUnreadSpecifiedNotes: boolean;
|
|
|
|
hideOnlineStatus: boolean;
|
|
|
|
injectFeaturedNote: boolean;
|
|
|
|
integrations: Record<string, any>;
|
|
|
|
isDeleted: boolean;
|
|
|
|
isExplorable: boolean;
|
|
|
|
mutedWords: string[][];
|
2023-09-29 04:29:54 +02:00
|
|
|
notificationRecieveConfig: {
|
|
|
|
[notificationType in typeof notificationTypes[number]]?: {
|
|
|
|
type: 'all';
|
|
|
|
} | {
|
|
|
|
type: 'never';
|
|
|
|
} | {
|
|
|
|
type: 'following';
|
|
|
|
} | {
|
|
|
|
type: 'follower';
|
|
|
|
} | {
|
|
|
|
type: 'mutualFollow';
|
|
|
|
} | {
|
|
|
|
type: 'list';
|
|
|
|
userListId: string;
|
|
|
|
};
|
|
|
|
};
|
2023-03-30 02:33:19 +02:00
|
|
|
noCrawle: boolean;
|
|
|
|
receiveAnnouncementEmail: boolean;
|
|
|
|
usePasswordLessLogin: boolean;
|
2023-08-13 13:12:29 +02:00
|
|
|
unreadAnnouncements: Announcement[];
|
2023-08-28 11:25:31 +02:00
|
|
|
twoFactorBackupCodesStock: 'full' | 'partial' | 'none';
|
2023-03-30 02:33:19 +02:00
|
|
|
[other: string]: any;
|
|
|
|
};
|
|
|
|
|
2023-06-25 01:34:18 +02:00
|
|
|
export type MeDetailedWithSecret = MeDetailed & {
|
|
|
|
email: string;
|
|
|
|
emailVerified: boolean;
|
|
|
|
securityKeysList: {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
lastUsed: string;
|
|
|
|
}[];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type MeSignup = MeDetailedWithSecret & {
|
|
|
|
token: string;
|
|
|
|
};
|
|
|
|
|
2023-03-30 02:33:19 +02:00
|
|
|
export type DriveFile = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
isSensitive: boolean;
|
|
|
|
name: string;
|
|
|
|
thumbnailUrl: string;
|
|
|
|
url: string;
|
|
|
|
type: string;
|
|
|
|
size: number;
|
|
|
|
md5: string;
|
|
|
|
blurhash: string;
|
|
|
|
comment: string | null;
|
|
|
|
properties: Record<string, any>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DriveFolder = TODO;
|
|
|
|
|
|
|
|
export type GalleryPost = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
updatedAt: DateString;
|
|
|
|
userId: User['id'];
|
|
|
|
user: User;
|
|
|
|
title: string;
|
|
|
|
description: string | null;
|
|
|
|
fileIds: DriveFile['id'][];
|
|
|
|
files: DriveFile[];
|
|
|
|
isSensitive: boolean;
|
|
|
|
likedCount: number;
|
|
|
|
isLiked?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Note = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
text: string | null;
|
|
|
|
cw: string | null;
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
reply?: Note;
|
|
|
|
replyId: Note['id'];
|
|
|
|
renote?: Note;
|
|
|
|
renoteId: Note['id'];
|
|
|
|
files: DriveFile[];
|
|
|
|
fileIds: DriveFile['id'][];
|
|
|
|
visibility: 'public' | 'home' | 'followers' | 'specified';
|
|
|
|
visibleUserIds?: User['id'][];
|
|
|
|
localOnly?: boolean;
|
|
|
|
myReaction?: string;
|
|
|
|
reactions: Record<string, number>;
|
|
|
|
renoteCount: number;
|
|
|
|
repliesCount: number;
|
2023-09-17 03:55:26 +02:00
|
|
|
clippedCount?: number;
|
2023-03-30 02:33:19 +02:00
|
|
|
poll?: {
|
|
|
|
expiresAt: DateString | null;
|
|
|
|
multiple: boolean;
|
|
|
|
choices: {
|
|
|
|
isVoted: boolean;
|
|
|
|
text: string;
|
|
|
|
votes: number;
|
|
|
|
}[];
|
|
|
|
};
|
|
|
|
emojis: {
|
|
|
|
name: string;
|
|
|
|
url: string;
|
|
|
|
}[];
|
|
|
|
uri?: string;
|
|
|
|
url?: string;
|
|
|
|
isHidden?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type NoteReaction = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
user: UserLite;
|
|
|
|
type: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Notification = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
isRead: boolean;
|
|
|
|
} & ({
|
|
|
|
type: 'reaction';
|
|
|
|
reaction: string;
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'reply';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'renote';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'quote';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'mention';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
2023-09-21 11:48:15 +02:00
|
|
|
type: 'note';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'pollEnded';
|
2023-03-30 02:33:19 +02:00
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
note: Note;
|
|
|
|
} | {
|
|
|
|
type: 'follow';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
} | {
|
|
|
|
type: 'followRequestAccepted';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
} | {
|
|
|
|
type: 'receiveFollowRequest';
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
} | {
|
|
|
|
type: 'groupInvited';
|
|
|
|
invitation: UserGroup;
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
2023-10-09 06:32:41 +02:00
|
|
|
} | {
|
|
|
|
type: 'achievementEarned';
|
|
|
|
achievement: string;
|
2023-03-30 02:33:19 +02:00
|
|
|
} | {
|
|
|
|
type: 'app';
|
|
|
|
header?: string | null;
|
|
|
|
body: string;
|
|
|
|
icon?: string | null;
|
2023-09-11 07:31:50 +02:00
|
|
|
} | {
|
|
|
|
type: 'test';
|
2023-03-30 02:33:19 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export type MessagingMessage = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
file: DriveFile | null;
|
|
|
|
fileId: DriveFile['id'] | null;
|
|
|
|
isRead: boolean;
|
|
|
|
reads: User['id'][];
|
|
|
|
text: string | null;
|
|
|
|
user: User;
|
|
|
|
userId: User['id'];
|
|
|
|
recipient?: User | null;
|
|
|
|
recipientId: User['id'] | null;
|
|
|
|
group?: UserGroup | null;
|
|
|
|
groupId: UserGroup['id'] | null;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type CustomEmoji = {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
url: string;
|
|
|
|
category: string;
|
|
|
|
aliases: string[];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type LiteInstanceMetadata = {
|
|
|
|
maintainerName: string | null;
|
|
|
|
maintainerEmail: string | null;
|
|
|
|
version: string;
|
|
|
|
name: string | null;
|
2023-09-23 05:38:20 +02:00
|
|
|
shortName: string | null;
|
2023-03-30 02:33:19 +02:00
|
|
|
uri: string;
|
|
|
|
description: string | null;
|
|
|
|
langs: string[];
|
|
|
|
tosUrl: string | null;
|
|
|
|
repositoryUrl: string;
|
|
|
|
feedbackUrl: string;
|
2023-10-07 06:13:13 +02:00
|
|
|
impressumUrl: string | null;
|
|
|
|
privacyPolicyUrl: string | null;
|
2023-03-30 02:33:19 +02:00
|
|
|
disableRegistration: boolean;
|
|
|
|
disableLocalTimeline: boolean;
|
|
|
|
disableGlobalTimeline: boolean;
|
|
|
|
driveCapacityPerLocalUserMb: number;
|
|
|
|
driveCapacityPerRemoteUserMb: number;
|
|
|
|
emailRequiredForSignup: boolean;
|
|
|
|
enableHcaptcha: boolean;
|
|
|
|
hcaptchaSiteKey: string | null;
|
|
|
|
enableRecaptcha: boolean;
|
|
|
|
recaptchaSiteKey: string | null;
|
|
|
|
enableTurnstile: boolean;
|
|
|
|
turnstileSiteKey: string | null;
|
|
|
|
swPublickey: string | null;
|
|
|
|
themeColor: string | null;
|
|
|
|
mascotImageUrl: string | null;
|
|
|
|
bannerUrl: string | null;
|
2023-06-09 07:00:53 +02:00
|
|
|
serverErrorImageUrl: string | null;
|
|
|
|
infoImageUrl: string | null;
|
|
|
|
notFoundImageUrl: string | null;
|
2023-03-30 02:33:19 +02:00
|
|
|
iconUrl: string | null;
|
|
|
|
backgroundImageUrl: string | null;
|
|
|
|
logoImageUrl: string | null;
|
|
|
|
maxNoteTextLength: number;
|
|
|
|
enableEmail: boolean;
|
|
|
|
enableTwitterIntegration: boolean;
|
|
|
|
enableGithubIntegration: boolean;
|
|
|
|
enableDiscordIntegration: boolean;
|
|
|
|
enableServiceWorker: boolean;
|
|
|
|
emojis: CustomEmoji[];
|
|
|
|
defaultDarkTheme: string | null;
|
|
|
|
defaultLightTheme: string | null;
|
|
|
|
ads: {
|
|
|
|
id: ID;
|
|
|
|
ratio: number;
|
|
|
|
place: string;
|
|
|
|
url: string;
|
|
|
|
imageUrl: string;
|
|
|
|
}[];
|
2023-10-08 10:56:44 +02:00
|
|
|
notesPerOneAd: number;
|
2023-03-30 02:33:19 +02:00
|
|
|
translatorAvailable: boolean;
|
2023-04-19 14:24:31 +02:00
|
|
|
serverRules: string[];
|
2023-03-30 02:33:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type DetailedInstanceMetadata = LiteInstanceMetadata & {
|
|
|
|
pinnedPages: string[];
|
|
|
|
pinnedClipId: string | null;
|
|
|
|
cacheRemoteFiles: boolean;
|
2023-07-15 13:12:20 +02:00
|
|
|
cacheRemoteSensitiveFiles: boolean;
|
2023-03-30 02:33:19 +02:00
|
|
|
requireSetup: boolean;
|
|
|
|
proxyAccountName: string | null;
|
|
|
|
features: Record<string, any>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
|
|
|
|
|
2023-07-31 05:22:57 +02:00
|
|
|
export type AdminInstanceMetadata = DetailedInstanceMetadata & {
|
|
|
|
// TODO: There are more fields.
|
|
|
|
blockedHosts: string[];
|
2023-10-16 13:11:27 +02:00
|
|
|
silencedHosts: string[];
|
2023-09-16 10:05:17 +02:00
|
|
|
app192IconUrl: string | null;
|
|
|
|
app512IconUrl: string | null;
|
|
|
|
manifestJsonOverride: string;
|
2023-07-31 05:22:57 +02:00
|
|
|
};
|
|
|
|
|
2023-03-30 02:33:19 +02:00
|
|
|
export type ServerInfo = {
|
|
|
|
machine: string;
|
|
|
|
cpu: {
|
|
|
|
model: string;
|
|
|
|
cores: number;
|
|
|
|
};
|
|
|
|
mem: {
|
|
|
|
total: number;
|
|
|
|
};
|
|
|
|
fs: {
|
|
|
|
total: number;
|
|
|
|
used: number;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Stats = {
|
|
|
|
notesCount: number;
|
|
|
|
originalNotesCount: number;
|
|
|
|
usersCount: number;
|
|
|
|
originalUsersCount: number;
|
|
|
|
instances: number;
|
|
|
|
driveUsageLocal: number;
|
|
|
|
driveUsageRemote: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Page = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
updatedAt: DateString;
|
|
|
|
userId: User['id'];
|
|
|
|
user: User;
|
|
|
|
content: Record<string, any>[];
|
|
|
|
variables: Record<string, any>[];
|
|
|
|
title: string;
|
|
|
|
name: string;
|
|
|
|
summary: string | null;
|
|
|
|
hideTitleWhenPinned: boolean;
|
|
|
|
alignCenter: boolean;
|
|
|
|
font: string;
|
|
|
|
script: string;
|
|
|
|
eyeCatchingImageId: DriveFile['id'] | null;
|
|
|
|
eyeCatchingImage: DriveFile | null;
|
|
|
|
attachedFiles: any;
|
|
|
|
likedCount: number;
|
|
|
|
isLiked?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type PageEvent = {
|
|
|
|
pageId: Page['id'];
|
|
|
|
event: string;
|
|
|
|
var: any;
|
|
|
|
userId: User['id'];
|
|
|
|
user: User;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Announcement = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
updatedAt: DateString | null;
|
|
|
|
text: string;
|
|
|
|
title: string;
|
|
|
|
imageUrl: string | null;
|
2023-08-13 13:12:29 +02:00
|
|
|
display: 'normal' | 'banner' | 'dialog';
|
|
|
|
icon: 'info' | 'warning' | 'error' | 'success';
|
|
|
|
needConfirmationToRead: boolean;
|
|
|
|
forYou: boolean;
|
2023-03-30 02:33:19 +02:00
|
|
|
isRead?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Antenna = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
name: string;
|
|
|
|
keywords: string[][]; // TODO
|
|
|
|
excludeKeywords: string[][]; // TODO
|
|
|
|
src: 'home' | 'all' | 'users' | 'list' | 'group';
|
|
|
|
userListId: ID | null; // TODO
|
|
|
|
userGroupId: ID | null; // TODO
|
|
|
|
users: string[]; // TODO
|
|
|
|
caseSensitive: boolean;
|
2023-10-16 08:06:00 +02:00
|
|
|
localOnly: boolean;
|
2023-03-30 02:33:19 +02:00
|
|
|
notify: boolean;
|
|
|
|
withReplies: boolean;
|
|
|
|
withFile: boolean;
|
|
|
|
hasUnreadNote: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type App = TODO;
|
|
|
|
|
|
|
|
export type AuthSession = {
|
|
|
|
id: ID;
|
|
|
|
app: App;
|
|
|
|
token: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Ad = TODO;
|
|
|
|
|
|
|
|
export type Clip = TODO;
|
|
|
|
|
|
|
|
export type NoteFavorite = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
noteId: Note['id'];
|
|
|
|
note: Note;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type FollowRequest = {
|
|
|
|
id: ID;
|
|
|
|
follower: User;
|
|
|
|
followee: User;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Channel = {
|
|
|
|
id: ID;
|
|
|
|
// TODO
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Following = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
followerId: User['id'];
|
|
|
|
followeeId: User['id'];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type FollowingFolloweePopulated = Following & {
|
|
|
|
followee: UserDetailed;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type FollowingFollowerPopulated = Following & {
|
|
|
|
follower: UserDetailed;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Blocking = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
blockeeId: User['id'];
|
|
|
|
blockee: UserDetailed;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Instance = {
|
|
|
|
id: ID;
|
2023-07-31 05:22:57 +02:00
|
|
|
firstRetrievedAt: DateString;
|
2023-03-30 02:33:19 +02:00
|
|
|
host: string;
|
|
|
|
usersCount: number;
|
|
|
|
notesCount: number;
|
|
|
|
followingCount: number;
|
|
|
|
followersCount: number;
|
|
|
|
driveUsage: number;
|
|
|
|
driveFiles: number;
|
|
|
|
latestRequestSentAt: DateString | null;
|
|
|
|
latestStatus: number | null;
|
|
|
|
latestRequestReceivedAt: DateString | null;
|
|
|
|
lastCommunicatedAt: DateString;
|
|
|
|
isNotResponding: boolean;
|
|
|
|
isSuspended: boolean;
|
2023-10-16 13:11:27 +02:00
|
|
|
isSilenced: boolean;
|
2023-07-31 05:22:57 +02:00
|
|
|
isBlocked: boolean;
|
2023-03-30 02:33:19 +02:00
|
|
|
softwareName: string | null;
|
|
|
|
softwareVersion: string | null;
|
|
|
|
openRegistrations: boolean | null;
|
|
|
|
name: string | null;
|
|
|
|
description: string | null;
|
|
|
|
maintainerName: string | null;
|
|
|
|
maintainerEmail: string | null;
|
|
|
|
iconUrl: string | null;
|
|
|
|
faviconUrl: string | null;
|
|
|
|
themeColor: string | null;
|
|
|
|
infoUpdatedAt: DateString | null;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Signin = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
ip: string;
|
|
|
|
headers: Record<string, any>;
|
|
|
|
success: boolean;
|
|
|
|
};
|
|
|
|
|
2023-07-15 02:57:58 +02:00
|
|
|
export type Invite = {
|
|
|
|
id: ID;
|
|
|
|
code: string;
|
|
|
|
expiresAt: DateString | null;
|
|
|
|
createdAt: DateString;
|
|
|
|
createdBy: UserLite | null;
|
|
|
|
usedBy: UserLite | null;
|
|
|
|
usedAt: DateString | null;
|
|
|
|
used: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type InviteLimit = {
|
|
|
|
remaining: number;
|
|
|
|
}
|
|
|
|
|
2023-03-30 02:33:19 +02:00
|
|
|
export type UserSorting =
|
|
|
|
| '+follower'
|
|
|
|
| '-follower'
|
|
|
|
| '+createdAt'
|
|
|
|
| '-createdAt'
|
|
|
|
| '+updatedAt'
|
|
|
|
| '-updatedAt';
|
|
|
|
export type OriginType = 'combined' | 'local' | 'remote';
|
2023-09-23 11:28:16 +02:00
|
|
|
|
|
|
|
export type ModerationLog = {
|
|
|
|
id: ID;
|
|
|
|
createdAt: DateString;
|
|
|
|
userId: User['id'];
|
|
|
|
user: UserDetailed | null;
|
|
|
|
} & ({
|
|
|
|
type: 'updateServerSettings';
|
|
|
|
info: ModerationLogPayloads['updateServerSettings'];
|
|
|
|
} | {
|
|
|
|
type: 'suspend';
|
|
|
|
info: ModerationLogPayloads['suspend'];
|
|
|
|
} | {
|
|
|
|
type: 'unsuspend';
|
|
|
|
info: ModerationLogPayloads['unsuspend'];
|
|
|
|
} | {
|
|
|
|
type: 'updateUserNote';
|
|
|
|
info: ModerationLogPayloads['updateUserNote'];
|
|
|
|
} | {
|
|
|
|
type: 'addCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['addCustomEmoji'];
|
2023-09-24 03:57:24 +02:00
|
|
|
} | {
|
|
|
|
type: 'updateCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['updateCustomEmoji'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteCustomEmoji';
|
|
|
|
info: ModerationLogPayloads['deleteCustomEmoji'];
|
2023-09-23 11:28:16 +02:00
|
|
|
} | {
|
|
|
|
type: 'assignRole';
|
|
|
|
info: ModerationLogPayloads['assignRole'];
|
|
|
|
} | {
|
|
|
|
type: 'unassignRole';
|
|
|
|
info: ModerationLogPayloads['unassignRole'];
|
2023-09-25 03:29:12 +02:00
|
|
|
} | {
|
|
|
|
type: 'createRole';
|
|
|
|
info: ModerationLogPayloads['createRole'];
|
2023-09-23 11:28:16 +02:00
|
|
|
} | {
|
|
|
|
type: 'updateRole';
|
|
|
|
info: ModerationLogPayloads['updateRole'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteRole';
|
|
|
|
info: ModerationLogPayloads['deleteRole'];
|
|
|
|
} | {
|
|
|
|
type: 'clearQueue';
|
|
|
|
info: ModerationLogPayloads['clearQueue'];
|
|
|
|
} | {
|
|
|
|
type: 'promoteQueue';
|
|
|
|
info: ModerationLogPayloads['promoteQueue'];
|
2023-09-24 03:46:09 +02:00
|
|
|
} | {
|
|
|
|
type: 'deleteDriveFile';
|
|
|
|
info: ModerationLogPayloads['deleteDriveFile'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteNote';
|
|
|
|
info: ModerationLogPayloads['deleteNote'];
|
|
|
|
} | {
|
|
|
|
type: 'createGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['createGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'createUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['createUserAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'updateGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['updateGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'updateUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['updateUserAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteGlobalAnnouncement';
|
|
|
|
info: ModerationLogPayloads['deleteGlobalAnnouncement'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteUserAnnouncement';
|
|
|
|
info: ModerationLogPayloads['deleteUserAnnouncement'];
|
2023-09-23 13:50:02 +02:00
|
|
|
} | {
|
|
|
|
type: 'resetPassword';
|
|
|
|
info: ModerationLogPayloads['resetPassword'];
|
|
|
|
} | {
|
|
|
|
type: 'suspendRemoteInstance';
|
|
|
|
info: ModerationLogPayloads['suspendRemoteInstance'];
|
|
|
|
} | {
|
|
|
|
type: 'unsuspendRemoteInstance';
|
|
|
|
info: ModerationLogPayloads['unsuspendRemoteInstance'];
|
2023-09-24 08:40:38 +02:00
|
|
|
} | {
|
|
|
|
type: 'markSensitiveDriveFile';
|
|
|
|
info: ModerationLogPayloads['markSensitiveDriveFile'];
|
|
|
|
} | {
|
|
|
|
type: 'unmarkSensitiveDriveFile';
|
|
|
|
info: ModerationLogPayloads['unmarkSensitiveDriveFile'];
|
2023-09-28 03:02:05 +02:00
|
|
|
} | {
|
|
|
|
type: 'createInvitation';
|
|
|
|
info: ModerationLogPayloads['createInvitation'];
|
2023-09-29 08:01:13 +02:00
|
|
|
} | {
|
|
|
|
type: 'createAd';
|
|
|
|
info: ModerationLogPayloads['createAd'];
|
|
|
|
} | {
|
|
|
|
type: 'updateAd';
|
|
|
|
info: ModerationLogPayloads['updateAd'];
|
|
|
|
} | {
|
|
|
|
type: 'deleteAd';
|
|
|
|
info: ModerationLogPayloads['deleteAd'];
|
2023-09-23 11:28:16 +02:00
|
|
|
});
|