refactor: fix types

This commit is contained in:
syuilo 2023-02-17 15:36:36 +09:00
parent 0e1b5d6f14
commit 60df819c60
19 changed files with 91 additions and 118 deletions

View file

@ -54,86 +54,22 @@ export const meta = {
},
mascotImageUrl: {
type: 'string',
optional: false, nullable: false,
optional: false, nullable: true,
default: '/assets/ai.png',
},
bannerUrl: {
type: 'string',
optional: false, nullable: false,
optional: false, nullable: true,
},
errorImageUrl: {
type: 'string',
optional: false, nullable: false,
optional: false, nullable: true,
default: 'https://xn--931a.moe/aiart/yubitun.png',
},
iconUrl: {
type: 'string',
optional: false, nullable: true,
},
maxNoteTextLength: {
type: 'number',
optional: false, nullable: false,
},
emojis: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
properties: {
id: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
aliases: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
category: {
type: 'string',
optional: false, nullable: true,
},
host: {
type: 'string',
optional: false, nullable: true,
},
url: {
type: 'string',
optional: false, nullable: false,
format: 'url',
},
},
},
},
ads: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
properties: {
place: {
type: 'string',
optional: false, nullable: false,
},
url: {
type: 'string',
optional: false, nullable: false,
format: 'url',
},
imageUrl: {
type: 'string',
optional: false, nullable: false,
format: 'url',
},
},
},
},
enableEmail: {
type: 'boolean',
optional: false, nullable: false,
@ -146,10 +82,6 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
proxyAccountName: {
type: 'string',
optional: false, nullable: true,
},
userStarForReactionFallback: {
type: 'boolean',
optional: true, nullable: false,
@ -228,7 +160,7 @@ export const meta = {
optional: true, nullable: true,
},
smtpPort: {
type: 'string',
type: 'number',
optional: true, nullable: true,
},
smtpUser: {
@ -299,6 +231,10 @@ export const meta = {
type: 'boolean',
optional: true, nullable: false,
},
policies: {
type: 'object',
optional: false, nullable: false,
},
},
},
} as const;
@ -349,7 +285,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
iconUrl: instance.iconUrl,
backgroundImageUrl: instance.backgroundImageUrl,
logoImageUrl: instance.logoImageUrl,
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, // 後方互換性のため
defaultLightTheme: instance.defaultLightTheme,
defaultDarkTheme: instance.defaultDarkTheme,
enableEmail: instance.enableEmail,