2023-07-27 05:31:52 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-12-04 07:53:31 +00:00
|
|
|
const notificationRecieveConfig = {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
properties: {
|
|
|
|
type: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
enum: ['all', 'following', 'follower', 'mutualFollow', 'list', 'never'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
2022-01-18 13:27:10 +00:00
|
|
|
export const packedUserLiteSchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
example: '藍',
|
|
|
|
},
|
|
|
|
username: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
example: 'ai',
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
example: 'misskey.example.com',
|
2022-04-03 04:57:26 +00:00
|
|
|
description: 'The local host is represented with `null`.',
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
avatarUrl: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
avatarBlurhash: {
|
2023-03-13 14:13:51 +00:00
|
|
|
type: 'string',
|
2022-01-18 13:27:10 +00:00
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2023-10-21 09:38:07 +00:00
|
|
|
avatarDecorations: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
2023-10-22 04:02:24 +00:00
|
|
|
angle: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
flipH: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
url: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-12-16 00:00:32 +00:00
|
|
|
offsetX: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
offsetY: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-10-21 09:38:07 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
isBot: {
|
2022-01-18 13:27:10 +00:00
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
isCat: {
|
2022-01-18 13:27:10 +00:00
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
instance: {
|
|
|
|
type: 'object',
|
2022-01-18 13:27:10 +00:00
|
|
|
nullable: false, optional: true,
|
2023-11-21 02:13:56 +00:00
|
|
|
properties: {
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
softwareName: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
softwareVersion: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
iconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
faviconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
themeColor: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
emojis: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
onlineStatus: {
|
|
|
|
type: 'string',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
enum: ['unknown', 'online', 'active', 'offline'],
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
badgeRoles: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
properties: {
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
iconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
displayOrder: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedUserDetailedNotMeOnlySchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
url: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
uri: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'uri',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
movedTo: {
|
2023-04-08 05:16:26 +00:00
|
|
|
type: 'string',
|
|
|
|
format: 'uri',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: true, optional: false,
|
2023-04-08 05:16:26 +00:00
|
|
|
},
|
|
|
|
alsoKnownAs: {
|
|
|
|
type: 'array',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: true, optional: false,
|
2023-04-29 10:24:33 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
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 15:09:29 +00:00
|
|
|
format: 'id',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2023-04-29 10:24:33 +00:00
|
|
|
},
|
2023-04-08 05:16:26 +00:00
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
updatedAt: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
lastFetchedAt: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
bannerUrl: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
bannerBlurhash: {
|
2023-03-13 14:13:51 +00:00
|
|
|
type: 'string',
|
2022-01-18 13:27:10 +00:00
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
isLocked: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
isSilenced: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
isSuspended: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
example: false,
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
example: 'Hi masters, I am Ai!',
|
|
|
|
},
|
|
|
|
location: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
birthday: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
example: '2018-03-12',
|
|
|
|
},
|
|
|
|
lang: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
example: 'ja-JP',
|
|
|
|
},
|
|
|
|
fields: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
2023-05-02 12:14:22 +00:00
|
|
|
maxItems: 16,
|
2022-01-18 13:27:10 +00:00
|
|
|
items: {
|
2022-07-07 12:06:37 +00:00
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
properties: {
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
2022-07-07 12:06:37 +00:00
|
|
|
value: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
},
|
2023-09-21 02:58:51 +00:00
|
|
|
verifiedLinks: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'url',
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
followersCount: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
followingCount: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
notesCount: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
pinnedNoteIds: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pinnedNotes: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
ref: 'Note',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pinnedPageId: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
pinnedPage: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
ref: 'Page',
|
|
|
|
},
|
|
|
|
publicReactions: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-12-18 11:59:20 +00:00
|
|
|
followingVisibility: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
enum: ['public', 'followers', 'private'],
|
|
|
|
},
|
|
|
|
followersVisibility: {
|
2023-11-21 02:13:56 +00:00
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
enum: ['public', 'followers', 'private'],
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
twoFactorEnabled: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
usePasswordLessLogin: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
securityKeys: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
default: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
roles: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
2023-12-06 06:47:57 +00:00
|
|
|
ref: 'RoleLite',
|
2023-11-21 02:13:56 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
memo: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
moderationNote: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
//#region relations
|
|
|
|
isFollowing: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
isFollowed: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
hasPendingFollowRequestFromYou: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
hasPendingFollowRequestToYou: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
isBlocking: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
isBlocked: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
isMuted: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-03-07 23:56:09 +00:00
|
|
|
isRenoteMuted: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2023-09-21 09:48:15 +00:00
|
|
|
notify: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: true,
|
2023-12-04 07:53:31 +00:00
|
|
|
enum: ['normal', 'none'],
|
2023-09-21 09:48:15 +00:00
|
|
|
},
|
2023-10-03 11:26:11 +00:00
|
|
|
withReplies: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
//#endregion
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedMeDetailedOnlySchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
avatarId: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
bannerId: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
isModerator: {
|
2022-01-18 13:27:10 +00:00
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
isAdmin: {
|
2022-01-18 13:27:10 +00:00
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
injectFeaturedNote: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
receiveAnnouncementEmail: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
alwaysMarkNsfw: {
|
|
|
|
type: 'boolean',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
2022-07-07 12:06:37 +00:00
|
|
|
autoSensitive: {
|
|
|
|
type: 'boolean',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-07-07 12:06:37 +00:00
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
carefulBot: {
|
|
|
|
type: 'boolean',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
autoAcceptFollowed: {
|
|
|
|
type: 'boolean',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
noCrawle: {
|
|
|
|
type: 'boolean',
|
2023-05-10 01:52:41 +00:00
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-05-11 07:22:46 +00:00
|
|
|
preventAiLearning: {
|
2023-05-10 01:52:41 +00:00
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
isExplorable: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
isDeleted: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-08-28 09:25:31 +00:00
|
|
|
twoFactorBackupCodesStock: {
|
|
|
|
type: 'string',
|
|
|
|
enum: ['full', 'partial', 'none'],
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
hideOnlineStatus: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasUnreadSpecifiedNotes: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasUnreadMentions: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasUnreadAnnouncement: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
unreadAnnouncements: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
ref: 'Announcement',
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
hasUnreadAntenna: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
hasUnreadChannel: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
hasUnreadNotification: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasPendingReceivedFollowRequest: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-11-01 04:34:05 +00:00
|
|
|
unreadNotificationsCount: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
mutedWords: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-23 09:56:20 +00:00
|
|
|
hardMutedWords: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
mutedInstances: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
2023-09-29 02:29:54 +00:00
|
|
|
notificationRecieveConfig: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
2023-12-04 07:53:31 +00:00
|
|
|
properties: {
|
|
|
|
app: notificationRecieveConfig,
|
|
|
|
quote: notificationRecieveConfig,
|
|
|
|
reply: notificationRecieveConfig,
|
|
|
|
follow: notificationRecieveConfig,
|
|
|
|
renote: notificationRecieveConfig,
|
|
|
|
mention: notificationRecieveConfig,
|
|
|
|
reaction: notificationRecieveConfig,
|
|
|
|
pollEnded: notificationRecieveConfig,
|
|
|
|
receiveFollowRequest: notificationRecieveConfig,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
emailNotificationTypes: {
|
|
|
|
type: 'array',
|
2023-11-21 02:13:56 +00:00
|
|
|
nullable: false, optional: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
achievements: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
properties: {
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
unlockedAt: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loggedInDays: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
policies: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
properties: {
|
|
|
|
gtlAvailable: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
ltlAvailable: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canPublicNote: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canInvite: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
inviteLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
inviteLimitCycle: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
inviteExpirationTime: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canManageCustomEmojis: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canManageAvatarDecorations: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canSearchNotes: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canUseTranslator: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
canHideAds: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
driveCapacityMb: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
alwaysMarkNsfw: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
pinLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
antennaLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
wordMuteLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
webhookLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
clipLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
noteEachClipsLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
userListLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
userEachUserListsLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
rateLimitFactor: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-12-13 07:56:19 +00:00
|
|
|
avatarDecorationLimit: {
|
|
|
|
type: 'number',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
//#region secrets
|
|
|
|
email: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: true, optional: true,
|
|
|
|
},
|
|
|
|
emailVerified: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: true,
|
|
|
|
},
|
|
|
|
securityKeysList: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
nullable: false, optional: false,
|
2023-12-04 07:53:31 +00:00
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
lastUsed: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
//#endregion
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedUserDetailedNotMeSchema = {
|
|
|
|
type: 'object',
|
|
|
|
allOf: [
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserLite',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserDetailedNotMeOnly',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedMeDetailedSchema = {
|
|
|
|
type: 'object',
|
|
|
|
allOf: [
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserLite',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserDetailedNotMeOnly',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'MeDetailedOnly',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedUserDetailedSchema = {
|
|
|
|
oneOf: [
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserDetailedNotMe',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'MeDetailed',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedUserSchema = {
|
|
|
|
oneOf: [
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserLite',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserDetailed',
|
|
|
|
},
|
2023-11-21 02:13:56 +00:00
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserDetailedNotMe',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'object',
|
|
|
|
ref: 'MeDetailed',
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
],
|
|
|
|
} as const;
|