forked from FoundKeyGang/FoundKey
Refactoring
This commit is contained in:
parent
bb903cab40
commit
43734f027b
217 changed files with 219 additions and 219 deletions
|
@ -14,12 +14,12 @@ type Params<T extends IEndpointMeta> = {
|
||||||
export type Response = Record<string, any> | void;
|
export type Response = Record<string, any> | void;
|
||||||
|
|
||||||
type executor<T extends IEndpointMeta> =
|
type executor<T extends IEndpointMeta> =
|
||||||
(params: Params<T>, user: ILocalUser, app: App, file?: any, cleanup?: Function) =>
|
(params: Params<T>, user: T['requireCredential'] extends true ? ILocalUser : ILocalUser | null, app: App, file?: any, cleanup?: Function) =>
|
||||||
Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
|
Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
|
||||||
|
|
||||||
export default function <T extends IEndpointMeta>(meta: T, cb: executor<T>)
|
export default function <T extends IEndpointMeta>(meta: T, cb: executor<T>)
|
||||||
: (params: any, user: ILocalUser, app: App, file?: any) => Promise<any> {
|
: (params: any, user: T['requireCredential'] extends true ? ILocalUser : ILocalUser | null, app: App, file?: any) => Promise<any> {
|
||||||
return (params: any, user: ILocalUser, app: App, file?: any) => {
|
return (params: any, user: T['requireCredential'] extends true ? ILocalUser : ILocalUser | null, app: App, file?: any) => {
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
fs.unlink(file.path, () => {});
|
fs.unlink(file.path, () => {});
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { genId } from '../../../../../misc/gen-id';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ID } from '../../../../misc/cafy-id';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Logs } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { createCleanRemoteFilesJob } from '../../../../../queue';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { DriveFiles } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { DriveFiles } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { DriveFiles } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import uploadFromUrl from '../../../../../services/drive/upload-from-url';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { DriveFiles } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ensure } from '../../../../../prelude/ensure';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { toPuny } from '../../../../../misc/convert-host';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import define from '../../define';
|
||||||
import { getConnection } from 'typeorm';
|
import { getConnection } from 'typeorm';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
desc: {
|
desc: {
|
||||||
'en-US': 'Get table stats'
|
'en-US': 'Get table stats'
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {}
|
params: {}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Brackets } from 'typeorm';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { insertModerationLog } from '../../../../../services/insert-moderation-l
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {}
|
params: {}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { deliverQueue } from '../../../../../queue';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { inboxQueue } from '../../../../../queue';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '../../../
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '../../../
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {}
|
params: {}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { AbuseUserReports } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { insertModerationLog } from '../../../../services/insert-moderation-log'
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { sendEmail } from '../../../../services/send-email';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import define from '../../define';
|
||||||
import redis from '../../../../db/redis';
|
import redis from '../../../../db/redis';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
desc: {
|
desc: {
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Users } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { insertModerationLog } from '../../../../services/insert-moderation-log'
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Announcements, AnnouncementReads } from '../../../models';
|
||||||
import { makePaginationQuery } from '../common/make-pagination-query';
|
import { makePaginationQuery } from '../common/make-pagination-query';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
limit: {
|
limit: {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { ApiError } from '../../error';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['antennas'],
|
tags: ['antennas'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Antennas } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['antennas'],
|
tags: ['antennas'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Antennas } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['antennas', 'account'],
|
tags: ['antennas', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { ApiError } from '../../error';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['account', 'notes', 'antennas'],
|
tags: ['account', 'notes', 'antennas'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Antennas } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['antennas', 'account'],
|
tags: ['antennas', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Antennas, UserLists, UserGroupJoinings } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['antennas'],
|
tags: ['antennas'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
'ja-JP': 'URIを指定してActivityPubオブジェクトを参照します。'
|
'ja-JP': 'URIを指定してActivityPubオブジェクトを参照します。'
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
uri: {
|
uri: {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { unique } from '../../../../prelude/array';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['app'],
|
tags: ['app'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
desc: {
|
desc: {
|
||||||
'ja-JP': 'アプリを作成します。',
|
'ja-JP': 'アプリを作成します。',
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { ensure } from '../../../../prelude/ensure';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['auth'],
|
tags: ['auth'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
secure: true,
|
secure: true,
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { genId } from '../../../../../misc/gen-id';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['auth'],
|
tags: ['auth'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
desc: {
|
desc: {
|
||||||
'ja-JP': 'アプリを認証するためのトークンを作成します。',
|
'ja-JP': 'アプリを認証するためのトークンを作成します。',
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { AuthSessions } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['auth'],
|
tags: ['auth'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
token: {
|
token: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ensure } from '../../../../../prelude/ensure';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['auth'],
|
tags: ['auth'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
appSecret: {
|
appSecret: {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
max: 100
|
max: 100
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:blocks',
|
kind: 'write:blocks',
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
max: 100
|
max: 100
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:blocks',
|
kind: 'write:blocks',
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['blocking', 'account'],
|
tags: ['blocking', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:blocks',
|
kind: 'read:blocks',
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Clips } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips'],
|
tags: ['clips'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Clips } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips'],
|
tags: ['clips'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Clips } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips', 'account'],
|
tags: ['clips', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['account', 'notes', 'clips'],
|
tags: ['account', 'notes', 'clips'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Clips } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips', 'account'],
|
tags: ['clips', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:account',
|
kind: 'read:account',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Clips } from '../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips'],
|
tags: ['clips'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive', 'account'],
|
tags: ['drive', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive', 'notes'],
|
tags: ['drive', 'notes'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1hour'),
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import define from '../../../define';
|
||||||
import { DriveFiles } from '../../../../../models';
|
import { DriveFiles } from '../../../../../models';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
max: 60
|
max: 60
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { DriveFolders } from '../../../../../models';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:drive',
|
kind: 'read:drive',
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import define from '../define';
|
||||||
import endpoints from '../endpoints';
|
import endpoints from '../endpoints';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
tags: ['meta'],
|
tags: ['meta'],
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import define from '../define';
|
||||||
import endpoints from '../endpoints';
|
import endpoints from '../endpoints';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
tags: ['meta'],
|
tags: ['meta'],
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['users'],
|
tags: ['users'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
host: {
|
host: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['users'],
|
tags: ['users'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
host: {
|
host: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { fetchMeta } from '../../../../misc/fetch-meta';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['federation'],
|
tags: ['federation'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
host: {
|
host: {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { toPuny } from '../../../../misc/convert-host';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['federation'],
|
tags: ['federation'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
host: {
|
host: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['users'],
|
tags: ['users'],
|
||||||
|
|
||||||
requireCredential: false,
|
requireCredential: false as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
host: {
|
host: {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
max: 100
|
max: 100
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:following',
|
kind: 'write:following',
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
max: 100
|
max: 100
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:following',
|
kind: 'write:following',
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['following', 'account'],
|
tags: ['following', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:following',
|
kind: 'write:following',
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['following', 'account'],
|
tags: ['following', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:following',
|
kind: 'write:following',
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['following', 'account'],
|
tags: ['following', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'read:following'
|
kind: 'read:following'
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
|
|
||||||
tags: ['following', 'account'],
|
tags: ['following', 'account'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
kind: 'write:following',
|
kind: 'write:following',
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
'ja-JP': '指定したリバーシの対局で投了します。'
|
'ja-JP': '指定したリバーシの対局で投了します。'
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true as const,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
gameId: {
|
gameId: {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue