diff options
Diffstat (limited to 'src/server/api/endpoints/admin/drive')
| -rw-r--r-- | src/server/api/endpoints/admin/drive/clean-remote-files.ts | 5 | ||||
| -rw-r--r-- | src/server/api/endpoints/admin/drive/cleanup.ts | 5 | ||||
| -rw-r--r-- | src/server/api/endpoints/admin/drive/files.ts | 15 | ||||
| -rw-r--r-- | src/server/api/endpoints/admin/drive/show-file.ts | 148 |
4 files changed, 173 insertions, 0 deletions
diff --git a/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/src/server/api/endpoints/admin/drive/clean-remote-files.ts index 5a5adb8a8b..20856da1cf 100644 --- a/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -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, diff --git a/src/server/api/endpoints/admin/drive/cleanup.ts b/src/server/api/endpoints/admin/drive/cleanup.ts index b76236a7f0..f4867597f3 100644 --- a/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/src/server/api/endpoints/admin/drive/cleanup.ts @@ -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, diff --git a/src/server/api/endpoints/admin/drive/files.ts b/src/server/api/endpoints/admin/drive/files.ts index f6296b8947..496050d2df 100644 --- a/src/server/api/endpoints/admin/drive/files.ts +++ b/src/server/api/endpoints/admin/drive/files.ts @@ -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' + } } }; diff --git a/src/server/api/endpoints/admin/drive/show-file.ts b/src/server/api/endpoints/admin/drive/show-file.ts index 36403bb1c3..96478a1c7d 100644 --- a/src/server/api/endpoints/admin/drive/show-file.ts +++ b/src/server/api/endpoints/admin/drive/show-file.ts @@ -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 + } + } } }; |