2023-07-27 05:31:52 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-01-18 13:27:10 +00:00
|
|
|
export const packedNoteSchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2022-09-24 01:46:52 +00:00
|
|
|
deletedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
text: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
cw: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
},
|
|
|
|
userId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
user: {
|
|
|
|
type: 'object',
|
|
|
|
ref: 'UserLite',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
replyId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
renoteId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
reply: {
|
|
|
|
type: 'object',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
ref: 'Note',
|
|
|
|
},
|
|
|
|
renote: {
|
|
|
|
type: 'object',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
ref: 'Note',
|
|
|
|
},
|
|
|
|
isHidden: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
|
|
|
visibility: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
mentions: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
visibleUserIds: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fileIds: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
files: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
ref: 'DriveFile',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tags: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
poll: {
|
|
|
|
type: 'object',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
},
|
|
|
|
channelId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
channel: {
|
|
|
|
type: 'object',
|
|
|
|
optional: true, nullable: true,
|
2023-11-21 02:13:56 +00:00
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
2023-11-21 06:12:05 +00:00
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
color: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
2023-11-21 02:13:56 +00:00
|
|
|
},
|
|
|
|
isSensitive: {
|
|
|
|
type: 'boolean',
|
2023-11-21 06:12:05 +00:00
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
allowRenoteToExternal: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
2024-01-03 04:35:40 +00:00
|
|
|
userId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
localOnly: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
2023-03-07 23:56:47 +00:00
|
|
|
reactionAcceptance: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
reactions: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
renoteCount: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
repliesCount: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
uri: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
type: 'string',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
2023-10-19 00:20:19 +00:00
|
|
|
reactionAndUserPairCache: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
2023-11-28 23:08:06 +00:00
|
|
|
clippedCount: {
|
|
|
|
type: 'number',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
|
|
|
|
myReaction: {
|
|
|
|
type: 'object',
|
|
|
|
optional: true, nullable: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|