This commit is contained in:
Michcio 2022-09-07 00:58:43 +02:00
parent f086c6d02f
commit af1296118d
1 changed files with 11 additions and 7 deletions

View File

@ -37,21 +37,24 @@ export const meta = {
},
} as const;
const commonProps = {
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
} as const;
export const paramDef = {
type: 'object',
properties: {
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
},
anyOf: [
type: 'object', anyOf: [
{
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id' },
...commonProps,
},
required: ['userId'],
},
{
type: 'object',
properties: {
username: { type: 'string' },
host: {
@ -59,6 +62,7 @@ export const paramDef = {
nullable: true,
description: 'The local host is represented with `null`.',
},
...commonProps,
},
required: ['username', 'host'],
},