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,
|
|
|
|
},
|
|
|
|
isAdmin: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
isModerator: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
isBot: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
isCat: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: true,
|
|
|
|
},
|
|
|
|
onlineStatus: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
enum: ['unknown', 'online', 'active', 'offline'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} 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-04-08 05:16:26 +00:00
|
|
|
movedToUri: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'uri',
|
|
|
|
nullable: true,
|
|
|
|
optional: false,
|
|
|
|
},
|
|
|
|
alsoKnownAs: {
|
|
|
|
type: 'array',
|
|
|
|
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-04-29 10:24:33 +00:00
|
|
|
nullable: false,
|
|
|
|
optional: false,
|
|
|
|
},
|
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
|
|
|
},
|
|
|
|
},
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
//#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-04-13 04:17:32 +00:00
|
|
|
memo: {
|
|
|
|
type: 'string',
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
injectFeaturedNote: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
receiveAnnouncementEmail: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
alwaysMarkNsfw: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2022-07-07 12:06:37 +00:00
|
|
|
autoSensitive: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
carefulBot: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
autoAcceptFollowed: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
noCrawle: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
},
|
|
|
|
isExplorable: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
isDeleted: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
hasUnreadAntenna: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasUnreadNotification: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
hasPendingReceivedFollowRequest: {
|
|
|
|
type: 'boolean',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
mutedWords: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mutedInstances: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mutingNotificationTypes: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emailNotificationTypes: {
|
|
|
|
type: 'array',
|
|
|
|
nullable: true, optional: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
nullable: false, optional: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//#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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//#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',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} as const;
|