merge upstream

This commit is contained in:
Hazelnoot 2025-03-25 16:14:53 -04:00
commit d8908ef2d8
1065 changed files with 32953 additions and 20092 deletions

View file

@ -0,0 +1,146 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const packedChatMessageSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
createdAt: {
type: 'string',
format: 'date-time',
optional: false, nullable: false,
},
fromUserId: {
type: 'string',
optional: false, nullable: false,
},
fromUser: {
type: 'object',
optional: false, nullable: false,
ref: 'UserLite',
},
toUserId: {
type: 'string',
optional: true, nullable: true,
},
toUser: {
type: 'object',
optional: true, nullable: true,
ref: 'UserLite',
},
toRoomId: {
type: 'string',
optional: true, nullable: true,
},
toRoom: {
type: 'object',
optional: true, nullable: true,
ref: 'ChatRoom',
},
text: {
type: 'string',
optional: true, nullable: true,
},
fileId: {
type: 'string',
optional: true, nullable: true,
},
file: {
type: 'object',
optional: true, nullable: true,
ref: 'DriveFile',
},
isRead: {
type: 'boolean',
optional: true, nullable: false,
},
reactions: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
properties: {
reaction: {
type: 'string',
optional: false, nullable: false,
},
user: {
type: 'object',
optional: true, nullable: true,
ref: 'UserLite',
},
},
},
},
},
} as const;
export const packedChatMessageLiteSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
createdAt: {
type: 'string',
format: 'date-time',
optional: false, nullable: false,
},
fromUserId: {
type: 'string',
optional: false, nullable: false,
},
fromUser: {
type: 'object',
optional: true, nullable: false,
ref: 'UserLite',
},
toUserId: {
type: 'string',
optional: true, nullable: true,
},
toRoomId: {
type: 'string',
optional: true, nullable: true,
},
text: {
type: 'string',
optional: true, nullable: true,
},
fileId: {
type: 'string',
optional: true, nullable: true,
},
file: {
type: 'object',
optional: true, nullable: true,
ref: 'DriveFile',
},
reactions: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
properties: {
reaction: {
type: 'string',
optional: false, nullable: false,
},
user: {
type: 'object',
optional: true, nullable: true,
ref: 'UserLite',
},
},
},
},
},
} as const;

View file

@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const packedChatRoomInvitationSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
createdAt: {
type: 'string',
format: 'date-time',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
},
user: {
type: 'object',
optional: false, nullable: false,
ref: 'UserLite',
},
roomId: {
type: 'string',
optional: false, nullable: false,
},
room: {
type: 'object',
optional: false, nullable: false,
ref: 'ChatRoom',
},
},
} as const;

View file

@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const packedChatRoomMembershipSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
createdAt: {
type: 'string',
format: 'date-time',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
},
user: {
type: 'object',
optional: true, nullable: false,
ref: 'UserLite',
},
roomId: {
type: 'string',
optional: false, nullable: false,
},
room: {
type: 'object',
optional: true, nullable: false,
ref: 'ChatRoom',
},
},
} as const;

View file

@ -0,0 +1,40 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const packedChatRoomSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
createdAt: {
type: 'string',
format: 'date-time',
optional: false, nullable: false,
},
ownerId: {
type: 'string',
optional: false, nullable: false,
},
owner: {
type: 'object',
optional: false, nullable: false,
ref: 'UserLite',
},
name: {
type: 'string',
optional: false, nullable: false,
},
description: {
type: 'string',
optional: false, nullable: false,
},
isMuted: {
type: 'boolean',
optional: true, nullable: false,
},
},
} as const;

View file

@ -149,6 +149,10 @@ export const packedMetaLiteSchema = {
type: 'boolean',
optional: false, nullable: false,
},
googleAnalyticsMeasurementId: {
type: 'string',
optional: false, nullable: true,
},
swPublickey: {
type: 'string',
optional: false, nullable: true,

View file

@ -332,6 +332,16 @@ export const packedNotificationSchema = {
enum: ['login'],
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['createToken'],
},
},
}, {
type: 'object',
properties: {

View file

@ -300,6 +300,10 @@ export const packedRolePoliciesSchema = {
type: 'integer',
optional: false, nullable: false,
},
canChat: {
type: 'boolean',
optional: false, nullable: false,
},
},
} as const;

View file

@ -418,6 +418,11 @@ export const packedUserDetailedNotMeOnlySchema = {
nullable: false, optional: false,
enum: ['public', 'followers', 'private'],
},
chatScope: {
type: 'string',
nullable: false, optional: false,
enum: ['everyone', 'following', 'followers', 'mutual', 'none'],
},
roles: {
type: 'array',
nullable: false, optional: false,
@ -609,6 +614,10 @@ export const packedMeDetailedOnlySchema = {
type: 'boolean',
nullable: false, optional: false,
},
hasUnreadChatMessages: {
type: 'boolean',
nullable: false, optional: false,
},
hasUnreadNotification: {
type: 'boolean',
nullable: false, optional: false,