summaryrefslogtreecommitdiff
path: root/packages/backend/src/models
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-03-02 17:28:34 +0000
committerdakkar <dakkar@thenautilus.net>2024-03-02 17:28:34 +0000
commit23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0 (patch)
tree0b9e79c2f18f4a206811561fa255f2510f60c175 /packages/backend/src/models
parentmerge: Add missing IMPORTANT_NOTES.md from Sharkey/OldJoinSharkey (!443) (diff)
parentmerge: put back the readme (!447) (diff)
downloadsharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.tar.gz
sharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.tar.bz2
sharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.zip
Merge branch 'develop' into release/2024.3.1
Diffstat (limited to 'packages/backend/src/models')
-rw-r--r--packages/backend/src/models/AbuseUserReport.ts2
-rw-r--r--packages/backend/src/models/AccessToken.ts2
-rw-r--r--packages/backend/src/models/Ad.ts2
-rw-r--r--packages/backend/src/models/Announcement.ts6
-rw-r--r--packages/backend/src/models/AnnouncementRead.ts2
-rw-r--r--packages/backend/src/models/Antenna.ts2
-rw-r--r--packages/backend/src/models/App.ts2
-rw-r--r--packages/backend/src/models/AuthSession.ts2
-rw-r--r--packages/backend/src/models/AvatarDecoration.ts2
-rw-r--r--packages/backend/src/models/Blocking.ts2
-rw-r--r--packages/backend/src/models/BubbleGameRecord.ts57
-rw-r--r--packages/backend/src/models/Channel.ts2
-rw-r--r--packages/backend/src/models/ChannelFavorite.ts2
-rw-r--r--packages/backend/src/models/ChannelFollowing.ts2
-rw-r--r--packages/backend/src/models/Clip.ts2
-rw-r--r--packages/backend/src/models/ClipFavorite.ts2
-rw-r--r--packages/backend/src/models/ClipNote.ts2
-rw-r--r--packages/backend/src/models/DriveFile.ts2
-rw-r--r--packages/backend/src/models/DriveFolder.ts2
-rw-r--r--packages/backend/src/models/Emoji.ts2
-rw-r--r--packages/backend/src/models/Flash.ts2
-rw-r--r--packages/backend/src/models/FlashLike.ts2
-rw-r--r--packages/backend/src/models/FollowRequest.ts2
-rw-r--r--packages/backend/src/models/Following.ts2
-rw-r--r--packages/backend/src/models/GalleryLike.ts2
-rw-r--r--packages/backend/src/models/GalleryPost.ts2
-rw-r--r--packages/backend/src/models/Hashtag.ts2
-rw-r--r--packages/backend/src/models/Instance.ts7
-rw-r--r--packages/backend/src/models/Meta.ts72
-rw-r--r--packages/backend/src/models/ModerationLog.ts2
-rw-r--r--packages/backend/src/models/Muting.ts2
-rw-r--r--packages/backend/src/models/Note.ts13
-rw-r--r--packages/backend/src/models/NoteFavorite.ts2
-rw-r--r--packages/backend/src/models/NoteReaction.ts2
-rw-r--r--packages/backend/src/models/NoteThreadMuting.ts2
-rw-r--r--packages/backend/src/models/NoteUnread.ts2
-rw-r--r--packages/backend/src/models/Notification.ts8
-rw-r--r--packages/backend/src/models/Page.ts2
-rw-r--r--packages/backend/src/models/PageLike.ts2
-rw-r--r--packages/backend/src/models/PasswordResetRequest.ts2
-rw-r--r--packages/backend/src/models/Poll.ts2
-rw-r--r--packages/backend/src/models/PollVote.ts2
-rw-r--r--packages/backend/src/models/PromoNote.ts2
-rw-r--r--packages/backend/src/models/PromoRead.ts2
-rw-r--r--packages/backend/src/models/RegistrationTicket.ts2
-rw-r--r--packages/backend/src/models/RegistryItem.ts2
-rw-r--r--packages/backend/src/models/Relay.ts2
-rw-r--r--packages/backend/src/models/RenoteMuting.ts2
-rw-r--r--packages/backend/src/models/RepositoryModule.ts20
-rw-r--r--packages/backend/src/models/RetentionAggregation.ts2
-rw-r--r--packages/backend/src/models/ReversiGame.ts143
-rw-r--r--packages/backend/src/models/Role.ts13
-rw-r--r--packages/backend/src/models/RoleAssignment.ts2
-rw-r--r--packages/backend/src/models/Signin.ts2
-rw-r--r--packages/backend/src/models/SwSubscription.ts2
-rw-r--r--packages/backend/src/models/UsedUsername.ts2
-rw-r--r--packages/backend/src/models/User.ts2
-rw-r--r--packages/backend/src/models/UserIp.ts2
-rw-r--r--packages/backend/src/models/UserKeypair.ts2
-rw-r--r--packages/backend/src/models/UserList.ts2
-rw-r--r--packages/backend/src/models/UserListFavorite.ts2
-rw-r--r--packages/backend/src/models/UserListMembership.ts2
-rw-r--r--packages/backend/src/models/UserMemo.ts2
-rw-r--r--packages/backend/src/models/UserNotePining.ts2
-rw-r--r--packages/backend/src/models/UserPending.ts2
-rw-r--r--packages/backend/src/models/UserProfile.ts4
-rw-r--r--packages/backend/src/models/UserPublickey.ts2
-rw-r--r--packages/backend/src/models/UserSecurityKey.ts2
-rw-r--r--packages/backend/src/models/Webhook.ts4
-rw-r--r--packages/backend/src/models/_.ts9
-rw-r--r--packages/backend/src/models/json-schema/ad.ts2
-rw-r--r--packages/backend/src/models/json-schema/announcement.ts4
-rw-r--r--packages/backend/src/models/json-schema/antenna.ts2
-rw-r--r--packages/backend/src/models/json-schema/app.ts2
-rw-r--r--packages/backend/src/models/json-schema/blocking.ts4
-rw-r--r--packages/backend/src/models/json-schema/channel.ts2
-rw-r--r--packages/backend/src/models/json-schema/clip.ts2
-rw-r--r--packages/backend/src/models/json-schema/drive-file.ts2
-rw-r--r--packages/backend/src/models/json-schema/drive-folder.ts2
-rw-r--r--packages/backend/src/models/json-schema/emoji.ts6
-rw-r--r--packages/backend/src/models/json-schema/federation-instance.ts6
-rw-r--r--packages/backend/src/models/json-schema/flash.ts2
-rw-r--r--packages/backend/src/models/json-schema/following.ts6
-rw-r--r--packages/backend/src/models/json-schema/gallery-post.ts2
-rw-r--r--packages/backend/src/models/json-schema/hashtag.ts2
-rw-r--r--packages/backend/src/models/json-schema/invite-code.ts2
-rw-r--r--packages/backend/src/models/json-schema/meta.ts344
-rw-r--r--packages/backend/src/models/json-schema/muting.ts4
-rw-r--r--packages/backend/src/models/json-schema/note-favorite.ts2
-rw-r--r--packages/backend/src/models/json-schema/note-reaction.ts2
-rw-r--r--packages/backend/src/models/json-schema/note.ts65
-rw-r--r--packages/backend/src/models/json-schema/notification.ts423
-rw-r--r--packages/backend/src/models/json-schema/page.ts105
-rw-r--r--packages/backend/src/models/json-schema/queue.ts2
-rw-r--r--packages/backend/src/models/json-schema/renote-muting.ts4
-rw-r--r--packages/backend/src/models/json-schema/reversi-game.ts243
-rw-r--r--packages/backend/src/models/json-schema/role.ts306
-rw-r--r--packages/backend/src/models/json-schema/user-list.ts2
-rw-r--r--packages/backend/src/models/json-schema/user.ts173
-rw-r--r--packages/backend/src/models/util/id.ts2
100 files changed, 1872 insertions, 325 deletions
diff --git a/packages/backend/src/models/AbuseUserReport.ts b/packages/backend/src/models/AbuseUserReport.ts
index 593c44f66b..0615fd7eb5 100644
--- a/packages/backend/src/models/AbuseUserReport.ts
+++ b/packages/backend/src/models/AbuseUserReport.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/AccessToken.ts b/packages/backend/src/models/AccessToken.ts
index 452711eb8c..6f98c14ec1 100644
--- a/packages/backend/src/models/AccessToken.ts
+++ b/packages/backend/src/models/AccessToken.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Ad.ts b/packages/backend/src/models/Ad.ts
index b1d7d7d79e..108e991c70 100644
--- a/packages/backend/src/models/Ad.ts
+++ b/packages/backend/src/models/Ad.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Announcement.ts b/packages/backend/src/models/Announcement.ts
index 8f8be88fed..d0c59fff50 100644
--- a/packages/backend/src/models/Announcement.ts
+++ b/packages/backend/src/models/Announcement.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -38,7 +38,7 @@ export class MiAnnouncement {
length: 256, nullable: false,
default: 'info',
})
- public icon: string;
+ public icon: 'info' | 'warning' | 'error' | 'success';
// normal ... お知らせページ掲載
// banner ... お知らせページ掲載 + バナー表示
@@ -47,7 +47,7 @@ export class MiAnnouncement {
length: 256, nullable: false,
default: 'normal',
})
- public display: string;
+ public display: 'normal' | 'banner' | 'dialog';
@Column('boolean', {
default: false,
diff --git a/packages/backend/src/models/AnnouncementRead.ts b/packages/backend/src/models/AnnouncementRead.ts
index db09e65f50..47de8dd180 100644
--- a/packages/backend/src/models/AnnouncementRead.ts
+++ b/packages/backend/src/models/AnnouncementRead.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Antenna.ts b/packages/backend/src/models/Antenna.ts
index b74c61b728..332a899768 100644
--- a/packages/backend/src/models/Antenna.ts
+++ b/packages/backend/src/models/Antenna.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/App.ts b/packages/backend/src/models/App.ts
index 5c56a224a2..0185e2995c 100644
--- a/packages/backend/src/models/App.ts
+++ b/packages/backend/src/models/App.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/AuthSession.ts b/packages/backend/src/models/AuthSession.ts
index 81bed21211..03050ba955 100644
--- a/packages/backend/src/models/AuthSession.ts
+++ b/packages/backend/src/models/AuthSession.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/AvatarDecoration.ts b/packages/backend/src/models/AvatarDecoration.ts
index 08ebbdeac1..13f0b05667 100644
--- a/packages/backend/src/models/AvatarDecoration.ts
+++ b/packages/backend/src/models/AvatarDecoration.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Blocking.ts b/packages/backend/src/models/Blocking.ts
index 9bf7a63b6e..34a6efe5a6 100644
--- a/packages/backend/src/models/Blocking.ts
+++ b/packages/backend/src/models/Blocking.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/BubbleGameRecord.ts b/packages/backend/src/models/BubbleGameRecord.ts
new file mode 100644
index 0000000000..686e39c118
--- /dev/null
+++ b/packages/backend/src/models/BubbleGameRecord.ts
@@ -0,0 +1,57 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
+import { id } from './util/id.js';
+import { MiUser } from './User.js';
+
+@Entity('bubble_game_record')
+export class MiBubbleGameRecord {
+ @PrimaryColumn(id())
+ public id: string;
+
+ @Index()
+ @Column({
+ ...id(),
+ })
+ public userId: MiUser['id'];
+
+ @ManyToOne(type => MiUser, {
+ onDelete: 'CASCADE',
+ })
+ @JoinColumn()
+ public user: MiUser | null;
+
+ @Index()
+ @Column('timestamp with time zone')
+ public seededAt: Date;
+
+ @Column('varchar', {
+ length: 1024,
+ })
+ public seed: string;
+
+ @Column('integer')
+ public gameVersion: number;
+
+ @Column('varchar', {
+ length: 128,
+ })
+ public gameMode: string;
+
+ @Index()
+ @Column('integer')
+ public score: number;
+
+ @Column('jsonb', {
+ default: [],
+ })
+ public logs: number[][];
+
+ @Column('boolean', {
+ default: false,
+ })
+ public isVerified: boolean;
+}
diff --git a/packages/backend/src/models/Channel.ts b/packages/backend/src/models/Channel.ts
index a7f9e262b1..f5e9b17e3e 100644
--- a/packages/backend/src/models/Channel.ts
+++ b/packages/backend/src/models/Channel.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/ChannelFavorite.ts b/packages/backend/src/models/ChannelFavorite.ts
index fc25ffe260..167f41cf16 100644
--- a/packages/backend/src/models/ChannelFavorite.ts
+++ b/packages/backend/src/models/ChannelFavorite.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/ChannelFollowing.ts b/packages/backend/src/models/ChannelFollowing.ts
index 4dd391a082..c7afdd05b0 100644
--- a/packages/backend/src/models/ChannelFollowing.ts
+++ b/packages/backend/src/models/ChannelFollowing.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Clip.ts b/packages/backend/src/models/Clip.ts
index 2483b0925a..6295a329fb 100644
--- a/packages/backend/src/models/Clip.ts
+++ b/packages/backend/src/models/Clip.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/ClipFavorite.ts b/packages/backend/src/models/ClipFavorite.ts
index aa949b3ea8..40bdb9f4aa 100644
--- a/packages/backend/src/models/ClipFavorite.ts
+++ b/packages/backend/src/models/ClipFavorite.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/ClipNote.ts b/packages/backend/src/models/ClipNote.ts
index b7cc5ee39b..6e1d2bec4c 100644
--- a/packages/backend/src/models/ClipNote.ts
+++ b/packages/backend/src/models/ClipNote.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/DriveFile.ts b/packages/backend/src/models/DriveFile.ts
index ca564f6f0c..efb639f075 100644
--- a/packages/backend/src/models/DriveFile.ts
+++ b/packages/backend/src/models/DriveFile.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/DriveFolder.ts b/packages/backend/src/models/DriveFolder.ts
index 18f6d17709..07046d6e11 100644
--- a/packages/backend/src/models/DriveFolder.ts
+++ b/packages/backend/src/models/DriveFolder.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Emoji.ts b/packages/backend/src/models/Emoji.ts
index 563ac1d9d3..d62b6e9f6f 100644
--- a/packages/backend/src/models/Emoji.ts
+++ b/packages/backend/src/models/Emoji.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Flash.ts b/packages/backend/src/models/Flash.ts
index ac880843b0..a1469a0d94 100644
--- a/packages/backend/src/models/Flash.ts
+++ b/packages/backend/src/models/Flash.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/FlashLike.ts b/packages/backend/src/models/FlashLike.ts
index ad7f4966b4..a9fb48123e 100644
--- a/packages/backend/src/models/FlashLike.ts
+++ b/packages/backend/src/models/FlashLike.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/FollowRequest.ts b/packages/backend/src/models/FollowRequest.ts
index 9899694dd6..3ff5e7a478 100644
--- a/packages/backend/src/models/FollowRequest.ts
+++ b/packages/backend/src/models/FollowRequest.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Following.ts b/packages/backend/src/models/Following.ts
index e320911a1d..62cbc29f26 100644
--- a/packages/backend/src/models/Following.ts
+++ b/packages/backend/src/models/Following.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/GalleryLike.ts b/packages/backend/src/models/GalleryLike.ts
index 84d4ce9c3e..ed0963122d 100644
--- a/packages/backend/src/models/GalleryLike.ts
+++ b/packages/backend/src/models/GalleryLike.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/GalleryPost.ts b/packages/backend/src/models/GalleryPost.ts
index b72220caf9..04d8823e37 100644
--- a/packages/backend/src/models/GalleryPost.ts
+++ b/packages/backend/src/models/GalleryPost.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Hashtag.ts b/packages/backend/src/models/Hashtag.ts
index 1493774752..3add06d0c3 100644
--- a/packages/backend/src/models/Hashtag.ts
+++ b/packages/backend/src/models/Hashtag.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Instance.ts b/packages/backend/src/models/Instance.ts
index 4200b1b461..7dd4e5b10c 100644
--- a/packages/backend/src/models/Instance.ts
+++ b/packages/backend/src/models/Instance.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -149,4 +149,9 @@ export class MiInstance {
default: false,
})
public isNSFW: boolean;
+
+ @Column('varchar', {
+ length: 16384, default: '',
+ })
+ public moderationNote: string;
}
diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts
index 4bf856e619..dd2e78cde2 100644
--- a/packages/backend/src/models/Meta.ts
+++ b/packages/backend/src/models/Meta.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -79,6 +79,11 @@ export class MiMeta {
@Column('varchar', {
length: 1024, array: true, default: '{}',
})
+ public prohibitedWords: string[];
+
+ @Column('varchar', {
+ length: 1024, array: true, default: '{}',
+ })
public silencedHosts: string[];
@Column('varchar', {
@@ -199,6 +204,29 @@ export class MiMeta {
@Column('boolean', {
default: false,
})
+ public enableMcaptcha: boolean;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public mcaptchaSitekey: string | null;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public mcaptchaSecretKey: string | null;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public mcaptchaInstanceUrl: string | null;
+
+ @Column('boolean', {
+ default: false,
+ })
public enableRecaptcha: boolean;
@Column('varchar', {
@@ -230,6 +258,8 @@ export class MiMeta {
})
public turnstileSecretKey: string | null;
+ // chaptcha系を追加した際にはnodeinfoのレスポンスに追加するのを忘れないようにすること
+
@Column('enum', {
enum: ['none', 'all', 'local', 'remote'],
default: 'none',
@@ -330,6 +360,17 @@ export class MiMeta {
})
public deeplIsPro: boolean;
+ @Column('boolean', {
+ default: false,
+ })
+ public deeplFreeMode: boolean;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public deeplFreeInstance: string | null;
+
@Column('varchar', {
length: 1024,
nullable: true,
@@ -338,14 +379,14 @@ export class MiMeta {
@Column('varchar', {
length: 1024,
- default: 'https://github.com/misskey-dev/misskey',
+ default: 'https://activitypub.software/TransFem-org/Sharkey/',
nullable: false,
})
- public repositoryUrl: string;
+ public repositoryUrl: string | null;
@Column('varchar', {
length: 1024,
- default: 'https://github.com/misskey-dev/misskey/issues/new',
+ default: 'https://activitypub.software/TransFem-org/Sharkey/-/issues/new',
nullable: true,
})
public feedbackUrl: string | null;
@@ -363,6 +404,12 @@ export class MiMeta {
public privacyPolicyUrl: string | null;
@Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public donationUrl: string | null;
+
+ @Column('varchar', {
length: 8192,
nullable: true,
})
@@ -468,6 +515,23 @@ export class MiMeta {
public verifymailAuthKey: string | null;
@Column('boolean', {
+ default: false,
+ })
+ public enableTruemailApi: boolean;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public truemailInstance: string | null;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public truemailAuthKey: string | null;
+
+ @Column('boolean', {
default: true,
})
public enableChartsForRemoteUser: boolean;
diff --git a/packages/backend/src/models/ModerationLog.ts b/packages/backend/src/models/ModerationLog.ts
index 71b33c3e47..edde315fdf 100644
--- a/packages/backend/src/models/ModerationLog.ts
+++ b/packages/backend/src/models/ModerationLog.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Muting.ts b/packages/backend/src/models/Muting.ts
index a528e1e7d7..e1240b9c4e 100644
--- a/packages/backend/src/models/Muting.ts
+++ b/packages/backend/src/models/Muting.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts
index 2705282880..b11e2ec62b 100644
--- a/packages/backend/src/models/Note.ts
+++ b/packages/backend/src/models/Note.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -11,9 +11,6 @@ import { MiChannel } from './Channel.js';
import type { MiDriveFile } from './DriveFile.js';
@Entity('note')
-@Index('IDX_NOTE_TAGS', { synchronize: false })
-@Index('IDX_NOTE_MENTIONS', { synchronize: false })
-@Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
export class MiNote {
@PrimaryColumn(id())
public id: string;
@@ -139,7 +136,7 @@ export class MiNote {
})
public url: string | null;
- @Index()
+ @Index('IDX_NOTE_FILE_IDS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
@@ -151,14 +148,14 @@ export class MiNote {
})
public attachedFileTypes: string[];
- @Index()
+ @Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
})
public visibleUserIds: MiUser['id'][];
- @Index()
+ @Index('IDX_NOTE_MENTIONS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
@@ -180,7 +177,7 @@ export class MiNote {
})
public emojis: string[];
- @Index()
+ @Index('IDX_NOTE_TAGS', { synchronize: false })
@Column('varchar', {
length: 128, array: true, default: '{}',
})
diff --git a/packages/backend/src/models/NoteFavorite.ts b/packages/backend/src/models/NoteFavorite.ts
index 364eaabd98..cf76c767b0 100644
--- a/packages/backend/src/models/NoteFavorite.ts
+++ b/packages/backend/src/models/NoteFavorite.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/NoteReaction.ts b/packages/backend/src/models/NoteReaction.ts
index ee3a447464..42dfcaa9ad 100644
--- a/packages/backend/src/models/NoteReaction.ts
+++ b/packages/backend/src/models/NoteReaction.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/NoteThreadMuting.ts b/packages/backend/src/models/NoteThreadMuting.ts
index 00311aa570..e7bd39f348 100644
--- a/packages/backend/src/models/NoteThreadMuting.ts
+++ b/packages/backend/src/models/NoteThreadMuting.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/NoteUnread.ts b/packages/backend/src/models/NoteUnread.ts
index d86a474553..c759181117 100644
--- a/packages/backend/src/models/NoteUnread.ts
+++ b/packages/backend/src/models/NoteUnread.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Notification.ts b/packages/backend/src/models/Notification.ts
index 3bc2edaa0d..4ed71a106c 100644
--- a/packages/backend/src/models/Notification.ts
+++ b/packages/backend/src/models/Notification.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -107,6 +107,12 @@ export type MiNotification = {
type: 'test';
id: string;
createdAt: string;
+} | {
+ type: 'edited';
+ id: string;
+ createdAt: string;
+ notifierId: MiUser['id'];
+ noteId: MiNote['id'];
};
export type MiGroupedNotification = MiNotification | {
diff --git a/packages/backend/src/models/Page.ts b/packages/backend/src/models/Page.ts
index 9cab875499..1695bf570e 100644
--- a/packages/backend/src/models/Page.ts
+++ b/packages/backend/src/models/Page.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/PageLike.ts b/packages/backend/src/models/PageLike.ts
index b845f58b7d..05ca22cf2c 100644
--- a/packages/backend/src/models/PageLike.ts
+++ b/packages/backend/src/models/PageLike.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/PasswordResetRequest.ts b/packages/backend/src/models/PasswordResetRequest.ts
index 5be439511f..fdaf21056b 100644
--- a/packages/backend/src/models/PasswordResetRequest.ts
+++ b/packages/backend/src/models/PasswordResetRequest.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Poll.ts b/packages/backend/src/models/Poll.ts
index 5ce0b9a2fc..c2693dbb19 100644
--- a/packages/backend/src/models/Poll.ts
+++ b/packages/backend/src/models/Poll.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/PollVote.ts b/packages/backend/src/models/PollVote.ts
index 751be8a32b..b5c780293c 100644
--- a/packages/backend/src/models/PollVote.ts
+++ b/packages/backend/src/models/PollVote.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/PromoNote.ts b/packages/backend/src/models/PromoNote.ts
index f4425fe88b..ae27adec9e 100644
--- a/packages/backend/src/models/PromoNote.ts
+++ b/packages/backend/src/models/PromoNote.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/PromoRead.ts b/packages/backend/src/models/PromoRead.ts
index d9f3075416..b2a698cc7b 100644
--- a/packages/backend/src/models/PromoRead.ts
+++ b/packages/backend/src/models/PromoRead.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/RegistrationTicket.ts b/packages/backend/src/models/RegistrationTicket.ts
index 730cedffba..0a4e4b9189 100644
--- a/packages/backend/src/models/RegistrationTicket.ts
+++ b/packages/backend/src/models/RegistrationTicket.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/RegistryItem.ts b/packages/backend/src/models/RegistryItem.ts
index 60bdced957..335e8b9eab 100644
--- a/packages/backend/src/models/RegistryItem.ts
+++ b/packages/backend/src/models/RegistryItem.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Relay.ts b/packages/backend/src/models/Relay.ts
index 293fccecfc..eca2916032 100644
--- a/packages/backend/src/models/Relay.ts
+++ b/packages/backend/src/models/Relay.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/RenoteMuting.ts b/packages/backend/src/models/RenoteMuting.ts
index 17df43ea31..448a0b7663 100644
--- a/packages/backend/src/models/RenoteMuting.ts
+++ b/packages/backend/src/models/RenoteMuting.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/RepositoryModule.ts b/packages/backend/src/models/RepositoryModule.ts
index 0b5d3b640f..053edd6094 100644
--- a/packages/backend/src/models/RepositoryModule.ts
+++ b/packages/backend/src/models/RepositoryModule.ts
@@ -1,11 +1,11 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Module } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
-import { MiAbuseUserReport, MiAccessToken, MiAd, MiAnnouncement, MiAnnouncementRead, MiAntenna, MiApp, MiAuthSession, MiAvatarDecoration, MiBlocking, MiChannel, MiChannelFavorite, MiChannelFollowing, MiClip, MiClipFavorite, MiClipNote, MiDriveFile, MiDriveFolder, MiEmoji, MiFlash, MiFlashLike, MiFollowRequest, MiFollowing, MiGalleryLike, MiGalleryPost, MiHashtag, MiInstance, MiMeta, MiModerationLog, MiMuting, MiNote, MiNoteFavorite, MiNoteReaction, MiNoteThreadMuting, MiNoteUnread, MiPage, MiPageLike, MiPasswordResetRequest, MiPoll, MiPollVote, MiPromoNote, MiPromoRead, MiRegistrationTicket, MiRegistryItem, MiRelay, MiRenoteMuting, MiRetentionAggregation, MiRole, MiRoleAssignment, MiSignin, MiSwSubscription, MiUsedUsername, MiUser, MiUserIp, MiUserKeypair, MiUserList, MiUserListFavorite, MiUserListMembership, MiUserMemo, MiUserNotePining, MiUserPending, MiUserProfile, MiUserPublickey, MiUserSecurityKey, MiWebhook, NoteEdit } from './_.js';
+import { MiAbuseUserReport, MiAccessToken, MiAd, MiAnnouncement, MiAnnouncementRead, MiAntenna, MiApp, MiAuthSession, MiAvatarDecoration, MiBlocking, MiChannel, MiChannelFavorite, MiChannelFollowing, MiClip, MiClipFavorite, MiClipNote, MiDriveFile, MiDriveFolder, MiEmoji, MiFlash, MiFlashLike, MiFollowRequest, MiFollowing, MiGalleryLike, MiGalleryPost, MiHashtag, MiInstance, MiMeta, MiModerationLog, MiMuting, MiNote, MiNoteFavorite, MiNoteReaction, MiNoteThreadMuting, MiNoteUnread, MiPage, MiPageLike, MiPasswordResetRequest, MiPoll, MiPollVote, MiPromoNote, MiPromoRead, MiRegistrationTicket, MiRegistryItem, MiRelay, MiRenoteMuting, MiRetentionAggregation, MiRole, MiRoleAssignment, MiSignin, MiSwSubscription, MiUsedUsername, MiUser, MiUserIp, MiUserKeypair, MiUserList, MiUserListFavorite, MiUserListMembership, MiUserMemo, MiUserNotePining, MiUserPending, MiUserProfile, MiUserPublickey, MiUserSecurityKey, MiWebhook, NoteEdit, MiBubbleGameRecord, MiReversiGame } from './_.js';
import type { DataSource } from 'typeorm';
import type { Provider } from '@nestjs/common';
@@ -405,6 +405,18 @@ const $noteEditRepository: Provider = {
inject: [DI.db],
};
+const $bubbleGameRecordsRepository: Provider = {
+ provide: DI.bubbleGameRecordsRepository,
+ useFactory: (db: DataSource) => db.getRepository(MiBubbleGameRecord),
+ inject: [DI.db],
+};
+
+const $reversiGamesRepository: Provider = {
+ provide: DI.reversiGamesRepository,
+ useFactory: (db: DataSource) => db.getRepository(MiReversiGame),
+ inject: [DI.db],
+};
+
@Module({
imports: [
],
@@ -475,6 +487,8 @@ const $noteEditRepository: Provider = {
$flashLikesRepository,
$userMemosRepository,
$noteEditRepository,
+ $bubbleGameRecordsRepository,
+ $reversiGamesRepository,
],
exports: [
$usersRepository,
@@ -543,6 +557,8 @@ const $noteEditRepository: Provider = {
$flashLikesRepository,
$userMemosRepository,
$noteEditRepository,
+ $bubbleGameRecordsRepository,
+ $reversiGamesRepository,
],
})
export class RepositoryModule {}
diff --git a/packages/backend/src/models/RetentionAggregation.ts b/packages/backend/src/models/RetentionAggregation.ts
index 9da401597c..139f3e4dfd 100644
--- a/packages/backend/src/models/RetentionAggregation.ts
+++ b/packages/backend/src/models/RetentionAggregation.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/ReversiGame.ts b/packages/backend/src/models/ReversiGame.ts
new file mode 100644
index 0000000000..c03335dd63
--- /dev/null
+++ b/packages/backend/src/models/ReversiGame.ts
@@ -0,0 +1,143 @@
+import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
+import { id } from './util/id.js';
+import { MiUser } from './User.js';
+
+@Entity('reversi_game')
+export class MiReversiGame {
+ @PrimaryColumn(id())
+ public id: string;
+
+ @Column('timestamp with time zone', {
+ nullable: true,
+ comment: 'The started date of the ReversiGame.',
+ })
+ public startedAt: Date | null;
+
+ @Column('timestamp with time zone', {
+ nullable: true,
+ comment: 'The ended date of the ReversiGame.',
+ })
+ public endedAt: Date | null;
+
+ @Column(id())
+ public user1Id: MiUser['id'];
+
+ @ManyToOne(type => MiUser, {
+ onDelete: 'CASCADE',
+ })
+ @JoinColumn()
+ public user1: MiUser | null;
+
+ @Column(id())
+ public user2Id: MiUser['id'];
+
+ @ManyToOne(type => MiUser, {
+ onDelete: 'CASCADE',
+ })
+ @JoinColumn()
+ public user2: MiUser | null;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public user1Ready: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public user2Ready: boolean;
+
+ /**
+ * どちらのプレイヤーが先行(黒)か
+ * 1 ... user1
+ * 2 ... user2
+ */
+ @Column('integer', {
+ nullable: true,
+ })
+ public black: number | null;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public isStarted: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public isEnded: boolean;
+
+ @Column({
+ ...id(),
+ nullable: true,
+ })
+ public winnerId: MiUser['id'] | null;
+
+ @Column({
+ ...id(),
+ nullable: true,
+ })
+ public surrenderedUserId: MiUser['id'] | null;
+
+ @Column({
+ ...id(),
+ nullable: true,
+ })
+ public timeoutUserId: MiUser['id'] | null;
+
+ // in sec
+ @Column('smallint', {
+ default: 90,
+ })
+ public timeLimitForEachTurn: number;
+
+ @Column('jsonb', {
+ default: [],
+ })
+ public logs: number[][];
+
+ @Column('varchar', {
+ array: true, length: 64,
+ })
+ public map: string[];
+
+ @Column('varchar', {
+ length: 32,
+ })
+ public bw: string;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public noIrregularRules: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public isLlotheo: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public canPutEverywhere: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
+ public loopedBoard: boolean;
+
+ @Column('jsonb', {
+ nullable: true, default: null,
+ })
+ public form1: any | null;
+
+ @Column('jsonb', {
+ nullable: true, default: null,
+ })
+ public form2: any | null;
+
+ @Column('varchar', {
+ length: 32, nullable: true,
+ })
+ public crc32: string | null;
+}
diff --git a/packages/backend/src/models/Role.ts b/packages/backend/src/models/Role.ts
index 6976956e13..058abe3118 100644
--- a/packages/backend/src/models/Role.ts
+++ b/packages/backend/src/models/Role.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -29,6 +29,11 @@ type CondFormulaValueIsRemote = {
type: 'isRemote';
};
+type CondFormulaValueRoleAssignedTo = {
+ type: 'roleAssignedTo';
+ roleId: string;
+};
+
type CondFormulaValueCreatedLessThan = {
type: 'createdLessThan';
sec: number;
@@ -69,12 +74,13 @@ type CondFormulaValueNotesMoreThanOrEq = {
value: number;
};
-export type RoleCondFormulaValue =
+export type RoleCondFormulaValue = { id: string } & (
CondFormulaValueAnd |
CondFormulaValueOr |
CondFormulaValueNot |
CondFormulaValueIsLocal |
CondFormulaValueIsRemote |
+ CondFormulaValueRoleAssignedTo |
CondFormulaValueCreatedLessThan |
CondFormulaValueCreatedMoreThan |
CondFormulaValueFollowersLessThanOrEq |
@@ -82,7 +88,8 @@ export type RoleCondFormulaValue =
CondFormulaValueFollowingLessThanOrEq |
CondFormulaValueFollowingMoreThanOrEq |
CondFormulaValueNotesLessThanOrEq |
- CondFormulaValueNotesMoreThanOrEq;
+ CondFormulaValueNotesMoreThanOrEq
+);
@Entity('role')
export class MiRole {
diff --git a/packages/backend/src/models/RoleAssignment.ts b/packages/backend/src/models/RoleAssignment.ts
index 30c7e19f2a..37755d631b 100644
--- a/packages/backend/src/models/RoleAssignment.ts
+++ b/packages/backend/src/models/RoleAssignment.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Signin.ts b/packages/backend/src/models/Signin.ts
index 656b44dfe0..f8ff9c57d7 100644
--- a/packages/backend/src/models/Signin.ts
+++ b/packages/backend/src/models/Signin.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/SwSubscription.ts b/packages/backend/src/models/SwSubscription.ts
index f685a8ff3e..0c531132b3 100644
--- a/packages/backend/src/models/SwSubscription.ts
+++ b/packages/backend/src/models/SwSubscription.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UsedUsername.ts b/packages/backend/src/models/UsedUsername.ts
index c75bf424c1..fbfc126763 100644
--- a/packages/backend/src/models/UsedUsername.ts
+++ b/packages/backend/src/models/UsedUsername.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/User.ts b/packages/backend/src/models/User.ts
index 3db8b398fd..b0910133c9 100644
--- a/packages/backend/src/models/User.ts
+++ b/packages/backend/src/models/User.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserIp.ts b/packages/backend/src/models/UserIp.ts
index 60a7bc8b01..3e757fcf79 100644
--- a/packages/backend/src/models/UserIp.ts
+++ b/packages/backend/src/models/UserIp.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserKeypair.ts b/packages/backend/src/models/UserKeypair.ts
index a316dbaeb4..f5252d126c 100644
--- a/packages/backend/src/models/UserKeypair.ts
+++ b/packages/backend/src/models/UserKeypair.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserList.ts b/packages/backend/src/models/UserList.ts
index 7ad15419d7..5fb991a87d 100644
--- a/packages/backend/src/models/UserList.ts
+++ b/packages/backend/src/models/UserList.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserListFavorite.ts b/packages/backend/src/models/UserListFavorite.ts
index a18ed9253a..80b2d61eb7 100644
--- a/packages/backend/src/models/UserListFavorite.ts
+++ b/packages/backend/src/models/UserListFavorite.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserListMembership.ts b/packages/backend/src/models/UserListMembership.ts
index fa8287f17a..af659d071d 100644
--- a/packages/backend/src/models/UserListMembership.ts
+++ b/packages/backend/src/models/UserListMembership.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserMemo.ts b/packages/backend/src/models/UserMemo.ts
index ab5e812c44..29e28d290a 100644
--- a/packages/backend/src/models/UserMemo.ts
+++ b/packages/backend/src/models/UserMemo.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserNotePining.ts b/packages/backend/src/models/UserNotePining.ts
index ae5977aa56..92c5cd55d0 100644
--- a/packages/backend/src/models/UserNotePining.ts
+++ b/packages/backend/src/models/UserNotePining.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserPending.ts b/packages/backend/src/models/UserPending.ts
index 6b26bd228c..961ae344f1 100644
--- a/packages/backend/src/models/UserPending.ts
+++ b/packages/backend/src/models/UserPending.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserProfile.ts b/packages/backend/src/models/UserProfile.ts
index ae46fbc83c..40ea26f610 100644
--- a/packages/backend/src/models/UserProfile.ts
+++ b/packages/backend/src/models/UserProfile.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -257,6 +257,8 @@ export class MiUserProfile {
} | {
type: 'mutualFollow';
} | {
+ type: 'followingOrFollower';
+ } | {
type: 'list';
userListId: MiUserList['id'];
};
diff --git a/packages/backend/src/models/UserPublickey.ts b/packages/backend/src/models/UserPublickey.ts
index 33de73c636..6bcd785304 100644
--- a/packages/backend/src/models/UserPublickey.ts
+++ b/packages/backend/src/models/UserPublickey.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/UserSecurityKey.ts b/packages/backend/src/models/UserSecurityKey.ts
index 02c29bfbb5..0babbe1abe 100644
--- a/packages/backend/src/models/UserSecurityKey.ts
+++ b/packages/backend/src/models/UserSecurityKey.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/Webhook.ts b/packages/backend/src/models/Webhook.ts
index ec4e13cc76..2a727f86fd 100644
--- a/packages/backend/src/models/Webhook.ts
+++ b/packages/backend/src/models/Webhook.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from './util/id.js';
import { MiUser } from './User.js';
-export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const;
+export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction', 'edited'] as const;
@Entity('webhook')
export class MiWebhook {
diff --git a/packages/backend/src/models/_.ts b/packages/backend/src/models/_.ts
index 2a7810235e..744a1dd4e7 100644
--- a/packages/backend/src/models/_.ts
+++ b/packages/backend/src/models/_.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -69,6 +69,9 @@ import { MiFlash } from '@/models/Flash.js';
import { MiFlashLike } from '@/models/FlashLike.js';
import { MiUserListFavorite } from '@/models/UserListFavorite.js';
import { NoteEdit } from '@/models/NoteEdit.js';
+import { MiBubbleGameRecord } from '@/models/BubbleGameRecord.js';
+import { MiReversiGame } from '@/models/ReversiGame.js';
+
import type { Repository } from 'typeorm';
export {
@@ -138,6 +141,8 @@ export {
MiFlashLike,
MiUserMemo,
NoteEdit,
+ MiBubbleGameRecord,
+ MiReversiGame,
};
export type AbuseUserReportsRepository = Repository<MiAbuseUserReport>;
@@ -206,3 +211,5 @@ export type FlashsRepository = Repository<MiFlash>;
export type FlashLikesRepository = Repository<MiFlashLike>;
export type UserMemoRepository = Repository<MiUserMemo>;
export type NoteEditRepository = Repository<NoteEdit>;
+export type BubbleGameRecordsRepository = Repository<MiBubbleGameRecord>;
+export type ReversiGamesRepository = Repository<MiReversiGame>;
diff --git a/packages/backend/src/models/json-schema/ad.ts b/packages/backend/src/models/json-schema/ad.ts
index 649ffcd4dc..b01b39a38b 100644
--- a/packages/backend/src/models/json-schema/ad.ts
+++ b/packages/backend/src/models/json-schema/ad.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/announcement.ts b/packages/backend/src/models/json-schema/announcement.ts
index 78a98872b2..b9352bd31e 100644
--- a/packages/backend/src/models/json-schema/announcement.ts
+++ b/packages/backend/src/models/json-schema/announcement.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -37,10 +37,12 @@ export const packedAnnouncementSchema = {
icon: {
type: 'string',
optional: false, nullable: false,
+ enum: ['info', 'warning', 'error', 'success'],
},
display: {
type: 'string',
optional: false, nullable: false,
+ enum: ['dialog', 'normal', 'banner'],
},
needConfirmationToRead: {
type: 'boolean',
diff --git a/packages/backend/src/models/json-schema/antenna.ts b/packages/backend/src/models/json-schema/antenna.ts
index 4a9f0ed355..74622b6193 100644
--- a/packages/backend/src/models/json-schema/antenna.ts
+++ b/packages/backend/src/models/json-schema/antenna.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/app.ts b/packages/backend/src/models/json-schema/app.ts
index 9e0916299c..6148232224 100644
--- a/packages/backend/src/models/json-schema/app.ts
+++ b/packages/backend/src/models/json-schema/app.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/blocking.ts b/packages/backend/src/models/json-schema/blocking.ts
index 0b58f1f8d7..2d02ba6a70 100644
--- a/packages/backend/src/models/json-schema/blocking.ts
+++ b/packages/backend/src/models/json-schema/blocking.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -25,7 +25,7 @@ export const packedBlockingSchema = {
blockee: {
type: 'object',
optional: false, nullable: false,
- ref: 'UserDetailed',
+ ref: 'UserDetailedNotMe',
},
},
} as const;
diff --git a/packages/backend/src/models/json-schema/channel.ts b/packages/backend/src/models/json-schema/channel.ts
index 5b0fa0f15d..d233f7858d 100644
--- a/packages/backend/src/models/json-schema/channel.ts
+++ b/packages/backend/src/models/json-schema/channel.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/clip.ts b/packages/backend/src/models/json-schema/clip.ts
index 1ab96c2b3b..ca4886c978 100644
--- a/packages/backend/src/models/json-schema/clip.ts
+++ b/packages/backend/src/models/json-schema/clip.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/drive-file.ts b/packages/backend/src/models/json-schema/drive-file.ts
index 79f242a711..ca88cc0e39 100644
--- a/packages/backend/src/models/json-schema/drive-file.ts
+++ b/packages/backend/src/models/json-schema/drive-file.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/drive-folder.ts b/packages/backend/src/models/json-schema/drive-folder.ts
index aaad301303..12012a7e12 100644
--- a/packages/backend/src/models/json-schema/drive-folder.ts
+++ b/packages/backend/src/models/json-schema/drive-folder.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/emoji.ts b/packages/backend/src/models/json-schema/emoji.ts
index 99a58f8773..62686ad5ae 100644
--- a/packages/backend/src/models/json-schema/emoji.ts
+++ b/packages/backend/src/models/json-schema/emoji.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -27,6 +27,10 @@ export const packedEmojiSimpleSchema = {
type: 'string',
optional: false, nullable: false,
},
+ localOnly: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
isSensitive: {
type: 'boolean',
optional: true, nullable: false,
diff --git a/packages/backend/src/models/json-schema/federation-instance.ts b/packages/backend/src/models/json-schema/federation-instance.ts
index 94873716bf..7b8ab22831 100644
--- a/packages/backend/src/models/json-schema/federation-instance.ts
+++ b/packages/backend/src/models/json-schema/federation-instance.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -112,5 +112,9 @@ export const packedFederationInstanceSchema = {
optional: false,
nullable: false,
},
+ moderationNote: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
},
} as const;
diff --git a/packages/backend/src/models/json-schema/flash.ts b/packages/backend/src/models/json-schema/flash.ts
index f08fa7a279..952df649ad 100644
--- a/packages/backend/src/models/json-schema/flash.ts
+++ b/packages/backend/src/models/json-schema/flash.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/following.ts b/packages/backend/src/models/json-schema/following.ts
index e92cff20a1..c5295a5128 100644
--- a/packages/backend/src/models/json-schema/following.ts
+++ b/packages/backend/src/models/json-schema/following.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -30,12 +30,12 @@ export const packedFollowingSchema = {
followee: {
type: 'object',
optional: true, nullable: false,
- ref: 'UserDetailed',
+ ref: 'UserDetailedNotMe',
},
follower: {
type: 'object',
optional: true, nullable: false,
- ref: 'UserDetailed',
+ ref: 'UserDetailedNotMe',
},
},
} as const;
diff --git a/packages/backend/src/models/json-schema/gallery-post.ts b/packages/backend/src/models/json-schema/gallery-post.ts
index df7038950c..a46d5115c2 100644
--- a/packages/backend/src/models/json-schema/gallery-post.ts
+++ b/packages/backend/src/models/json-schema/gallery-post.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/hashtag.ts b/packages/backend/src/models/json-schema/hashtag.ts
index a48e972a5d..4fd136afed 100644
--- a/packages/backend/src/models/json-schema/hashtag.ts
+++ b/packages/backend/src/models/json-schema/hashtag.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/invite-code.ts b/packages/backend/src/models/json-schema/invite-code.ts
index cd8bf98d90..08d1b8fd0c 100644
--- a/packages/backend/src/models/json-schema/invite-code.ts
+++ b/packages/backend/src/models/json-schema/invite-code.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/meta.ts b/packages/backend/src/models/json-schema/meta.ts
new file mode 100644
index 0000000000..9db3f7f809
--- /dev/null
+++ b/packages/backend/src/models/json-schema/meta.ts
@@ -0,0 +1,344 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export const packedMetaLiteSchema = {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ maintainerName: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ maintainerEmail: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ version: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ providesTarball: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ shortName: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ uri: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'url',
+ example: 'https://misskey.example.com',
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ langs: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ tosUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ repositoryUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ default: 'https://github.com/misskey-dev/misskey',
+ },
+ feedbackUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ default: 'https://github.com/misskey-dev/misskey/issues/new',
+ },
+ donationUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ defaultDarkTheme: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ defaultLightTheme: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ defaultLike: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ disableRegistration: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ emailRequiredForSignup: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ approvalRequiredForSignup: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ enableHcaptcha: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ hcaptchaSiteKey: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ enableMcaptcha: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ mcaptchaSiteKey: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ mcaptchaInstanceUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ enableRecaptcha: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ recaptchaSiteKey: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ enableTurnstile: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ turnstileSiteKey: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ enableAchievements: {
+ type: 'boolean',
+ optional: false, nullable: true,
+ },
+ swPublickey: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ mascotImageUrl: {
+ type: 'string',
+ optional: false, nullable: false,
+ default: '/assets/ai.png',
+ },
+ bannerUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ serverErrorImageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ infoImageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ notFoundImageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ iconUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ maxNoteTextLength: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ ads: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'url',
+ },
+ place: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ ratio: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ imageUrl: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'url',
+ },
+ dayOfWeek: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ },
+ },
+ },
+ notesPerOneAd: {
+ type: 'number',
+ optional: false, nullable: false,
+ default: 0,
+ },
+ enableEmail: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ enableServiceWorker: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ translatorAvailable: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ mediaProxy: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ backgroundImageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ impressumUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ logoImageUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ privacyPolicyUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ serverRules: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ },
+ },
+ themeColor: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ policies: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'RolePolicies',
+ },
+ },
+} as const;
+
+export const packedMetaDetailedOnlySchema = {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ features: {
+ type: 'object',
+ optional: true, nullable: false,
+ properties: {
+ registration: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ emailRequiredForSignup: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ localTimeline: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ globalTimeline: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ hcaptcha: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ turnstile: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ recaptcha: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ objectStorage: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ serviceWorker: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ miauth: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ default: true,
+ },
+ },
+ },
+ proxyAccountName: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ requireSetup: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ example: false,
+ },
+ cacheRemoteFiles: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ cacheRemoteSensitiveFiles: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
+
+export const packedMetaDetailedSchema = {
+ type: 'object',
+ allOf: [
+ {
+ type: 'object',
+ ref: 'MetaLite',
+ },
+ {
+ type: 'object',
+ ref: 'MetaDetailedOnly',
+ },
+ ],
+} as const;
diff --git a/packages/backend/src/models/json-schema/muting.ts b/packages/backend/src/models/json-schema/muting.ts
index dde9dc0288..b5fab013ef 100644
--- a/packages/backend/src/models/json-schema/muting.ts
+++ b/packages/backend/src/models/json-schema/muting.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -30,7 +30,7 @@ export const packedMutingSchema = {
mutee: {
type: 'object',
optional: false, nullable: false,
- ref: 'UserDetailed',
+ ref: 'UserDetailedNotMe',
},
},
} as const;
diff --git a/packages/backend/src/models/json-schema/note-favorite.ts b/packages/backend/src/models/json-schema/note-favorite.ts
index 3f0007d917..d2a3745f4b 100644
--- a/packages/backend/src/models/json-schema/note-favorite.ts
+++ b/packages/backend/src/models/json-schema/note-favorite.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/note-reaction.ts b/packages/backend/src/models/json-schema/note-reaction.ts
index e3335f426e..95658ace1f 100644
--- a/packages/backend/src/models/json-schema/note-reaction.ts
+++ b/packages/backend/src/models/json-schema/note-reaction.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts
index aa749943f0..bb4ccc7ee4 100644
--- a/packages/backend/src/models/json-schema/note.ts
+++ b/packages/backend/src/models/json-schema/note.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -69,6 +69,7 @@ export const packedNoteSchema = {
visibility: {
type: 'string',
optional: false, nullable: false,
+ enum: ['public', 'home', 'followers', 'specified'],
},
mentions: {
type: 'array',
@@ -117,6 +118,48 @@ export const packedNoteSchema = {
poll: {
type: 'object',
optional: true, nullable: true,
+ properties: {
+ expiresAt: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'date-time',
+ },
+ multiple: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ choices: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ isVoted: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ text: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ votes: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ },
+ },
+ },
+ },
+ },
+ emojis: {
+ type: 'object',
+ optional: true, nullable: false,
+ additionalProperties: {
+ anyOf: [{
+ type: 'string',
+ }],
+ },
},
channelId: {
type: 'string',
@@ -148,6 +191,10 @@ export const packedNoteSchema = {
type: 'boolean',
optional: false, nullable: false,
},
+ userId: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
},
},
localOnly: {
@@ -158,9 +205,23 @@ export const packedNoteSchema = {
type: 'string',
optional: false, nullable: true,
},
+ reactionEmojis: {
+ type: 'object',
+ optional: false, nullable: false,
+ additionalProperties: {
+ anyOf: [{
+ type: 'string',
+ }],
+ },
+ },
reactions: {
type: 'object',
optional: false, nullable: false,
+ additionalProperties: {
+ anyOf: [{
+ type: 'number',
+ }],
+ },
},
renoteCount: {
type: 'number',
@@ -192,7 +253,7 @@ export const packedNoteSchema = {
},
myReaction: {
- type: 'object',
+ type: 'string',
optional: true, nullable: true,
},
},
diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts
index c6d6e84317..3f31cc47ee 100644
--- a/packages/backend/src/models/json-schema/notification.ts
+++ b/packages/backend/src/models/json-schema/notification.ts
@@ -1,11 +1,11 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { notificationTypes } from '@/types.js';
-export const packedNotificationSchema = {
+const baseSchema = {
type: 'object',
properties: {
id: {
@@ -23,68 +23,393 @@ export const packedNotificationSchema = {
optional: false, nullable: false,
enum: [...notificationTypes, 'reaction:grouped', 'renote:grouped'],
},
- user: {
- type: 'object',
- ref: 'UserLite',
- optional: true, nullable: true,
+ },
+} as const;
+
+export const packedNotificationSchema = {
+ type: 'object',
+ oneOf: [{
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['note'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- userId: {
- type: 'string',
- optional: true, nullable: true,
- format: 'id',
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['mention'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- note: {
- type: 'object',
- ref: 'Note',
- optional: true, nullable: true,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['reply'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- reaction: {
- type: 'string',
- optional: true, nullable: true,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['renote'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- achievement: {
- type: 'string',
- optional: true, nullable: false,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['quote'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- body: {
- type: 'string',
- optional: true, nullable: true,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['reaction'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
+ reaction: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
},
- header: {
- type: 'string',
- optional: true, nullable: true,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['pollEnded'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
},
- icon: {
- type: 'string',
- optional: true, nullable: true,
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['follow'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
},
- reactions: {
- type: 'array',
- optional: true, nullable: true,
- items: {
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['receiveFollowRequest'],
+ },
+ user: {
type: 'object',
- properties: {
- user: {
- type: 'object',
- ref: 'UserLite',
- optional: false, nullable: false,
- },
- reaction: {
- type: 'string',
- optional: false, nullable: false,
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['followRequestAccepted'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['roleAssigned'],
+ },
+ role: {
+ type: 'object',
+ ref: 'Role',
+ optional: false, nullable: false,
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['achievementEarned'],
+ },
+ achievement: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['app'],
+ },
+ body: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ header: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ icon: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['edited'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
+ },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['reaction:grouped'],
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
+ reactions: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ properties: {
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ reaction: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
},
+ required: ['user', 'reaction'],
},
- required: ['user', 'reaction'],
},
},
- users: {
- type: 'array',
- optional: true, nullable: true,
- items: {
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['renote:grouped'],
+ },
+ note: {
type: 'object',
- ref: 'UserLite',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
+ users: {
+ type: 'array',
optional: false, nullable: false,
+ items: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
},
},
- },
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['test'],
+ },
+ },
+ }],
} as const;
diff --git a/packages/backend/src/models/json-schema/page.ts b/packages/backend/src/models/json-schema/page.ts
index 9baacd6884..748d6f1245 100644
--- a/packages/backend/src/models/json-schema/page.ts
+++ b/packages/backend/src/models/json-schema/page.ts
@@ -1,8 +1,110 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
+const blockBaseSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
+
+const textBlockSchema = {
+ type: 'object',
+ properties: {
+ ...blockBaseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['text'],
+ },
+ text: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
+
+const sectionBlockSchema = {
+ type: 'object',
+ properties: {
+ ...blockBaseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['section'],
+ },
+ title: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ children: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'PageBlock',
+ selfRef: true,
+ },
+ },
+ },
+} as const;
+
+const imageBlockSchema = {
+ type: 'object',
+ properties: {
+ ...blockBaseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['image'],
+ },
+ fileId: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ },
+} as const;
+
+const noteBlockSchema = {
+ type: 'object',
+ properties: {
+ ...blockBaseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['note'],
+ },
+ detailed: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ note: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ },
+} as const;
+
+export const packedPageBlockSchema = {
+ type: 'object',
+ oneOf: [
+ textBlockSchema,
+ sectionBlockSchema,
+ imageBlockSchema,
+ noteBlockSchema,
+ ],
+} as const;
+
export const packedPageSchema = {
type: 'object',
properties: {
@@ -38,6 +140,7 @@ export const packedPageSchema = {
items: {
type: 'object',
optional: false, nullable: false,
+ ref: 'PageBlock',
},
},
variables: {
diff --git a/packages/backend/src/models/json-schema/queue.ts b/packages/backend/src/models/json-schema/queue.ts
index 43da6e605d..2ecf5c831f 100644
--- a/packages/backend/src/models/json-schema/queue.ts
+++ b/packages/backend/src/models/json-schema/queue.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/renote-muting.ts b/packages/backend/src/models/json-schema/renote-muting.ts
index feed1ceb09..344d6c7c00 100644
--- a/packages/backend/src/models/json-schema/renote-muting.ts
+++ b/packages/backend/src/models/json-schema/renote-muting.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -25,7 +25,7 @@ export const packedRenoteMutingSchema = {
mutee: {
type: 'object',
optional: false, nullable: false,
- ref: 'UserDetailed',
+ ref: 'UserDetailedNotMe',
},
},
} as const;
diff --git a/packages/backend/src/models/json-schema/reversi-game.ts b/packages/backend/src/models/json-schema/reversi-game.ts
new file mode 100644
index 0000000000..cb37200384
--- /dev/null
+++ b/packages/backend/src/models/json-schema/reversi-game.ts
@@ -0,0 +1,243 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export const packedReversiGameLiteSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ startedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ endedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ isStarted: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isEnded: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ user1Id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user2Id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user1: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ user2: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ winnerId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ winner: {
+ type: 'object',
+ optional: false, nullable: true,
+ ref: 'UserLite',
+ },
+ surrenderedUserId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ timeoutUserId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ black: {
+ type: 'number',
+ optional: false, nullable: true,
+ },
+ bw: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ noIrregularRules: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isLlotheo: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canPutEverywhere: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ loopedBoard: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ timeLimitForEachTurn: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
+
+export const packedReversiGameDetailedSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ startedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ endedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ isStarted: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isEnded: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ form1: {
+ type: 'object',
+ optional: false, nullable: true,
+ },
+ form2: {
+ type: 'object',
+ optional: false, nullable: true,
+ },
+ user1Ready: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ user2Ready: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ user1Id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user2Id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user1: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ user2: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ winnerId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ winner: {
+ type: 'object',
+ optional: false, nullable: true,
+ ref: 'UserLite',
+ },
+ surrenderedUserId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ timeoutUserId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ black: {
+ type: 'number',
+ optional: false, nullable: true,
+ },
+ bw: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ noIrregularRules: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isLlotheo: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canPutEverywhere: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ loopedBoard: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ timeLimitForEachTurn: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ logs: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'number',
+ },
+ },
+ },
+ map: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts
index b0c6804bb8..7eba1d5443 100644
--- a/packages/backend/src/models/json-schema/role.ts
+++ b/packages/backend/src/models/json-schema/role.ts
@@ -1,26 +1,260 @@
-const rolePolicyValue = {
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export const packedRoleCondFormulaLogicsSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: ['and', 'or'],
+ },
+ values: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ ref: 'RoleCondFormulaValue',
+ },
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaValueNot = {
type: 'object',
properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: ['not'],
+ },
value: {
- oneOf: [
- {
- type: 'integer',
- optional: false, nullable: false,
- },
- {
- type: 'boolean',
- optional: false, nullable: false,
- },
+ type: 'object',
+ optional: false,
+ ref: 'RoleCondFormulaValue',
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaValueIsLocalOrRemoteSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: ['isLocal', 'isRemote'],
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaValueAssignedRoleSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: ['roleAssignedTo'],
+ },
+ roleId: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaValueCreatedSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: [
+ 'createdLessThan',
+ 'createdMoreThan',
+ ],
+ },
+ sec: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaFollowersOrFollowingOrNotesSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string', optional: false,
+ },
+ type: {
+ type: 'string',
+ nullable: false, optional: false,
+ enum: [
+ 'followersLessThanOrEq',
+ 'followersMoreThanOrEq',
+ 'followingLessThanOrEq',
+ 'followingMoreThanOrEq',
+ 'notesLessThanOrEq',
+ 'notesMoreThanOrEq',
],
},
- priority: {
+ value: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ },
+} as const;
+
+export const packedRoleCondFormulaValueSchema = {
+ type: 'object',
+ oneOf: [
+ {
+ ref: 'RoleCondFormulaLogics',
+ },
+ {
+ ref: 'RoleCondFormulaValueNot',
+ },
+ {
+ ref: 'RoleCondFormulaValueIsLocalOrRemote',
+ },
+ {
+ ref: 'RoleCondFormulaValueAssignedRole',
+ },
+ {
+ ref: 'RoleCondFormulaValueCreated',
+ },
+ {
+ ref: 'RoleCondFormulaFollowersOrFollowingOrNotes',
+ },
+ ],
+} as const;
+
+export const packedRolePoliciesSchema = {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ gtlAvailable: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ ltlAvailable: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ btlAvailable: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canPublicNote: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ mentionLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ canInvite: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ inviteLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ inviteLimitCycle: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ inviteExpirationTime: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ canManageCustomEmojis: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canManageAvatarDecorations: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canSearchNotes: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canUseTranslator: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ canHideAds: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ driveCapacityMb: {
type: 'integer',
optional: false, nullable: false,
},
- useDefault: {
+ alwaysMarkNsfw: {
type: 'boolean',
optional: false, nullable: false,
},
+ pinLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ antennaLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ wordMuteLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ webhookLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ clipLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ noteEachClipsLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ userListLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ userEachUserListsLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ rateLimitFactor: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
+ avatarDecorationLimit: {
+ type: 'integer',
+ optional: false, nullable: false,
+ },
},
} as const;
@@ -97,6 +331,7 @@ export const packedRoleSchema = {
condFormula: {
type: 'object',
optional: false, nullable: false,
+ ref: 'RoleCondFormulaValue',
},
isPublic: {
type: 'boolean',
@@ -121,31 +356,28 @@ export const packedRoleSchema = {
policies: {
type: 'object',
optional: false, nullable: false,
- properties: {
- pinLimit: rolePolicyValue,
- canInvite: rolePolicyValue,
- clipLimit: rolePolicyValue,
- canHideAds: rolePolicyValue,
- inviteLimit: rolePolicyValue,
- antennaLimit: rolePolicyValue,
- gtlAvailable: rolePolicyValue,
- ltlAvailable: rolePolicyValue,
- webhookLimit: rolePolicyValue,
- canPublicNote: rolePolicyValue,
- userListLimit: rolePolicyValue,
- wordMuteLimit: rolePolicyValue,
- alwaysMarkNsfw: rolePolicyValue,
- canSearchNotes: rolePolicyValue,
- driveCapacityMb: rolePolicyValue,
- rateLimitFactor: rolePolicyValue,
- inviteLimitCycle: rolePolicyValue,
- noteEachClipsLimit: rolePolicyValue,
- inviteExpirationTime: rolePolicyValue,
- canManageCustomEmojis: rolePolicyValue,
- userEachUserListsLimit: rolePolicyValue,
- canManageAvatarDecorations: rolePolicyValue,
- canUseTranslator: rolePolicyValue,
- avatarDecorationLimit: rolePolicyValue,
+ additionalProperties: {
+ anyOf: [{
+ type: 'object',
+ properties: {
+ value: {
+ oneOf: [
+ {
+ type: 'integer',
+ },
+ {
+ type: 'boolean',
+ },
+ ],
+ },
+ priority: {
+ type: 'integer',
+ },
+ useDefault: {
+ type: 'boolean',
+ },
+ },
+ }],
},
},
usersCount: {
diff --git a/packages/backend/src/models/json-schema/user-list.ts b/packages/backend/src/models/json-schema/user-list.ts
index e257d9984c..dc9af25602 100644
--- a/packages/backend/src/models/json-schema/user-list.ts
+++ b/packages/backend/src/models/json-schema/user-list.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts
index af67e62afa..33a3efd453 100644
--- a/packages/backend/src/models/json-schema/user.ts
+++ b/packages/backend/src/models/json-schema/user.ts
@@ -1,18 +1,40 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
-const notificationRecieveConfig = {
+export const notificationRecieveConfig = {
type: 'object',
- nullable: false, optional: true,
- properties: {
- type: {
- type: 'string',
- nullable: false, optional: false,
- enum: ['all', 'following', 'follower', 'mutualFollow', 'list', 'never'],
+ oneOf: [
+ {
+ type: 'object',
+ nullable: false,
+ properties: {
+ type: {
+ type: 'string',
+ nullable: false,
+ enum: ['all', 'following', 'follower', 'mutualFollow', 'followingOrFollower', 'never'],
+ },
+ },
+ required: ['type'],
},
- },
+ {
+ type: 'object',
+ nullable: false,
+ properties: {
+ type: {
+ type: 'string',
+ nullable: false,
+ enum: ['list'],
+ },
+ userListId: {
+ type: 'string',
+ format: 'misskey:id',
+ },
+ },
+ required: ['type', 'userListId'],
+ },
+ ],
} as const;
export const packedUserLiteSchema = {
@@ -148,6 +170,9 @@ export const packedUserLiteSchema = {
emojis: {
type: 'object',
nullable: false, optional: false,
+ additionalProperties: {
+ type: 'string',
+ },
},
onlineStatus: {
type: 'string',
@@ -584,15 +609,20 @@ export const packedMeDetailedOnlySchema = {
type: 'object',
nullable: false, optional: false,
properties: {
- app: notificationRecieveConfig,
- quote: notificationRecieveConfig,
- reply: notificationRecieveConfig,
- follow: notificationRecieveConfig,
- renote: notificationRecieveConfig,
- mention: notificationRecieveConfig,
- reaction: notificationRecieveConfig,
- pollEnded: notificationRecieveConfig,
- receiveFollowRequest: notificationRecieveConfig,
+ note: { optional: true, ...notificationRecieveConfig },
+ follow: { optional: true, ...notificationRecieveConfig },
+ mention: { optional: true, ...notificationRecieveConfig },
+ reply: { optional: true, ...notificationRecieveConfig },
+ renote: { optional: true, ...notificationRecieveConfig },
+ quote: { optional: true, ...notificationRecieveConfig },
+ reaction: { optional: true, ...notificationRecieveConfig },
+ pollEnded: { optional: true, ...notificationRecieveConfig },
+ receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
+ followRequestAccepted: { optional: true, ...notificationRecieveConfig },
+ roleAssigned: { optional: true, ...notificationRecieveConfig },
+ achievementEarned: { optional: true, ...notificationRecieveConfig },
+ app: { optional: true, ...notificationRecieveConfig },
+ test: { optional: true, ...notificationRecieveConfig },
},
},
emailNotificationTypes: {
@@ -628,104 +658,7 @@ export const packedMeDetailedOnlySchema = {
policies: {
type: 'object',
nullable: false, optional: false,
- properties: {
- gtlAvailable: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- ltlAvailable: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canPublicNote: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canInvite: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- inviteLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- inviteLimitCycle: {
- type: 'number',
- nullable: false, optional: false,
- },
- inviteExpirationTime: {
- type: 'number',
- nullable: false, optional: false,
- },
- canManageCustomEmojis: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canManageAvatarDecorations: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canSearchNotes: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canUseTranslator: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- canHideAds: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- driveCapacityMb: {
- type: 'number',
- nullable: false, optional: false,
- },
- alwaysMarkNsfw: {
- type: 'boolean',
- nullable: false, optional: false,
- },
- pinLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- antennaLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- wordMuteLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- webhookLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- clipLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- noteEachClipsLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- userListLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- userEachUserListsLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- rateLimitFactor: {
- type: 'number',
- nullable: false, optional: false,
- },
- avatarDecorationLimit: {
- type: 'number',
- nullable: false, optional: false,
- },
- },
+ ref: 'RolePolicies',
},
//#region secrets
email: {
@@ -820,13 +753,5 @@ export const packedUserSchema = {
type: 'object',
ref: 'UserDetailed',
},
- {
- type: 'object',
- ref: 'UserDetailedNotMe',
- },
- {
- type: 'object',
- ref: 'MeDetailed',
- },
],
} as const;
diff --git a/packages/backend/src/models/util/id.ts b/packages/backend/src/models/util/id.ts
index 81e83b8db9..2d742702c7 100644
--- a/packages/backend/src/models/util/id.ts
+++ b/packages/backend/src/models/util/id.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/