mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 10:13:08 +02:00
wip
This commit is contained in:
parent
00b1fd2ee3
commit
f3bc232419
3 changed files with 50 additions and 48 deletions
|
@ -1,34 +1,40 @@
|
|||
import type { JSONSchema7Definition } from 'schema-type';
|
||||
|
||||
export const packedHashtagSchema = {
|
||||
$id: 'https://misskey-hub.net/api/schemas/Hashtag',
|
||||
|
||||
type: 'object',
|
||||
properties: {
|
||||
tag: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
example: 'misskey',
|
||||
examples: 'misskey',
|
||||
},
|
||||
mentionedUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
mentionedLocalUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
mentionedRemoteUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
attachedUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
attachedLocalUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
attachedRemoteUsersCount: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
required: [
|
||||
'tag',
|
||||
'mentionedUsersCount',
|
||||
'mentionedLocalUsersCount',
|
||||
'mentionedRemoteUsersCount',
|
||||
'attachedUsersCount',
|
||||
'attachedLocalUsersCount',
|
||||
'attachedRemoteUsersCount',
|
||||
],
|
||||
} as const satisfies JSONSchema7Definition;
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
import type { JSONSchema7Definition } from 'schema-type';
|
||||
|
||||
export const packedMutingSchema = {
|
||||
$id: 'https://misskey-hub.net/api/schemas/Muting',
|
||||
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
createdAt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'date-time',
|
||||
},
|
||||
expiresAt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
format: 'date-time',
|
||||
},
|
||||
muteeId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
mutee: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'UserDetailed',
|
||||
oneOf: [{
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
muteeId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
mutee: { $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
|
||||
},
|
||||
} as const;
|
||||
required: [
|
||||
'id',
|
||||
'createdAt',
|
||||
'expiresAt',
|
||||
'muteeId',
|
||||
'mutee',
|
||||
],
|
||||
} as const satisfies JSONSchema7Definition;
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
import type { JSONSchema7Definition } from 'schema-type';
|
||||
|
||||
export const packedNoteFavoriteSchema = {
|
||||
$id: 'https://misskey-hub.net/api/schemas/NoteFavorite',
|
||||
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
createdAt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'date-time',
|
||||
},
|
||||
note: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'Note',
|
||||
},
|
||||
noteId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
noteId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
note: { $ref: 'https://misskey-hub.net/api/schemas/Note' },
|
||||
},
|
||||
} as const;
|
||||
required: [
|
||||
'id',
|
||||
'createdAt',
|
||||
'note',
|
||||
'noteId',
|
||||
]
|
||||
} as const satisfies JSONSchema7Definition;
|
||||
|
|
Loading…
Reference in a new issue