summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/json-schema
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-09-24 18:21:31 +0900
committerGitHub <noreply@github.com>2023-09-24 18:21:31 +0900
commitf32915b515f4cbc3b1a877cfb8e8e35bf6a31efa (patch)
tree0f6f098cbb282e4b6619152b14b9e6f57e6b448f /packages/backend/src/models/json-schema
parentMerge pull request #11384 from misskey-dev/develop (diff)
parent2023.9.0 (diff)
downloadmisskey-f32915b515f4cbc3b1a877cfb8e8e35bf6a31efa.tar.gz
misskey-f32915b515f4cbc3b1a877cfb8e8e35bf6a31efa.tar.bz2
misskey-f32915b515f4cbc3b1a877cfb8e8e35bf6a31efa.zip
Merge pull request #11874 from misskey-dev/develop
Release: 2023.9.0
Diffstat (limited to 'packages/backend/src/models/json-schema')
-rw-r--r--packages/backend/src/models/json-schema/announcement.ts58
-rw-r--r--packages/backend/src/models/json-schema/antenna.ts7
-rw-r--r--packages/backend/src/models/json-schema/app.ts5
-rw-r--r--packages/backend/src/models/json-schema/blocking.ts5
-rw-r--r--packages/backend/src/models/json-schema/channel.ts9
-rw-r--r--packages/backend/src/models/json-schema/clip.ts5
-rw-r--r--packages/backend/src/models/json-schema/drive-file.ts5
-rw-r--r--packages/backend/src/models/json-schema/drive-folder.ts5
-rw-r--r--packages/backend/src/models/json-schema/emoji.ts5
-rw-r--r--packages/backend/src/models/json-schema/federation-instance.ts5
-rw-r--r--packages/backend/src/models/json-schema/flash.ts5
-rw-r--r--packages/backend/src/models/json-schema/following.ts5
-rw-r--r--packages/backend/src/models/json-schema/gallery-post.ts5
-rw-r--r--packages/backend/src/models/json-schema/hashtag.ts5
-rw-r--r--packages/backend/src/models/json-schema/invite-code.ts5
-rw-r--r--packages/backend/src/models/json-schema/muting.ts5
-rw-r--r--packages/backend/src/models/json-schema/note-favorite.ts5
-rw-r--r--packages/backend/src/models/json-schema/note-reaction.ts5
-rw-r--r--packages/backend/src/models/json-schema/note.ts9
-rw-r--r--packages/backend/src/models/json-schema/notification.ts5
-rw-r--r--packages/backend/src/models/json-schema/page.ts5
-rw-r--r--packages/backend/src/models/json-schema/queue.ts5
-rw-r--r--packages/backend/src/models/json-schema/renote-muting.ts5
-rw-r--r--packages/backend/src/models/json-schema/user-list.ts5
-rw-r--r--packages/backend/src/models/json-schema/user.ts23
25 files changed, 205 insertions, 1 deletions
diff --git a/packages/backend/src/models/json-schema/announcement.ts b/packages/backend/src/models/json-schema/announcement.ts
new file mode 100644
index 0000000000..c7e24c7f29
--- /dev/null
+++ b/packages/backend/src/models/json-schema/announcement.ts
@@ -0,0 +1,58 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export const packedAnnouncementSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ updatedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ text: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ title: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ imageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ icon: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ display: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ forYou: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ needConfirmationToRead: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isRead: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/json-schema/antenna.ts b/packages/backend/src/models/json-schema/antenna.ts
index 4483510610..7b6475919c 100644
--- a/packages/backend/src/models/json-schema/antenna.ts
+++ b/packages/backend/src/models/json-schema/antenna.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedAntennaSchema = {
type: 'object',
properties: {
@@ -42,7 +47,7 @@ export const packedAntennaSchema = {
src: {
type: 'string',
optional: false, nullable: false,
- enum: ['home', 'all', 'users', 'list'],
+ enum: ['home', 'all', 'users', 'list', 'users_blacklist'],
},
userListId: {
type: 'string',
diff --git a/packages/backend/src/models/json-schema/app.ts b/packages/backend/src/models/json-schema/app.ts
index c80dc81c33..9e0916299c 100644
--- a/packages/backend/src/models/json-schema/app.ts
+++ b/packages/backend/src/models/json-schema/app.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedAppSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/blocking.ts b/packages/backend/src/models/json-schema/blocking.ts
index 5532322420..0b58f1f8d7 100644
--- a/packages/backend/src/models/json-schema/blocking.ts
+++ b/packages/backend/src/models/json-schema/blocking.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedBlockingSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/channel.ts b/packages/backend/src/models/json-schema/channel.ts
index fd61a70c0e..f1019d1461 100644
--- a/packages/backend/src/models/json-schema/channel.ts
+++ b/packages/backend/src/models/json-schema/channel.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedChannelSchema = {
type: 'object',
properties: {
@@ -67,5 +72,9 @@ export const packedChannelSchema = {
type: 'string',
optional: false, nullable: false,
},
+ isSensitive: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
},
} as const;
diff --git a/packages/backend/src/models/json-schema/clip.ts b/packages/backend/src/models/json-schema/clip.ts
index 7310e59013..64f7a2ad9c 100644
--- a/packages/backend/src/models/json-schema/clip.ts
+++ b/packages/backend/src/models/json-schema/clip.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedClipSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/drive-file.ts b/packages/backend/src/models/json-schema/drive-file.ts
index 4359076612..87f1340812 100644
--- a/packages/backend/src/models/json-schema/drive-file.ts
+++ b/packages/backend/src/models/json-schema/drive-file.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedDriveFileSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/drive-folder.ts b/packages/backend/src/models/json-schema/drive-folder.ts
index 88cb8ab4a2..51107d423f 100644
--- a/packages/backend/src/models/json-schema/drive-folder.ts
+++ b/packages/backend/src/models/json-schema/drive-folder.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedDriveFolderSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/emoji.ts b/packages/backend/src/models/json-schema/emoji.ts
index 63f56e77cb..99a58f8773 100644
--- a/packages/backend/src/models/json-schema/emoji.ts
+++ b/packages/backend/src/models/json-schema/emoji.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedEmojiSimpleSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/federation-instance.ts b/packages/backend/src/models/json-schema/federation-instance.ts
index 42d93dfac9..ac07519f16 100644
--- a/packages/backend/src/models/json-schema/federation-instance.ts
+++ b/packages/backend/src/models/json-schema/federation-instance.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedFederationInstanceSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/flash.ts b/packages/backend/src/models/json-schema/flash.ts
index 8471a138ec..9453ba1dce 100644
--- a/packages/backend/src/models/json-schema/flash.ts
+++ b/packages/backend/src/models/json-schema/flash.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedFlashSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/following.ts b/packages/backend/src/models/json-schema/following.ts
index 2bcffbfc4d..3a24ebb619 100644
--- a/packages/backend/src/models/json-schema/following.ts
+++ b/packages/backend/src/models/json-schema/following.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedFollowingSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/gallery-post.ts b/packages/backend/src/models/json-schema/gallery-post.ts
index fc503d4a64..cf260c0bf5 100644
--- a/packages/backend/src/models/json-schema/gallery-post.ts
+++ b/packages/backend/src/models/json-schema/gallery-post.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedGalleryPostSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/hashtag.ts b/packages/backend/src/models/json-schema/hashtag.ts
index 98f8827640..a48e972a5d 100644
--- a/packages/backend/src/models/json-schema/hashtag.ts
+++ b/packages/backend/src/models/json-schema/hashtag.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedHashtagSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/invite-code.ts b/packages/backend/src/models/json-schema/invite-code.ts
index b70a779f29..cd8bf98d90 100644
--- a/packages/backend/src/models/json-schema/invite-code.ts
+++ b/packages/backend/src/models/json-schema/invite-code.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedInviteCodeSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/muting.ts b/packages/backend/src/models/json-schema/muting.ts
index 3ab99e17e7..dde9dc0288 100644
--- a/packages/backend/src/models/json-schema/muting.ts
+++ b/packages/backend/src/models/json-schema/muting.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedMutingSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/note-favorite.ts b/packages/backend/src/models/json-schema/note-favorite.ts
index d133f7367d..3f0007d917 100644
--- a/packages/backend/src/models/json-schema/note-favorite.ts
+++ b/packages/backend/src/models/json-schema/note-favorite.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedNoteFavoriteSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/note-reaction.ts b/packages/backend/src/models/json-schema/note-reaction.ts
index 0d8fc5449b..e3335f426e 100644
--- a/packages/backend/src/models/json-schema/note-reaction.ts
+++ b/packages/backend/src/models/json-schema/note-reaction.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedNoteReactionSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts
index 58ef425dcd..eb744aa109 100644
--- a/packages/backend/src/models/json-schema/note.ts
+++ b/packages/backend/src/models/json-schema/note.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedNoteSchema = {
type: 'object',
properties: {
@@ -134,6 +139,10 @@ export const packedNoteSchema = {
type: 'string',
optional: false, nullable: true,
},
+ isSensitive: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ }
},
},
},
diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts
index e88ca61ba0..2c434913da 100644
--- a/packages/backend/src/models/json-schema/notification.ts
+++ b/packages/backend/src/models/json-schema/notification.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
import { notificationTypes } from '@/types.js';
export const packedNotificationSchema = {
diff --git a/packages/backend/src/models/json-schema/page.ts b/packages/backend/src/models/json-schema/page.ts
index 55ba3ce7f7..3f20a4b802 100644
--- a/packages/backend/src/models/json-schema/page.ts
+++ b/packages/backend/src/models/json-schema/page.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedPageSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/queue.ts b/packages/backend/src/models/json-schema/queue.ts
index 7ceeda26af..43da6e605d 100644
--- a/packages/backend/src/models/json-schema/queue.ts
+++ b/packages/backend/src/models/json-schema/queue.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedQueueCountSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/renote-muting.ts b/packages/backend/src/models/json-schema/renote-muting.ts
index 69ed8510da..feed1ceb09 100644
--- a/packages/backend/src/models/json-schema/renote-muting.ts
+++ b/packages/backend/src/models/json-schema/renote-muting.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedRenoteMutingSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/user-list.ts b/packages/backend/src/models/json-schema/user-list.ts
index 1e620516e4..e257d9984c 100644
--- a/packages/backend/src/models/json-schema/user-list.ts
+++ b/packages/backend/src/models/json-schema/user-list.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedUserListSchema = {
type: 'object',
properties: {
diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts
index f9a20ac398..f15b225a30 100644
--- a/packages/backend/src/models/json-schema/user.ts
+++ b/packages/backend/src/models/json-schema/user.ts
@@ -1,3 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
export const packedUserLiteSchema = {
type: 'object',
properties: {
@@ -164,6 +169,15 @@ export const packedUserDetailedNotMeOnlySchema = {
},
},
},
+ verifiedLinks: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'url',
+ },
+ },
followersCount: {
type: 'number',
nullable: false, optional: false,
@@ -259,6 +273,10 @@ export const packedUserDetailedNotMeOnlySchema = {
type: 'string',
nullable: false, optional: true,
},
+ notify: {
+ type: 'string',
+ nullable: false, optional: true,
+ },
//#endregion
},
} as const;
@@ -316,6 +334,11 @@ export const packedMeDetailedOnlySchema = {
type: 'boolean',
nullable: false, optional: false,
},
+ twoFactorBackupCodesStock: {
+ type: 'string',
+ enum: ['full', 'partial', 'none'],
+ nullable: false, optional: false,
+ },
hideOnlineStatus: {
type: 'boolean',
nullable: false, optional: false,