wip
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
"@swc/core": "1.3.56",
|
||||
"@types/json-schema": "^7.0.11",
|
||||
"eventemitter3": "5.0.1",
|
||||
"ms": "3.0.0-canary.1",
|
||||
"reconnecting-websocket": "4.4.0",
|
||||
"schema-type": "github:misskey-dev/schema-type",
|
||||
"ts-essentials": "^9.3.2"
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { JSONSchema7 } from 'schema-type';
|
||||
import type { JSONSchema7 } from 'schema-type';
|
||||
import { IEndpointMeta } from './endpoints.types';
|
||||
import { localUsernameSchema, passwordSchema } from './schemas/user';
|
||||
import ms from 'ms';
|
||||
|
||||
export const endpoints = {
|
||||
//#region admin
|
||||
@@ -2204,6 +2205,84 @@ export const endpoints = {
|
||||
}],
|
||||
},
|
||||
//#endregion
|
||||
|
||||
//#region ap
|
||||
'ap/get': {
|
||||
tags: ['federation'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 30,
|
||||
},
|
||||
|
||||
defines: [{
|
||||
req: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
},
|
||||
res: {
|
||||
type: 'object',
|
||||
},
|
||||
}],
|
||||
},
|
||||
'ap/show': {
|
||||
tags: ['federation'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 30,
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchObject: {
|
||||
message: 'No such object.',
|
||||
code: 'NO_SUCH_OBJECT',
|
||||
id: 'dc94d745-1262-4e63-a17d-fecaa57efc82',
|
||||
},
|
||||
},
|
||||
|
||||
defines: [{
|
||||
req: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
},
|
||||
res: {
|
||||
oneOf: [
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
type: { const: 'User' },
|
||||
object: {
|
||||
$ref: 'https://misskey-hub.net/api/schemas/UserDetailedNotMe',
|
||||
},
|
||||
},
|
||||
required: ['type', 'object'],
|
||||
},
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
type: { const: 'Note' },
|
||||
object: {
|
||||
$ref: 'https://misskey-hub.net/api/schemas/Note',
|
||||
},
|
||||
},
|
||||
required: ['type', 'object'],
|
||||
},
|
||||
],
|
||||
},
|
||||
}],
|
||||
}
|
||||
//#endregion
|
||||
} as const satisfies { [x: string]: IEndpointMeta; };
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user