mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 08:20:10 +00:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
deda2b2782
100 changed files with 3050 additions and 109 deletions
|
@ -41,20 +41,78 @@ export const packedAntennaSchema = {
|
|||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Antenna.',
|
||||
example: 'xxxxxxxxxx',
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Antenna was created.'
|
||||
format: 'date-time'
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the Antenna.'
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
keywords: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
execludeKeywords: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
src: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['home', 'all', 'users', 'list', 'group']
|
||||
},
|
||||
userListId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
userGroupId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
users: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
caseSensitive: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
notify: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
withReplies: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
withFile: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hasUnreadNote: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -46,33 +46,35 @@ export const packedAppSchema = {
|
|||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Note.',
|
||||
example: 'xxxxxxxxxx',
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'アプリケーションの名前'
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
callbackUrl: {
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'コールバックするURL'
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
lastUsedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
permission: {
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
description: 'アプリケーションのシークレットキー'
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isAuthorized: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -182,12 +182,52 @@ export const packedDriveFileSchema = {
|
|||
description: 'The size of this Drive file. (bytes)',
|
||||
example: 51469
|
||||
},
|
||||
isSensitive: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether this Drive file is sensitive.',
|
||||
},
|
||||
blurhash: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
properties: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
width: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 1280
|
||||
},
|
||||
height: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 720
|
||||
},
|
||||
avgColor: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 'rgb(40,65,87)'
|
||||
}
|
||||
}
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The URL of this Drive file.',
|
||||
},
|
||||
thumbnailUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The thumbnail URL of this Drive file.',
|
||||
},
|
||||
comment: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
folderId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
|
@ -195,10 +235,24 @@ export const packedDriveFileSchema = {
|
|||
description: 'The parent folder ID of this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
isSensitive: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether this Drive file is sensitive.',
|
||||
folder: {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
description: 'The parent folder of this Drive file.',
|
||||
ref: 'DriveFolder'
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
description: 'Owner ID of this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
user: {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
description: 'Owner of this Drive file.',
|
||||
ref: 'User'
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
106
src/models/repositories/federation-instance.ts
Normal file
106
src/models/repositories/federation-instance.ts
Normal file
|
@ -0,0 +1,106 @@
|
|||
import config from '../../config';
|
||||
|
||||
export const packedFederationInstanceSchema = {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
caughtAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 'misskey.example.com'
|
||||
},
|
||||
usersCount: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
notesCount: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
followingCount: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
followersCount: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
driveUsage: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
driveFiles: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
latestRequestSentAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
lastCommunicatedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
isNotResponding: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isSuspended: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
softwareName: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
example: 'misskey'
|
||||
},
|
||||
softwareVersion: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
example: config.version
|
||||
},
|
||||
openRegistrations: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
example: true
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
description: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
maintainerName: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
maintainerEmail: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
iconUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url'
|
||||
},
|
||||
infoUpdatedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'date-time'
|
||||
}
|
||||
}
|
||||
};
|
30
src/models/repositories/queue.ts
Normal file
30
src/models/repositories/queue.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
export const packedQueueCountSchema = {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
waiting: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
active: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
completed: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
failed: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
delayed: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
paused: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
};
|
|
@ -330,22 +330,22 @@ export const packedUserSchema = {
|
|||
description: 'The unique identifier for this User.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
username: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'The screen name, handle, or alias that this user identifies themselves with.',
|
||||
example: 'ai'
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
description: 'The name of the user, as they’ve defined it.',
|
||||
example: '藍'
|
||||
},
|
||||
url: {
|
||||
username: {
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: true as const, optional: true as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'The screen name, handle, or alias that this user identifies themselves with.',
|
||||
example: 'ai'
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
example: 'misskey.example.com'
|
||||
},
|
||||
avatarUrl: {
|
||||
type: 'string' as const,
|
||||
|
@ -356,35 +356,69 @@ export const packedUserSchema = {
|
|||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
bannerUrl: {
|
||||
avatarColor: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
default: null
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'Whether this account is the admin.',
|
||||
default: false
|
||||
},
|
||||
isModerator: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'Whether this account is a moderator.',
|
||||
default: false
|
||||
},
|
||||
isBot: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a bot.'
|
||||
},
|
||||
isCat: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a cat.'
|
||||
},
|
||||
emojis: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
aliases: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
bannerBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
emojis: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
example: 'misskey.example.com'
|
||||
},
|
||||
description: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
description: 'The user-defined UTF-8 string describing their account.',
|
||||
example: 'Hi masters, I am Ai!'
|
||||
},
|
||||
birthday: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
example: '2018-03-12'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
|
@ -396,10 +430,63 @@ export const packedUserSchema = {
|
|||
nullable: true as const, optional: true as const,
|
||||
format: 'date-time',
|
||||
},
|
||||
bannerUrl: {
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
bannerBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
bannerColor: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
default: null
|
||||
},
|
||||
isLocked: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
isSuspended: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
example: false
|
||||
},
|
||||
description: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
description: 'The user-defined UTF-8 string describing their account.',
|
||||
example: 'Hi masters, I am Ai!'
|
||||
},
|
||||
location: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
birthday: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
example: '2018-03-12'
|
||||
},
|
||||
fields: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
value: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
}
|
||||
},
|
||||
maxLength: 4
|
||||
}
|
||||
},
|
||||
followersCount: {
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
|
@ -415,11 +502,6 @@ export const packedUserSchema = {
|
|||
nullable: false as const, optional: true as const,
|
||||
description: 'The number of Notes (including renotes) issued by the user.'
|
||||
},
|
||||
isBot: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a bot.'
|
||||
},
|
||||
pinnedNoteIds: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
|
@ -438,24 +520,59 @@ export const packedUserSchema = {
|
|||
ref: 'Note'
|
||||
}
|
||||
},
|
||||
isCat: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a cat.'
|
||||
pinnedPageId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is the admin.'
|
||||
pinnedPage: {
|
||||
type: 'object' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
ref: 'Page'
|
||||
},
|
||||
isModerator: {
|
||||
twoFactorEnabled: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a moderator.'
|
||||
nullable: false as const, optional: false as const,
|
||||
default: false
|
||||
},
|
||||
isLocked: {
|
||||
usePasswordLessLogin: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
default: false
|
||||
},
|
||||
securityKeys: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
default: false
|
||||
},
|
||||
avatarId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
bannerId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
autoWatch: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
injectFeaturedNote: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
alwaysMarkNsfw: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
carefulBot: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
autoAcceptFollowed: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
hasUnreadSpecifiedNotes: {
|
||||
type: 'boolean' as const,
|
||||
|
@ -465,5 +582,69 @@ export const packedUserSchema = {
|
|||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadAnnouncement: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadAntenna: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadChannel: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadMessagingMessage: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadNotification: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasPendingReceivedFollowRequest: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
integrations: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
mutedWords: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
mutingNotificationTypes: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const
|
||||
},
|
||||
isFollowing: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestFromYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestToYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isFollowed: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isBlocking: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isBlocked: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isMuted: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -5,6 +5,11 @@ import { AbuseUserReports } from '../../../../models';
|
|||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '通報一覧を表示します。',
|
||||
'en-US': 'Show list of abuse user reports.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -46,6 +51,74 @@ export const meta = {
|
|||
]),
|
||||
default: 'combined'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this User.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the abuse user report was created on Misskey.'
|
||||
},
|
||||
comment: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'The content of the report.',
|
||||
},
|
||||
resolved: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'Returns whether this report has been resolved',
|
||||
example: false
|
||||
},
|
||||
reporterId: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
description: 'Reporter\'s user ID.'
|
||||
},
|
||||
targetUserId: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
description: 'User ID of the person to be reported.'
|
||||
},
|
||||
assigneeId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
format: 'id',
|
||||
description: 'User ID of the person who responded to the report.'
|
||||
},
|
||||
reporter: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
targetUser: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
assignee: {
|
||||
type: 'object' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
ref: 'User'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ import { Users } from '../../../../../models';
|
|||
import { signup } from '../../../common/signup';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アカウントを作成します。',
|
||||
'en-US': 'Create a account.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
params: {
|
||||
|
@ -13,6 +18,19 @@ export const meta = {
|
|||
password: {
|
||||
validator: Users.validatePassword,
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
properties: {
|
||||
token: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Token to access this user.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import { Announcements } from '../../../../../models';
|
|||
import { genId } from '../../../../../misc/gen-id';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アナウンスを作成します。',
|
||||
'en-US': 'Create a announcement.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -19,6 +24,47 @@ export const meta = {
|
|||
imageUrl: {
|
||||
validator: $.nullable.str.min(1)
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Announcement.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was created.'
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was updated.'
|
||||
},
|
||||
title: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement title.'
|
||||
},
|
||||
text: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement text.'
|
||||
},
|
||||
imageUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Announcement image.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@ export const meta = {
|
|||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'アナウンスを削除します。',
|
||||
'en-US': 'Delete a announcement.'
|
||||
},
|
||||
|
||||
params: {
|
||||
id: {
|
||||
validator: $.type(ID)
|
||||
|
|
|
@ -5,6 +5,11 @@ import { Announcements, AnnouncementReads } from '../../../../../models';
|
|||
import { makePaginationQuery } from '../../../common/make-pagination-query';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アナウンスのリストを表示します。',
|
||||
'en-US': 'List announcements.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -23,6 +28,56 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Announcement.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was created.'
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was updated.'
|
||||
},
|
||||
text: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement text.'
|
||||
},
|
||||
title: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement title.'
|
||||
},
|
||||
imageUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Announcement image.'
|
||||
},
|
||||
reads: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of people who read this announcement.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@ import { Announcements } from '../../../../../models';
|
|||
import { ApiError } from '../../../error';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アナウンスの内容を変更します。',
|
||||
'en-US': 'Update a annoucement.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -5,6 +5,11 @@ import { DriveFiles } from '../../../../models';
|
|||
import { ID } from '../../../../misc/cafy-id';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '対象のユーザーのファイルを全て削除します。',
|
||||
'en-US': 'Delete all files to specified user.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -2,6 +2,11 @@ import define from '../../define';
|
|||
import { Logs } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ログを全て削除します。',
|
||||
'en-US': 'Delete all logs.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -2,6 +2,11 @@ import define from '../../../define';
|
|||
import { createCleanRemoteFilesJob } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'キャッシュされたリモートファイルをすべて削除します。',
|
||||
'en-US': 'Deletes all cached remote files.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -4,6 +4,11 @@ import { deleteFile } from '../../../../../services/drive/delete-file';
|
|||
import { DriveFiles } from '../../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '使用されていないユーザーのファイルを削除します。',
|
||||
'en-US': 'Delete the unused user\'s files.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -5,6 +5,11 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
|
|||
import { ID } from '../../../../../misc/cafy-id';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '管理用のドライブの一覧を表示します。',
|
||||
'en-US': 'Displays a list of management drives.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: false as const,
|
||||
|
@ -41,6 +46,16 @@ export const meta = {
|
|||
validator: $.optional.nullable.str,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,154 @@ export const meta = {
|
|||
code: 'NO_SUCH_FILE',
|
||||
id: 'caf3ca38-c6e5-472e-a30c-b05377dcc240'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Drive file was created on Misskey.'
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
description: 'Owner ID of this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
userHost: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
md5: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'md5',
|
||||
description: 'The MD5 hash of this Drive file.',
|
||||
example: '15eca7fba0480996e2245f5185bf39f2'
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The file name with extension.',
|
||||
example: 'lenna.jpg'
|
||||
},
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The MIME type of this Drive file.',
|
||||
example: 'image/jpeg'
|
||||
},
|
||||
size: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The size of this Drive file. (bytes)',
|
||||
example: 51469
|
||||
},
|
||||
comment: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
blurhash: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
properties: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
width: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 1280
|
||||
},
|
||||
height: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 720
|
||||
},
|
||||
avgColor: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 'rgb(40,65,87)'
|
||||
}
|
||||
}
|
||||
},
|
||||
storedInternal: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Indicates whether this file is stored in the same location as Misskey itself',
|
||||
example: true
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The URL of this Drive file.',
|
||||
},
|
||||
thumbnailUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The thumbnail URL of this Drive file.',
|
||||
},
|
||||
webpublicUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The public URL of this Drive file.',
|
||||
},
|
||||
accessKey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Access key to access this file'
|
||||
},
|
||||
thumbnailAccessKey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Access key to access this file for thumbnail'
|
||||
},
|
||||
webpublicAccessKey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Access key to access this file for webpublic'
|
||||
},
|
||||
uri: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
src: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
folderId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
description: 'The parent folder ID of this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
isSensitive: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether this Drive file is sensitive.',
|
||||
},
|
||||
isLink: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import uploadFromUrl from '../../../../../services/drive/upload-from-url';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '選択したカスタム絵文字をコピーします。',
|
||||
'en-US': 'Copies the selected custom emoji.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -26,6 +31,19 @@ export const meta = {
|
|||
code: 'NO_SUCH_EMOJI',
|
||||
id: 'e2785b66-dca3-4087-9cac-b93c541cc425'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'New copied emoji ID'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'カスタム絵文字を取得します。'
|
||||
'ja-JP': 'リモートのカスタム絵文字一覧を取得します。',
|
||||
'en-US': 'Gets a list of remote custom emojis.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -38,6 +39,52 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Emoji.'
|
||||
},
|
||||
aliases: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'List to make it easier to be displayed as a candidate when entering emoji.',
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Official name of custom emoji.'
|
||||
},
|
||||
category: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Names categorized in the emoji list.'
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'If it is another server, the FQDN will be returned here.'
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Image URL of emoji.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ import { Emoji } from '../../../../../models/entities/emoji';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'カスタム絵文字を取得します。'
|
||||
'ja-JP': 'カスタム絵文字一覧を取得します。',
|
||||
'en-US': 'List custom emojis.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -33,6 +34,52 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Emoji.'
|
||||
},
|
||||
aliases: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'List to make it easier to be displayed as a candidate when entering emoji.',
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Official name of custom emoji.'
|
||||
},
|
||||
category: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Names categorized in the emoji list.'
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'If it is another server, the FQDN will be returned here.'
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Image URL of emoji.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import { deleteFile } from '../../../../../services/drive/delete-file';
|
|||
import { DriveFiles } from '../../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したドメインのファイルを全て削除します。',
|
||||
'en-US': 'Deletes all files in the specified domain.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -4,6 +4,11 @@ import deleteFollowing from '../../../../../services/following/delete';
|
|||
import { Followings, Users } from '../../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したドメインの全ユーザーのフォローを全て解除します。',
|
||||
'en-US': 'Unfollow all users in the specified domain.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -4,6 +4,11 @@ import { Instances } from '../../../../../models';
|
|||
import { toPuny } from '../../../../../misc/convert-host';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したドメインのアクティビティの配信を停止するかを選択します。',
|
||||
'en-US': 'Select whether to undeliver the activity for the specified domain.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -6,6 +6,7 @@ export const meta = {
|
|||
requireModerator: true,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'テーブル情報を取得します。',
|
||||
'en-US': 'Get table stats'
|
||||
},
|
||||
|
||||
|
@ -13,6 +14,17 @@ export const meta = {
|
|||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: {
|
||||
migrations: {
|
||||
count: 66,
|
||||
size: 32768
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async () => {
|
||||
|
|
|
@ -5,7 +5,8 @@ import { genId } from '../../../../misc/gen-id';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '招待コードを発行します。'
|
||||
'ja-JP': '招待コードを発行します。',
|
||||
'en-US': 'Issue an invitation code.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -13,7 +14,22 @@ export const meta = {
|
|||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
params: {}
|
||||
params: {},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
code: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Give this code to the applicant for registration.',
|
||||
example: '2ERUA5VR',
|
||||
maxLength: 8,
|
||||
minLength: 8
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async () => {
|
||||
|
|
|
@ -4,6 +4,11 @@ import { Logs } from '../../../../models';
|
|||
import { Brackets } from 'typeorm';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ログを表示します。',
|
||||
'en-US': 'Show logs.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -24,6 +29,60 @@ export const meta = {
|
|||
validator: $.optional.nullable.str,
|
||||
default: null as any
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this log.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Drive file was created on Misskey.'
|
||||
},
|
||||
domain: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
level: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
worker: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
machine: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the running machine.'
|
||||
},
|
||||
message: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Log body.'
|
||||
},
|
||||
data: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@ import { getNote } from '../../../common/getters';
|
|||
import { PromoNotes } from '../../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'プロモーションを作成します。',
|
||||
'en-US': 'Create a promotion.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -3,6 +3,11 @@ import { destroy } from '../../../../../queue';
|
|||
import { insertModerationLog } from '../../../../../services/insert-moderation-log';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ジョブキューを全て削除します。',
|
||||
'en-US': 'Delete all job queues.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -2,12 +2,42 @@ import define from '../../../define';
|
|||
import { deliverQueue } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '他サーバーへ送るキューの遅延一覧を返します。',
|
||||
'en-US': 'Returns a list of delays in queues sent to other servers.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'string' as const,
|
||||
description: 'FQDN to fediverse server'
|
||||
},
|
||||
{
|
||||
type: 'number' as const,
|
||||
description: 'Delayed queue counts'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
example: [[
|
||||
'example.com',
|
||||
12
|
||||
]]
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,12 +2,42 @@ import define from '../../../define';
|
|||
import { inboxQueue } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'このサーバーへのキューの遅延一覧を返します。',
|
||||
'en-US': 'Returns a list of queue delays to this server.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'string' as const,
|
||||
description: 'FQDN to fediverse server'
|
||||
},
|
||||
{
|
||||
type: 'number' as const,
|
||||
description: 'Delayed queue counts'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
example: [[
|
||||
'example.com',
|
||||
12
|
||||
]]
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ import define from '../../../define';
|
|||
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ジョブ一覧を表示します。',
|
||||
'en-US': 'Display the job list.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -21,6 +26,38 @@ export const meta = {
|
|||
validator: $.optional.num,
|
||||
default: 50
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
data: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
attempts: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
maxAttempts: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
timestamp: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,12 +2,36 @@ import define from '../../../define';
|
|||
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'キューの状態を返します。',
|
||||
'en-US': 'Returns the status of the queue.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
params: {}
|
||||
params: {},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
deliver: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
inbox: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
db: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
objectStorage: {
|
||||
ref: 'QueueCount'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
|
|
|
@ -5,7 +5,8 @@ import { ApiError } from '../../../error';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'Add relay'
|
||||
'ja-JP': 'リレーを追加します。',
|
||||
'en-US': 'Add relay'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -25,6 +26,33 @@ export const meta = {
|
|||
code: 'INVALID_URL',
|
||||
id: 'fb8c92d3-d4e5-44e7-b3d4-800d5cef8b2c'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
inbox: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
status: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 'requesting',
|
||||
enum: [
|
||||
'requesting',
|
||||
'accepted',
|
||||
'rejected'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ import { listRelay } from '../../../../../services/relay';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'List relay'
|
||||
'ja-JP': 'リレー一覧を表示します。',
|
||||
'en-US': 'List relay'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -13,6 +14,37 @@ export const meta = {
|
|||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
inbox: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
status: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 'requesting',
|
||||
enum: [
|
||||
'requesting',
|
||||
'accepted',
|
||||
'rejected'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
@ -4,7 +4,8 @@ import { removeRelay } from '../../../../../services/relay';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'Remove relay'
|
||||
'ja-JP': 'リレーを削除します。',
|
||||
'en-US': 'Remove relay'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
|
|
@ -8,6 +8,7 @@ import { Users, UserProfiles } from '../../../../models';
|
|||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したユーザーのパスワードをリセットします。',
|
||||
'en-US': 'Reset password to specified user.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -23,6 +24,19 @@ export const meta = {
|
|||
'en-US': 'The user ID which you want to suspend'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
password: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
minLength: 8,
|
||||
maxLength: 8
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import define from '../../define';
|
|||
import { AbuseUserReports } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定した通報を解決済みにします。',
|
||||
'en-US': 'Marks the specified report as resolved.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -3,6 +3,11 @@ import { driveChart, notesChart, usersChart, instanceChart } from '../../../../s
|
|||
import { insertModerationLog } from '../../../../services/insert-moderation-log';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'チャートを再同期します。',
|
||||
'en-US': 'Resync the chart.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -3,6 +3,11 @@ import define from '../../define';
|
|||
import { sendEmail } from '../../../../services/send-email';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'メールを送信します。',
|
||||
'en-US': 'Send a mail.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -9,12 +9,100 @@ export const meta = {
|
|||
requireModerator: true,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'サーバー情報を表示します。',
|
||||
'en-US': 'Show server information.'
|
||||
},
|
||||
|
||||
tags: ['admin', 'meta'],
|
||||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
machine: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the running server'
|
||||
},
|
||||
os: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'OS used by the server',
|
||||
example: 'linux'
|
||||
},
|
||||
node: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Version of Node.js'
|
||||
},
|
||||
psql: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Version of Postgresql'
|
||||
},
|
||||
cpu: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
model: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the CPU you are using'
|
||||
},
|
||||
cores: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of CPU cores used (number of logical processors)'
|
||||
}
|
||||
}
|
||||
},
|
||||
mem: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'bytes',
|
||||
description: 'RAM capacity.'
|
||||
}
|
||||
}
|
||||
},
|
||||
fs: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'bytes',
|
||||
description: 'Total storage capacity.'
|
||||
},
|
||||
used: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'bytes',
|
||||
description: 'Amount of storage used'
|
||||
}
|
||||
}
|
||||
},
|
||||
net: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
interface: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The interface name of your network.',
|
||||
example: 'eth0'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async () => {
|
||||
|
|
|
@ -5,6 +5,11 @@ import { ModerationLogs } from '../../../../models';
|
|||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'モデレーションログ一覧を表示します。',
|
||||
'en-US': 'Display the moderation log list.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -23,6 +28,45 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
info: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
user: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ import { Users } from '../../../../models';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したユーザーの情報を取得します。',
|
||||
'ja-JP': '指定したユーザーの情報を取得します(管理者向け)。',
|
||||
'en-US': 'Gets the information of the specified user (for administrators).'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
@ -21,6 +22,149 @@ export const meta = {
|
|||
'en-US': 'The user ID which you want to suspend'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
lastFetchedAt: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
username: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
folowersCount: {
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
followingCount: {
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
notesCount: {
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
avatarId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
bannerId: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
tags: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
}
|
||||
},
|
||||
avatarUrl: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
bannerUrl: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
avatarBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
default: null
|
||||
},
|
||||
bannerBlurhash: {
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
default: null
|
||||
},
|
||||
isSuspended: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
isSilenced: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
isLocked: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
},
|
||||
isBot: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
isCat: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
isModerator: {
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
emojis: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
}
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
inbox: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
sharedInbox: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
featured: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
uri: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
token: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
default: '<MASKED>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ import define from '../../define';
|
|||
import { Users } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '管理者用のユーザー一覧を表示します。',
|
||||
'en-US': 'Displays a list of users for administrators.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -61,6 +66,16 @@ export const meta = {
|
|||
validator: $.optional.str,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import { getConnection } from 'typeorm';
|
|||
import { insertModerationLog } from '../../../../services/insert-moderation-log';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'データベースのメンテナンスを行います。',
|
||||
'en-US': 'Perform database maintenance.'
|
||||
},
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -5,6 +5,11 @@ import { Announcements, AnnouncementReads } from '../../../models';
|
|||
import { makePaginationQuery } from '../common/make-pagination-query';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アナウンスを表示します。',
|
||||
'en-US': 'Show announcements.'
|
||||
},
|
||||
|
||||
tags: ['meta'],
|
||||
|
||||
requireCredential: false as const,
|
||||
|
@ -27,6 +32,56 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Announcement.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was created.'
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Announcement was updated.'
|
||||
},
|
||||
text: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement text.'
|
||||
},
|
||||
title: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Announcement title.'
|
||||
},
|
||||
imageUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'Announcement image.'
|
||||
},
|
||||
isRead: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Indicates that you have read this announcement'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import { ApiError } from '../../error';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アンテナを作成します。',
|
||||
'en-US': 'Create a antenna.'
|
||||
},
|
||||
|
||||
tags: ['antennas'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -70,6 +75,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_USER_GROUP',
|
||||
id: 'aa3c0b9a-8cae-47c0-92ac-202ce5906682'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@ import { ApiError } from '../../error';
|
|||
import { Antennas } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アンテナを削除します。',
|
||||
'en-US': 'Delete a antenna.'
|
||||
},
|
||||
|
||||
tags: ['antennas'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -2,11 +2,26 @@ import define from '../../define';
|
|||
import { Antennas } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アンテナの一覧を取得します。',
|
||||
'en-US': 'Get a list of antennas.'
|
||||
},
|
||||
|
||||
tags: ['antennas', 'account'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
||||
kind: 'read:account',
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
|
|
|
@ -8,6 +8,11 @@ import { generateMutedUserQuery } from '../../common/generate-muted-user-query';
|
|||
import { ApiError } from '../../error';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したアンテナのノート一覧を表示します。',
|
||||
'en-US': 'Displays a list of notes for the specified antenna.'
|
||||
},
|
||||
|
||||
tags: ['antennas', 'account', 'notes'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -39,6 +44,16 @@ export const meta = {
|
|||
code: 'NO_SUCH_ANTENNA',
|
||||
id: '850926e0-fd3b-49b6-b69a-b28a5dbd82fe'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@ import { ApiError } from '../../error';
|
|||
import { Antennas } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したアンテナの情報を取得します。',
|
||||
'en-US': 'Acquires the information of the specified antenna.'
|
||||
},
|
||||
|
||||
tags: ['antennas', 'account'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -23,6 +28,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_ANTENNA',
|
||||
id: 'c06569fb-b025-4f23-b22d-1fcd20d2816b'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@ import { ApiError } from '../../error';
|
|||
import { Antennas, UserLists, UserGroupJoinings } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'アンテナの情報を更新します。',
|
||||
'en-US': 'Updates the information of the specified antenna.'
|
||||
},
|
||||
|
||||
tags: ['antennas'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
@ -79,6 +84,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_USER_GROUP',
|
||||
id: '109ed789-b6eb-456e-b8a9-6059d567d385'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ export const meta = {
|
|||
tags: ['federation'],
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'URIを指定してActivityPubオブジェクトを参照します。'
|
||||
'ja-JP': 'URIを指定してActivityPubオブジェクトを参照します。',
|
||||
'en-US': 'Browse to the ActivityPub object by specifying the URI.'
|
||||
},
|
||||
|
||||
requireCredential: false as const,
|
||||
|
@ -36,6 +37,22 @@ export const meta = {
|
|||
code: 'NO_SUCH_OBJECT',
|
||||
id: 'dc94d745-1262-4e63-a17d-fecaa57efc82'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['User', 'Note']
|
||||
},
|
||||
object: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_APP',
|
||||
id: 'dce83913-2dc6-4093-8a7b-71dbb11718a3'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'App'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -24,6 +24,27 @@ export const meta = {
|
|||
code: 'NO_SUCH_SESSION',
|
||||
id: 'bd72c97d-eba7-4adb-a467-f171b8847250'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
app: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'App'
|
||||
},
|
||||
token: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -52,6 +52,12 @@ export const meta = {
|
|||
code: 'ALREADY_BLOCKING',
|
||||
id: '787fed64-acb9-464a-82eb-afbd745b9614'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -52,6 +52,76 @@ export const meta = {
|
|||
code: 'NOT_BLOCKING',
|
||||
id: '291b2efa-60c6-45c0-9f6a-045c8f9b02cd'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this blocking.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
username: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
avatarUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
avatarBlurhash: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
avatarColor: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
emojis: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'url'
|
||||
},
|
||||
aliases: {
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ export const meta = {
|
|||
validator: $.optional.nullable.str.range(1, 2048)
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Clip'
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
@ -7,6 +7,16 @@ export const meta = {
|
|||
requireCredential: true as const,
|
||||
|
||||
kind: 'read:account',
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Clip'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
|
|
|
@ -39,6 +39,16 @@ export const meta = {
|
|||
code: 'NO_SUCH_CLIP',
|
||||
id: '1d7645e6-2b6d-4635-b0fe-fe22b0e72e00'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_CLIP',
|
||||
id: 'c3c5fe33-d62c-44d2-9ea5-d997703f5c20'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Clip'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -35,6 +35,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_CLIP',
|
||||
id: 'b4d92d70-b216-46fa-9a3f-a8c811699257'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Clip'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -70,6 +70,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_FOLDER',
|
||||
id: 'ea8fb7a5-af77-4a08-b608-c0218176cd73'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_FOLDER',
|
||||
id: '53326628-a00d-40a6-a3cd-8975105c0f95'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -61,6 +61,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_PARENT_FOLDER',
|
||||
id: 'ce104e3a-faaf-49d5-b459-10ff0cbbcaa1'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,12 +2,32 @@ import define from '../define';
|
|||
import endpoints from '../endpoints';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '使用できるAPI一覧を返します。',
|
||||
'en-US': 'Returns a list of available APIs.'
|
||||
},
|
||||
|
||||
requireCredential: false as const,
|
||||
|
||||
tags: ['meta'],
|
||||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
example: [
|
||||
'admin/abuse-user-reports',
|
||||
'admin/accounts/create',
|
||||
'admin/announcements/create',
|
||||
'...'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async () => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import $ from 'cafy';
|
||||
import config from '../../../../config';
|
||||
import define from '../../define';
|
||||
import { Instances } from '../../../../models';
|
||||
import { fetchMeta } from '../../../../misc/fetch-meta';
|
||||
|
@ -50,6 +51,16 @@ export const meta = {
|
|||
sort: {
|
||||
validator: $.optional.str,
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'FederationInstance'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { Instances } from '../../../../models';
|
||||
import { toPuny } from '../../../../misc/convert-host';
|
||||
import config from '../../../../config';
|
||||
|
||||
export const meta = {
|
||||
tags: ['federation'],
|
||||
|
@ -12,6 +13,12 @@ export const meta = {
|
|||
host: {
|
||||
validator: $.str
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'FederationInstance'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -64,6 +64,12 @@ export const meta = {
|
|||
code: 'BLOCKED',
|
||||
id: 'c4ab57cc-4e41-45e9-bfd9-584f61e35ce0'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -52,6 +52,12 @@ export const meta = {
|
|||
code: 'NOT_FOLLOWING',
|
||||
id: '5dbf82f5-c92b-40b1-87d1-6c8c0741fd09'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -40,6 +40,12 @@ export const meta = {
|
|||
code: 'FOLLOW_REQUEST_NOT_FOUND',
|
||||
id: '089b125b-d338-482a-9a09-e2622ac9f8d4'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,33 @@ export const meta = {
|
|||
|
||||
requireCredential: true as const,
|
||||
|
||||
kind: 'read:following'
|
||||
kind: 'read:following',
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
follower: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
followee: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
@ -26,6 +26,113 @@ export const meta = {
|
|||
validator: $.optional.bool,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
startedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
isStarted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isEnded: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
form1: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
form2: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
user1Accepted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
user2Accepted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
user1Id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
user2Id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
user1: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
user2: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
winnerId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
winner: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
ref: 'User'
|
||||
},
|
||||
surrendered: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
black: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
bw: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isLlotheo: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
canPutEverywhere: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
loopedBoard: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -20,6 +20,125 @@ export const meta = {
|
|||
code: 'NO_SUCH_GAME',
|
||||
id: 'f13a03db-fae1-46c9-87f3-43c8165419e1'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
startedAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
isStarted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isEnded: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
form1: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
form2: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
user1Accepted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
user2Accepted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
user1Id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
user2Id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
user1: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
user2: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
winnerId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
winner: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
ref: 'User'
|
||||
},
|
||||
surrendered: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
black: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
bw: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isLlotheo: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
canPutEverywhere: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
loopedBoard: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
board: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
turn: {
|
||||
type: 'any' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,7 +4,48 @@ import { ReversiMatchings } from '../../../../../models';
|
|||
export const meta = {
|
||||
tags: ['games'],
|
||||
|
||||
requireCredential: true as const
|
||||
requireCredential: true as const,
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time'
|
||||
},
|
||||
parentId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
parent: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
},
|
||||
childId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
child: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
@ -9,6 +9,17 @@ export const meta = {
|
|||
kind: 'read:account',
|
||||
|
||||
params: {
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
count: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,23 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
page: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Page'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,16 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Page'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -44,6 +44,12 @@ export const meta = {
|
|||
code: 'ALREADY_PINNED',
|
||||
id: '8b18c2b7-68fe-4edb-9892-c0cbaeb6c913'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,11 @@ import { AnnouncementReads, Announcements, Users } from '../../../../models';
|
|||
import { publishMainStream } from '../../../../services/stream';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したアナウンスを既読にします。',
|
||||
'en-US': 'Marks the specified announcement as read.'
|
||||
},
|
||||
|
||||
tags: ['account'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -32,6 +32,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_NOTE',
|
||||
id: '454170ce-9d63-4a43-9da1-ea10afe81e21'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -196,6 +196,12 @@ export const meta = {
|
|||
code: 'NO_SUCH_PAGE',
|
||||
id: '8e01b590-7eb9-431b-a239-860e086c408e'
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,27 @@ export const meta = {
|
|||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
group: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,14 @@ export const meta = {
|
|||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
maintainerName: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
maintainerEmail: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
version: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
|
@ -37,31 +45,43 @@ export const meta = {
|
|||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of this instance.',
|
||||
},
|
||||
description: {
|
||||
uri: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url',
|
||||
example: 'https://misskey.example.com'
|
||||
},
|
||||
description: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'The description of this instance.',
|
||||
},
|
||||
announcements: {
|
||||
langs: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
title: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The title of the announcement.',
|
||||
},
|
||||
text: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The text of the announcement. (can be HTML)',
|
||||
},
|
||||
}
|
||||
},
|
||||
description: 'The announcements of this instance.',
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
tosUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
repositoryUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 'https://github.com/syuilo/misskey'
|
||||
},
|
||||
feedbackUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 'https://github.com/syuilo/misskey/issues/new'
|
||||
},
|
||||
secure: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: false
|
||||
},
|
||||
disableRegistration: {
|
||||
type: 'boolean' as const,
|
||||
|
@ -78,6 +98,330 @@ export const meta = {
|
|||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether disabled GTL.',
|
||||
},
|
||||
driveCapacityPerLocalUserMb: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
driveCapacityPerRemoteUserMb: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
cacheRemoteFiles: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
proxyRemoteFiles: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
enableHcaptcha: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hcaptchaSiteKey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
enableRecaptcha: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
recaptchaSiteKey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
swPublickey: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
mascotImageUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: '/assets/ai.png'
|
||||
},
|
||||
bannerUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
errorImageUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 'https://xn--931a.moe/aiart/yubitun.png'
|
||||
},
|
||||
iconUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
maxNoteTextLength: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
default: 500
|
||||
},
|
||||
emojis: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
aliases: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
category: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
host: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
requireSetup: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: false
|
||||
},
|
||||
enableEmail: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
enableTwitterIntegration: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
enableGithubIntegration: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
enableDiscordIntegration: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
enableServiceWorker: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
proxyAccountName: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
},
|
||||
features: {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
properties: {
|
||||
registration: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
localTimeLine: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
globalTimeLine: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
elasticsearch: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hcaptcha: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
recaptcha: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
objectStorage: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
twitter: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
github: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
discord: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
serviceWorker: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
miauth: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
default: true
|
||||
},
|
||||
}
|
||||
},
|
||||
userStarForReactionFallback: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
},
|
||||
pinnedUsers: {
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
hiddenTags: {
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
blockedHosts: {
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
hcaptchaSecretKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
recaptchaSecretKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
proxyAccountId: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id'
|
||||
},
|
||||
twitterConsumerKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
twitterConsumerSecret: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
githubClientId: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
githubClientSecret: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
discordClientId: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
discordClientSecret: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
summaryProxy: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
email: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
smtpSecure: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
smtpHost: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
smtpPort: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
smtpUser: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
smtpPass: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
swPrivateKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
useObjectStorage: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
objectStorageBaseUrl: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageBucket: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStoragePrefix: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageEndpoint: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageRegion: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStoragePort: {
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageAccessKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageSecretKey: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const
|
||||
},
|
||||
objectStorageUseSSL: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
objectStorageUseProxy: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
objectStorageSetPublicRead: {
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -32,6 +32,17 @@ export const meta = {
|
|||
validator: $.arr($.str).unique(),
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
token: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
@ -22,6 +22,55 @@ export const meta = {
|
|||
validator: $.optional.num.min(0),
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
callbackUrl: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
permission: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const
|
||||
},
|
||||
isAuthorized: {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
properties: {
|
||||
appId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,16 @@ export const meta = {
|
|||
validator: $.optional.num.min(0),
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -21,6 +21,21 @@ export const meta = {
|
|||
'en-US': 'Target note ID.'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
isFavorited: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isWatching: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@ import define from '../../define';
|
|||
import { createNotification } from '../../../../services/create-notification';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '通知を作成します。'
|
||||
},
|
||||
|
||||
tags: ['notifications'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -7,6 +7,11 @@ import { PromoReads } from '../../../../models';
|
|||
import { genId } from '../../../../misc/gen-id';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定したノートのプロモーションを既読にします。',
|
||||
'en-US': 'Marks the promotion for the specified note as read.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
|
|
@ -7,7 +7,7 @@ import { toPunyNullable } from '../../../../misc/convert-host';
|
|||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': '指定した部屋の情報を取得します。',
|
||||
'ja-JP': '指定したユーザーの部屋の情報を取得します。',
|
||||
},
|
||||
|
||||
tags: ['room'],
|
||||
|
@ -38,6 +38,83 @@ export const meta = {
|
|||
code: 'NO_SUCH_USER',
|
||||
id: '7ad3fa3e-5e12-42f0-b23a-f3d13f10ee4b'
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
roomType: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['default', 'washitsu']
|
||||
},
|
||||
furnitures: {
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
props: {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
description: 'Properties vary depending on the furniture'
|
||||
},
|
||||
position: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
x: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
y: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
z: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
},
|
||||
rotation: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
x: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
y: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
z: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carpetColor: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'hex',
|
||||
example: '#85CAF0'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -46,5 +46,6 @@ export default define(meta, async (ps, user) => {
|
|||
// Publish meUpdated event
|
||||
publishMainStream(user.id, 'meUpdated', iObj);
|
||||
|
||||
// TODO: レスポンスがおかしいと思う by YuzuRyo61
|
||||
return iObj;
|
||||
});
|
||||
|
|
|
@ -6,6 +6,7 @@ export const meta = {
|
|||
requireCredential: false as const,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'インスタンスの統計を取得します。',
|
||||
'en-US': 'Get the instance\'s statistics'
|
||||
},
|
||||
|
||||
|
@ -43,6 +44,14 @@ export const meta = {
|
|||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of federated instances.',
|
||||
},
|
||||
driveUsageLocal: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
driveUsageRemote: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -21,6 +21,22 @@ export const meta = {
|
|||
publickey: {
|
||||
validator: $.str
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
state: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['already-subscribed', 'subscribed']
|
||||
},
|
||||
key: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ import define from '../../define';
|
|||
import { Users, UsedUsernames } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ユーザーネームが使用されていないかをチェックします。',
|
||||
'en-US': 'Check if the username is being used.'
|
||||
},
|
||||
|
||||
tags: ['users'],
|
||||
|
||||
requireCredential: false as const,
|
||||
|
@ -11,6 +16,18 @@ export const meta = {
|
|||
username: {
|
||||
validator: $.use(Users.validateLocalUsername)
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
available: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Returns true if the username is not used.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import { Users } from '../../../models';
|
|||
import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
'ja-JP': 'ユーザー一覧を表示します。',
|
||||
'en-US': 'Display the user list.'
|
||||
},
|
||||
|
||||
tags: ['users'],
|
||||
|
||||
requireCredential: false as const,
|
||||
|
|
|
@ -34,6 +34,12 @@ export const meta = {
|
|||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserList',
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchList: {
|
||||
message: 'No such list.',
|
||||
|
|
|
@ -19,6 +19,93 @@ export const meta = {
|
|||
'ja-JP': 'ユーザーID (配列でも可)'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
oneOf: [
|
||||
{
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
isFollowing: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestFromYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestToYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isFollowed: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isBlocking: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isBlocked: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isMuted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
},
|
||||
isFollowing: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestFromYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
hasPendingFollowRequestToYou: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isFollowed: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isBlocking: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isBlocked: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
},
|
||||
isMuted: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ export function genOpenapiSpec(lang = 'ja-JP') {
|
|||
}
|
||||
},
|
||||
'403': {
|
||||
description: 'Forbiddon error',
|
||||
description: 'Forbidden error',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: {
|
||||
|
|
|
@ -16,6 +16,10 @@ import { packedPageSchema } from '../../../models/repositories/page';
|
|||
import { packedUserGroupSchema } from '../../../models/repositories/user-group';
|
||||
import { packedNoteFavoriteSchema } from '../../../models/repositories/note-favorite';
|
||||
import { packedChannelSchema } from '../../../models/repositories/channel';
|
||||
import { packedAntennaSchema } from '../../../models/repositories/antenna';
|
||||
import { packedClipSchema } from '../../../models/repositories/clip';
|
||||
import { packedFederationInstanceSchema } from '../../../models/repositories/federation-instance';
|
||||
import { packedQueueCountSchema } from '../../../models/repositories/queue';
|
||||
|
||||
export function convertSchemaToOpenApiSchema(schema: Schema) {
|
||||
const res: any = schema;
|
||||
|
@ -84,4 +88,8 @@ export const schemas = {
|
|||
Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema),
|
||||
Page: convertSchemaToOpenApiSchema(packedPageSchema),
|
||||
Channel: convertSchemaToOpenApiSchema(packedChannelSchema),
|
||||
QueueCount: convertSchemaToOpenApiSchema(packedQueueCountSchema),
|
||||
Antenna: convertSchemaToOpenApiSchema(packedAntennaSchema),
|
||||
Clip: convertSchemaToOpenApiSchema(packedClipSchema),
|
||||
FederationInstance: convertSchemaToOpenApiSchema(packedFederationInstanceSchema),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue