mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 08:03:08 +02:00
parent
fd8f8162e1
commit
fcfb5ef0a3
304 changed files with 307 additions and 306 deletions
|
@ -78,8 +78,8 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cast non JSON input
|
// Cast non JSON input
|
||||||
if (ep.meta.requireFile) {
|
if (ep.meta.requireFile && ep.params.properties) {
|
||||||
for (const k of Object.keys(ep.params)) {
|
for (const k of Object.keys(ep.params.properties)) {
|
||||||
const param = ep.params.properties![k];
|
const param = ep.params.properties![k];
|
||||||
if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') {
|
if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as Ajv from 'ajv';
|
import Ajv from 'ajv';
|
||||||
import { ILocalUser } from '@/models/entities/user';
|
import { ILocalUser } from '@/models/entities/user';
|
||||||
import { IEndpointMeta } from './endpoints';
|
import { IEndpointMeta } from './endpoints';
|
||||||
import { ApiError } from './error';
|
import { ApiError } from './error';
|
||||||
|
@ -65,6 +65,6 @@ export default function <T extends IEndpointMeta, Ps extends Schema>(meta: T, pa
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cb(params, user, token, file, cleanup);
|
return cb(params as SchemaType<Ps>, user, token, file, cleanup);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
username: Users.localUsernameSchema,
|
username: Users.localUsernameSchema,
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
url: { type: 'string', minLength: 1 },
|
url: { type: 'string', minLength: 1 },
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
title: { type: 'string', minLength: 1 },
|
title: { type: 'string', minLength: 1 },
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -52,7 +52,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -149,7 +149,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
fileId: { type: 'string', format: 'misskey:id' },
|
fileId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
ids: { type: 'array', items: {
|
ids: { type: 'array', items: {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
fileId: { type: 'string', format: 'misskey:id' },
|
fileId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -34,7 +34,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
emojiId: { type: 'string', format: 'misskey:id' },
|
emojiId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
ids: { type: 'array', items: {
|
ids: { type: 'array', items: {
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
fileId: { type: 'string', format: 'misskey:id' },
|
fileId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
query: { type: 'string', nullable: true, default: null },
|
query: { type: 'string', nullable: true, default: null },
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
query: { type: 'string', nullable: true, default: null },
|
query: { type: 'string', nullable: true, default: null },
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
ids: { type: 'array', items: {
|
ids: { type: 'array', items: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
ids: { type: 'array', items: {
|
ids: { type: 'array', items: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
ids: { type: 'array', items: {
|
ids: { type: 'array', items: {
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: 'string', format: 'misskey:id' },
|
id: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
host: { type: 'string' },
|
host: { type: 'string' },
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
host: { type: 'string' },
|
host: { type: 'string' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
host: { type: 'string' },
|
host: { type: 'string' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
host: { type: 'string' },
|
host: { type: 'string' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
noteId: { type: 'string', format: 'misskey:id' },
|
noteId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
inbox: { type: 'string' },
|
inbox: { type: 'string' },
|
||||||
|
|
|
@ -39,7 +39,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
inbox: { type: 'string' },
|
inbox: { type: 'string' },
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
reportId: { type: 'string', format: 'misskey:id' },
|
reportId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
to: { type: 'string' },
|
to: { type: 'string' },
|
||||||
|
|
|
@ -87,7 +87,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const meta = {
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
disableRegistration: { type: 'boolean', nullable: true },
|
disableRegistration: { type: 'boolean', nullable: true },
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
full: { type: 'boolean' },
|
full: { type: 'boolean' },
|
||||||
|
|
|
@ -51,7 +51,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
name: { type: 'string', minLength: 1, maxLength: 100 },
|
name: { type: 'string', minLength: 1, maxLength: 100 },
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
antennaId: { type: 'string', format: 'misskey:id' },
|
antennaId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
antennaId: { type: 'string', format: 'misskey:id' },
|
antennaId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
antennaId: { type: 'string', format: 'misskey:id' },
|
antennaId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -37,7 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
antennaId: { type: 'string', format: 'misskey:id' },
|
antennaId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
uri: { type: 'string' },
|
uri: { type: 'string' },
|
||||||
|
|
|
@ -68,7 +68,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
uri: { type: 'string' },
|
uri: { type: 'string' },
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
name: { type: 'string' },
|
name: { type: 'string' },
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
appId: { type: 'string', format: 'misskey:id' },
|
appId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -21,7 +21,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
token: { type: 'string' },
|
token: { type: 'string' },
|
||||||
|
|
|
@ -35,7 +35,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
appSecret: { type: 'string' },
|
appSecret: { type: 'string' },
|
||||||
|
|
|
@ -37,7 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
token: { type: 'string' },
|
token: { type: 'string' },
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
appSecret: { type: 'string' },
|
appSecret: { type: 'string' },
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
userId: { type: 'string', format: 'misskey:id' },
|
userId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
name: { type: 'string', minLength: 1, maxLength: 128 },
|
name: { type: 'string', minLength: 1, maxLength: 128 },
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {},
|
properties: {},
|
||||||
required: [],
|
required: [],
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
channelId: { type: 'string', format: 'misskey:id' },
|
channelId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
sinceId: { type: 'string', format: 'misskey:id' },
|
sinceId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
sinceId: { type: 'string', format: 'misskey:id' },
|
sinceId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
channelId: { type: 'string', format: 'misskey:id' },
|
channelId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -28,7 +28,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
channelId: { type: 'string', format: 'misskey:id' },
|
channelId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
channelId: { type: 'string', format: 'misskey:id' },
|
channelId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -36,7 +36,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
channelId: { type: 'string', format: 'misskey:id' },
|
channelId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(activeUsersChart.schema),
|
res: getJsonSchema(activeUsersChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(apRequestChart.schema),
|
res: getJsonSchema(apRequestChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(driveChart.schema),
|
res: getJsonSchema(driveChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(federationChart.schema),
|
res: getJsonSchema(federationChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(hashtagChart.schema),
|
res: getJsonSchema(hashtagChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(instanceChart.schema),
|
res: getJsonSchema(instanceChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(notesChart.schema),
|
res: getJsonSchema(notesChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(perUserDriveChart.schema),
|
res: getJsonSchema(perUserDriveChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(perUserFollowingChart.schema),
|
res: getJsonSchema(perUserFollowingChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(perUserNotesChart.schema),
|
res: getJsonSchema(perUserNotesChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(perUserReactionsChart.schema),
|
res: getJsonSchema(perUserReactionsChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const meta = {
|
||||||
res: getJsonSchema(usersChart.schema),
|
res: getJsonSchema(usersChart.schema),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
span: { type: 'string', enum: ['day', 'hour'] },
|
span: { type: 'string', enum: ['day', 'hour'] },
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
clipId: { type: 'string', format: 'misskey:id' },
|
clipId: { type: 'string', format: 'misskey:id' },
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue