user packとnote packの型不整合を修正

This commit is contained in:
tamaina 2021-09-12 00:46:38 +09:00
parent 94ebf2ac5a
commit a7f5ad78b4
2 changed files with 27 additions and 26 deletions

View File

@ -447,11 +447,24 @@ export const packedNoteSchema = {
channel: { channel: {
type: 'object' as const, type: 'object' as const,
optional: true as const, nullable: true as const, optional: true as const, nullable: true as const,
ref: 'Channel' as const, items: {
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,
},
name: {
type: 'string' as const,
optional: false as const, nullable: true as const,
},
},
},
}, },
localOnly: { localOnly: {
type: 'boolean' as const, type: 'boolean' as const,
optional: false as const, nullable: true as const, optional: true as const, nullable: false as const,
}, },
emojis: { emojis: {
type: 'array' as const, type: 'array' as const,
@ -466,7 +479,7 @@ export const packedNoteSchema = {
}, },
url: { url: {
type: 'string' as const, type: 'string' as const,
optional: false as const, nullable: false as const, optional: false as const, nullable: true as const,
}, },
}, },
}, },
@ -485,11 +498,11 @@ export const packedNoteSchema = {
}, },
uri: { uri: {
type: 'string' as const, type: 'string' as const,
optional: false as const, nullable: true as const, optional: true as const, nullable: false as const,
}, },
url: { url: {
type: 'string' as const, type: 'string' as const,
optional: false as const, nullable: true as const, optional: true as const, nullable: false as const,
}, },
myReaction: { myReaction: {

View File

@ -375,12 +375,12 @@ export const packedUserSchema = {
}, },
isAdmin: { isAdmin: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
default: false default: false
}, },
isModerator: { isModerator: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
default: false default: false
}, },
isBot: { isBot: {
@ -402,23 +402,11 @@ export const packedUserSchema = {
type: 'string' as const, type: 'string' as const,
nullable: false as const, optional: false as const nullable: false as const, optional: false as const
}, },
host: {
type: 'string' as const,
nullable: true as const, optional: false as const
},
url: { url: {
type: 'string' as const, type: 'string' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: false as const,
format: 'url' format: 'url'
}, },
aliases: {
type: 'array' as const,
nullable: false as const, optional: false as const,
items: {
type: 'string' as const,
nullable: false as const, optional: false as const
}
}
} }
} }
}, },
@ -457,7 +445,7 @@ export const packedUserSchema = {
}, },
isSuspended: { isSuspended: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
example: false example: false
}, },
description: { description: {
@ -476,7 +464,7 @@ export const packedUserSchema = {
}, },
fields: { fields: {
type: 'array' as const, type: 'array' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
items: { items: {
type: 'object' as const, type: 'object' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: false as const,
@ -525,26 +513,26 @@ export const packedUserSchema = {
}, },
pinnedPageId: { pinnedPageId: {
type: 'string' as const, type: 'string' as const,
nullable: true as const, optional: false as const nullable: true as const, optional: true as const
}, },
pinnedPage: { pinnedPage: {
type: 'object' as const, type: 'object' as const,
nullable: true as const, optional: false as const, nullable: true as const, optional: true as const,
ref: 'Page' as const, ref: 'Page' as const,
}, },
twoFactorEnabled: { twoFactorEnabled: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
default: false default: false
}, },
usePasswordLessLogin: { usePasswordLessLogin: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
default: false default: false
}, },
securityKeys: { securityKeys: {
type: 'boolean' as const, type: 'boolean' as const,
nullable: false as const, optional: false as const, nullable: false as const, optional: true as const,
default: false default: false
}, },
avatarId: { avatarId: {