mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-01 18:27:29 +00: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: {
|
||||
oneOf: [{
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
format: 'date-time',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
muteeId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
muteeId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
mutee: { $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
|
||||
},
|
||||
mutee: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: '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: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||
note: { $ref: 'https://misskey-hub.net/api/schemas/Note' },
|
||||
},
|
||||
noteId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
required: [
|
||||
'id',
|
||||
'createdAt',
|
||||
'note',
|
||||
'noteId',
|
||||
]
|
||||
} as const satisfies JSONSchema7Definition;
|
||||
|
|
Loading…
Reference in a new issue