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 = {
|
export const packedHashtagSchema = {
|
||||||
|
$id: 'https://misskey-hub.net/api/schemas/Hashtag',
|
||||||
|
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
tag: {
|
tag: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
examples: 'misskey',
|
||||||
example: 'misskey',
|
|
||||||
},
|
},
|
||||||
mentionedUsersCount: {
|
mentionedUsersCount: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
},
|
||||||
mentionedLocalUsersCount: {
|
mentionedLocalUsersCount: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
},
|
||||||
mentionedRemoteUsersCount: {
|
mentionedRemoteUsersCount: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
},
|
||||||
attachedUsersCount: {
|
attachedUsersCount: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
},
|
||||||
attachedLocalUsersCount: {
|
attachedLocalUsersCount: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
},
|
||||||
attachedRemoteUsersCount: {
|
attachedRemoteUsersCount: {
|
||||||
type: 'number',
|
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 = {
|
export const packedMutingSchema = {
|
||||||
|
$id: 'https://misskey-hub.net/api/schemas/Muting',
|
||||||
|
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: {
|
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||||
type: 'string',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
format: 'id',
|
|
||||||
example: 'xxxxxxxxxx',
|
|
||||||
},
|
|
||||||
createdAt: {
|
createdAt: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
},
|
},
|
||||||
expiresAt: {
|
expiresAt: {
|
||||||
|
oneOf: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
muteeId: {
|
muteeId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||||
type: 'string',
|
mutee: { $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
|
||||||
optional: false, nullable: false,
|
|
||||||
format: 'id',
|
|
||||||
},
|
},
|
||||||
mutee: {
|
required: [
|
||||||
type: 'object',
|
'id',
|
||||||
optional: false, nullable: false,
|
'createdAt',
|
||||||
ref: 'UserDetailed',
|
'expiresAt',
|
||||||
},
|
'muteeId',
|
||||||
},
|
'mutee',
|
||||||
} as const;
|
],
|
||||||
|
} as const satisfies JSONSchema7Definition;
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
|
import type { JSONSchema7Definition } from 'schema-type';
|
||||||
|
|
||||||
export const packedNoteFavoriteSchema = {
|
export const packedNoteFavoriteSchema = {
|
||||||
|
$id: 'https://misskey-hub.net/api/schemas/NoteFavorite',
|
||||||
|
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
id: {
|
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||||
type: 'string',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
format: 'id',
|
|
||||||
example: 'xxxxxxxxxx',
|
|
||||||
},
|
|
||||||
createdAt: {
|
createdAt: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
},
|
},
|
||||||
note: {
|
noteId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
||||||
type: 'object',
|
note: { $ref: 'https://misskey-hub.net/api/schemas/Note' },
|
||||||
optional: false, nullable: false,
|
|
||||||
ref: 'Note',
|
|
||||||
},
|
},
|
||||||
noteId: {
|
required: [
|
||||||
type: 'string',
|
'id',
|
||||||
optional: false, nullable: false,
|
'createdAt',
|
||||||
format: 'id',
|
'note',
|
||||||
},
|
'noteId',
|
||||||
},
|
]
|
||||||
} as const;
|
} as const satisfies JSONSchema7Definition;
|
||||||
|
|
Loading…
Reference in a new issue