merge: upstream
This commit is contained in:
commit
5db583a3eb
701 changed files with 50809 additions and 13660 deletions
|
@ -11,7 +11,7 @@
|
|||
"decoratorMetadata": true
|
||||
},
|
||||
"experimental": {
|
||||
"keepImportAttributes": true
|
||||
"keepImportAssertions": true
|
||||
},
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
|
|
File diff suppressed because it is too large
Load diff
9
packages/misskey-js/generator/.eslintrc.cjs
Normal file
9
packages/misskey-js/generator/.eslintrc.cjs
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
extends: [
|
||||
'../../shared/.eslintrc.js',
|
||||
],
|
||||
};
|
1
packages/misskey-js/generator/.gitignore
vendored
Normal file
1
packages/misskey-js/generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
api.json
|
19
packages/misskey-js/generator/README.md
Normal file
19
packages/misskey-js/generator/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## misskey-js向け型生成モジュール
|
||||
|
||||
バックエンドが吐き出すOpenAPI準拠のapi.jsonからmisskey-jsで使用される型エイリアスを生成するためのモジュールです。
|
||||
このモジュールはmisskey-jsそのものにバンドルされることは想定しておらず、生成物をmisskey-jsのsrc配下にコピーして使用することを想定しています。
|
||||
|
||||
## 使い方
|
||||
|
||||
まず、Misskeyのバックエンドからapi.jsonを取得する必要があります。任意のMisskeyインスタンスの/api-docからダウンロードしても良いですし、
|
||||
backendモジュール配下で`pnpm generate-api-json`を実行しても良いでしょう。
|
||||
|
||||
api.jsonを入手したら、このファイルがあるディレクトリに置いてください。
|
||||
|
||||
その後、以下コマンドを実行します。
|
||||
|
||||
```shell
|
||||
pnpm generate
|
||||
```
|
||||
|
||||
上記を実行することで、`./built`ディレクトリ配下にtsファイルが生成されます。
|
24
packages/misskey-js/generator/package.json
Normal file
24
packages/misskey-js/generator/package.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "misskey-js-type-generator",
|
||||
"version": "0.0.0",
|
||||
"description": "Misskey TypeGenerator",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"generate": "tsx src/generator.ts && eslint ./built/**/* --ext .ts --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apidevtools/swagger-parser": "10.1.0",
|
||||
"@types/node": "20.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"eslint": "8.53.0",
|
||||
"typescript": "5.3.3",
|
||||
"tsx": "4.4.0",
|
||||
"ts-case-convert": "2.0.2",
|
||||
"openapi-types": "12.1.3",
|
||||
"openapi-typescript": "6.7.1"
|
||||
},
|
||||
"files": [
|
||||
"built"
|
||||
]
|
||||
}
|
349
packages/misskey-js/generator/src/generator.ts
Normal file
349
packages/misskey-js/generator/src/generator.ts
Normal file
|
@ -0,0 +1,349 @@
|
|||
import { mkdir, writeFile } from 'fs/promises';
|
||||
import { OpenAPIV3 } from 'openapi-types';
|
||||
import { toPascal } from 'ts-case-convert';
|
||||
import SwaggerParser from '@apidevtools/swagger-parser';
|
||||
import openapiTS from 'openapi-typescript';
|
||||
|
||||
function generateVersionHeaderComment(openApiDocs: OpenAPIV3.Document): string {
|
||||
const contents = {
|
||||
version: openApiDocs.info.version,
|
||||
generatedAt: new Date().toISOString(),
|
||||
};
|
||||
|
||||
const lines: string[] = [];
|
||||
lines.push('/*');
|
||||
for (const [key, value] of Object.entries(contents)) {
|
||||
lines.push(` * ${key}: ${value}`);
|
||||
}
|
||||
lines.push(' */');
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
async function generateBaseTypes(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
openApiJsonPath: string,
|
||||
typeFileName: string,
|
||||
) {
|
||||
const disabledLints = [
|
||||
'@typescript-eslint/naming-convention',
|
||||
'@typescript-eslint/no-explicit-any',
|
||||
];
|
||||
|
||||
const lines: string[] = [];
|
||||
for (const lint of disabledLints) {
|
||||
lines.push(`/* eslint ${lint}: 0 */`);
|
||||
}
|
||||
lines.push('');
|
||||
|
||||
lines.push(generateVersionHeaderComment(openApiDocs));
|
||||
lines.push('');
|
||||
|
||||
const generatedTypes = await openapiTS(openApiJsonPath, { exportType: true });
|
||||
lines.push(generatedTypes);
|
||||
lines.push('');
|
||||
|
||||
await writeFile(typeFileName, lines.join('\n'));
|
||||
}
|
||||
|
||||
async function generateSchemaEntities(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
typeFileName: string,
|
||||
outputPath: string,
|
||||
) {
|
||||
if (!openApiDocs.components?.schemas) {
|
||||
return;
|
||||
}
|
||||
|
||||
const schemas = openApiDocs.components.schemas;
|
||||
const schemaNames = Object.keys(schemas);
|
||||
const typeAliasLines: string[] = [];
|
||||
|
||||
typeAliasLines.push(generateVersionHeaderComment(openApiDocs));
|
||||
typeAliasLines.push('');
|
||||
typeAliasLines.push(`import { components } from '${toImportPath(typeFileName)}';`);
|
||||
typeAliasLines.push(
|
||||
...schemaNames.map(it => `export type ${it} = components['schemas']['${it}'];`),
|
||||
);
|
||||
typeAliasLines.push('');
|
||||
|
||||
await writeFile(outputPath, typeAliasLines.join('\n'));
|
||||
}
|
||||
|
||||
async function generateEndpoints(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
typeFileName: string,
|
||||
entitiesOutputPath: string,
|
||||
endpointOutputPath: string,
|
||||
) {
|
||||
const endpoints: Endpoint[] = [];
|
||||
|
||||
// misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり
|
||||
const paths = openApiDocs.paths;
|
||||
const postPathItems = Object.keys(paths)
|
||||
.map(it => paths[it]?.post)
|
||||
.filter(filterUndefined);
|
||||
|
||||
for (const operation of postPathItems) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const operationId = operation.operationId!;
|
||||
const endpoint = new Endpoint(operationId);
|
||||
endpoints.push(endpoint);
|
||||
|
||||
if (isRequestBodyObject(operation.requestBody)) {
|
||||
const reqContent = operation.requestBody.content;
|
||||
const supportMediaTypes = Object.keys(reqContent);
|
||||
if (supportMediaTypes.length > 0) {
|
||||
// いまのところ複数のメディアタイプをとるエンドポイントは無いので決め打ちする
|
||||
endpoint.request = new OperationTypeAlias(
|
||||
operationId,
|
||||
supportMediaTypes[0],
|
||||
OperationsAliasType.REQUEST,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (isResponseObject(operation.responses['200']) && operation.responses['200'].content) {
|
||||
const resContent = operation.responses['200'].content;
|
||||
const supportMediaTypes = Object.keys(resContent);
|
||||
if (supportMediaTypes.length > 0) {
|
||||
// いまのところ複数のメディアタイプを返すエンドポイントは無いので決め打ちする
|
||||
endpoint.response = new OperationTypeAlias(
|
||||
operationId,
|
||||
supportMediaTypes[0],
|
||||
OperationsAliasType.RESPONSE,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const entitiesOutputLine: string[] = [];
|
||||
|
||||
entitiesOutputLine.push(generateVersionHeaderComment(openApiDocs));
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
entitiesOutputLine.push(`import { operations } from '${toImportPath(typeFileName)}';`);
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.REQUEST).toLine());
|
||||
entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.RESPONSE).toLine());
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
const entities = endpoints
|
||||
.flatMap(it => [it.request, it.response].filter(i => i))
|
||||
.filter(filterUndefined);
|
||||
entitiesOutputLine.push(...entities.map(it => it.toLine()));
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
await writeFile(entitiesOutputPath, entitiesOutputLine.join('\n'));
|
||||
|
||||
const endpointOutputLine: string[] = [];
|
||||
|
||||
endpointOutputLine.push(generateVersionHeaderComment(openApiDocs));
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push('import type {');
|
||||
endpointOutputLine.push(
|
||||
...[emptyRequest, emptyResponse, ...entities].map(it => '\t' + it.generateName() + ','),
|
||||
);
|
||||
endpointOutputLine.push(`} from '${toImportPath(entitiesOutputPath)}';`);
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push('export type Endpoints = {');
|
||||
endpointOutputLine.push(
|
||||
...endpoints.map(it => '\t' + it.toLine()),
|
||||
);
|
||||
endpointOutputLine.push('}');
|
||||
endpointOutputLine.push('');
|
||||
|
||||
await writeFile(endpointOutputPath, endpointOutputLine.join('\n'));
|
||||
}
|
||||
|
||||
async function generateApiClientJSDoc(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
apiClientFileName: string,
|
||||
endpointsFileName: string,
|
||||
warningsOutputPath: string,
|
||||
) {
|
||||
const endpoints: { operationId: string; description: string; }[] = [];
|
||||
|
||||
// misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり
|
||||
const paths = openApiDocs.paths;
|
||||
const postPathItems = Object.keys(paths)
|
||||
.map(it => paths[it]?.post)
|
||||
.filter(filterUndefined);
|
||||
|
||||
for (const operation of postPathItems) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const operationId = operation.operationId!;
|
||||
|
||||
if (operation.description) {
|
||||
endpoints.push({
|
||||
operationId: operationId,
|
||||
description: operation.description,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const endpointOutputLine: string[] = [];
|
||||
|
||||
endpointOutputLine.push(generateVersionHeaderComment(openApiDocs));
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push(`import type { SwitchCaseResponseType } from '${toImportPath(apiClientFileName)}';`);
|
||||
endpointOutputLine.push(`import type { Endpoints } from '${toImportPath(endpointsFileName)}';`);
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push(`declare module '${toImportPath(apiClientFileName)}' {`);
|
||||
endpointOutputLine.push(' export interface APIClient {');
|
||||
for (let i = 0; i < endpoints.length; i++) {
|
||||
const endpoint = endpoints[i];
|
||||
|
||||
endpointOutputLine.push(
|
||||
' /**',
|
||||
` * ${endpoint.description.split('\n').join('\n * ')}`,
|
||||
' */',
|
||||
` request<E extends '${endpoint.operationId}', P extends Endpoints[E][\'req\']>(`,
|
||||
' endpoint: E,',
|
||||
' params: P,',
|
||||
' credential?: string | null,',
|
||||
' ): Promise<SwitchCaseResponseType<E, P>>;',
|
||||
);
|
||||
|
||||
if (i < endpoints.length - 1) {
|
||||
endpointOutputLine.push('\n');
|
||||
}
|
||||
}
|
||||
endpointOutputLine.push(' }');
|
||||
endpointOutputLine.push('}');
|
||||
endpointOutputLine.push('');
|
||||
|
||||
await writeFile(warningsOutputPath, endpointOutputLine.join('\n'));
|
||||
}
|
||||
|
||||
function isRequestBodyObject(value: unknown): value is OpenAPIV3.RequestBodyObject {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { content } = value as Record<keyof OpenAPIV3.RequestBodyObject, unknown>;
|
||||
return content !== undefined;
|
||||
}
|
||||
|
||||
function isResponseObject(value: unknown): value is OpenAPIV3.ResponseObject {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { description } = value as Record<keyof OpenAPIV3.ResponseObject, unknown>;
|
||||
return description !== undefined;
|
||||
}
|
||||
|
||||
function filterUndefined<T>(item: T): item is Exclude<T, undefined> {
|
||||
return item !== undefined;
|
||||
}
|
||||
|
||||
function toImportPath(fileName: string, fromPath = '/built/autogen', toPath = ''): string {
|
||||
return fileName.replace(fromPath, toPath).replace('.ts', '.js');
|
||||
}
|
||||
|
||||
enum OperationsAliasType {
|
||||
REQUEST = 'Request',
|
||||
RESPONSE = 'Response'
|
||||
}
|
||||
|
||||
interface IOperationTypeAlias {
|
||||
readonly type: OperationsAliasType
|
||||
|
||||
generateName(): string
|
||||
|
||||
toLine(): string
|
||||
}
|
||||
|
||||
class OperationTypeAlias implements IOperationTypeAlias {
|
||||
public readonly operationId: string;
|
||||
public readonly mediaType: string;
|
||||
public readonly type: OperationsAliasType;
|
||||
|
||||
constructor(
|
||||
operationId: string,
|
||||
mediaType: string,
|
||||
type: OperationsAliasType,
|
||||
) {
|
||||
this.operationId = operationId;
|
||||
this.mediaType = mediaType;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
generateName(): string {
|
||||
const nameBase = this.operationId.replace(/\//g, '-');
|
||||
return toPascal(nameBase + this.type);
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const name = this.generateName();
|
||||
return (this.type === OperationsAliasType.REQUEST)
|
||||
? `export type ${name} = operations['${this.operationId}']['requestBody']['content']['${this.mediaType}'];`
|
||||
: `export type ${name} = operations['${this.operationId}']['responses']['200']['content']['${this.mediaType}'];`;
|
||||
}
|
||||
}
|
||||
|
||||
class EmptyTypeAlias implements IOperationTypeAlias {
|
||||
readonly type: OperationsAliasType;
|
||||
|
||||
constructor(type: OperationsAliasType) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
generateName(): string {
|
||||
return 'Empty' + this.type;
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const name = this.generateName();
|
||||
return `export type ${name} = Record<string, unknown> | undefined;`;
|
||||
}
|
||||
}
|
||||
|
||||
const emptyRequest = new EmptyTypeAlias(OperationsAliasType.REQUEST);
|
||||
const emptyResponse = new EmptyTypeAlias(OperationsAliasType.RESPONSE);
|
||||
|
||||
class Endpoint {
|
||||
public readonly operationId: string;
|
||||
public request?: IOperationTypeAlias;
|
||||
public response?: IOperationTypeAlias;
|
||||
|
||||
constructor(operationId: string) {
|
||||
this.operationId = operationId;
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const reqName = this.request?.generateName() ?? emptyRequest.generateName();
|
||||
const resName = this.response?.generateName() ?? emptyResponse.generateName();
|
||||
|
||||
return `'${this.operationId}': { req: ${reqName}; res: ${resName} };`;
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const generatePath = './built/autogen';
|
||||
await mkdir(generatePath, { recursive: true });
|
||||
|
||||
const openApiJsonPath = './api.json';
|
||||
const openApiDocs = await SwaggerParser.validate(openApiJsonPath) as OpenAPIV3.Document;
|
||||
|
||||
const typeFileName = './built/autogen/types.ts';
|
||||
await generateBaseTypes(openApiDocs, openApiJsonPath, typeFileName);
|
||||
|
||||
const modelFileName = `${generatePath}/models.ts`;
|
||||
await generateSchemaEntities(openApiDocs, typeFileName, modelFileName);
|
||||
|
||||
const entitiesFileName = `${generatePath}/entities.ts`;
|
||||
const endpointFileName = `${generatePath}/endpoint.ts`;
|
||||
await generateEndpoints(openApiDocs, typeFileName, entitiesFileName, endpointFileName);
|
||||
|
||||
const apiClientWarningFileName = `${generatePath}/apiClientJSDoc.ts`;
|
||||
await generateApiClientJSDoc(openApiDocs, '../api.ts', endpointFileName, apiClientWarningFileName);
|
||||
}
|
||||
|
||||
main();
|
20
packages/misskey-js/generator/tsconfig.json
Normal file
20
packages/misskey-js/generator/tsconfig.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"strict": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"built/**/*.ts"
|
||||
],
|
||||
"exclude": []
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
"types": "./built/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"watch": "nodemon -w src -e ts,js,cjs,mjs,json --exec \"pnpm run build\"",
|
||||
"tsd": "tsd",
|
||||
"api": "pnpm api-extractor run --local --verbose",
|
||||
"api-prod": "pnpm api-extractor run --verbose",
|
||||
|
@ -13,33 +14,36 @@
|
|||
"typecheck": "tsc --noEmit",
|
||||
"lint": "pnpm typecheck && pnpm eslint",
|
||||
"jest": "jest --coverage --detectOpenHandles",
|
||||
"test": "pnpm jest && pnpm tsd"
|
||||
"test": "pnpm jest && pnpm tsd",
|
||||
"update-autogen-code": "pnpm --filter misskey-js-type-generator generate && ncp generator/built/autogen src/autogen"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.38.3",
|
||||
"@microsoft/api-extractor": "7.38.5",
|
||||
"@swc/jest": "0.2.29",
|
||||
"@types/jest": "29.5.8",
|
||||
"@types/node": "20.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"eslint": "8.53.0",
|
||||
"@types/jest": "29.5.11",
|
||||
"@types/node": "20.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.14.0",
|
||||
"@typescript-eslint/parser": "6.14.0",
|
||||
"eslint": "8.56.0",
|
||||
"jest": "29.7.0",
|
||||
"jest-fetch-mock": "3.0.3",
|
||||
"jest-websocket-mock": "2.5.0",
|
||||
"mock-socket": "9.3.1",
|
||||
"tsd": "0.29.0",
|
||||
"typescript": "5.2.2"
|
||||
"ncp": "2.0.0",
|
||||
"nodemon": "3.0.2",
|
||||
"tsd": "0.30.0",
|
||||
"typescript": "5.3.3"
|
||||
},
|
||||
"files": [
|
||||
"built"
|
||||
],
|
||||
"dependencies": {
|
||||
"@swc/cli": "0.1.63",
|
||||
"@swc/core": "1.3.96",
|
||||
"@swc/core": "1.3.100",
|
||||
"eventemitter3": "5.0.1",
|
||||
"reconnecting-websocket": "4.4.0"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
import type { Endpoints } from './api.types.js';
|
||||
import './autogen/apiClientJSDoc';
|
||||
|
||||
import { SwitchCaseResponseType } from './api.types';
|
||||
import type { Endpoints } from './api.types';
|
||||
|
||||
export {
|
||||
SwitchCaseResponseType,
|
||||
} from './api.types';
|
||||
|
||||
const MK_API_ERROR = Symbol();
|
||||
|
||||
|
@ -15,25 +22,15 @@ export function isAPIError(reason: any): reason is APIError {
|
|||
}
|
||||
|
||||
export type FetchLike = (input: string, init?: {
|
||||
method?: string;
|
||||
body?: string;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
headers: {[key in string]: string}
|
||||
}) => Promise<{
|
||||
status: number;
|
||||
json(): Promise<any>;
|
||||
}>;
|
||||
|
||||
type IsNeverType<T> = [T] extends [never] ? true : false;
|
||||
|
||||
type StrictExtract<Union, Cond> = Cond extends Union ? Union : never;
|
||||
|
||||
type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false;
|
||||
|
||||
type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1];
|
||||
method?: string;
|
||||
body?: string;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
headers: { [key in string]: string }
|
||||
}) => Promise<{
|
||||
status: number;
|
||||
json(): Promise<any>;
|
||||
}>;
|
||||
|
||||
export class APIClient {
|
||||
public origin: string;
|
||||
|
@ -53,22 +50,11 @@ export class APIClient {
|
|||
}
|
||||
|
||||
public request<E extends keyof Endpoints, P extends Endpoints[E]['req']>(
|
||||
endpoint: E, params: P = {} as P, credential?: string | null | undefined,
|
||||
): Promise<Endpoints[E]['res'] extends { $switch: { $cases: [any, any][]; $default: any; }; }
|
||||
?
|
||||
IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> :
|
||||
IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> :
|
||||
IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> :
|
||||
IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> :
|
||||
IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> :
|
||||
IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> :
|
||||
IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> :
|
||||
IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> :
|
||||
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
|
||||
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
|
||||
Endpoints[E]['res']['$switch']['$default']
|
||||
: Endpoints[E]['res']> {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
endpoint: E,
|
||||
params: P = {} as P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.fetch(`${this.origin}/api/${endpoint}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
|
@ -83,10 +69,8 @@ export class APIClient {
|
|||
}).then(async (res) => {
|
||||
const body = res.status === 204 ? null : await res.json();
|
||||
|
||||
if (res.status === 200) {
|
||||
if (res.status === 200 || res.status === 204) {
|
||||
resolve(body);
|
||||
} else if (res.status === 204) {
|
||||
resolve(null);
|
||||
} else {
|
||||
reject({
|
||||
[MK_API_ERROR]: true,
|
||||
|
@ -95,7 +79,5 @@ export class APIClient {
|
|||
}
|
||||
}).catch(reject);
|
||||
});
|
||||
|
||||
return promise as any;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,675 +1,60 @@
|
|||
import type {
|
||||
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance,
|
||||
LiteInstanceMetadata,
|
||||
MeDetailed,
|
||||
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, Invite, InviteLimit, AdminInstanceMetadata,
|
||||
} from './entities.js';
|
||||
import { Endpoints as Gen } from './autogen/endpoint';
|
||||
import { UserDetailed } from './autogen/models';
|
||||
import { UsersShowRequest } from './autogen/entities';
|
||||
|
||||
type TODO = Record<string, any> | null;
|
||||
type Overwrite<T, U extends { [Key in keyof T]?: unknown }> = Omit<
|
||||
T,
|
||||
keyof U
|
||||
> & U;
|
||||
|
||||
type NoParams = Record<string, never>;
|
||||
|
||||
type ShowUserReq = { username: string; host?: string; } | { userId: User['id']; };
|
||||
|
||||
export type Endpoints = {
|
||||
// admin
|
||||
'admin/abuse-user-reports': { req: TODO; res: TODO; };
|
||||
'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; };
|
||||
'admin/delete-logs': { req: NoParams; res: null; };
|
||||
'admin/get-index-stats': { req: TODO; res: TODO; };
|
||||
'admin/get-table-stats': { req: TODO; res: TODO; };
|
||||
'admin/invite': { req: TODO; res: TODO; };
|
||||
'admin/logs': { req: TODO; res: TODO; };
|
||||
'admin/meta': { req: NoParams; res: AdminInstanceMetadata; };
|
||||
'admin/reset-password': { req: TODO; res: TODO; };
|
||||
'admin/resolve-abuse-user-report': { req: TODO; res: TODO; };
|
||||
'admin/resync-chart': { req: TODO; res: TODO; };
|
||||
'admin/send-email': { req: TODO; res: TODO; };
|
||||
'admin/server-info': { req: TODO; res: TODO; };
|
||||
'admin/show-moderation-logs': { req: TODO; res: TODO; };
|
||||
'admin/show-user': { req: TODO; res: TODO; };
|
||||
'admin/show-users': { req: TODO; res: TODO; };
|
||||
'admin/silence-user': { req: TODO; res: TODO; };
|
||||
'admin/suspend-user': { req: TODO; res: TODO; };
|
||||
'admin/nsfw-user': { req: TODO; res: TODO; };
|
||||
'admin/unnsfw-user': { req: TODO; res: TODO; };
|
||||
'admin/approve-user': { req: TODO; res: TODO; };
|
||||
'admin/unsilence-user': { req: TODO; res: TODO; };
|
||||
'admin/unsuspend-user': { req: TODO; res: TODO; };
|
||||
'admin/update-meta': { req: TODO; res: TODO; };
|
||||
'admin/vacuum': { req: TODO; res: TODO; };
|
||||
'admin/accounts/create': { req: TODO; res: TODO; };
|
||||
'admin/ad/create': { req: TODO; res: TODO; };
|
||||
'admin/ad/delete': { req: { id: Ad['id']; }; res: null; };
|
||||
'admin/ad/list': { req: TODO; res: TODO; };
|
||||
'admin/ad/update': { req: TODO; res: TODO; };
|
||||
'admin/announcements/create': { req: TODO; res: TODO; };
|
||||
'admin/announcements/delete': { req: { id: Announcement['id'] }; res: null; };
|
||||
'admin/announcements/list': { req: TODO; res: TODO; };
|
||||
'admin/announcements/update': { req: TODO; res: TODO; };
|
||||
'admin/drive/clean-remote-files': { req: TODO; res: TODO; };
|
||||
'admin/drive/cleanup': { req: TODO; res: TODO; };
|
||||
'admin/drive/files': { req: TODO; res: TODO; };
|
||||
'admin/drive/show-file': { req: TODO; res: TODO; };
|
||||
'admin/emoji/add': { req: TODO; res: TODO; };
|
||||
'admin/emoji/copy': { req: TODO; res: TODO; };
|
||||
'admin/emoji/list-remote': { req: TODO; res: TODO; };
|
||||
'admin/emoji/list': { req: TODO; res: TODO; };
|
||||
'admin/emoji/remove': { req: TODO; res: TODO; };
|
||||
'admin/emoji/update': { req: TODO; res: TODO; };
|
||||
'admin/federation/delete-all-files': { req: { host: string; }; res: null; };
|
||||
'admin/federation/refresh-remote-instance-metadata': { req: TODO; res: TODO; };
|
||||
'admin/federation/remove-all-following': { req: TODO; res: TODO; };
|
||||
'admin/federation/update-instance': { req: TODO; res: TODO; };
|
||||
'admin/invite/create': { req: TODO; res: TODO; };
|
||||
'admin/invite/list': { req: TODO; res: TODO; };
|
||||
'admin/moderators/add': { req: TODO; res: TODO; };
|
||||
'admin/moderators/remove': { req: TODO; res: TODO; };
|
||||
'admin/promo/create': { req: TODO; res: TODO; };
|
||||
'admin/queue/clear': { req: TODO; res: TODO; };
|
||||
'admin/queue/deliver-delayed': { req: TODO; res: TODO; };
|
||||
'admin/queue/inbox-delayed': { req: TODO; res: TODO; };
|
||||
'admin/queue/jobs': { req: TODO; res: TODO; };
|
||||
'admin/queue/stats': { req: TODO; res: TODO; };
|
||||
'admin/relays/add': { req: TODO; res: TODO; };
|
||||
'admin/relays/list': { req: TODO; res: TODO; };
|
||||
'admin/relays/remove': { req: TODO; res: TODO; };
|
||||
|
||||
// announcements
|
||||
'announcements': { req: { limit?: number; withUnreads?: boolean; sinceId?: Announcement['id']; untilId?: Announcement['id']; }; res: Announcement[]; };
|
||||
|
||||
// antennas
|
||||
'antennas/create': { req: TODO; res: Antenna; };
|
||||
'antennas/delete': { req: { antennaId: Antenna['id']; }; res: null; };
|
||||
'antennas/list': { req: NoParams; res: Antenna[]; };
|
||||
'antennas/notes': { req: { antennaId: Antenna['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; };
|
||||
'antennas/show': { req: { antennaId: Antenna['id']; }; res: Antenna; };
|
||||
'antennas/update': { req: TODO; res: Antenna; };
|
||||
|
||||
// ap
|
||||
'ap/get': { req: { uri: string; }; res: Record<string, any>; };
|
||||
'ap/show': { req: { uri: string; }; res: {
|
||||
type: 'Note';
|
||||
object: Note;
|
||||
} | {
|
||||
type: 'User';
|
||||
object: UserDetailed;
|
||||
}; };
|
||||
|
||||
// app
|
||||
'app/create': { req: TODO; res: App; };
|
||||
'app/show': { req: { appId: App['id']; }; res: App; };
|
||||
|
||||
// auth
|
||||
'auth/accept': { req: { token: string; }; res: null; };
|
||||
'auth/session/generate': { req: { appSecret: string; }; res: { token: string; url: string; }; };
|
||||
'auth/session/show': { req: { token: string; }; res: AuthSession; };
|
||||
'auth/session/userkey': { req: { appSecret: string; token: string; }; res: { accessToken: string; user: User }; };
|
||||
|
||||
// blocking
|
||||
'blocking/create': { req: { userId: User['id'] }; res: UserDetailed; };
|
||||
'blocking/delete': { req: { userId: User['id'] }; res: UserDetailed; };
|
||||
'blocking/list': { req: { limit?: number; sinceId?: Blocking['id']; untilId?: Blocking['id']; }; res: Blocking[]; };
|
||||
|
||||
// channels
|
||||
'channels/create': { req: TODO; res: TODO; };
|
||||
'channels/featured': { req: TODO; res: TODO; };
|
||||
'channels/follow': { req: TODO; res: TODO; };
|
||||
'channels/followed': { req: TODO; res: TODO; };
|
||||
'channels/owned': { req: TODO; res: TODO; };
|
||||
'channels/pin-note': { req: TODO; res: TODO; };
|
||||
'channels/show': { req: TODO; res: TODO; };
|
||||
'channels/timeline': { req: TODO; res: TODO; };
|
||||
'channels/unfollow': { req: TODO; res: TODO; };
|
||||
'channels/update': { req: TODO; res: TODO; };
|
||||
|
||||
// charts
|
||||
'charts/active-users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: {
|
||||
local: {
|
||||
users: number[];
|
||||
};
|
||||
remote: {
|
||||
users: number[];
|
||||
};
|
||||
}; };
|
||||
'charts/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: {
|
||||
local: {
|
||||
decCount: number[];
|
||||
decSize: number[];
|
||||
incCount: number[];
|
||||
incSize: number[];
|
||||
totalCount: number[];
|
||||
totalSize: number[];
|
||||
};
|
||||
remote: {
|
||||
decCount: number[];
|
||||
decSize: number[];
|
||||
incCount: number[];
|
||||
incSize: number[];
|
||||
totalCount: number[];
|
||||
totalSize: number[];
|
||||
};
|
||||
}; };
|
||||
'charts/federation': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: {
|
||||
instance: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
}; };
|
||||
'charts/hashtag': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; };
|
||||
'charts/instance': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; host: string; }; res: {
|
||||
drive: {
|
||||
decFiles: number[];
|
||||
decUsage: number[];
|
||||
incFiles: number[];
|
||||
incUsage: number[];
|
||||
totalFiles: number[];
|
||||
totalUsage: number[];
|
||||
};
|
||||
followers: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
following: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
notes: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
diffs: {
|
||||
normal: number[];
|
||||
renote: number[];
|
||||
reply: number[];
|
||||
};
|
||||
};
|
||||
requests: {
|
||||
failed: number[];
|
||||
received: number[];
|
||||
succeeded: number[];
|
||||
};
|
||||
users: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
}; };
|
||||
'charts/network': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; };
|
||||
'charts/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: {
|
||||
local: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
diffs: {
|
||||
normal: number[];
|
||||
renote: number[];
|
||||
reply: number[];
|
||||
};
|
||||
};
|
||||
remote: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
diffs: {
|
||||
normal: number[];
|
||||
renote: number[];
|
||||
reply: number[];
|
||||
};
|
||||
};
|
||||
}; };
|
||||
'charts/user/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: {
|
||||
decCount: number[];
|
||||
decSize: number[];
|
||||
incCount: number[];
|
||||
incSize: number[];
|
||||
totalCount: number[];
|
||||
totalSize: number[];
|
||||
}; };
|
||||
'charts/user/following': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; };
|
||||
'charts/user/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
diffs: {
|
||||
normal: number[];
|
||||
renote: number[];
|
||||
reply: number[];
|
||||
};
|
||||
}; };
|
||||
'charts/user/reactions': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; };
|
||||
'charts/users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: {
|
||||
local: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
remote: {
|
||||
dec: number[];
|
||||
inc: number[];
|
||||
total: number[];
|
||||
};
|
||||
}; };
|
||||
|
||||
// clips
|
||||
'clips/add-note': { req: TODO; res: TODO; };
|
||||
'clips/create': { req: TODO; res: TODO; };
|
||||
'clips/delete': { req: { clipId: Clip['id']; }; res: null; };
|
||||
'clips/list': { req: TODO; res: TODO; };
|
||||
'clips/notes': { req: TODO; res: TODO; };
|
||||
'clips/show': { req: TODO; res: TODO; };
|
||||
'clips/update': { req: TODO; res: TODO; };
|
||||
|
||||
// drive
|
||||
'drive': { req: NoParams; res: { capacity: number; usage: number; }; };
|
||||
'drive/files': { req: { folderId?: DriveFolder['id'] | null; type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; };
|
||||
'drive/files/attached-notes': { req: TODO; res: TODO; };
|
||||
'drive/files/check-existence': { req: TODO; res: TODO; };
|
||||
'drive/files/create': {
|
||||
req: {
|
||||
folderId?: string,
|
||||
name?: string,
|
||||
comment?: string,
|
||||
isSentisive?: boolean,
|
||||
force?: boolean,
|
||||
};
|
||||
res: DriveFile;
|
||||
};
|
||||
'drive/files/delete': { req: { fileId: DriveFile['id']; }; res: null; };
|
||||
'drive/files/find-by-hash': { req: TODO; res: TODO; };
|
||||
'drive/files/find': { req: { name: string; folderId?: DriveFolder['id'] | null; }; res: DriveFile[]; };
|
||||
'drive/files/show': { req: { fileId?: DriveFile['id']; url?: string; }; res: DriveFile; };
|
||||
'drive/files/update': { req: { fileId: DriveFile['id']; folderId?: DriveFolder['id'] | null; name?: string; isSensitive?: boolean; comment?: string | null; }; res: DriveFile; };
|
||||
'drive/files/upload-from-url': { req: { url: string; folderId?: DriveFolder['id'] | null; isSensitive?: boolean; comment?: string | null; marker?: string | null; force?: boolean; }; res: null; };
|
||||
'drive/folders': { req: { folderId?: DriveFolder['id'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFolder[]; };
|
||||
'drive/folders/create': { req: { name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; };
|
||||
'drive/folders/delete': { req: { folderId: DriveFolder['id']; }; res: null; };
|
||||
'drive/folders/find': { req: { name: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder[]; };
|
||||
'drive/folders/show': { req: { folderId: DriveFolder['id']; }; res: DriveFolder; };
|
||||
'drive/folders/update': { req: { folderId: DriveFolder['id']; name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; };
|
||||
'drive/stream': { req: { type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; };
|
||||
|
||||
// endpoint
|
||||
'endpoint': { req: { endpoint: string; }; res: { params: { name: string; type: string; }[]; }; };
|
||||
|
||||
// endpoints
|
||||
'endpoints': { req: NoParams; res: string[]; };
|
||||
|
||||
// federation
|
||||
'federation/dns': { req: { host: string; }; res: {
|
||||
a: string[];
|
||||
aaaa: string[];
|
||||
cname: string[];
|
||||
txt: string[];
|
||||
}; };
|
||||
'federation/followers': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; };
|
||||
'federation/following': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; };
|
||||
'federation/instances': { req: {
|
||||
host?: string | null;
|
||||
blocked?: boolean | null;
|
||||
notResponding?: boolean | null;
|
||||
suspended?: boolean | null;
|
||||
federating?: boolean | null;
|
||||
subscribing?: boolean | null;
|
||||
publishing?: boolean | null;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles';
|
||||
}; res: Instance[]; };
|
||||
'federation/show-instance': { req: { host: string; }; res: Instance; };
|
||||
'federation/update-remote-user': { req: { userId: User['id']; }; res: null; };
|
||||
'federation/users': { req: { host: string; limit?: number; sinceId?: User['id']; untilId?: User['id']; }; res: UserDetailed[]; };
|
||||
|
||||
// following
|
||||
'following/create': { req: {
|
||||
userId: User['id'],
|
||||
withReplies?: boolean,
|
||||
}; res: User; };
|
||||
'following/delete': { req: { userId: User['id'] }; res: User; };
|
||||
'following/requests/accept': { req: { userId: User['id'] }; res: null; };
|
||||
'following/requests/cancel': { req: { userId: User['id'] }; res: User; };
|
||||
'following/requests/list': { req: NoParams; res: FollowRequest[]; };
|
||||
'following/requests/reject': { req: { userId: User['id'] }; res: null; };
|
||||
|
||||
// gallery
|
||||
'gallery/featured': { req: null; res: GalleryPost[]; };
|
||||
'gallery/popular': { req: null; res: GalleryPost[]; };
|
||||
'gallery/posts': { req: { limit?: number; sinceId?: GalleryPost['id']; untilId?: GalleryPost['id']; }; res: GalleryPost[]; };
|
||||
'gallery/posts/create': { req: { title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; };
|
||||
'gallery/posts/delete': { req: { postId: GalleryPost['id'] }; res: null; };
|
||||
'gallery/posts/like': { req: { postId: GalleryPost['id'] }; res: null; };
|
||||
'gallery/posts/show': { req: { postId: GalleryPost['id'] }; res: GalleryPost; };
|
||||
'gallery/posts/unlike': { req: { postId: GalleryPost['id'] }; res: null; };
|
||||
'gallery/posts/update': { req: { postId: GalleryPost['id']; title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; };
|
||||
|
||||
// games
|
||||
'games/reversi/games': { req: TODO; res: TODO; };
|
||||
'games/reversi/games/show': { req: TODO; res: TODO; };
|
||||
'games/reversi/games/surrender': { req: TODO; res: TODO; };
|
||||
'games/reversi/invitations': { req: TODO; res: TODO; };
|
||||
'games/reversi/match': { req: TODO; res: TODO; };
|
||||
'games/reversi/match/cancel': { req: TODO; res: TODO; };
|
||||
|
||||
// get-online-users-count
|
||||
'get-online-users-count': { req: NoParams; res: { count: number; }; };
|
||||
|
||||
// hashtags
|
||||
'hashtags/list': { req: TODO; res: TODO; };
|
||||
'hashtags/search': { req: TODO; res: TODO; };
|
||||
'hashtags/show': { req: TODO; res: TODO; };
|
||||
'hashtags/trend': { req: TODO; res: TODO; };
|
||||
'hashtags/users': { req: TODO; res: TODO; };
|
||||
|
||||
// i
|
||||
'i': { req: NoParams; res: User; };
|
||||
'i/apps': { req: TODO; res: TODO; };
|
||||
'i/authorized-apps': { req: TODO; res: TODO; };
|
||||
'i/change-password': { req: TODO; res: TODO; };
|
||||
'i/delete-account': { req: { password: string; }; res: null; };
|
||||
'i/export-blocking': { req: TODO; res: TODO; };
|
||||
'i/export-following': { req: TODO; res: TODO; };
|
||||
'i/export-mute': { req: TODO; res: TODO; };
|
||||
'i/export-notes': { req: TODO; res: TODO; };
|
||||
'i/export-user-lists': { req: TODO; res: TODO; };
|
||||
'i/favorites': { req: { limit?: number; sinceId?: NoteFavorite['id']; untilId?: NoteFavorite['id']; }; res: NoteFavorite[]; };
|
||||
'i/gallery/likes': { req: TODO; res: TODO; };
|
||||
'i/gallery/posts': { req: TODO; res: TODO; };
|
||||
'i/import-following': { req: TODO; res: TODO; };
|
||||
'i/import-user-lists': { req: TODO; res: TODO; };
|
||||
'i/move': { req: TODO; res: TODO; };
|
||||
'i/notifications': { req: {
|
||||
limit?: number;
|
||||
sinceId?: Notification['id'];
|
||||
untilId?: Notification['id'];
|
||||
following?: boolean;
|
||||
markAsRead?: boolean;
|
||||
includeTypes?: Notification['type'][];
|
||||
excludeTypes?: Notification['type'][];
|
||||
}; res: Notification[]; };
|
||||
'i/page-likes': { req: TODO; res: TODO; };
|
||||
'i/pages': { req: TODO; res: TODO; };
|
||||
'i/pin': { req: { noteId: Note['id']; }; res: MeDetailed; };
|
||||
'i/read-all-messaging-messages': { req: TODO; res: TODO; };
|
||||
'i/read-all-unread-notes': { req: TODO; res: TODO; };
|
||||
'i/read-announcement': { req: TODO; res: TODO; };
|
||||
'i/regenerate-token': { req: { password: string; }; res: null; };
|
||||
'i/registry/get-all': { req: { scope?: string[]; }; res: Record<string, any>; };
|
||||
'i/registry/get-detail': { req: { key: string; scope?: string[]; }; res: { updatedAt: DateString; value: any; }; };
|
||||
'i/registry/get': { req: { key: string; scope?: string[]; }; res: any; };
|
||||
'i/registry/keys-with-type': { req: { scope?: string[]; }; res: Record<string, 'null' | 'array' | 'number' | 'string' | 'boolean' | 'object'>; };
|
||||
'i/registry/keys': { req: { scope?: string[]; }; res: string[]; };
|
||||
'i/registry/remove': { req: { key: string; scope?: string[]; }; res: null; };
|
||||
'i/registry/set': { req: { key: string; value: any; scope?: string[]; }; res: null; };
|
||||
'i/revoke-token': { req: TODO; res: TODO; };
|
||||
'i/signin-history': { req: { limit?: number; sinceId?: Signin['id']; untilId?: Signin['id']; }; res: Signin[]; };
|
||||
'i/unpin': { req: { noteId: Note['id']; }; res: MeDetailed; };
|
||||
'i/update-email': { req: {
|
||||
password: string;
|
||||
email?: string | null;
|
||||
}; res: MeDetailed; };
|
||||
'i/update': { req: {
|
||||
name?: string | null;
|
||||
description?: string | null;
|
||||
lang?: string | null;
|
||||
location?: string | null;
|
||||
birthday?: string | null;
|
||||
avatarId?: DriveFile['id'] | null;
|
||||
bannerId?: DriveFile['id'] | null;
|
||||
backgroundId?: DriveFile['id'] | null;
|
||||
fields?: {
|
||||
name: string;
|
||||
value: string;
|
||||
}[];
|
||||
isLocked?: boolean;
|
||||
isExplorable?: boolean;
|
||||
hideOnlineStatus?: boolean;
|
||||
carefulBot?: boolean;
|
||||
autoAcceptFollowed?: boolean;
|
||||
noCrawle?: boolean;
|
||||
isBot?: boolean;
|
||||
isCat?: boolean;
|
||||
speakAsCat?: boolean;
|
||||
injectFeaturedNote?: boolean;
|
||||
receiveAnnouncementEmail?: boolean;
|
||||
alwaysMarkNsfw?: boolean;
|
||||
mutedWords?: string[][];
|
||||
notificationRecieveConfig?: any;
|
||||
emailNotificationTypes?: string[];
|
||||
alsoKnownAs?: string[];
|
||||
}; res: MeDetailed; };
|
||||
'i/user-group-invites': { req: TODO; res: TODO; };
|
||||
'i/2fa/done': { req: TODO; res: TODO; };
|
||||
'i/2fa/key-done': { req: TODO; res: TODO; };
|
||||
'i/2fa/password-less': { req: TODO; res: TODO; };
|
||||
'i/2fa/register-key': { req: TODO; res: TODO; };
|
||||
'i/2fa/register': { req: TODO; res: TODO; };
|
||||
'i/2fa/remove-key': { req: TODO; res: TODO; };
|
||||
'i/2fa/unregister': { req: TODO; res: TODO; };
|
||||
|
||||
// invite
|
||||
'invite/create': { req: NoParams; res: Invite; };
|
||||
'invite/delete': { req: { inviteId: Invite['id']; }; res: null; };
|
||||
'invite/list': { req: { limit?: number; sinceId?: Invite['id']; untilId?: Invite['id'] }; res: Invite[]; };
|
||||
'invite/limit': { req: NoParams; res: InviteLimit; };
|
||||
|
||||
// messaging
|
||||
'messaging/history': { req: { limit?: number; group?: boolean; }; res: MessagingMessage[]; };
|
||||
'messaging/messages': { req: { userId?: User['id']; groupId?: UserGroup['id']; limit?: number; sinceId?: MessagingMessage['id']; untilId?: MessagingMessage['id']; markAsRead?: boolean; }; res: MessagingMessage[]; };
|
||||
'messaging/messages/create': { req: { userId?: User['id']; groupId?: UserGroup['id']; text?: string; fileId?: DriveFile['id']; }; res: MessagingMessage; };
|
||||
'messaging/messages/delete': { req: { messageId: MessagingMessage['id']; }; res: null; };
|
||||
'messaging/messages/read': { req: { messageId: MessagingMessage['id']; }; res: null; };
|
||||
|
||||
// meta
|
||||
'meta': { req: { detail?: boolean; }; res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{ detail: true; },
|
||||
DetailedInstanceMetadata,
|
||||
], [
|
||||
{ detail: false; },
|
||||
LiteInstanceMetadata,
|
||||
], [
|
||||
{ detail: boolean; },
|
||||
LiteInstanceMetadata | DetailedInstanceMetadata,
|
||||
]];
|
||||
$default: LiteInstanceMetadata;
|
||||
};
|
||||
}; };
|
||||
|
||||
// miauth
|
||||
'miauth/gen-token': { req: TODO; res: TODO; };
|
||||
|
||||
// mute
|
||||
'mute/create': { req: TODO; res: TODO; };
|
||||
'mute/delete': { req: { userId: User['id'] }; res: null; };
|
||||
'mute/list': { req: TODO; res: TODO; };
|
||||
|
||||
// my
|
||||
'my/apps': { req: TODO; res: TODO; };
|
||||
|
||||
// notes
|
||||
'notes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; };
|
||||
'notes/children': { req: { noteId: Note['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; };
|
||||
'notes/clips': { req: TODO; res: TODO; };
|
||||
'notes/conversation': { req: TODO; res: TODO; };
|
||||
'notes/create': { req: {
|
||||
visibility?: 'public' | 'home' | 'followers' | 'specified',
|
||||
visibleUserIds?: User['id'][];
|
||||
text?: null | string;
|
||||
cw?: null | string;
|
||||
viaMobile?: boolean;
|
||||
localOnly?: boolean;
|
||||
fileIds?: DriveFile['id'][];
|
||||
replyId?: null | Note['id'];
|
||||
renoteId?: null | Note['id'];
|
||||
channelId?: null | Channel['id'];
|
||||
poll?: null | {
|
||||
choices: string[];
|
||||
multiple?: boolean;
|
||||
expiresAt?: null | number;
|
||||
expiredAfter?: null | number;
|
||||
};
|
||||
}; res: { createdNote: Note }; };
|
||||
'notes/delete': { req: { noteId: Note['id']; }; res: null; };
|
||||
'notes/edit': { req: {
|
||||
visibility?: 'public' | 'home' | 'followers' | 'specified',
|
||||
visibleUserIds?: User['id'][];
|
||||
text?: null | string;
|
||||
cw?: null | string;
|
||||
viaMobile?: boolean;
|
||||
localOnly?: boolean;
|
||||
fileIds?: DriveFile['id'][];
|
||||
replyId?: null | Note['id'];
|
||||
renoteId?: null | Note['id'];
|
||||
channelId?: null | Channel['id'];
|
||||
poll?: null | {
|
||||
choices: string[];
|
||||
multiple?: boolean;
|
||||
expiresAt?: null | number;
|
||||
expiredAfter?: null | number;
|
||||
};
|
||||
}; res: { createdNote: Note }; };
|
||||
'notes/favorites/create': { req: { noteId: Note['id']; }; res: null; };
|
||||
'notes/favorites/delete': { req: { noteId: Note['id']; }; res: null; };
|
||||
'notes/featured': { req: TODO; res: Note[]; };
|
||||
'notes/global-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'notes/hybrid-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'notes/local-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'notes/mentions': { req: { following?: boolean; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; };
|
||||
'notes/polls/recommendation': { req: TODO; res: TODO; };
|
||||
'notes/polls/vote': { req: { noteId: Note['id']; choice: number; }; res: null; };
|
||||
'notes/reactions': { req: { noteId: Note['id']; type?: string | null; limit?: number; }; res: NoteReaction[]; };
|
||||
'notes/reactions/create': { req: { noteId: Note['id']; reaction: string; }; res: null; };
|
||||
'notes/reactions/delete': { req: { noteId: Note['id']; }; res: null; };
|
||||
'notes/like': { req: { noteId: Note['id']; override: string | null; }; res: null; };
|
||||
'notes/renotes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; };
|
||||
'notes/replies': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; };
|
||||
'notes/search-by-tag': { req: TODO; res: TODO; };
|
||||
'notes/search': { req: TODO; res: TODO; };
|
||||
'notes/show': { req: { noteId: Note['id']; }; res: Note; };
|
||||
'notes/state': { req: TODO; res: TODO; };
|
||||
'notes/timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'notes/unrenote': { req: { noteId: Note['id']; }; res: null; };
|
||||
'notes/user-list-timeline': { req: { listId: UserList['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'notes/watching/create': { req: TODO; res: TODO; };
|
||||
'notes/watching/delete': { req: { noteId: Note['id']; }; res: null; };
|
||||
|
||||
// notifications
|
||||
'notifications/create': { req: { body: string; header?: string | null; icon?: string | null; }; res: null; };
|
||||
'notifications/test-notification': { req: NoParams; res: null; };
|
||||
'notifications/mark-all-as-read': { req: NoParams; res: null; };
|
||||
|
||||
// page-push
|
||||
'page-push': { req: { pageId: Page['id']; event: string; var?: any; }; res: null; };
|
||||
|
||||
// pages
|
||||
'pages/create': { req: TODO; res: Page; };
|
||||
'pages/delete': { req: { pageId: Page['id']; }; res: null; };
|
||||
'pages/featured': { req: NoParams; res: Page[]; };
|
||||
'pages/like': { req: { pageId: Page['id']; }; res: null; };
|
||||
'pages/show': { req: { pageId?: Page['id']; name?: string; username?: string; }; res: Page; };
|
||||
'pages/unlike': { req: { pageId: Page['id']; }; res: null; };
|
||||
'pages/update': { req: TODO; res: null; };
|
||||
|
||||
// ping
|
||||
'ping': { req: NoParams; res: { pong: number; }; };
|
||||
|
||||
// pinned-users
|
||||
'pinned-users': { req: TODO; res: TODO; };
|
||||
|
||||
// promo
|
||||
'promo/read': { req: TODO; res: TODO; };
|
||||
|
||||
// request-reset-password
|
||||
'request-reset-password': { req: { username: string; email: string; }; res: null; };
|
||||
|
||||
// reset-password
|
||||
'reset-password': { req: { token: string; password: string; }; res: null; };
|
||||
|
||||
// sponsors
|
||||
'sponsors': { req: { forceUpdate: boolean; }; res: null; };
|
||||
|
||||
// room
|
||||
'room/show': { req: TODO; res: TODO; };
|
||||
'room/update': { req: TODO; res: TODO; };
|
||||
|
||||
// signup
|
||||
'signup': {
|
||||
req: {
|
||||
username: string;
|
||||
password: string;
|
||||
host?: string;
|
||||
invitationCode?: string;
|
||||
emailAddress?: string;
|
||||
'hcaptcha-response'?: string;
|
||||
'g-recaptcha-response'?: string;
|
||||
'turnstile-response'?: string;
|
||||
};
|
||||
res: MeSignup | null;
|
||||
};
|
||||
|
||||
// stats
|
||||
'stats': { req: NoParams; res: Stats; };
|
||||
|
||||
// server-info
|
||||
'server-info': { req: NoParams; res: ServerInfo; };
|
||||
|
||||
// sw
|
||||
'sw/register': { req: TODO; res: TODO; };
|
||||
|
||||
// username
|
||||
'username/available': { req: { username: string; }; res: { available: boolean; }; };
|
||||
|
||||
// users
|
||||
'users': { req: { limit?: number; offset?: number; sort?: UserSorting; origin?: OriginType; }; res: User[]; };
|
||||
'users/clips': { req: TODO; res: TODO; };
|
||||
'users/followers': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFollowerPopulated[]; };
|
||||
'users/following': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; };
|
||||
'users/gallery/posts': { req: TODO; res: TODO; };
|
||||
'users/get-frequently-replied-users': { req: TODO; res: TODO; };
|
||||
'users/groups/create': { req: TODO; res: TODO; };
|
||||
'users/groups/delete': { req: { groupId: UserGroup['id'] }; res: null; };
|
||||
'users/groups/invitations/accept': { req: TODO; res: TODO; };
|
||||
'users/groups/invitations/reject': { req: TODO; res: TODO; };
|
||||
'users/groups/invite': { req: TODO; res: TODO; };
|
||||
'users/groups/joined': { req: TODO; res: TODO; };
|
||||
'users/groups/owned': { req: TODO; res: TODO; };
|
||||
'users/groups/pull': { req: TODO; res: TODO; };
|
||||
'users/groups/show': { req: TODO; res: TODO; };
|
||||
'users/groups/transfer': { req: TODO; res: TODO; };
|
||||
'users/groups/update': { req: TODO; res: TODO; };
|
||||
'users/lists/create': { req: { name: string; }; res: UserList; };
|
||||
'users/lists/delete': { req: { listId: UserList['id']; }; res: null; };
|
||||
'users/lists/list': { req: NoParams; res: UserList[]; };
|
||||
'users/lists/pull': { req: { listId: UserList['id']; userId: User['id']; }; res: null; };
|
||||
'users/lists/push': { req: { listId: UserList['id']; userId: User['id']; }; res: null; };
|
||||
'users/lists/show': { req: { listId: UserList['id']; }; res: UserList; };
|
||||
'users/lists/update': { req: { listId: UserList['id']; name: string; }; res: UserList; };
|
||||
'users/notes': { req: { userId: User['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; };
|
||||
'users/pages': { req: TODO; res: TODO; };
|
||||
'users/flashs': { req: TODO; res: TODO; };
|
||||
'users/recommendation': { req: TODO; res: TODO; };
|
||||
'users/relation': { req: TODO; res: TODO; };
|
||||
'users/report-abuse': { req: TODO; res: TODO; };
|
||||
'users/search-by-username-and-host': { req: TODO; res: TODO; };
|
||||
'users/search': { req: TODO; res: TODO; };
|
||||
'users/show': { req: ShowUserReq | { userIds: User['id'][]; }; res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{ userIds: User['id'][]; },
|
||||
UserDetailed[],
|
||||
]];
|
||||
$default: UserDetailed;
|
||||
};
|
||||
}; };
|
||||
|
||||
// fetching external data
|
||||
'fetch-rss': { req: { url: string; }; res: TODO; };
|
||||
'fetch-external-resources': {
|
||||
req: { url: string; hash: string; };
|
||||
res: { type: string; data: string; };
|
||||
type SwitchCase = {
|
||||
$switch: {
|
||||
$cases: [any, any][],
|
||||
$default: any;
|
||||
};
|
||||
};
|
||||
|
||||
type IsNeverType<T> = [T] extends [never] ? true : false;
|
||||
type StrictExtract<Union, Cond> = Cond extends Union ? Union : never;
|
||||
|
||||
type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
? IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false
|
||||
: false
|
||||
|
||||
type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
? StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1]
|
||||
: never
|
||||
|
||||
export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoints[E]['req']> = Endpoints[E]['res'] extends SwitchCase
|
||||
? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> :
|
||||
IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> :
|
||||
IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> :
|
||||
IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> :
|
||||
IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> :
|
||||
IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> :
|
||||
IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> :
|
||||
IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> :
|
||||
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
|
||||
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
|
||||
Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res'];
|
||||
|
||||
export type Endpoints = Overwrite<
|
||||
Gen,
|
||||
{
|
||||
'users/show': {
|
||||
req: UsersShowRequest;
|
||||
res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{
|
||||
userIds?: string[];
|
||||
}, UserDetailed[],
|
||||
]];
|
||||
$default: UserDetailed;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
>
|
||||
|
|
3973
packages/misskey-js/src/autogen/apiClientJSDoc.ts
Normal file
3973
packages/misskey-js/src/autogen/apiClientJSDoc.ts
Normal file
File diff suppressed because it is too large
Load diff
871
packages/misskey-js/src/autogen/endpoint.ts
Normal file
871
packages/misskey-js/src/autogen/endpoint.ts
Normal file
|
@ -0,0 +1,871 @@
|
|||
/*
|
||||
* version: 2023.11.0-beta.3
|
||||
* generatedAt: 2023-12-08T04:57:48.415Z
|
||||
*/
|
||||
|
||||
import type {
|
||||
EmptyRequest,
|
||||
EmptyResponse,
|
||||
AdminMetaResponse,
|
||||
AdminAbuseUserReportsRequest,
|
||||
AdminAbuseUserReportsResponse,
|
||||
AdminAccountsCreateRequest,
|
||||
AdminAccountsCreateResponse,
|
||||
AdminAccountsDeleteRequest,
|
||||
AdminAccountsFindByEmailRequest,
|
||||
AdminAdCreateRequest,
|
||||
AdminAdDeleteRequest,
|
||||
AdminAdListRequest,
|
||||
AdminAdUpdateRequest,
|
||||
AdminAnnouncementsCreateRequest,
|
||||
AdminAnnouncementsCreateResponse,
|
||||
AdminAnnouncementsDeleteRequest,
|
||||
AdminAnnouncementsListRequest,
|
||||
AdminAnnouncementsListResponse,
|
||||
AdminAnnouncementsUpdateRequest,
|
||||
AdminAvatarDecorationsCreateRequest,
|
||||
AdminAvatarDecorationsDeleteRequest,
|
||||
AdminAvatarDecorationsListRequest,
|
||||
AdminAvatarDecorationsListResponse,
|
||||
AdminAvatarDecorationsUpdateRequest,
|
||||
AdminDeleteAllFilesOfAUserRequest,
|
||||
AdminUnsetUserAvatarRequest,
|
||||
AdminUnsetUserBannerRequest,
|
||||
AdminDriveFilesRequest,
|
||||
AdminDriveFilesResponse,
|
||||
AdminDriveShowFileRequest,
|
||||
AdminDriveShowFileResponse,
|
||||
AdminEmojiAddAliasesBulkRequest,
|
||||
AdminEmojiAddRequest,
|
||||
AdminEmojiCopyRequest,
|
||||
AdminEmojiCopyResponse,
|
||||
AdminEmojiDeleteBulkRequest,
|
||||
AdminEmojiDeleteRequest,
|
||||
AdminEmojiImportZipRequest,
|
||||
AdminEmojiListRemoteRequest,
|
||||
AdminEmojiListRemoteResponse,
|
||||
AdminEmojiListRequest,
|
||||
AdminEmojiListResponse,
|
||||
AdminEmojiRemoveAliasesBulkRequest,
|
||||
AdminEmojiSetAliasesBulkRequest,
|
||||
AdminEmojiSetCategoryBulkRequest,
|
||||
AdminEmojiSetLicenseBulkRequest,
|
||||
AdminEmojiUpdateRequest,
|
||||
AdminFederationDeleteAllFilesRequest,
|
||||
AdminFederationRefreshRemoteInstanceMetadataRequest,
|
||||
AdminFederationRemoveAllFollowingRequest,
|
||||
AdminFederationUpdateInstanceRequest,
|
||||
AdminGetTableStatsResponse,
|
||||
AdminGetUserIpsRequest,
|
||||
AdminInviteCreateRequest,
|
||||
AdminInviteCreateResponse,
|
||||
AdminInviteListRequest,
|
||||
AdminInviteListResponse,
|
||||
AdminPromoCreateRequest,
|
||||
AdminQueueDeliverDelayedResponse,
|
||||
AdminQueueInboxDelayedResponse,
|
||||
AdminQueuePromoteRequest,
|
||||
AdminQueueStatsResponse,
|
||||
AdminRelaysAddRequest,
|
||||
AdminRelaysAddResponse,
|
||||
AdminRelaysListResponse,
|
||||
AdminRelaysRemoveRequest,
|
||||
AdminResetPasswordRequest,
|
||||
AdminResetPasswordResponse,
|
||||
AdminResolveAbuseUserReportRequest,
|
||||
AdminSendEmailRequest,
|
||||
AdminServerInfoResponse,
|
||||
AdminShowModerationLogsRequest,
|
||||
AdminShowModerationLogsResponse,
|
||||
AdminShowUserRequest,
|
||||
AdminShowUserResponse,
|
||||
AdminShowUsersRequest,
|
||||
AdminShowUsersResponse,
|
||||
AdminSuspendUserRequest,
|
||||
AdminUnsuspendUserRequest,
|
||||
AdminUpdateMetaRequest,
|
||||
AdminDeleteAccountRequest,
|
||||
AdminDeleteAccountResponse,
|
||||
AdminUpdateUserNoteRequest,
|
||||
AdminRolesCreateRequest,
|
||||
AdminRolesCreateResponse,
|
||||
AdminRolesDeleteRequest,
|
||||
AdminRolesListResponse,
|
||||
AdminRolesShowRequest,
|
||||
AdminRolesShowResponse,
|
||||
AdminRolesUpdateRequest,
|
||||
AdminRolesAssignRequest,
|
||||
AdminRolesUnassignRequest,
|
||||
AdminRolesUpdateDefaultPoliciesRequest,
|
||||
AdminRolesUsersRequest,
|
||||
AnnouncementsRequest,
|
||||
AnnouncementsResponse,
|
||||
AntennasCreateRequest,
|
||||
AntennasCreateResponse,
|
||||
AntennasDeleteRequest,
|
||||
AntennasListResponse,
|
||||
AntennasNotesRequest,
|
||||
AntennasNotesResponse,
|
||||
AntennasShowRequest,
|
||||
AntennasShowResponse,
|
||||
AntennasUpdateRequest,
|
||||
AntennasUpdateResponse,
|
||||
ApGetRequest,
|
||||
ApGetResponse,
|
||||
ApShowRequest,
|
||||
ApShowResponse,
|
||||
AppCreateRequest,
|
||||
AppCreateResponse,
|
||||
AppShowRequest,
|
||||
AppShowResponse,
|
||||
AuthAcceptRequest,
|
||||
AuthSessionGenerateRequest,
|
||||
AuthSessionGenerateResponse,
|
||||
AuthSessionShowRequest,
|
||||
AuthSessionShowResponse,
|
||||
AuthSessionUserkeyRequest,
|
||||
AuthSessionUserkeyResponse,
|
||||
BlockingCreateRequest,
|
||||
BlockingCreateResponse,
|
||||
BlockingDeleteRequest,
|
||||
BlockingDeleteResponse,
|
||||
BlockingListRequest,
|
||||
BlockingListResponse,
|
||||
ChannelsCreateRequest,
|
||||
ChannelsCreateResponse,
|
||||
ChannelsFeaturedResponse,
|
||||
ChannelsFollowRequest,
|
||||
ChannelsFollowedRequest,
|
||||
ChannelsFollowedResponse,
|
||||
ChannelsOwnedRequest,
|
||||
ChannelsOwnedResponse,
|
||||
ChannelsShowRequest,
|
||||
ChannelsShowResponse,
|
||||
ChannelsTimelineRequest,
|
||||
ChannelsTimelineResponse,
|
||||
ChannelsUnfollowRequest,
|
||||
ChannelsUpdateRequest,
|
||||
ChannelsUpdateResponse,
|
||||
ChannelsFavoriteRequest,
|
||||
ChannelsUnfavoriteRequest,
|
||||
ChannelsMyFavoritesResponse,
|
||||
ChannelsSearchRequest,
|
||||
ChannelsSearchResponse,
|
||||
ChartsActiveUsersRequest,
|
||||
ChartsActiveUsersResponse,
|
||||
ChartsApRequestRequest,
|
||||
ChartsApRequestResponse,
|
||||
ChartsDriveRequest,
|
||||
ChartsDriveResponse,
|
||||
ChartsFederationRequest,
|
||||
ChartsFederationResponse,
|
||||
ChartsInstanceRequest,
|
||||
ChartsInstanceResponse,
|
||||
ChartsNotesRequest,
|
||||
ChartsNotesResponse,
|
||||
ChartsUserDriveRequest,
|
||||
ChartsUserDriveResponse,
|
||||
ChartsUserFollowingRequest,
|
||||
ChartsUserFollowingResponse,
|
||||
ChartsUserNotesRequest,
|
||||
ChartsUserNotesResponse,
|
||||
ChartsUserPvRequest,
|
||||
ChartsUserPvResponse,
|
||||
ChartsUserReactionsRequest,
|
||||
ChartsUserReactionsResponse,
|
||||
ChartsUsersRequest,
|
||||
ChartsUsersResponse,
|
||||
ClipsAddNoteRequest,
|
||||
ClipsRemoveNoteRequest,
|
||||
ClipsCreateRequest,
|
||||
ClipsCreateResponse,
|
||||
ClipsDeleteRequest,
|
||||
ClipsListResponse,
|
||||
ClipsNotesRequest,
|
||||
ClipsNotesResponse,
|
||||
ClipsShowRequest,
|
||||
ClipsShowResponse,
|
||||
ClipsUpdateRequest,
|
||||
ClipsUpdateResponse,
|
||||
ClipsFavoriteRequest,
|
||||
ClipsUnfavoriteRequest,
|
||||
ClipsMyFavoritesResponse,
|
||||
DriveResponse,
|
||||
DriveFilesRequest,
|
||||
DriveFilesResponse,
|
||||
DriveFilesAttachedNotesRequest,
|
||||
DriveFilesAttachedNotesResponse,
|
||||
DriveFilesCheckExistenceRequest,
|
||||
DriveFilesCheckExistenceResponse,
|
||||
DriveFilesCreateRequest,
|
||||
DriveFilesCreateResponse,
|
||||
DriveFilesDeleteRequest,
|
||||
DriveFilesFindByHashRequest,
|
||||
DriveFilesFindByHashResponse,
|
||||
DriveFilesFindRequest,
|
||||
DriveFilesFindResponse,
|
||||
DriveFilesShowRequest,
|
||||
DriveFilesShowResponse,
|
||||
DriveFilesUpdateRequest,
|
||||
DriveFilesUpdateResponse,
|
||||
DriveFilesUploadFromUrlRequest,
|
||||
DriveFoldersRequest,
|
||||
DriveFoldersResponse,
|
||||
DriveFoldersCreateRequest,
|
||||
DriveFoldersCreateResponse,
|
||||
DriveFoldersDeleteRequest,
|
||||
DriveFoldersFindRequest,
|
||||
DriveFoldersFindResponse,
|
||||
DriveFoldersShowRequest,
|
||||
DriveFoldersShowResponse,
|
||||
DriveFoldersUpdateRequest,
|
||||
DriveFoldersUpdateResponse,
|
||||
DriveStreamRequest,
|
||||
DriveStreamResponse,
|
||||
EmailAddressAvailableRequest,
|
||||
EmailAddressAvailableResponse,
|
||||
EndpointRequest,
|
||||
EndpointsResponse,
|
||||
FederationFollowersRequest,
|
||||
FederationFollowersResponse,
|
||||
FederationFollowingRequest,
|
||||
FederationFollowingResponse,
|
||||
FederationInstancesRequest,
|
||||
FederationInstancesResponse,
|
||||
FederationShowInstanceRequest,
|
||||
FederationShowInstanceResponse,
|
||||
FederationUpdateRemoteUserRequest,
|
||||
FederationUsersRequest,
|
||||
FederationUsersResponse,
|
||||
FederationStatsRequest,
|
||||
FollowingCreateRequest,
|
||||
FollowingCreateResponse,
|
||||
FollowingDeleteRequest,
|
||||
FollowingDeleteResponse,
|
||||
FollowingUpdateRequest,
|
||||
FollowingUpdateResponse,
|
||||
FollowingUpdateAllRequest,
|
||||
FollowingInvalidateRequest,
|
||||
FollowingInvalidateResponse,
|
||||
FollowingRequestsAcceptRequest,
|
||||
FollowingRequestsCancelRequest,
|
||||
FollowingRequestsCancelResponse,
|
||||
FollowingRequestsListRequest,
|
||||
FollowingRequestsListResponse,
|
||||
FollowingRequestsRejectRequest,
|
||||
GalleryFeaturedRequest,
|
||||
GalleryFeaturedResponse,
|
||||
GalleryPopularResponse,
|
||||
GalleryPostsRequest,
|
||||
GalleryPostsResponse,
|
||||
GalleryPostsCreateRequest,
|
||||
GalleryPostsCreateResponse,
|
||||
GalleryPostsDeleteRequest,
|
||||
GalleryPostsLikeRequest,
|
||||
GalleryPostsShowRequest,
|
||||
GalleryPostsShowResponse,
|
||||
GalleryPostsUnlikeRequest,
|
||||
GalleryPostsUpdateRequest,
|
||||
GalleryPostsUpdateResponse,
|
||||
GetAvatarDecorationsResponse,
|
||||
HashtagsListRequest,
|
||||
HashtagsListResponse,
|
||||
HashtagsSearchRequest,
|
||||
HashtagsSearchResponse,
|
||||
HashtagsShowRequest,
|
||||
HashtagsShowResponse,
|
||||
HashtagsTrendResponse,
|
||||
HashtagsUsersRequest,
|
||||
HashtagsUsersResponse,
|
||||
IResponse,
|
||||
I2faDoneRequest,
|
||||
I2faKeyDoneRequest,
|
||||
I2faPasswordLessRequest,
|
||||
I2faRegisterKeyRequest,
|
||||
I2faRegisterRequest,
|
||||
I2faUpdateKeyRequest,
|
||||
I2faRemoveKeyRequest,
|
||||
I2faUnregisterRequest,
|
||||
IAppsRequest,
|
||||
IAuthorizedAppsRequest,
|
||||
IClaimAchievementRequest,
|
||||
IChangePasswordRequest,
|
||||
IDeleteAccountRequest,
|
||||
IExportFollowingRequest,
|
||||
IFavoritesRequest,
|
||||
IFavoritesResponse,
|
||||
IGalleryLikesRequest,
|
||||
IGalleryLikesResponse,
|
||||
IGalleryPostsRequest,
|
||||
IGalleryPostsResponse,
|
||||
IImportBlockingRequest,
|
||||
IImportFollowingRequest,
|
||||
IImportMutingRequest,
|
||||
IImportUserListsRequest,
|
||||
IImportAntennasRequest,
|
||||
INotificationsRequest,
|
||||
INotificationsResponse,
|
||||
INotificationsGroupedRequest,
|
||||
INotificationsGroupedResponse,
|
||||
IPageLikesRequest,
|
||||
IPageLikesResponse,
|
||||
IPagesRequest,
|
||||
IPagesResponse,
|
||||
IPinRequest,
|
||||
IPinResponse,
|
||||
IReadAnnouncementRequest,
|
||||
IRegenerateTokenRequest,
|
||||
IRegistryGetAllRequest,
|
||||
IRegistryGetDetailRequest,
|
||||
IRegistryGetRequest,
|
||||
IRegistryKeysWithTypeRequest,
|
||||
IRegistryKeysRequest,
|
||||
IRegistryRemoveRequest,
|
||||
IRegistrySetRequest,
|
||||
IRevokeTokenRequest,
|
||||
ISigninHistoryRequest,
|
||||
ISigninHistoryResponse,
|
||||
IUnpinRequest,
|
||||
IUnpinResponse,
|
||||
IUpdateEmailRequest,
|
||||
IUpdateRequest,
|
||||
IUpdateResponse,
|
||||
IMoveRequest,
|
||||
IWebhooksCreateRequest,
|
||||
IWebhooksShowRequest,
|
||||
IWebhooksUpdateRequest,
|
||||
IWebhooksDeleteRequest,
|
||||
InviteCreateResponse,
|
||||
InviteDeleteRequest,
|
||||
InviteListRequest,
|
||||
InviteListResponse,
|
||||
InviteLimitResponse,
|
||||
MetaRequest,
|
||||
MetaResponse,
|
||||
EmojisResponse,
|
||||
EmojiRequest,
|
||||
EmojiResponse,
|
||||
MiauthGenTokenRequest,
|
||||
MiauthGenTokenResponse,
|
||||
MuteCreateRequest,
|
||||
MuteDeleteRequest,
|
||||
MuteListRequest,
|
||||
MuteListResponse,
|
||||
RenoteMuteCreateRequest,
|
||||
RenoteMuteDeleteRequest,
|
||||
RenoteMuteListRequest,
|
||||
RenoteMuteListResponse,
|
||||
MyAppsRequest,
|
||||
MyAppsResponse,
|
||||
NotesRequest,
|
||||
NotesResponse,
|
||||
NotesChildrenRequest,
|
||||
NotesChildrenResponse,
|
||||
NotesClipsRequest,
|
||||
NotesClipsResponse,
|
||||
NotesConversationRequest,
|
||||
NotesConversationResponse,
|
||||
NotesCreateRequest,
|
||||
NotesCreateResponse,
|
||||
NotesDeleteRequest,
|
||||
NotesFavoritesCreateRequest,
|
||||
NotesFavoritesDeleteRequest,
|
||||
NotesFeaturedRequest,
|
||||
NotesFeaturedResponse,
|
||||
NotesGlobalTimelineRequest,
|
||||
NotesGlobalTimelineResponse,
|
||||
NotesHybridTimelineRequest,
|
||||
NotesHybridTimelineResponse,
|
||||
NotesLocalTimelineRequest,
|
||||
NotesLocalTimelineResponse,
|
||||
NotesMentionsRequest,
|
||||
NotesMentionsResponse,
|
||||
NotesPollsRecommendationRequest,
|
||||
NotesPollsRecommendationResponse,
|
||||
NotesPollsVoteRequest,
|
||||
NotesReactionsRequest,
|
||||
NotesReactionsResponse,
|
||||
NotesReactionsCreateRequest,
|
||||
NotesReactionsDeleteRequest,
|
||||
NotesRenotesRequest,
|
||||
NotesRenotesResponse,
|
||||
NotesRepliesRequest,
|
||||
NotesRepliesResponse,
|
||||
NotesSearchByTagRequest,
|
||||
NotesSearchByTagResponse,
|
||||
NotesSearchRequest,
|
||||
NotesSearchResponse,
|
||||
NotesShowRequest,
|
||||
NotesShowResponse,
|
||||
NotesStateRequest,
|
||||
NotesStateResponse,
|
||||
NotesThreadMutingCreateRequest,
|
||||
NotesThreadMutingDeleteRequest,
|
||||
NotesTimelineRequest,
|
||||
NotesTimelineResponse,
|
||||
NotesTranslateRequest,
|
||||
NotesTranslateResponse,
|
||||
NotesUnrenoteRequest,
|
||||
NotesUserListTimelineRequest,
|
||||
NotesUserListTimelineResponse,
|
||||
NotificationsCreateRequest,
|
||||
PagePushRequest,
|
||||
PagesCreateRequest,
|
||||
PagesCreateResponse,
|
||||
PagesDeleteRequest,
|
||||
PagesFeaturedResponse,
|
||||
PagesLikeRequest,
|
||||
PagesShowRequest,
|
||||
PagesShowResponse,
|
||||
PagesUnlikeRequest,
|
||||
PagesUpdateRequest,
|
||||
FlashCreateRequest,
|
||||
FlashDeleteRequest,
|
||||
FlashFeaturedResponse,
|
||||
FlashLikeRequest,
|
||||
FlashShowRequest,
|
||||
FlashShowResponse,
|
||||
FlashUnlikeRequest,
|
||||
FlashUpdateRequest,
|
||||
FlashMyRequest,
|
||||
FlashMyResponse,
|
||||
FlashMyLikesRequest,
|
||||
FlashMyLikesResponse,
|
||||
PingResponse,
|
||||
PinnedUsersResponse,
|
||||
PromoReadRequest,
|
||||
RolesListResponse,
|
||||
RolesShowRequest,
|
||||
RolesShowResponse,
|
||||
RolesUsersRequest,
|
||||
RolesNotesRequest,
|
||||
RolesNotesResponse,
|
||||
RequestResetPasswordRequest,
|
||||
ResetPasswordRequest,
|
||||
StatsResponse,
|
||||
SwShowRegistrationRequest,
|
||||
SwShowRegistrationResponse,
|
||||
SwUpdateRegistrationRequest,
|
||||
SwUpdateRegistrationResponse,
|
||||
SwRegisterRequest,
|
||||
SwRegisterResponse,
|
||||
SwUnregisterRequest,
|
||||
TestRequest,
|
||||
UsernameAvailableRequest,
|
||||
UsernameAvailableResponse,
|
||||
UsersRequest,
|
||||
UsersResponse,
|
||||
UsersClipsRequest,
|
||||
UsersClipsResponse,
|
||||
UsersFollowersRequest,
|
||||
UsersFollowersResponse,
|
||||
UsersFollowingRequest,
|
||||
UsersFollowingResponse,
|
||||
UsersGalleryPostsRequest,
|
||||
UsersGalleryPostsResponse,
|
||||
UsersGetFrequentlyRepliedUsersRequest,
|
||||
UsersGetFrequentlyRepliedUsersResponse,
|
||||
UsersFeaturedNotesRequest,
|
||||
UsersFeaturedNotesResponse,
|
||||
UsersListsCreateRequest,
|
||||
UsersListsCreateResponse,
|
||||
UsersListsDeleteRequest,
|
||||
UsersListsListRequest,
|
||||
UsersListsListResponse,
|
||||
UsersListsPullRequest,
|
||||
UsersListsPushRequest,
|
||||
UsersListsShowRequest,
|
||||
UsersListsShowResponse,
|
||||
UsersListsFavoriteRequest,
|
||||
UsersListsUnfavoriteRequest,
|
||||
UsersListsUpdateRequest,
|
||||
UsersListsUpdateResponse,
|
||||
UsersListsCreateFromPublicRequest,
|
||||
UsersListsCreateFromPublicResponse,
|
||||
UsersListsUpdateMembershipRequest,
|
||||
UsersListsGetMembershipsRequest,
|
||||
UsersNotesRequest,
|
||||
UsersNotesResponse,
|
||||
UsersPagesRequest,
|
||||
UsersPagesResponse,
|
||||
UsersFlashsRequest,
|
||||
UsersFlashsResponse,
|
||||
UsersReactionsRequest,
|
||||
UsersReactionsResponse,
|
||||
UsersRecommendationRequest,
|
||||
UsersRecommendationResponse,
|
||||
UsersRelationRequest,
|
||||
UsersRelationResponse,
|
||||
UsersReportAbuseRequest,
|
||||
UsersSearchByUsernameAndHostRequest,
|
||||
UsersSearchByUsernameAndHostResponse,
|
||||
UsersSearchRequest,
|
||||
UsersSearchResponse,
|
||||
UsersShowRequest,
|
||||
UsersShowResponse,
|
||||
UsersAchievementsRequest,
|
||||
UsersUpdateMemoRequest,
|
||||
FetchRssRequest,
|
||||
FetchExternalResourcesRequest,
|
||||
RetentionResponse,
|
||||
} from './entities.js';
|
||||
|
||||
export type Endpoints = {
|
||||
'admin/meta': { req: EmptyRequest; res: AdminMetaResponse };
|
||||
'admin/abuse-user-reports': { req: AdminAbuseUserReportsRequest; res: AdminAbuseUserReportsResponse };
|
||||
'admin/accounts/create': { req: AdminAccountsCreateRequest; res: AdminAccountsCreateResponse };
|
||||
'admin/accounts/delete': { req: AdminAccountsDeleteRequest; res: EmptyResponse };
|
||||
'admin/accounts/find-by-email': { req: AdminAccountsFindByEmailRequest; res: EmptyResponse };
|
||||
'admin/ad/create': { req: AdminAdCreateRequest; res: EmptyResponse };
|
||||
'admin/ad/delete': { req: AdminAdDeleteRequest; res: EmptyResponse };
|
||||
'admin/ad/list': { req: AdminAdListRequest; res: EmptyResponse };
|
||||
'admin/ad/update': { req: AdminAdUpdateRequest; res: EmptyResponse };
|
||||
'admin/announcements/create': { req: AdminAnnouncementsCreateRequest; res: AdminAnnouncementsCreateResponse };
|
||||
'admin/announcements/delete': { req: AdminAnnouncementsDeleteRequest; res: EmptyResponse };
|
||||
'admin/announcements/list': { req: AdminAnnouncementsListRequest; res: AdminAnnouncementsListResponse };
|
||||
'admin/announcements/update': { req: AdminAnnouncementsUpdateRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/create': { req: AdminAvatarDecorationsCreateRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/delete': { req: AdminAvatarDecorationsDeleteRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/list': { req: AdminAvatarDecorationsListRequest; res: AdminAvatarDecorationsListResponse };
|
||||
'admin/avatar-decorations/update': { req: AdminAvatarDecorationsUpdateRequest; res: EmptyResponse };
|
||||
'admin/delete-all-files-of-a-user': { req: AdminDeleteAllFilesOfAUserRequest; res: EmptyResponse };
|
||||
'admin/unset-user-avatar': { req: AdminUnsetUserAvatarRequest; res: EmptyResponse };
|
||||
'admin/unset-user-banner': { req: AdminUnsetUserBannerRequest; res: EmptyResponse };
|
||||
'admin/drive/clean-remote-files': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/drive/cleanup': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/drive/files': { req: AdminDriveFilesRequest; res: AdminDriveFilesResponse };
|
||||
'admin/drive/show-file': { req: AdminDriveShowFileRequest; res: AdminDriveShowFileResponse };
|
||||
'admin/emoji/add-aliases-bulk': { req: AdminEmojiAddAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/add': { req: AdminEmojiAddRequest; res: EmptyResponse };
|
||||
'admin/emoji/copy': { req: AdminEmojiCopyRequest; res: AdminEmojiCopyResponse };
|
||||
'admin/emoji/delete-bulk': { req: AdminEmojiDeleteBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/delete': { req: AdminEmojiDeleteRequest; res: EmptyResponse };
|
||||
'admin/emoji/import-zip': { req: AdminEmojiImportZipRequest; res: EmptyResponse };
|
||||
'admin/emoji/list-remote': { req: AdminEmojiListRemoteRequest; res: AdminEmojiListRemoteResponse };
|
||||
'admin/emoji/list': { req: AdminEmojiListRequest; res: AdminEmojiListResponse };
|
||||
'admin/emoji/remove-aliases-bulk': { req: AdminEmojiRemoveAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-aliases-bulk': { req: AdminEmojiSetAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-category-bulk': { req: AdminEmojiSetCategoryBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-license-bulk': { req: AdminEmojiSetLicenseBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/update': { req: AdminEmojiUpdateRequest; res: EmptyResponse };
|
||||
'admin/federation/delete-all-files': { req: AdminFederationDeleteAllFilesRequest; res: EmptyResponse };
|
||||
'admin/federation/refresh-remote-instance-metadata': { req: AdminFederationRefreshRemoteInstanceMetadataRequest; res: EmptyResponse };
|
||||
'admin/federation/remove-all-following': { req: AdminFederationRemoveAllFollowingRequest; res: EmptyResponse };
|
||||
'admin/federation/update-instance': { req: AdminFederationUpdateInstanceRequest; res: EmptyResponse };
|
||||
'admin/get-index-stats': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/get-table-stats': { req: EmptyRequest; res: AdminGetTableStatsResponse };
|
||||
'admin/get-user-ips': { req: AdminGetUserIpsRequest; res: EmptyResponse };
|
||||
'admin/invite/create': { req: AdminInviteCreateRequest; res: AdminInviteCreateResponse };
|
||||
'admin/invite/list': { req: AdminInviteListRequest; res: AdminInviteListResponse };
|
||||
'admin/promo/create': { req: AdminPromoCreateRequest; res: EmptyResponse };
|
||||
'admin/queue/clear': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/queue/deliver-delayed': { req: EmptyRequest; res: AdminQueueDeliverDelayedResponse };
|
||||
'admin/queue/inbox-delayed': { req: EmptyRequest; res: AdminQueueInboxDelayedResponse };
|
||||
'admin/queue/promote': { req: AdminQueuePromoteRequest; res: EmptyResponse };
|
||||
'admin/queue/stats': { req: EmptyRequest; res: AdminQueueStatsResponse };
|
||||
'admin/relays/add': { req: AdminRelaysAddRequest; res: AdminRelaysAddResponse };
|
||||
'admin/relays/list': { req: EmptyRequest; res: AdminRelaysListResponse };
|
||||
'admin/relays/remove': { req: AdminRelaysRemoveRequest; res: EmptyResponse };
|
||||
'admin/reset-password': { req: AdminResetPasswordRequest; res: AdminResetPasswordResponse };
|
||||
'admin/resolve-abuse-user-report': { req: AdminResolveAbuseUserReportRequest; res: EmptyResponse };
|
||||
'admin/send-email': { req: AdminSendEmailRequest; res: EmptyResponse };
|
||||
'admin/server-info': { req: EmptyRequest; res: AdminServerInfoResponse };
|
||||
'admin/show-moderation-logs': { req: AdminShowModerationLogsRequest; res: AdminShowModerationLogsResponse };
|
||||
'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse };
|
||||
'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse };
|
||||
'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse };
|
||||
'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse };
|
||||
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
|
||||
'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse };
|
||||
'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse };
|
||||
'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse };
|
||||
'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse };
|
||||
'admin/roles/list': { req: EmptyRequest; res: AdminRolesListResponse };
|
||||
'admin/roles/show': { req: AdminRolesShowRequest; res: AdminRolesShowResponse };
|
||||
'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse };
|
||||
'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse };
|
||||
'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse };
|
||||
'admin/roles/update-default-policies': { req: AdminRolesUpdateDefaultPoliciesRequest; res: EmptyResponse };
|
||||
'admin/roles/users': { req: AdminRolesUsersRequest; res: EmptyResponse };
|
||||
'announcements': { req: AnnouncementsRequest; res: AnnouncementsResponse };
|
||||
'antennas/create': { req: AntennasCreateRequest; res: AntennasCreateResponse };
|
||||
'antennas/delete': { req: AntennasDeleteRequest; res: EmptyResponse };
|
||||
'antennas/list': { req: EmptyRequest; res: AntennasListResponse };
|
||||
'antennas/notes': { req: AntennasNotesRequest; res: AntennasNotesResponse };
|
||||
'antennas/show': { req: AntennasShowRequest; res: AntennasShowResponse };
|
||||
'antennas/update': { req: AntennasUpdateRequest; res: AntennasUpdateResponse };
|
||||
'ap/get': { req: ApGetRequest; res: ApGetResponse };
|
||||
'ap/show': { req: ApShowRequest; res: ApShowResponse };
|
||||
'app/create': { req: AppCreateRequest; res: AppCreateResponse };
|
||||
'app/show': { req: AppShowRequest; res: AppShowResponse };
|
||||
'auth/accept': { req: AuthAcceptRequest; res: EmptyResponse };
|
||||
'auth/session/generate': { req: AuthSessionGenerateRequest; res: AuthSessionGenerateResponse };
|
||||
'auth/session/show': { req: AuthSessionShowRequest; res: AuthSessionShowResponse };
|
||||
'auth/session/userkey': { req: AuthSessionUserkeyRequest; res: AuthSessionUserkeyResponse };
|
||||
'blocking/create': { req: BlockingCreateRequest; res: BlockingCreateResponse };
|
||||
'blocking/delete': { req: BlockingDeleteRequest; res: BlockingDeleteResponse };
|
||||
'blocking/list': { req: BlockingListRequest; res: BlockingListResponse };
|
||||
'channels/create': { req: ChannelsCreateRequest; res: ChannelsCreateResponse };
|
||||
'channels/featured': { req: EmptyRequest; res: ChannelsFeaturedResponse };
|
||||
'channels/follow': { req: ChannelsFollowRequest; res: EmptyResponse };
|
||||
'channels/followed': { req: ChannelsFollowedRequest; res: ChannelsFollowedResponse };
|
||||
'channels/owned': { req: ChannelsOwnedRequest; res: ChannelsOwnedResponse };
|
||||
'channels/show': { req: ChannelsShowRequest; res: ChannelsShowResponse };
|
||||
'channels/timeline': { req: ChannelsTimelineRequest; res: ChannelsTimelineResponse };
|
||||
'channels/unfollow': { req: ChannelsUnfollowRequest; res: EmptyResponse };
|
||||
'channels/update': { req: ChannelsUpdateRequest; res: ChannelsUpdateResponse };
|
||||
'channels/favorite': { req: ChannelsFavoriteRequest; res: EmptyResponse };
|
||||
'channels/unfavorite': { req: ChannelsUnfavoriteRequest; res: EmptyResponse };
|
||||
'channels/my-favorites': { req: EmptyRequest; res: ChannelsMyFavoritesResponse };
|
||||
'channels/search': { req: ChannelsSearchRequest; res: ChannelsSearchResponse };
|
||||
'charts/active-users': { req: ChartsActiveUsersRequest; res: ChartsActiveUsersResponse };
|
||||
'charts/ap-request': { req: ChartsApRequestRequest; res: ChartsApRequestResponse };
|
||||
'charts/drive': { req: ChartsDriveRequest; res: ChartsDriveResponse };
|
||||
'charts/federation': { req: ChartsFederationRequest; res: ChartsFederationResponse };
|
||||
'charts/instance': { req: ChartsInstanceRequest; res: ChartsInstanceResponse };
|
||||
'charts/notes': { req: ChartsNotesRequest; res: ChartsNotesResponse };
|
||||
'charts/user/drive': { req: ChartsUserDriveRequest; res: ChartsUserDriveResponse };
|
||||
'charts/user/following': { req: ChartsUserFollowingRequest; res: ChartsUserFollowingResponse };
|
||||
'charts/user/notes': { req: ChartsUserNotesRequest; res: ChartsUserNotesResponse };
|
||||
'charts/user/pv': { req: ChartsUserPvRequest; res: ChartsUserPvResponse };
|
||||
'charts/user/reactions': { req: ChartsUserReactionsRequest; res: ChartsUserReactionsResponse };
|
||||
'charts/users': { req: ChartsUsersRequest; res: ChartsUsersResponse };
|
||||
'clips/add-note': { req: ClipsAddNoteRequest; res: EmptyResponse };
|
||||
'clips/remove-note': { req: ClipsRemoveNoteRequest; res: EmptyResponse };
|
||||
'clips/create': { req: ClipsCreateRequest; res: ClipsCreateResponse };
|
||||
'clips/delete': { req: ClipsDeleteRequest; res: EmptyResponse };
|
||||
'clips/list': { req: EmptyRequest; res: ClipsListResponse };
|
||||
'clips/notes': { req: ClipsNotesRequest; res: ClipsNotesResponse };
|
||||
'clips/show': { req: ClipsShowRequest; res: ClipsShowResponse };
|
||||
'clips/update': { req: ClipsUpdateRequest; res: ClipsUpdateResponse };
|
||||
'clips/favorite': { req: ClipsFavoriteRequest; res: EmptyResponse };
|
||||
'clips/unfavorite': { req: ClipsUnfavoriteRequest; res: EmptyResponse };
|
||||
'clips/my-favorites': { req: EmptyRequest; res: ClipsMyFavoritesResponse };
|
||||
'drive': { req: EmptyRequest; res: DriveResponse };
|
||||
'drive/files': { req: DriveFilesRequest; res: DriveFilesResponse };
|
||||
'drive/files/attached-notes': { req: DriveFilesAttachedNotesRequest; res: DriveFilesAttachedNotesResponse };
|
||||
'drive/files/check-existence': { req: DriveFilesCheckExistenceRequest; res: DriveFilesCheckExistenceResponse };
|
||||
'drive/files/create': { req: DriveFilesCreateRequest; res: DriveFilesCreateResponse };
|
||||
'drive/files/delete': { req: DriveFilesDeleteRequest; res: EmptyResponse };
|
||||
'drive/files/find-by-hash': { req: DriveFilesFindByHashRequest; res: DriveFilesFindByHashResponse };
|
||||
'drive/files/find': { req: DriveFilesFindRequest; res: DriveFilesFindResponse };
|
||||
'drive/files/show': { req: DriveFilesShowRequest; res: DriveFilesShowResponse };
|
||||
'drive/files/update': { req: DriveFilesUpdateRequest; res: DriveFilesUpdateResponse };
|
||||
'drive/files/upload-from-url': { req: DriveFilesUploadFromUrlRequest; res: EmptyResponse };
|
||||
'drive/folders': { req: DriveFoldersRequest; res: DriveFoldersResponse };
|
||||
'drive/folders/create': { req: DriveFoldersCreateRequest; res: DriveFoldersCreateResponse };
|
||||
'drive/folders/delete': { req: DriveFoldersDeleteRequest; res: EmptyResponse };
|
||||
'drive/folders/find': { req: DriveFoldersFindRequest; res: DriveFoldersFindResponse };
|
||||
'drive/folders/show': { req: DriveFoldersShowRequest; res: DriveFoldersShowResponse };
|
||||
'drive/folders/update': { req: DriveFoldersUpdateRequest; res: DriveFoldersUpdateResponse };
|
||||
'drive/stream': { req: DriveStreamRequest; res: DriveStreamResponse };
|
||||
'email-address/available': { req: EmailAddressAvailableRequest; res: EmailAddressAvailableResponse };
|
||||
'endpoint': { req: EndpointRequest; res: EmptyResponse };
|
||||
'endpoints': { req: EmptyRequest; res: EndpointsResponse };
|
||||
'export-custom-emojis': { req: EmptyRequest; res: EmptyResponse };
|
||||
'federation/followers': { req: FederationFollowersRequest; res: FederationFollowersResponse };
|
||||
'federation/following': { req: FederationFollowingRequest; res: FederationFollowingResponse };
|
||||
'federation/instances': { req: FederationInstancesRequest; res: FederationInstancesResponse };
|
||||
'federation/show-instance': { req: FederationShowInstanceRequest; res: FederationShowInstanceResponse };
|
||||
'federation/update-remote-user': { req: FederationUpdateRemoteUserRequest; res: EmptyResponse };
|
||||
'federation/users': { req: FederationUsersRequest; res: FederationUsersResponse };
|
||||
'federation/stats': { req: FederationStatsRequest; res: EmptyResponse };
|
||||
'following/create': { req: FollowingCreateRequest; res: FollowingCreateResponse };
|
||||
'following/delete': { req: FollowingDeleteRequest; res: FollowingDeleteResponse };
|
||||
'following/update': { req: FollowingUpdateRequest; res: FollowingUpdateResponse };
|
||||
'following/update-all': { req: FollowingUpdateAllRequest; res: EmptyResponse };
|
||||
'following/invalidate': { req: FollowingInvalidateRequest; res: FollowingInvalidateResponse };
|
||||
'following/requests/accept': { req: FollowingRequestsAcceptRequest; res: EmptyResponse };
|
||||
'following/requests/cancel': { req: FollowingRequestsCancelRequest; res: FollowingRequestsCancelResponse };
|
||||
'following/requests/list': { req: FollowingRequestsListRequest; res: FollowingRequestsListResponse };
|
||||
'following/requests/reject': { req: FollowingRequestsRejectRequest; res: EmptyResponse };
|
||||
'gallery/featured': { req: GalleryFeaturedRequest; res: GalleryFeaturedResponse };
|
||||
'gallery/popular': { req: EmptyRequest; res: GalleryPopularResponse };
|
||||
'gallery/posts': { req: GalleryPostsRequest; res: GalleryPostsResponse };
|
||||
'gallery/posts/create': { req: GalleryPostsCreateRequest; res: GalleryPostsCreateResponse };
|
||||
'gallery/posts/delete': { req: GalleryPostsDeleteRequest; res: EmptyResponse };
|
||||
'gallery/posts/like': { req: GalleryPostsLikeRequest; res: EmptyResponse };
|
||||
'gallery/posts/show': { req: GalleryPostsShowRequest; res: GalleryPostsShowResponse };
|
||||
'gallery/posts/unlike': { req: GalleryPostsUnlikeRequest; res: EmptyResponse };
|
||||
'gallery/posts/update': { req: GalleryPostsUpdateRequest; res: GalleryPostsUpdateResponse };
|
||||
'get-online-users-count': { req: EmptyRequest; res: EmptyResponse };
|
||||
'get-avatar-decorations': { req: EmptyRequest; res: GetAvatarDecorationsResponse };
|
||||
'hashtags/list': { req: HashtagsListRequest; res: HashtagsListResponse };
|
||||
'hashtags/search': { req: HashtagsSearchRequest; res: HashtagsSearchResponse };
|
||||
'hashtags/show': { req: HashtagsShowRequest; res: HashtagsShowResponse };
|
||||
'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse };
|
||||
'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse };
|
||||
'i': { req: EmptyRequest; res: IResponse };
|
||||
'i/2fa/done': { req: I2faDoneRequest; res: EmptyResponse };
|
||||
'i/2fa/key-done': { req: I2faKeyDoneRequest; res: EmptyResponse };
|
||||
'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse };
|
||||
'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: EmptyResponse };
|
||||
'i/2fa/register': { req: I2faRegisterRequest; res: EmptyResponse };
|
||||
'i/2fa/update-key': { req: I2faUpdateKeyRequest; res: EmptyResponse };
|
||||
'i/2fa/remove-key': { req: I2faRemoveKeyRequest; res: EmptyResponse };
|
||||
'i/2fa/unregister': { req: I2faUnregisterRequest; res: EmptyResponse };
|
||||
'i/apps': { req: IAppsRequest; res: EmptyResponse };
|
||||
'i/authorized-apps': { req: IAuthorizedAppsRequest; res: EmptyResponse };
|
||||
'i/claim-achievement': { req: IClaimAchievementRequest; res: EmptyResponse };
|
||||
'i/change-password': { req: IChangePasswordRequest; res: EmptyResponse };
|
||||
'i/delete-account': { req: IDeleteAccountRequest; res: EmptyResponse };
|
||||
'i/export-blocking': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/export-following': { req: IExportFollowingRequest; res: EmptyResponse };
|
||||
'i/export-mute': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/export-notes': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/export-favorites': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/export-user-lists': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/export-antennas': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/favorites': { req: IFavoritesRequest; res: IFavoritesResponse };
|
||||
'i/gallery/likes': { req: IGalleryLikesRequest; res: IGalleryLikesResponse };
|
||||
'i/gallery/posts': { req: IGalleryPostsRequest; res: IGalleryPostsResponse };
|
||||
'i/import-blocking': { req: IImportBlockingRequest; res: EmptyResponse };
|
||||
'i/import-following': { req: IImportFollowingRequest; res: EmptyResponse };
|
||||
'i/import-muting': { req: IImportMutingRequest; res: EmptyResponse };
|
||||
'i/import-user-lists': { req: IImportUserListsRequest; res: EmptyResponse };
|
||||
'i/import-antennas': { req: IImportAntennasRequest; res: EmptyResponse };
|
||||
'i/notifications': { req: INotificationsRequest; res: INotificationsResponse };
|
||||
'i/notifications-grouped': { req: INotificationsGroupedRequest; res: INotificationsGroupedResponse };
|
||||
'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse };
|
||||
'i/pages': { req: IPagesRequest; res: IPagesResponse };
|
||||
'i/pin': { req: IPinRequest; res: IPinResponse };
|
||||
'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse };
|
||||
'i/regenerate-token': { req: IRegenerateTokenRequest; res: EmptyResponse };
|
||||
'i/registry/get-all': { req: IRegistryGetAllRequest; res: EmptyResponse };
|
||||
'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: EmptyResponse };
|
||||
'i/registry/get': { req: IRegistryGetRequest; res: EmptyResponse };
|
||||
'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: EmptyResponse };
|
||||
'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse };
|
||||
'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse };
|
||||
'i/registry/scopes-with-domain': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse };
|
||||
'i/revoke-token': { req: IRevokeTokenRequest; res: EmptyResponse };
|
||||
'i/signin-history': { req: ISigninHistoryRequest; res: ISigninHistoryResponse };
|
||||
'i/unpin': { req: IUnpinRequest; res: IUnpinResponse };
|
||||
'i/update-email': { req: IUpdateEmailRequest; res: EmptyResponse };
|
||||
'i/update': { req: IUpdateRequest; res: IUpdateResponse };
|
||||
'i/move': { req: IMoveRequest; res: EmptyResponse };
|
||||
'i/webhooks/create': { req: IWebhooksCreateRequest; res: EmptyResponse };
|
||||
'i/webhooks/list': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/webhooks/show': { req: IWebhooksShowRequest; res: EmptyResponse };
|
||||
'i/webhooks/update': { req: IWebhooksUpdateRequest; res: EmptyResponse };
|
||||
'i/webhooks/delete': { req: IWebhooksDeleteRequest; res: EmptyResponse };
|
||||
'invite/create': { req: EmptyRequest; res: InviteCreateResponse };
|
||||
'invite/delete': { req: InviteDeleteRequest; res: EmptyResponse };
|
||||
'invite/list': { req: InviteListRequest; res: InviteListResponse };
|
||||
'invite/limit': { req: EmptyRequest; res: InviteLimitResponse };
|
||||
'meta': { req: MetaRequest; res: MetaResponse };
|
||||
'emojis': { req: EmptyRequest; res: EmojisResponse };
|
||||
'emoji': { req: EmojiRequest; res: EmojiResponse };
|
||||
'miauth/gen-token': { req: MiauthGenTokenRequest; res: MiauthGenTokenResponse };
|
||||
'mute/create': { req: MuteCreateRequest; res: EmptyResponse };
|
||||
'mute/delete': { req: MuteDeleteRequest; res: EmptyResponse };
|
||||
'mute/list': { req: MuteListRequest; res: MuteListResponse };
|
||||
'renote-mute/create': { req: RenoteMuteCreateRequest; res: EmptyResponse };
|
||||
'renote-mute/delete': { req: RenoteMuteDeleteRequest; res: EmptyResponse };
|
||||
'renote-mute/list': { req: RenoteMuteListRequest; res: RenoteMuteListResponse };
|
||||
'my/apps': { req: MyAppsRequest; res: MyAppsResponse };
|
||||
'notes': { req: NotesRequest; res: NotesResponse };
|
||||
'notes/children': { req: NotesChildrenRequest; res: NotesChildrenResponse };
|
||||
'notes/clips': { req: NotesClipsRequest; res: NotesClipsResponse };
|
||||
'notes/conversation': { req: NotesConversationRequest; res: NotesConversationResponse };
|
||||
'notes/create': { req: NotesCreateRequest; res: NotesCreateResponse };
|
||||
'notes/delete': { req: NotesDeleteRequest; res: EmptyResponse };
|
||||
'notes/favorites/create': { req: NotesFavoritesCreateRequest; res: EmptyResponse };
|
||||
'notes/favorites/delete': { req: NotesFavoritesDeleteRequest; res: EmptyResponse };
|
||||
'notes/featured': { req: NotesFeaturedRequest; res: NotesFeaturedResponse };
|
||||
'notes/global-timeline': { req: NotesGlobalTimelineRequest; res: NotesGlobalTimelineResponse };
|
||||
'notes/hybrid-timeline': { req: NotesHybridTimelineRequest; res: NotesHybridTimelineResponse };
|
||||
'notes/local-timeline': { req: NotesLocalTimelineRequest; res: NotesLocalTimelineResponse };
|
||||
'notes/mentions': { req: NotesMentionsRequest; res: NotesMentionsResponse };
|
||||
'notes/polls/recommendation': { req: NotesPollsRecommendationRequest; res: NotesPollsRecommendationResponse };
|
||||
'notes/polls/vote': { req: NotesPollsVoteRequest; res: EmptyResponse };
|
||||
'notes/reactions': { req: NotesReactionsRequest; res: NotesReactionsResponse };
|
||||
'notes/reactions/create': { req: NotesReactionsCreateRequest; res: EmptyResponse };
|
||||
'notes/reactions/delete': { req: NotesReactionsDeleteRequest; res: EmptyResponse };
|
||||
'notes/renotes': { req: NotesRenotesRequest; res: NotesRenotesResponse };
|
||||
'notes/replies': { req: NotesRepliesRequest; res: NotesRepliesResponse };
|
||||
'notes/search-by-tag': { req: NotesSearchByTagRequest; res: NotesSearchByTagResponse };
|
||||
'notes/search': { req: NotesSearchRequest; res: NotesSearchResponse };
|
||||
'notes/show': { req: NotesShowRequest; res: NotesShowResponse };
|
||||
'notes/state': { req: NotesStateRequest; res: NotesStateResponse };
|
||||
'notes/thread-muting/create': { req: NotesThreadMutingCreateRequest; res: EmptyResponse };
|
||||
'notes/thread-muting/delete': { req: NotesThreadMutingDeleteRequest; res: EmptyResponse };
|
||||
'notes/timeline': { req: NotesTimelineRequest; res: NotesTimelineResponse };
|
||||
'notes/translate': { req: NotesTranslateRequest; res: NotesTranslateResponse };
|
||||
'notes/unrenote': { req: NotesUnrenoteRequest; res: EmptyResponse };
|
||||
'notes/user-list-timeline': { req: NotesUserListTimelineRequest; res: NotesUserListTimelineResponse };
|
||||
'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse };
|
||||
'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse };
|
||||
'notifications/test-notification': { req: EmptyRequest; res: EmptyResponse };
|
||||
'page-push': { req: PagePushRequest; res: EmptyResponse };
|
||||
'pages/create': { req: PagesCreateRequest; res: PagesCreateResponse };
|
||||
'pages/delete': { req: PagesDeleteRequest; res: EmptyResponse };
|
||||
'pages/featured': { req: EmptyRequest; res: PagesFeaturedResponse };
|
||||
'pages/like': { req: PagesLikeRequest; res: EmptyResponse };
|
||||
'pages/show': { req: PagesShowRequest; res: PagesShowResponse };
|
||||
'pages/unlike': { req: PagesUnlikeRequest; res: EmptyResponse };
|
||||
'pages/update': { req: PagesUpdateRequest; res: EmptyResponse };
|
||||
'flash/create': { req: FlashCreateRequest; res: EmptyResponse };
|
||||
'flash/delete': { req: FlashDeleteRequest; res: EmptyResponse };
|
||||
'flash/featured': { req: EmptyRequest; res: FlashFeaturedResponse };
|
||||
'flash/like': { req: FlashLikeRequest; res: EmptyResponse };
|
||||
'flash/show': { req: FlashShowRequest; res: FlashShowResponse };
|
||||
'flash/unlike': { req: FlashUnlikeRequest; res: EmptyResponse };
|
||||
'flash/update': { req: FlashUpdateRequest; res: EmptyResponse };
|
||||
'flash/my': { req: FlashMyRequest; res: FlashMyResponse };
|
||||
'flash/my-likes': { req: FlashMyLikesRequest; res: FlashMyLikesResponse };
|
||||
'ping': { req: EmptyRequest; res: PingResponse };
|
||||
'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse };
|
||||
'promo/read': { req: PromoReadRequest; res: EmptyResponse };
|
||||
'roles/list': { req: EmptyRequest; res: RolesListResponse };
|
||||
'roles/show': { req: RolesShowRequest; res: RolesShowResponse };
|
||||
'roles/users': { req: RolesUsersRequest; res: EmptyResponse };
|
||||
'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse };
|
||||
'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse };
|
||||
'reset-db': { req: EmptyRequest; res: EmptyResponse };
|
||||
'reset-password': { req: ResetPasswordRequest; res: EmptyResponse };
|
||||
'server-info': { req: EmptyRequest; res: EmptyResponse };
|
||||
'stats': { req: EmptyRequest; res: StatsResponse };
|
||||
'sw/show-registration': { req: SwShowRegistrationRequest; res: SwShowRegistrationResponse };
|
||||
'sw/update-registration': { req: SwUpdateRegistrationRequest; res: SwUpdateRegistrationResponse };
|
||||
'sw/register': { req: SwRegisterRequest; res: SwRegisterResponse };
|
||||
'sw/unregister': { req: SwUnregisterRequest; res: EmptyResponse };
|
||||
'test': { req: TestRequest; res: EmptyResponse };
|
||||
'username/available': { req: UsernameAvailableRequest; res: UsernameAvailableResponse };
|
||||
'users': { req: UsersRequest; res: UsersResponse };
|
||||
'users/clips': { req: UsersClipsRequest; res: UsersClipsResponse };
|
||||
'users/followers': { req: UsersFollowersRequest; res: UsersFollowersResponse };
|
||||
'users/following': { req: UsersFollowingRequest; res: UsersFollowingResponse };
|
||||
'users/gallery/posts': { req: UsersGalleryPostsRequest; res: UsersGalleryPostsResponse };
|
||||
'users/get-frequently-replied-users': { req: UsersGetFrequentlyRepliedUsersRequest; res: UsersGetFrequentlyRepliedUsersResponse };
|
||||
'users/featured-notes': { req: UsersFeaturedNotesRequest; res: UsersFeaturedNotesResponse };
|
||||
'users/lists/create': { req: UsersListsCreateRequest; res: UsersListsCreateResponse };
|
||||
'users/lists/delete': { req: UsersListsDeleteRequest; res: EmptyResponse };
|
||||
'users/lists/list': { req: UsersListsListRequest; res: UsersListsListResponse };
|
||||
'users/lists/pull': { req: UsersListsPullRequest; res: EmptyResponse };
|
||||
'users/lists/push': { req: UsersListsPushRequest; res: EmptyResponse };
|
||||
'users/lists/show': { req: UsersListsShowRequest; res: UsersListsShowResponse };
|
||||
'users/lists/favorite': { req: UsersListsFavoriteRequest; res: EmptyResponse };
|
||||
'users/lists/unfavorite': { req: UsersListsUnfavoriteRequest; res: EmptyResponse };
|
||||
'users/lists/update': { req: UsersListsUpdateRequest; res: UsersListsUpdateResponse };
|
||||
'users/lists/create-from-public': { req: UsersListsCreateFromPublicRequest; res: UsersListsCreateFromPublicResponse };
|
||||
'users/lists/update-membership': { req: UsersListsUpdateMembershipRequest; res: EmptyResponse };
|
||||
'users/lists/get-memberships': { req: UsersListsGetMembershipsRequest; res: EmptyResponse };
|
||||
'users/notes': { req: UsersNotesRequest; res: UsersNotesResponse };
|
||||
'users/pages': { req: UsersPagesRequest; res: UsersPagesResponse };
|
||||
'users/flashs': { req: UsersFlashsRequest; res: UsersFlashsResponse };
|
||||
'users/reactions': { req: UsersReactionsRequest; res: UsersReactionsResponse };
|
||||
'users/recommendation': { req: UsersRecommendationRequest; res: UsersRecommendationResponse };
|
||||
'users/relation': { req: UsersRelationRequest; res: UsersRelationResponse };
|
||||
'users/report-abuse': { req: UsersReportAbuseRequest; res: EmptyResponse };
|
||||
'users/search-by-username-and-host': { req: UsersSearchByUsernameAndHostRequest; res: UsersSearchByUsernameAndHostResponse };
|
||||
'users/search': { req: UsersSearchRequest; res: UsersSearchResponse };
|
||||
'users/show': { req: UsersShowRequest; res: UsersShowResponse };
|
||||
'users/achievements': { req: UsersAchievementsRequest; res: EmptyResponse };
|
||||
'users/update-memo': { req: UsersUpdateMemoRequest; res: EmptyResponse };
|
||||
'fetch-rss': { req: FetchRssRequest; res: EmptyResponse };
|
||||
'fetch-external-resources': { req: FetchExternalResourcesRequest; res: EmptyResponse };
|
||||
'retention': { req: EmptyRequest; res: RetentionResponse };
|
||||
}
|
512
packages/misskey-js/src/autogen/entities.ts
Normal file
512
packages/misskey-js/src/autogen/entities.ts
Normal file
|
@ -0,0 +1,512 @@
|
|||
/*
|
||||
* version: 2023.11.0-beta.3
|
||||
* generatedAt: 2023-12-08T04:57:48.409Z
|
||||
*/
|
||||
|
||||
import { operations } from './types.js';
|
||||
|
||||
export type EmptyRequest = Record<string, unknown> | undefined;
|
||||
export type EmptyResponse = Record<string, unknown> | undefined;
|
||||
|
||||
export type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json'];
|
||||
export type AdminAbuseUserReportsRequest = operations['admin/abuse-user-reports']['requestBody']['content']['application/json'];
|
||||
export type AdminAbuseUserReportsResponse = operations['admin/abuse-user-reports']['responses']['200']['content']['application/json'];
|
||||
export type AdminAccountsCreateRequest = operations['admin/accounts/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAccountsCreateResponse = operations['admin/accounts/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminAccountsDeleteRequest = operations['admin/accounts/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAccountsFindByEmailRequest = operations['admin/accounts/find-by-email']['requestBody']['content']['application/json'];
|
||||
export type AdminAdCreateRequest = operations['admin/ad/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAdDeleteRequest = operations['admin/ad/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAdListRequest = operations['admin/ad/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAdUpdateRequest = operations['admin/ad/update']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsCreateRequest = operations['admin/announcements/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsCreateResponse = operations['admin/announcements/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminAnnouncementsDeleteRequest = operations['admin/announcements/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsListRequest = operations['admin/announcements/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsListResponse = operations['admin/announcements/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsDeleteRequest = operations['admin/avatar-decorations/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsListRequest = operations['admin/avatar-decorations/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsListResponse = operations['admin/avatar-decorations/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/update']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveFilesRequest = operations['admin/drive/files']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveFilesResponse = operations['admin/drive/files']['responses']['200']['content']['application/json'];
|
||||
export type AdminDriveShowFileRequest = operations['admin/drive/show-file']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveShowFileResponse = operations['admin/drive/show-file']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiAddAliasesBulkRequest = operations['admin/emoji/add-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiAddRequest = operations['admin/emoji/add']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListResponse = operations['admin/emoji/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiRemoveAliasesBulkRequest = operations['admin/emoji/remove-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetAliasesBulkRequest = operations['admin/emoji/set-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetCategoryBulkRequest = operations['admin/emoji/set-category-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetLicenseBulkRequest = operations['admin/emoji/set-license-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiUpdateRequest = operations['admin/emoji/update']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationDeleteAllFilesRequest = operations['admin/federation/delete-all-files']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json'];
|
||||
export type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteCreateRequest = operations['admin/invite/create']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteCreateResponse = operations['admin/invite/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminInviteListRequest = operations['admin/invite/list']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteListResponse = operations['admin/invite/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueDeliverDelayedResponse = operations['admin/queue/deliver-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueueInboxDelayedResponse = operations['admin/queue/inbox-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueuePromoteRequest = operations['admin/queue/promote']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueStatsResponse = operations['admin/queue/stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysAddRequest = operations['admin/relays/add']['requestBody']['content']['application/json'];
|
||||
export type AdminRelaysAddResponse = operations['admin/relays/add']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysListResponse = operations['admin/relays/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysRemoveRequest = operations['admin/relays/remove']['requestBody']['content']['application/json'];
|
||||
export type AdminResetPasswordRequest = operations['admin/reset-password']['requestBody']['content']['application/json'];
|
||||
export type AdminResetPasswordResponse = operations['admin/reset-password']['responses']['200']['content']['application/json'];
|
||||
export type AdminResolveAbuseUserReportRequest = operations['admin/resolve-abuse-user-report']['requestBody']['content']['application/json'];
|
||||
export type AdminSendEmailRequest = operations['admin/send-email']['requestBody']['content']['application/json'];
|
||||
export type AdminServerInfoResponse = operations['admin/server-info']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowModerationLogsRequest = operations['admin/show-moderation-logs']['requestBody']['content']['application/json'];
|
||||
export type AdminShowModerationLogsResponse = operations['admin/show-moderation-logs']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowUserRequest = operations['admin/show-user']['requestBody']['content']['application/json'];
|
||||
export type AdminShowUserResponse = operations['admin/show-user']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json'];
|
||||
export type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json'];
|
||||
export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
|
||||
export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json'];
|
||||
export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUpdateDefaultPoliciesRequest = operations['admin/roles/update-default-policies']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUsersRequest = operations['admin/roles/users']['requestBody']['content']['application/json'];
|
||||
export type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json'];
|
||||
export type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json'];
|
||||
export type AntennasCreateRequest = operations['antennas/create']['requestBody']['content']['application/json'];
|
||||
export type AntennasCreateResponse = operations['antennas/create']['responses']['200']['content']['application/json'];
|
||||
export type AntennasDeleteRequest = operations['antennas/delete']['requestBody']['content']['application/json'];
|
||||
export type AntennasListResponse = operations['antennas/list']['responses']['200']['content']['application/json'];
|
||||
export type AntennasNotesRequest = operations['antennas/notes']['requestBody']['content']['application/json'];
|
||||
export type AntennasNotesResponse = operations['antennas/notes']['responses']['200']['content']['application/json'];
|
||||
export type AntennasShowRequest = operations['antennas/show']['requestBody']['content']['application/json'];
|
||||
export type AntennasShowResponse = operations['antennas/show']['responses']['200']['content']['application/json'];
|
||||
export type AntennasUpdateRequest = operations['antennas/update']['requestBody']['content']['application/json'];
|
||||
export type AntennasUpdateResponse = operations['antennas/update']['responses']['200']['content']['application/json'];
|
||||
export type ApGetRequest = operations['ap/get']['requestBody']['content']['application/json'];
|
||||
export type ApGetResponse = operations['ap/get']['responses']['200']['content']['application/json'];
|
||||
export type ApShowRequest = operations['ap/show']['requestBody']['content']['application/json'];
|
||||
export type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json'];
|
||||
export type AppCreateRequest = operations['app/create']['requestBody']['content']['application/json'];
|
||||
export type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json'];
|
||||
export type AppShowRequest = operations['app/show']['requestBody']['content']['application/json'];
|
||||
export type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json'];
|
||||
export type AuthAcceptRequest = operations['auth/accept']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json'];
|
||||
export type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionShowResponse = operations['auth/session/show']['responses']['200']['content']['application/json'];
|
||||
export type AuthSessionUserkeyRequest = operations['auth/session/userkey']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionUserkeyResponse = operations['auth/session/userkey']['responses']['200']['content']['application/json'];
|
||||
export type BlockingCreateRequest = operations['blocking/create']['requestBody']['content']['application/json'];
|
||||
export type BlockingCreateResponse = operations['blocking/create']['responses']['200']['content']['application/json'];
|
||||
export type BlockingDeleteRequest = operations['blocking/delete']['requestBody']['content']['application/json'];
|
||||
export type BlockingDeleteResponse = operations['blocking/delete']['responses']['200']['content']['application/json'];
|
||||
export type BlockingListRequest = operations['blocking/list']['requestBody']['content']['application/json'];
|
||||
export type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsCreateRequest = operations['channels/create']['requestBody']['content']['application/json'];
|
||||
export type ChannelsCreateResponse = operations['channels/create']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFeaturedResponse = operations['channels/featured']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFollowRequest = operations['channels/follow']['requestBody']['content']['application/json'];
|
||||
export type ChannelsFollowedRequest = operations['channels/followed']['requestBody']['content']['application/json'];
|
||||
export type ChannelsFollowedResponse = operations['channels/followed']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsOwnedRequest = operations['channels/owned']['requestBody']['content']['application/json'];
|
||||
export type ChannelsOwnedResponse = operations['channels/owned']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsShowRequest = operations['channels/show']['requestBody']['content']['application/json'];
|
||||
export type ChannelsShowResponse = operations['channels/show']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsTimelineRequest = operations['channels/timeline']['requestBody']['content']['application/json'];
|
||||
export type ChannelsTimelineResponse = operations['channels/timeline']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsUnfollowRequest = operations['channels/unfollow']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUpdateRequest = operations['channels/update']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUpdateResponse = operations['channels/update']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFavoriteRequest = operations['channels/favorite']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUnfavoriteRequest = operations['channels/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type ChannelsMyFavoritesResponse = operations['channels/my-favorites']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsSearchRequest = operations['channels/search']['requestBody']['content']['application/json'];
|
||||
export type ChannelsSearchResponse = operations['channels/search']['responses']['200']['content']['application/json'];
|
||||
export type ChartsActiveUsersRequest = operations['charts/active-users']['requestBody']['content']['application/json'];
|
||||
export type ChartsActiveUsersResponse = operations['charts/active-users']['responses']['200']['content']['application/json'];
|
||||
export type ChartsApRequestRequest = operations['charts/ap-request']['requestBody']['content']['application/json'];
|
||||
export type ChartsApRequestResponse = operations['charts/ap-request']['responses']['200']['content']['application/json'];
|
||||
export type ChartsDriveRequest = operations['charts/drive']['requestBody']['content']['application/json'];
|
||||
export type ChartsDriveResponse = operations['charts/drive']['responses']['200']['content']['application/json'];
|
||||
export type ChartsFederationRequest = operations['charts/federation']['requestBody']['content']['application/json'];
|
||||
export type ChartsFederationResponse = operations['charts/federation']['responses']['200']['content']['application/json'];
|
||||
export type ChartsInstanceRequest = operations['charts/instance']['requestBody']['content']['application/json'];
|
||||
export type ChartsInstanceResponse = operations['charts/instance']['responses']['200']['content']['application/json'];
|
||||
export type ChartsNotesRequest = operations['charts/notes']['requestBody']['content']['application/json'];
|
||||
export type ChartsNotesResponse = operations['charts/notes']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserDriveRequest = operations['charts/user/drive']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserDriveResponse = operations['charts/user/drive']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserFollowingRequest = operations['charts/user/following']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserFollowingResponse = operations['charts/user/following']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserNotesRequest = operations['charts/user/notes']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserNotesResponse = operations['charts/user/notes']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserPvRequest = operations['charts/user/pv']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserPvResponse = operations['charts/user/pv']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserReactionsRequest = operations['charts/user/reactions']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserReactionsResponse = operations['charts/user/reactions']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUsersRequest = operations['charts/users']['requestBody']['content']['application/json'];
|
||||
export type ChartsUsersResponse = operations['charts/users']['responses']['200']['content']['application/json'];
|
||||
export type ClipsAddNoteRequest = operations['clips/add-note']['requestBody']['content']['application/json'];
|
||||
export type ClipsRemoveNoteRequest = operations['clips/remove-note']['requestBody']['content']['application/json'];
|
||||
export type ClipsCreateRequest = operations['clips/create']['requestBody']['content']['application/json'];
|
||||
export type ClipsCreateResponse = operations['clips/create']['responses']['200']['content']['application/json'];
|
||||
export type ClipsDeleteRequest = operations['clips/delete']['requestBody']['content']['application/json'];
|
||||
export type ClipsListResponse = operations['clips/list']['responses']['200']['content']['application/json'];
|
||||
export type ClipsNotesRequest = operations['clips/notes']['requestBody']['content']['application/json'];
|
||||
export type ClipsNotesResponse = operations['clips/notes']['responses']['200']['content']['application/json'];
|
||||
export type ClipsShowRequest = operations['clips/show']['requestBody']['content']['application/json'];
|
||||
export type ClipsShowResponse = operations['clips/show']['responses']['200']['content']['application/json'];
|
||||
export type ClipsUpdateRequest = operations['clips/update']['requestBody']['content']['application/json'];
|
||||
export type ClipsUpdateResponse = operations['clips/update']['responses']['200']['content']['application/json'];
|
||||
export type ClipsFavoriteRequest = operations['clips/favorite']['requestBody']['content']['application/json'];
|
||||
export type ClipsUnfavoriteRequest = operations['clips/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type ClipsMyFavoritesResponse = operations['clips/my-favorites']['responses']['200']['content']['application/json'];
|
||||
export type DriveResponse = operations['drive']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesRequest = operations['drive/files']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesResponse = operations['drive/files']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesAttachedNotesRequest = operations['drive/files/attached-notes']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesAttachedNotesResponse = operations['drive/files/attached-notes']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesCheckExistenceRequest = operations['drive/files/check-existence']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesCheckExistenceResponse = operations['drive/files/check-existence']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesCreateRequest = operations['drive/files/create']['requestBody']['content']['multipart/form-data'];
|
||||
export type DriveFilesCreateResponse = operations['drive/files/create']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesDeleteRequest = operations['drive/files/delete']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindByHashRequest = operations['drive/files/find-by-hash']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindByHashResponse = operations['drive/files/find-by-hash']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesFindRequest = operations['drive/files/find']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindResponse = operations['drive/files/find']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesShowRequest = operations['drive/files/show']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesShowResponse = operations['drive/files/show']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesUpdateRequest = operations['drive/files/update']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesUpdateResponse = operations['drive/files/update']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesUploadFromUrlRequest = operations['drive/files/upload-from-url']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersRequest = operations['drive/folders']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersResponse = operations['drive/folders']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersCreateRequest = operations['drive/folders/create']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersCreateResponse = operations['drive/folders/create']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersDeleteRequest = operations['drive/folders/delete']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersFindRequest = operations['drive/folders/find']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersFindResponse = operations['drive/folders/find']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersShowRequest = operations['drive/folders/show']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersShowResponse = operations['drive/folders/show']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersUpdateRequest = operations['drive/folders/update']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersUpdateResponse = operations['drive/folders/update']['responses']['200']['content']['application/json'];
|
||||
export type DriveStreamRequest = operations['drive/stream']['requestBody']['content']['application/json'];
|
||||
export type DriveStreamResponse = operations['drive/stream']['responses']['200']['content']['application/json'];
|
||||
export type EmailAddressAvailableRequest = operations['email-address/available']['requestBody']['content']['application/json'];
|
||||
export type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json'];
|
||||
export type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json'];
|
||||
export type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json'];
|
||||
export type FederationFollowersRequest = operations['federation/followers']['requestBody']['content']['application/json'];
|
||||
export type FederationFollowersResponse = operations['federation/followers']['responses']['200']['content']['application/json'];
|
||||
export type FederationFollowingRequest = operations['federation/following']['requestBody']['content']['application/json'];
|
||||
export type FederationFollowingResponse = operations['federation/following']['responses']['200']['content']['application/json'];
|
||||
export type FederationInstancesRequest = operations['federation/instances']['requestBody']['content']['application/json'];
|
||||
export type FederationInstancesResponse = operations['federation/instances']['responses']['200']['content']['application/json'];
|
||||
export type FederationShowInstanceRequest = operations['federation/show-instance']['requestBody']['content']['application/json'];
|
||||
export type FederationShowInstanceResponse = operations['federation/show-instance']['responses']['200']['content']['application/json'];
|
||||
export type FederationUpdateRemoteUserRequest = operations['federation/update-remote-user']['requestBody']['content']['application/json'];
|
||||
export type FederationUsersRequest = operations['federation/users']['requestBody']['content']['application/json'];
|
||||
export type FederationUsersResponse = operations['federation/users']['responses']['200']['content']['application/json'];
|
||||
export type FederationStatsRequest = operations['federation/stats']['requestBody']['content']['application/json'];
|
||||
export type FollowingCreateRequest = operations['following/create']['requestBody']['content']['application/json'];
|
||||
export type FollowingCreateResponse = operations['following/create']['responses']['200']['content']['application/json'];
|
||||
export type FollowingDeleteRequest = operations['following/delete']['requestBody']['content']['application/json'];
|
||||
export type FollowingDeleteResponse = operations['following/delete']['responses']['200']['content']['application/json'];
|
||||
export type FollowingUpdateRequest = operations['following/update']['requestBody']['content']['application/json'];
|
||||
export type FollowingUpdateResponse = operations['following/update']['responses']['200']['content']['application/json'];
|
||||
export type FollowingUpdateAllRequest = operations['following/update-all']['requestBody']['content']['application/json'];
|
||||
export type FollowingInvalidateRequest = operations['following/invalidate']['requestBody']['content']['application/json'];
|
||||
export type FollowingInvalidateResponse = operations['following/invalidate']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsAcceptRequest = operations['following/requests/accept']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsCancelRequest = operations['following/requests/cancel']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsCancelResponse = operations['following/requests/cancel']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsListRequest = operations['following/requests/list']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsListResponse = operations['following/requests/list']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsRejectRequest = operations['following/requests/reject']['requestBody']['content']['application/json'];
|
||||
export type GalleryFeaturedRequest = operations['gallery/featured']['requestBody']['content']['application/json'];
|
||||
export type GalleryFeaturedResponse = operations['gallery/featured']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPopularResponse = operations['gallery/popular']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsRequest = operations['gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsResponse = operations['gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsCreateRequest = operations['gallery/posts/create']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsCreateResponse = operations['gallery/posts/create']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsDeleteRequest = operations['gallery/posts/delete']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsLikeRequest = operations['gallery/posts/like']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsShowRequest = operations['gallery/posts/show']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsShowResponse = operations['gallery/posts/show']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsUnlikeRequest = operations['gallery/posts/unlike']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsUpdateRequest = operations['gallery/posts/update']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsUpdateResponse = operations['gallery/posts/update']['responses']['200']['content']['application/json'];
|
||||
export type GetAvatarDecorationsResponse = operations['get-avatar-decorations']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsListRequest = operations['hashtags/list']['requestBody']['content']['application/json'];
|
||||
export type HashtagsListResponse = operations['hashtags/list']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsSearchRequest = operations['hashtags/search']['requestBody']['content']['application/json'];
|
||||
export type HashtagsSearchResponse = operations['hashtags/search']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsShowRequest = operations['hashtags/show']['requestBody']['content']['application/json'];
|
||||
export type HashtagsShowResponse = operations['hashtags/show']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsTrendResponse = operations['hashtags/trend']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json'];
|
||||
export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json'];
|
||||
export type IResponse = operations['i']['responses']['200']['content']['application/json'];
|
||||
export type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
|
||||
export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
|
||||
export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json'];
|
||||
export type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json'];
|
||||
export type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json'];
|
||||
export type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json'];
|
||||
export type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json'];
|
||||
export type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json'];
|
||||
export type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json'];
|
||||
export type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json'];
|
||||
export type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json'];
|
||||
export type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json'];
|
||||
export type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json'];
|
||||
export type IExportFollowingRequest = operations['i/export-following']['requestBody']['content']['application/json'];
|
||||
export type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json'];
|
||||
export type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json'];
|
||||
export type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json'];
|
||||
export type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json'];
|
||||
export type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json'];
|
||||
export type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json'];
|
||||
export type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json'];
|
||||
export type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json'];
|
||||
export type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['content']['application/json'];
|
||||
export type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json'];
|
||||
export type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json'];
|
||||
export type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json'];
|
||||
export type INotificationsGroupedResponse = operations['i/notifications-grouped']['responses']['200']['content']['application/json'];
|
||||
export type IPageLikesRequest = operations['i/page-likes']['requestBody']['content']['application/json'];
|
||||
export type IPageLikesResponse = operations['i/page-likes']['responses']['200']['content']['application/json'];
|
||||
export type IPagesRequest = operations['i/pages']['requestBody']['content']['application/json'];
|
||||
export type IPagesResponse = operations['i/pages']['responses']['200']['content']['application/json'];
|
||||
export type IPinRequest = operations['i/pin']['requestBody']['content']['application/json'];
|
||||
export type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json'];
|
||||
export type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json'];
|
||||
export type IRegenerateTokenRequest = operations['i/regenerate-token']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json'];
|
||||
export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json'];
|
||||
export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
|
||||
export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json'];
|
||||
export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json'];
|
||||
export type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json'];
|
||||
export type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json'];
|
||||
export type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['content']['application/json'];
|
||||
export type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json'];
|
||||
export type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json'];
|
||||
export type IUpdateEmailRequest = operations['i/update-email']['requestBody']['content']['application/json'];
|
||||
export type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json'];
|
||||
export type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json'];
|
||||
export type IMoveRequest = operations['i/move']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksDeleteRequest = operations['i/webhooks/delete']['requestBody']['content']['application/json'];
|
||||
export type InviteCreateResponse = operations['invite/create']['responses']['200']['content']['application/json'];
|
||||
export type InviteDeleteRequest = operations['invite/delete']['requestBody']['content']['application/json'];
|
||||
export type InviteListRequest = operations['invite/list']['requestBody']['content']['application/json'];
|
||||
export type InviteListResponse = operations['invite/list']['responses']['200']['content']['application/json'];
|
||||
export type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json'];
|
||||
export type MetaRequest = operations['meta']['requestBody']['content']['application/json'];
|
||||
export type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
|
||||
export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json'];
|
||||
export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json'];
|
||||
export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json'];
|
||||
export type MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json'];
|
||||
export type MiauthGenTokenResponse = operations['miauth/gen-token']['responses']['200']['content']['application/json'];
|
||||
export type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json'];
|
||||
export type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json'];
|
||||
export type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json'];
|
||||
export type MuteListResponse = operations['mute/list']['responses']['200']['content']['application/json'];
|
||||
export type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteDeleteRequest = operations['renote-mute/delete']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteListRequest = operations['renote-mute/list']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteListResponse = operations['renote-mute/list']['responses']['200']['content']['application/json'];
|
||||
export type MyAppsRequest = operations['my/apps']['requestBody']['content']['application/json'];
|
||||
export type MyAppsResponse = operations['my/apps']['responses']['200']['content']['application/json'];
|
||||
export type NotesRequest = operations['notes']['requestBody']['content']['application/json'];
|
||||
export type NotesResponse = operations['notes']['responses']['200']['content']['application/json'];
|
||||
export type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json'];
|
||||
export type NotesChildrenResponse = operations['notes/children']['responses']['200']['content']['application/json'];
|
||||
export type NotesClipsRequest = operations['notes/clips']['requestBody']['content']['application/json'];
|
||||
export type NotesClipsResponse = operations['notes/clips']['responses']['200']['content']['application/json'];
|
||||
export type NotesConversationRequest = operations['notes/conversation']['requestBody']['content']['application/json'];
|
||||
export type NotesConversationResponse = operations['notes/conversation']['responses']['200']['content']['application/json'];
|
||||
export type NotesCreateRequest = operations['notes/create']['requestBody']['content']['application/json'];
|
||||
export type NotesCreateResponse = operations['notes/create']['responses']['200']['content']['application/json'];
|
||||
export type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json'];
|
||||
export type NotesFavoritesDeleteRequest = operations['notes/favorites/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesFeaturedRequest = operations['notes/featured']['requestBody']['content']['application/json'];
|
||||
export type NotesFeaturedResponse = operations['notes/featured']['responses']['200']['content']['application/json'];
|
||||
export type NotesGlobalTimelineRequest = operations['notes/global-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesGlobalTimelineResponse = operations['notes/global-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesLocalTimelineResponse = operations['notes/local-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesMentionsRequest = operations['notes/mentions']['requestBody']['content']['application/json'];
|
||||
export type NotesMentionsResponse = operations['notes/mentions']['responses']['200']['content']['application/json'];
|
||||
export type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json'];
|
||||
export type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json'];
|
||||
export type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json'];
|
||||
export type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsDeleteRequest = operations['notes/reactions/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesRenotesRequest = operations['notes/renotes']['requestBody']['content']['application/json'];
|
||||
export type NotesRenotesResponse = operations['notes/renotes']['responses']['200']['content']['application/json'];
|
||||
export type NotesRepliesRequest = operations['notes/replies']['requestBody']['content']['application/json'];
|
||||
export type NotesRepliesResponse = operations['notes/replies']['responses']['200']['content']['application/json'];
|
||||
export type NotesSearchByTagRequest = operations['notes/search-by-tag']['requestBody']['content']['application/json'];
|
||||
export type NotesSearchByTagResponse = operations['notes/search-by-tag']['responses']['200']['content']['application/json'];
|
||||
export type NotesSearchRequest = operations['notes/search']['requestBody']['content']['application/json'];
|
||||
export type NotesSearchResponse = operations['notes/search']['responses']['200']['content']['application/json'];
|
||||
export type NotesShowRequest = operations['notes/show']['requestBody']['content']['application/json'];
|
||||
export type NotesShowResponse = operations['notes/show']['responses']['200']['content']['application/json'];
|
||||
export type NotesStateRequest = operations['notes/state']['requestBody']['content']['application/json'];
|
||||
export type NotesStateResponse = operations['notes/state']['responses']['200']['content']['application/json'];
|
||||
export type NotesThreadMutingCreateRequest = operations['notes/thread-muting/create']['requestBody']['content']['application/json'];
|
||||
export type NotesThreadMutingDeleteRequest = operations['notes/thread-muting/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesTimelineRequest = operations['notes/timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesTimelineResponse = operations['notes/timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesTranslateRequest = operations['notes/translate']['requestBody']['content']['application/json'];
|
||||
export type NotesTranslateResponse = operations['notes/translate']['responses']['200']['content']['application/json'];
|
||||
export type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['content']['application/json'];
|
||||
export type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json'];
|
||||
export type PagePushRequest = operations['page-push']['requestBody']['content']['application/json'];
|
||||
export type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json'];
|
||||
export type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json'];
|
||||
export type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json'];
|
||||
export type PagesFeaturedResponse = operations['pages/featured']['responses']['200']['content']['application/json'];
|
||||
export type PagesLikeRequest = operations['pages/like']['requestBody']['content']['application/json'];
|
||||
export type PagesShowRequest = operations['pages/show']['requestBody']['content']['application/json'];
|
||||
export type PagesShowResponse = operations['pages/show']['responses']['200']['content']['application/json'];
|
||||
export type PagesUnlikeRequest = operations['pages/unlike']['requestBody']['content']['application/json'];
|
||||
export type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['application/json'];
|
||||
export type FlashCreateRequest = operations['flash/create']['requestBody']['content']['application/json'];
|
||||
export type FlashDeleteRequest = operations['flash/delete']['requestBody']['content']['application/json'];
|
||||
export type FlashFeaturedResponse = operations['flash/featured']['responses']['200']['content']['application/json'];
|
||||
export type FlashLikeRequest = operations['flash/like']['requestBody']['content']['application/json'];
|
||||
export type FlashShowRequest = operations['flash/show']['requestBody']['content']['application/json'];
|
||||
export type FlashShowResponse = operations['flash/show']['responses']['200']['content']['application/json'];
|
||||
export type FlashUnlikeRequest = operations['flash/unlike']['requestBody']['content']['application/json'];
|
||||
export type FlashUpdateRequest = operations['flash/update']['requestBody']['content']['application/json'];
|
||||
export type FlashMyRequest = operations['flash/my']['requestBody']['content']['application/json'];
|
||||
export type FlashMyResponse = operations['flash/my']['responses']['200']['content']['application/json'];
|
||||
export type FlashMyLikesRequest = operations['flash/my-likes']['requestBody']['content']['application/json'];
|
||||
export type FlashMyLikesResponse = operations['flash/my-likes']['responses']['200']['content']['application/json'];
|
||||
export type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
|
||||
export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
|
||||
export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json'];
|
||||
export type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json'];
|
||||
export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
||||
export type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json'];
|
||||
export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
||||
export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
||||
export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json'];
|
||||
export type RequestResetPasswordRequest = operations['request-reset-password']['requestBody']['content']['application/json'];
|
||||
export type ResetPasswordRequest = operations['reset-password']['requestBody']['content']['application/json'];
|
||||
export type StatsResponse = operations['stats']['responses']['200']['content']['application/json'];
|
||||
export type SwShowRegistrationRequest = operations['sw/show-registration']['requestBody']['content']['application/json'];
|
||||
export type SwShowRegistrationResponse = operations['sw/show-registration']['responses']['200']['content']['application/json'];
|
||||
export type SwUpdateRegistrationRequest = operations['sw/update-registration']['requestBody']['content']['application/json'];
|
||||
export type SwUpdateRegistrationResponse = operations['sw/update-registration']['responses']['200']['content']['application/json'];
|
||||
export type SwRegisterRequest = operations['sw/register']['requestBody']['content']['application/json'];
|
||||
export type SwRegisterResponse = operations['sw/register']['responses']['200']['content']['application/json'];
|
||||
export type SwUnregisterRequest = operations['sw/unregister']['requestBody']['content']['application/json'];
|
||||
export type TestRequest = operations['test']['requestBody']['content']['application/json'];
|
||||
export type UsernameAvailableRequest = operations['username/available']['requestBody']['content']['application/json'];
|
||||
export type UsernameAvailableResponse = operations['username/available']['responses']['200']['content']['application/json'];
|
||||
export type UsersRequest = operations['users']['requestBody']['content']['application/json'];
|
||||
export type UsersResponse = operations['users']['responses']['200']['content']['application/json'];
|
||||
export type UsersClipsRequest = operations['users/clips']['requestBody']['content']['application/json'];
|
||||
export type UsersClipsResponse = operations['users/clips']['responses']['200']['content']['application/json'];
|
||||
export type UsersFollowersRequest = operations['users/followers']['requestBody']['content']['application/json'];
|
||||
export type UsersFollowersResponse = operations['users/followers']['responses']['200']['content']['application/json'];
|
||||
export type UsersFollowingRequest = operations['users/following']['requestBody']['content']['application/json'];
|
||||
export type UsersFollowingResponse = operations['users/following']['responses']['200']['content']['application/json'];
|
||||
export type UsersGalleryPostsRequest = operations['users/gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type UsersGalleryPostsResponse = operations['users/gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type UsersGetFrequentlyRepliedUsersRequest = operations['users/get-frequently-replied-users']['requestBody']['content']['application/json'];
|
||||
export type UsersGetFrequentlyRepliedUsersResponse = operations['users/get-frequently-replied-users']['responses']['200']['content']['application/json'];
|
||||
export type UsersFeaturedNotesRequest = operations['users/featured-notes']['requestBody']['content']['application/json'];
|
||||
export type UsersFeaturedNotesResponse = operations['users/featured-notes']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsCreateRequest = operations['users/lists/create']['requestBody']['content']['application/json'];
|
||||
export type UsersListsCreateResponse = operations['users/lists/create']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsDeleteRequest = operations['users/lists/delete']['requestBody']['content']['application/json'];
|
||||
export type UsersListsListRequest = operations['users/lists/list']['requestBody']['content']['application/json'];
|
||||
export type UsersListsListResponse = operations['users/lists/list']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsPullRequest = operations['users/lists/pull']['requestBody']['content']['application/json'];
|
||||
export type UsersListsPushRequest = operations['users/lists/push']['requestBody']['content']['application/json'];
|
||||
export type UsersListsShowRequest = operations['users/lists/show']['requestBody']['content']['application/json'];
|
||||
export type UsersListsShowResponse = operations['users/lists/show']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsFavoriteRequest = operations['users/lists/favorite']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUnfavoriteRequest = operations['users/lists/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUpdateRequest = operations['users/lists/update']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUpdateResponse = operations['users/lists/update']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsCreateFromPublicRequest = operations['users/lists/create-from-public']['requestBody']['content']['application/json'];
|
||||
export type UsersListsCreateFromPublicResponse = operations['users/lists/create-from-public']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsUpdateMembershipRequest = operations['users/lists/update-membership']['requestBody']['content']['application/json'];
|
||||
export type UsersListsGetMembershipsRequest = operations['users/lists/get-memberships']['requestBody']['content']['application/json'];
|
||||
export type UsersNotesRequest = operations['users/notes']['requestBody']['content']['application/json'];
|
||||
export type UsersNotesResponse = operations['users/notes']['responses']['200']['content']['application/json'];
|
||||
export type UsersPagesRequest = operations['users/pages']['requestBody']['content']['application/json'];
|
||||
export type UsersPagesResponse = operations['users/pages']['responses']['200']['content']['application/json'];
|
||||
export type UsersFlashsRequest = operations['users/flashs']['requestBody']['content']['application/json'];
|
||||
export type UsersFlashsResponse = operations['users/flashs']['responses']['200']['content']['application/json'];
|
||||
export type UsersReactionsRequest = operations['users/reactions']['requestBody']['content']['application/json'];
|
||||
export type UsersReactionsResponse = operations['users/reactions']['responses']['200']['content']['application/json'];
|
||||
export type UsersRecommendationRequest = operations['users/recommendation']['requestBody']['content']['application/json'];
|
||||
export type UsersRecommendationResponse = operations['users/recommendation']['responses']['200']['content']['application/json'];
|
||||
export type UsersRelationRequest = operations['users/relation']['requestBody']['content']['application/json'];
|
||||
export type UsersRelationResponse = operations['users/relation']['responses']['200']['content']['application/json'];
|
||||
export type UsersReportAbuseRequest = operations['users/report-abuse']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchByUsernameAndHostRequest = operations['users/search-by-username-and-host']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchByUsernameAndHostResponse = operations['users/search-by-username-and-host']['responses']['200']['content']['application/json'];
|
||||
export type UsersSearchRequest = operations['users/search']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchResponse = operations['users/search']['responses']['200']['content']['application/json'];
|
||||
export type UsersShowRequest = operations['users/show']['requestBody']['content']['application/json'];
|
||||
export type UsersShowResponse = operations['users/show']['responses']['200']['content']['application/json'];
|
||||
export type UsersAchievementsRequest = operations['users/achievements']['requestBody']['content']['application/json'];
|
||||
export type UsersUpdateMemoRequest = operations['users/update-memo']['requestBody']['content']['application/json'];
|
||||
export type FetchRssRequest = operations['fetch-rss']['requestBody']['content']['application/json'];
|
||||
export type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json'];
|
||||
export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
|
42
packages/misskey-js/src/autogen/models.ts
Normal file
42
packages/misskey-js/src/autogen/models.ts
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* version: 2023.11.0-beta.3
|
||||
* generatedAt: 2023-12-08T04:57:48.405Z
|
||||
*/
|
||||
|
||||
import { components } from './types.js';
|
||||
export type Error = components['schemas']['Error'];
|
||||
export type UserLite = components['schemas']['UserLite'];
|
||||
export type UserDetailedNotMeOnly = components['schemas']['UserDetailedNotMeOnly'];
|
||||
export type MeDetailedOnly = components['schemas']['MeDetailedOnly'];
|
||||
export type UserDetailedNotMe = components['schemas']['UserDetailedNotMe'];
|
||||
export type MeDetailed = components['schemas']['MeDetailed'];
|
||||
export type UserDetailed = components['schemas']['UserDetailed'];
|
||||
export type User = components['schemas']['User'];
|
||||
export type UserList = components['schemas']['UserList'];
|
||||
export type Announcement = components['schemas']['Announcement'];
|
||||
export type App = components['schemas']['App'];
|
||||
export type Note = components['schemas']['Note'];
|
||||
export type NoteReaction = components['schemas']['NoteReaction'];
|
||||
export type NoteFavorite = components['schemas']['NoteFavorite'];
|
||||
export type Notification = components['schemas']['Notification'];
|
||||
export type DriveFile = components['schemas']['DriveFile'];
|
||||
export type DriveFolder = components['schemas']['DriveFolder'];
|
||||
export type Following = components['schemas']['Following'];
|
||||
export type Muting = components['schemas']['Muting'];
|
||||
export type RenoteMuting = components['schemas']['RenoteMuting'];
|
||||
export type Blocking = components['schemas']['Blocking'];
|
||||
export type Hashtag = components['schemas']['Hashtag'];
|
||||
export type InviteCode = components['schemas']['InviteCode'];
|
||||
export type Page = components['schemas']['Page'];
|
||||
export type Channel = components['schemas']['Channel'];
|
||||
export type QueueCount = components['schemas']['QueueCount'];
|
||||
export type Antenna = components['schemas']['Antenna'];
|
||||
export type Clip = components['schemas']['Clip'];
|
||||
export type FederationInstance = components['schemas']['FederationInstance'];
|
||||
export type GalleryPost = components['schemas']['GalleryPost'];
|
||||
export type EmojiSimple = components['schemas']['EmojiSimple'];
|
||||
export type EmojiDetailed = components['schemas']['EmojiDetailed'];
|
||||
export type Flash = components['schemas']['Flash'];
|
||||
export type Signin = components['schemas']['Signin'];
|
||||
export type RoleLite = components['schemas']['RoleLite'];
|
||||
export type Role = components['schemas']['Role'];
|
25038
packages/misskey-js/src/autogen/types.ts
Normal file
25038
packages/misskey-js/src/autogen/types.ts
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,10 +1,12 @@
|
|||
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'achievementEarned'] as const;
|
||||
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned'] as const;
|
||||
|
||||
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
||||
|
||||
export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const;
|
||||
|
||||
export const ffVisibility = ['public', 'followers', 'private'] as const;
|
||||
export const followingVisibilities = ['public', 'followers', 'private'] as const;
|
||||
|
||||
export const followersVisibilities = ['public', 'followers', 'private'] as const;
|
||||
|
||||
export const permissions = [
|
||||
'read:account',
|
||||
|
@ -82,6 +84,8 @@ export const moderationLogTypes = [
|
|||
'createAvatarDecoration',
|
||||
'updateAvatarDecoration',
|
||||
'deleteAvatarDecoration',
|
||||
'unsetUserAvatar',
|
||||
'unsetUserBanner',
|
||||
] as const;
|
||||
|
||||
export type ModerationLogPayloads = {
|
||||
|
@ -261,4 +265,16 @@ export type ModerationLogPayloads = {
|
|||
avatarDecorationId: string;
|
||||
avatarDecoration: any;
|
||||
};
|
||||
unsetUserAvatar: {
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
fileId: string;
|
||||
};
|
||||
unsetUserBanner: {
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
fileId: string;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,480 +1,12 @@
|
|||
import { ModerationLogPayloads, notificationTypes } from './consts.js';
|
||||
import { ModerationLogPayloads } from './consts.js';
|
||||
import { Announcement, EmojiDetailed, Page, User, UserDetailed } from './autogen/models';
|
||||
|
||||
export * from './autogen/entities';
|
||||
export * from './autogen/models';
|
||||
|
||||
export type ID = string;
|
||||
export type DateString = string;
|
||||
|
||||
type TODO = Record<string, any>;
|
||||
|
||||
// NOTE: 極力この型を使うのは避け、UserLite か UserDetailed か明示するように
|
||||
export type User = UserLite | UserDetailed;
|
||||
|
||||
export type UserLite = {
|
||||
id: ID;
|
||||
username: string;
|
||||
host: string | null;
|
||||
name: string | null;
|
||||
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
|
||||
avatarUrl: string;
|
||||
avatarBlurhash: string;
|
||||
approved: boolean;
|
||||
avatarDecorations: {
|
||||
id: ID;
|
||||
url: string;
|
||||
angle?: number;
|
||||
flipH?: boolean;
|
||||
}[];
|
||||
emojis: {
|
||||
name: string;
|
||||
url: string;
|
||||
}[];
|
||||
instance?: {
|
||||
name: Instance['name'];
|
||||
softwareName: Instance['softwareName'];
|
||||
softwareVersion: Instance['softwareVersion'];
|
||||
iconUrl: Instance['iconUrl'];
|
||||
faviconUrl: Instance['faviconUrl'];
|
||||
themeColor: Instance['themeColor'];
|
||||
};
|
||||
isCat?: boolean;
|
||||
isBot?: boolean;
|
||||
noindex?: boolean;
|
||||
};
|
||||
|
||||
export type UserDetailed = UserLite & {
|
||||
alsoKnownAs: string[];
|
||||
bannerBlurhash: string | null;
|
||||
bannerColor: string | null;
|
||||
bannerUrl: string | null;
|
||||
backgroundUrl: string | null;
|
||||
backgroundBlurhash: string | null;
|
||||
birthday: string | null;
|
||||
listenbrainz: string | null;
|
||||
createdAt: DateString;
|
||||
description: string | null;
|
||||
ffVisibility: 'public' | 'followers' | 'private';
|
||||
fields: {name: string; value: string}[];
|
||||
verifiedLinks: string[];
|
||||
followersCount: number;
|
||||
followingCount: number;
|
||||
hasPendingFollowRequestFromYou: boolean;
|
||||
hasPendingFollowRequestToYou: boolean;
|
||||
isAdmin: boolean;
|
||||
isBlocked: boolean;
|
||||
isBlocking: boolean;
|
||||
isBot: boolean;
|
||||
isCat: boolean;
|
||||
speakAsCat: boolean;
|
||||
isFollowed: boolean;
|
||||
isFollowing: boolean;
|
||||
noindex: boolean;
|
||||
isLocked: boolean;
|
||||
isModerator: boolean;
|
||||
isMuted: boolean;
|
||||
isSilenced: boolean;
|
||||
isSuspended: boolean;
|
||||
lang: string | null;
|
||||
lastFetchedAt?: DateString;
|
||||
location: string | null;
|
||||
movedTo: string;
|
||||
notesCount: number;
|
||||
pinnedNoteIds: ID[];
|
||||
pinnedNotes: Note[];
|
||||
pinnedPage: Page | null;
|
||||
pinnedPageId: string | null;
|
||||
publicReactions: boolean;
|
||||
securityKeys: boolean;
|
||||
twoFactorEnabled: boolean;
|
||||
updatedAt: DateString | null;
|
||||
uri: string | null;
|
||||
url: string | null;
|
||||
notify: 'normal' | 'none';
|
||||
};
|
||||
|
||||
export type UserGroup = TODO;
|
||||
|
||||
export type UserList = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
name: string;
|
||||
userIds: User['id'][];
|
||||
};
|
||||
|
||||
export type MeDetailed = UserDetailed & {
|
||||
avatarId: DriveFile['id'];
|
||||
bannerId: DriveFile['id'];
|
||||
backgroundId: DriveFile['id'];
|
||||
autoAcceptFollowed: boolean;
|
||||
alwaysMarkNsfw: boolean;
|
||||
carefulBot: boolean;
|
||||
emailNotificationTypes: string[];
|
||||
hasPendingReceivedFollowRequest: boolean;
|
||||
hasUnreadAnnouncement: boolean;
|
||||
hasUnreadAntenna: boolean;
|
||||
hasUnreadMentions: boolean;
|
||||
hasUnreadMessagingMessage: boolean;
|
||||
hasUnreadNotification: boolean;
|
||||
hasUnreadSpecifiedNotes: boolean;
|
||||
unreadNotificationsCount: number;
|
||||
hideOnlineStatus: boolean;
|
||||
injectFeaturedNote: boolean;
|
||||
integrations: Record<string, any>;
|
||||
isDeleted: boolean;
|
||||
isExplorable: boolean;
|
||||
mutedWords: string[][];
|
||||
notificationRecieveConfig: {
|
||||
[notificationType in typeof notificationTypes[number]]?: {
|
||||
type: 'all';
|
||||
} | {
|
||||
type: 'never';
|
||||
} | {
|
||||
type: 'following';
|
||||
} | {
|
||||
type: 'follower';
|
||||
} | {
|
||||
type: 'mutualFollow';
|
||||
} | {
|
||||
type: 'list';
|
||||
userListId: string;
|
||||
};
|
||||
};
|
||||
noCrawle: boolean;
|
||||
receiveAnnouncementEmail: boolean;
|
||||
usePasswordLessLogin: boolean;
|
||||
unreadAnnouncements: Announcement[];
|
||||
twoFactorBackupCodesStock: 'full' | 'partial' | 'none';
|
||||
[other: string]: any;
|
||||
};
|
||||
|
||||
export type MeDetailedWithSecret = MeDetailed & {
|
||||
email: string;
|
||||
emailVerified: boolean;
|
||||
securityKeysList: {
|
||||
id: string;
|
||||
name: string;
|
||||
lastUsed: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type MeSignup = MeDetailedWithSecret & {
|
||||
token: string;
|
||||
};
|
||||
|
||||
export type DriveFile = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
isSensitive: boolean;
|
||||
name: string;
|
||||
thumbnailUrl: string;
|
||||
url: string;
|
||||
type: string;
|
||||
size: number;
|
||||
md5: string;
|
||||
blurhash: string;
|
||||
comment: string | null;
|
||||
properties: Record<string, any>;
|
||||
};
|
||||
|
||||
export type DriveFolder = TODO;
|
||||
|
||||
export type GalleryPost = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
updatedAt: DateString;
|
||||
userId: User['id'];
|
||||
user: User;
|
||||
title: string;
|
||||
description: string | null;
|
||||
fileIds: DriveFile['id'][];
|
||||
files: DriveFile[];
|
||||
isSensitive: boolean;
|
||||
likedCount: number;
|
||||
isLiked?: boolean;
|
||||
};
|
||||
|
||||
export type Note = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
updatedAt?: DateString | null;
|
||||
text: string | null;
|
||||
cw: string | null;
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
reply?: Note;
|
||||
replyId: Note['id'];
|
||||
renote?: Note;
|
||||
renoteId: Note['id'];
|
||||
files: DriveFile[];
|
||||
fileIds: DriveFile['id'][];
|
||||
visibility: 'public' | 'home' | 'followers' | 'specified';
|
||||
visibleUserIds?: User['id'][];
|
||||
channel?: Channel;
|
||||
channelId?: Channel['id'];
|
||||
localOnly?: boolean;
|
||||
myReaction?: string;
|
||||
reactions: Record<string, number>;
|
||||
renoteCount: number;
|
||||
repliesCount: number;
|
||||
clippedCount?: number;
|
||||
poll?: {
|
||||
expiresAt: DateString | null;
|
||||
expiredAfter: DateString | null;
|
||||
multiple: boolean;
|
||||
choices: {
|
||||
isVoted: boolean;
|
||||
text: string;
|
||||
votes: number;
|
||||
}[];
|
||||
};
|
||||
emojis: {
|
||||
name: string;
|
||||
url: string;
|
||||
}[];
|
||||
uri?: string;
|
||||
url?: string;
|
||||
isHidden?: boolean;
|
||||
};
|
||||
|
||||
export type NoteReaction = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
user: UserLite;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type NoteEdit = {
|
||||
noteId: Note['id'];
|
||||
note: Note;
|
||||
newText: string;
|
||||
oldText: string;
|
||||
cw: string;
|
||||
fileIds: DriveFile['id'][];
|
||||
updatedAt?: DateString;
|
||||
oldDate: DateString;
|
||||
}
|
||||
|
||||
export type Notification = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
isRead: boolean;
|
||||
} & ({
|
||||
type: 'reaction';
|
||||
reaction: string;
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'reply';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'renote';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'quote';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'mention';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'note';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'pollEnded';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
note: Note;
|
||||
} | {
|
||||
type: 'follow';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
} | {
|
||||
type: 'followRequestAccepted';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
} | {
|
||||
type: 'receiveFollowRequest';
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
} | {
|
||||
type: 'groupInvited';
|
||||
invitation: UserGroup;
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
} | {
|
||||
type: 'achievementEarned';
|
||||
achievement: string;
|
||||
} | {
|
||||
type: 'app';
|
||||
header?: string | null;
|
||||
body: string;
|
||||
icon?: string | null;
|
||||
} | {
|
||||
type: 'test';
|
||||
});
|
||||
|
||||
export type MessagingMessage = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
file: DriveFile | null;
|
||||
fileId: DriveFile['id'] | null;
|
||||
isRead: boolean;
|
||||
reads: User['id'][];
|
||||
text: string | null;
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
recipient?: User | null;
|
||||
recipientId: User['id'] | null;
|
||||
group?: UserGroup | null;
|
||||
groupId: UserGroup['id'] | null;
|
||||
};
|
||||
|
||||
export type CustomEmoji = {
|
||||
id: string;
|
||||
name: string;
|
||||
url: string;
|
||||
category: string;
|
||||
aliases: string[];
|
||||
};
|
||||
|
||||
export type LiteInstanceMetadata = {
|
||||
maintainerName: string | null;
|
||||
maintainerEmail: string | null;
|
||||
version: string;
|
||||
name: string | null;
|
||||
shortName: string | null;
|
||||
uri: string;
|
||||
description: string | null;
|
||||
langs: string[];
|
||||
tosUrl: string | null;
|
||||
repositoryUrl: string;
|
||||
feedbackUrl: string;
|
||||
impressumUrl: string | null;
|
||||
privacyPolicyUrl: string | null;
|
||||
disableRegistration: boolean;
|
||||
disableLocalTimeline: boolean;
|
||||
disableBubbleTimeline: boolean;
|
||||
disableGlobalTimeline: boolean;
|
||||
driveCapacityPerLocalUserMb: number;
|
||||
driveCapacityPerRemoteUserMb: number;
|
||||
emailRequiredForSignup: boolean;
|
||||
approvalRequiredForSignup: boolean;
|
||||
enableHcaptcha: boolean;
|
||||
hcaptchaSiteKey: string | null;
|
||||
enableRecaptcha: boolean;
|
||||
recaptchaSiteKey: string | null;
|
||||
enableTurnstile: boolean;
|
||||
turnstileSiteKey: string | null;
|
||||
swPublickey: string | null;
|
||||
themeColor: string | null;
|
||||
mascotImageUrl: string | null;
|
||||
bannerUrl: string | null;
|
||||
serverErrorImageUrl: string | null;
|
||||
infoImageUrl: string | null;
|
||||
notFoundImageUrl: string | null;
|
||||
iconUrl: string | null;
|
||||
backgroundImageUrl: string | null;
|
||||
logoImageUrl: string | null;
|
||||
maxNoteTextLength: number;
|
||||
enableEmail: boolean;
|
||||
enableTwitterIntegration: boolean;
|
||||
enableGithubIntegration: boolean;
|
||||
enableDiscordIntegration: boolean;
|
||||
enableAchievements: boolean;
|
||||
enableServiceWorker: boolean;
|
||||
emojis: CustomEmoji[];
|
||||
defaultDarkTheme: string | null;
|
||||
defaultLightTheme: string | null;
|
||||
ads: {
|
||||
id: ID;
|
||||
ratio: number;
|
||||
place: string;
|
||||
url: string;
|
||||
imageUrl: string;
|
||||
}[];
|
||||
notesPerOneAd: number;
|
||||
translatorAvailable: boolean;
|
||||
serverRules: string[];
|
||||
defaultLike: string;
|
||||
};
|
||||
|
||||
export type DetailedInstanceMetadata = LiteInstanceMetadata & {
|
||||
pinnedPages: string[];
|
||||
pinnedClipId: string | null;
|
||||
cacheRemoteFiles: boolean;
|
||||
cacheRemoteSensitiveFiles: boolean;
|
||||
requireSetup: boolean;
|
||||
proxyAccountName: string | null;
|
||||
features: Record<string, any>;
|
||||
};
|
||||
|
||||
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
|
||||
|
||||
export type AdminInstanceMetadata = DetailedInstanceMetadata & {
|
||||
// TODO: There are more fields.
|
||||
blockedHosts: string[];
|
||||
silencedHosts: string[];
|
||||
app192IconUrl: string | null;
|
||||
app512IconUrl: string | null;
|
||||
manifestJsonOverride: string;
|
||||
enableBotTrending: boolean;
|
||||
};
|
||||
|
||||
export type ServerInfo = {
|
||||
machine: string;
|
||||
cpu: {
|
||||
model: string;
|
||||
cores: number;
|
||||
};
|
||||
mem: {
|
||||
total: number;
|
||||
};
|
||||
fs: {
|
||||
total: number;
|
||||
used: number;
|
||||
};
|
||||
};
|
||||
|
||||
export type Stats = {
|
||||
notesCount: number;
|
||||
originalNotesCount: number;
|
||||
usersCount: number;
|
||||
originalUsersCount: number;
|
||||
instances: number;
|
||||
driveUsageLocal: number;
|
||||
driveUsageRemote: number;
|
||||
};
|
||||
|
||||
export type Page = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
updatedAt: DateString;
|
||||
userId: User['id'];
|
||||
user: User;
|
||||
content: Record<string, any>[];
|
||||
variables: Record<string, any>[];
|
||||
title: string;
|
||||
name: string;
|
||||
summary: string | null;
|
||||
hideTitleWhenPinned: boolean;
|
||||
alignCenter: boolean;
|
||||
font: string;
|
||||
script: string;
|
||||
eyeCatchingImageId: DriveFile['id'] | null;
|
||||
eyeCatchingImage: DriveFile | null;
|
||||
attachedFiles: any;
|
||||
likedCount: number;
|
||||
isLiked?: boolean;
|
||||
};
|
||||
|
||||
export type PageEvent = {
|
||||
pageId: Page['id'];
|
||||
event: string;
|
||||
|
@ -483,167 +15,6 @@ export type PageEvent = {
|
|||
user: User;
|
||||
};
|
||||
|
||||
export type Announcement = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
updatedAt: DateString | null;
|
||||
text: string;
|
||||
title: string;
|
||||
imageUrl: string | null;
|
||||
display: 'normal' | 'banner' | 'dialog';
|
||||
icon: 'info' | 'warning' | 'error' | 'success';
|
||||
needConfirmationToRead: boolean;
|
||||
forYou: boolean;
|
||||
isRead?: boolean;
|
||||
};
|
||||
|
||||
export type Antenna = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
name: string;
|
||||
keywords: string[][]; // TODO
|
||||
excludeKeywords: string[][]; // TODO
|
||||
src: 'home' | 'all' | 'users' | 'list' | 'group';
|
||||
userListId: ID | null; // TODO
|
||||
userGroupId: ID | null; // TODO
|
||||
users: string[]; // TODO
|
||||
caseSensitive: boolean;
|
||||
localOnly: boolean;
|
||||
notify: boolean;
|
||||
withReplies: boolean;
|
||||
withFile: boolean;
|
||||
hasUnreadNote: boolean;
|
||||
};
|
||||
|
||||
export type App = TODO;
|
||||
|
||||
export type AuthSession = {
|
||||
id: ID;
|
||||
app: App;
|
||||
token: string;
|
||||
};
|
||||
|
||||
export type Ad = TODO;
|
||||
|
||||
export type Clip = TODO;
|
||||
|
||||
export type NoteFavorite = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
noteId: Note['id'];
|
||||
note: Note;
|
||||
};
|
||||
|
||||
export type FollowRequest = {
|
||||
id: ID;
|
||||
follower: User;
|
||||
followee: User;
|
||||
};
|
||||
|
||||
export type Channel = {
|
||||
id: ID;
|
||||
lastNotedAt: Date | null;
|
||||
userId: User['id'] | null;
|
||||
user: User | null;
|
||||
name: string;
|
||||
description: string | null;
|
||||
bannerId: DriveFile['id'] | null;
|
||||
banner: DriveFile | null;
|
||||
pinnedNoteIds: string[];
|
||||
color: string;
|
||||
isArchived: boolean;
|
||||
notesCount: number;
|
||||
usersCount: number;
|
||||
isSensitive: boolean;
|
||||
allowRenoteToExternal: boolean;
|
||||
};
|
||||
|
||||
export type Following = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
followerId: User['id'];
|
||||
followeeId: User['id'];
|
||||
};
|
||||
|
||||
export type FollowingFolloweePopulated = Following & {
|
||||
followee: UserDetailed;
|
||||
};
|
||||
|
||||
export type FollowingFollowerPopulated = Following & {
|
||||
follower: UserDetailed;
|
||||
};
|
||||
|
||||
export type Blocking = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
blockeeId: User['id'];
|
||||
blockee: UserDetailed;
|
||||
};
|
||||
|
||||
export type Instance = {
|
||||
id: ID;
|
||||
firstRetrievedAt: DateString;
|
||||
host: string;
|
||||
usersCount: number;
|
||||
notesCount: number;
|
||||
followingCount: number;
|
||||
followersCount: number;
|
||||
driveUsage: number;
|
||||
driveFiles: number;
|
||||
latestRequestSentAt: DateString | null;
|
||||
latestStatus: number | null;
|
||||
latestRequestReceivedAt: DateString | null;
|
||||
lastCommunicatedAt: DateString;
|
||||
isNotResponding: boolean;
|
||||
isSuspended: boolean;
|
||||
isSilenced: boolean;
|
||||
isBlocked: boolean;
|
||||
softwareName: string | null;
|
||||
softwareVersion: string | null;
|
||||
openRegistrations: boolean | null;
|
||||
name: string | null;
|
||||
description: string | null;
|
||||
maintainerName: string | null;
|
||||
maintainerEmail: string | null;
|
||||
iconUrl: string | null;
|
||||
faviconUrl: string | null;
|
||||
themeColor: string | null;
|
||||
infoUpdatedAt: DateString | null;
|
||||
isNSFW: boolean;
|
||||
};
|
||||
|
||||
export type Signin = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
ip: string;
|
||||
headers: Record<string, any>;
|
||||
success: boolean;
|
||||
};
|
||||
|
||||
export type Invite = {
|
||||
id: ID;
|
||||
code: string;
|
||||
expiresAt: DateString | null;
|
||||
createdAt: DateString;
|
||||
createdBy: UserLite | null;
|
||||
usedBy: UserLite | null;
|
||||
usedAt: DateString | null;
|
||||
used: boolean;
|
||||
}
|
||||
|
||||
export type InviteLimit = {
|
||||
remaining: number;
|
||||
}
|
||||
|
||||
export type UserSorting =
|
||||
| '+follower'
|
||||
| '-follower'
|
||||
| '+createdAt'
|
||||
| '-createdAt'
|
||||
| '+updatedAt'
|
||||
| '-updatedAt';
|
||||
export type OriginType = 'combined' | 'local' | 'remote';
|
||||
|
||||
export type ModerationLog = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
|
@ -757,4 +128,61 @@ export type ModerationLog = {
|
|||
} | {
|
||||
type: 'resolveAbuseReport';
|
||||
info: ModerationLogPayloads['resolveAbuseReport'];
|
||||
} | {
|
||||
type: 'unsetUserAvatar';
|
||||
info: ModerationLogPayloads['unsetUserAvatar'];
|
||||
} | {
|
||||
type: 'unsetUserBanner';
|
||||
info: ModerationLogPayloads['unsetUserBanner'];
|
||||
});
|
||||
|
||||
export type ServerStats = {
|
||||
cpu: number;
|
||||
mem: {
|
||||
used: number;
|
||||
active: number;
|
||||
};
|
||||
net: {
|
||||
rx: number;
|
||||
tx: number;
|
||||
};
|
||||
fs: {
|
||||
r: number;
|
||||
w: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type ServerStatsLog = string[];
|
||||
|
||||
export type QueueStats = {
|
||||
deliver: {
|
||||
activeSincePrevTick: number;
|
||||
active: number;
|
||||
waiting: number;
|
||||
delayed: number;
|
||||
};
|
||||
inbox: {
|
||||
activeSincePrevTick: number;
|
||||
active: number;
|
||||
waiting: number;
|
||||
delayed: number;
|
||||
};
|
||||
};
|
||||
|
||||
export type QueueStatsLog = string[];
|
||||
|
||||
export type EmojiAdded = {
|
||||
emoji: EmojiDetailed
|
||||
};
|
||||
|
||||
export type EmojiUpdated = {
|
||||
emojis: EmojiDetailed[]
|
||||
};
|
||||
|
||||
export type EmojiDeleted = {
|
||||
emojis: EmojiDetailed[]
|
||||
};
|
||||
|
||||
export type AnnouncementCreated = {
|
||||
announcement: Announcement;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,8 @@ export const permissions = consts.permissions;
|
|||
export const notificationTypes = consts.notificationTypes;
|
||||
export const noteVisibilities = consts.noteVisibilities;
|
||||
export const mutedNoteReasons = consts.mutedNoteReasons;
|
||||
export const ffVisibility = consts.ffVisibility;
|
||||
export const followingVisibilities = consts.followingVisibilities;
|
||||
export const followersVisibilities = consts.followersVisibilities;
|
||||
export const moderationLogTypes = consts.moderationLogTypes;
|
||||
|
||||
// api extractor not supported yet
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities.js';
|
||||
|
||||
type FIXME = any;
|
||||
import {
|
||||
Antenna,
|
||||
DriveFile,
|
||||
DriveFolder,
|
||||
MeDetailed,
|
||||
Note,
|
||||
Notification,
|
||||
Signin,
|
||||
User,
|
||||
} from './autogen/models.js';
|
||||
import {
|
||||
AnnouncementCreated,
|
||||
EmojiAdded, EmojiDeleted,
|
||||
EmojiUpdated,
|
||||
PageEvent,
|
||||
QueueStats,
|
||||
QueueStatsLog,
|
||||
ServerStats,
|
||||
ServerStatsLog,
|
||||
} from './entities.js';
|
||||
|
||||
export type Channels = {
|
||||
main: {
|
||||
|
@ -22,16 +39,11 @@ export type Channels = {
|
|||
readAllUnreadMentions: () => void;
|
||||
unreadSpecifiedNote: (payload: Note['id']) => void;
|
||||
readAllUnreadSpecifiedNotes: () => void;
|
||||
readAllMessagingMessages: () => void;
|
||||
messagingMessage: (payload: MessagingMessage) => void;
|
||||
unreadMessagingMessage: (payload: MessagingMessage) => void;
|
||||
readAllAntennas: () => void;
|
||||
unreadAntenna: (payload: Antenna) => void;
|
||||
readAllAnnouncements: () => void;
|
||||
myTokenRegenerated: () => void;
|
||||
reversiNoInvites: () => void;
|
||||
reversiInvited: (payload: FIXME) => void;
|
||||
signin: (payload: FIXME) => void;
|
||||
signin: (payload: Signin) => void;
|
||||
registryUpdated: (payload: {
|
||||
scope?: string[];
|
||||
key: string;
|
||||
|
@ -39,32 +51,48 @@ export type Channels = {
|
|||
}) => void;
|
||||
driveFileCreated: (payload: DriveFile) => void;
|
||||
readAntenna: (payload: Antenna) => void;
|
||||
receiveFollowRequest: (payload: User) => void;
|
||||
announcementCreated: (payload: AnnouncementCreated) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
homeTimeline: {
|
||||
params: null;
|
||||
params: {
|
||||
withRenotes?: boolean;
|
||||
withFiles?: boolean;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
localTimeline: {
|
||||
params: null;
|
||||
params: {
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
withFiles?: boolean;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
hybridTimeline: {
|
||||
params: null;
|
||||
params: {
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
withFiles?: boolean;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
globalTimeline: {
|
||||
params: null;
|
||||
params: {
|
||||
withRenotes?: boolean;
|
||||
withFiles?: boolean;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
|
@ -77,27 +105,69 @@ export type Channels = {
|
|||
};
|
||||
receives: null;
|
||||
};
|
||||
messaging: {
|
||||
userList: {
|
||||
params: {
|
||||
otherparty?: User['id'] | null;
|
||||
group?: UserGroup['id'] | null;
|
||||
listId: string;
|
||||
withFiles?: boolean;
|
||||
};
|
||||
events: {
|
||||
message: (payload: MessagingMessage) => void;
|
||||
deleted: (payload: MessagingMessage['id']) => void;
|
||||
read: (payload: MessagingMessage['id'][]) => void;
|
||||
typers: (payload: User[]) => void;
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: MessagingMessage['id'];
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
hashtag: {
|
||||
params: {
|
||||
q?: string;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
roleTimeline: {
|
||||
params: {
|
||||
roleId: string;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
antenna: {
|
||||
params: {
|
||||
antennaId: string;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
channel: {
|
||||
params: {
|
||||
channelId: string;
|
||||
};
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
drive: {
|
||||
params: null;
|
||||
events: {
|
||||
fileCreated: (payload: DriveFile) => void;
|
||||
fileDeleted: (payload: DriveFile['id']) => void;
|
||||
fileUpdated: (payload: DriveFile) => void;
|
||||
folderCreated: (payload: DriveFolder) => void;
|
||||
folderDeleted: (payload: DriveFolder['id']) => void;
|
||||
folderUpdated: (payload: DriveFile) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
serverStats: {
|
||||
params: null;
|
||||
events: {
|
||||
stats: (payload: FIXME) => void;
|
||||
stats: (payload: ServerStats) => void;
|
||||
statsLog: (payload: ServerStatsLog) => void;
|
||||
};
|
||||
receives: {
|
||||
requestLog: {
|
||||
|
@ -109,7 +179,8 @@ export type Channels = {
|
|||
queueStats: {
|
||||
params: null;
|
||||
events: {
|
||||
stats: (payload: FIXME) => void;
|
||||
stats: (payload: QueueStats) => void;
|
||||
statsLog: (payload: QueueStatsLog) => void;
|
||||
};
|
||||
receives: {
|
||||
requestLog: {
|
||||
|
@ -118,17 +189,28 @@ export type Channels = {
|
|||
};
|
||||
};
|
||||
};
|
||||
admin: {
|
||||
params: null;
|
||||
events: {
|
||||
newAbuseUserReport: {
|
||||
id: string;
|
||||
targetUserId: string;
|
||||
reporterId: string;
|
||||
comment: string;
|
||||
}
|
||||
};
|
||||
receives: null;
|
||||
}
|
||||
};
|
||||
|
||||
export type NoteUpdatedEvent = {
|
||||
id: Note['id'];
|
||||
type: 'reacted';
|
||||
body: {
|
||||
reaction: string;
|
||||
emoji: string | null;
|
||||
userId: User['id'];
|
||||
};
|
||||
} | {
|
||||
id: Note['id'];
|
||||
type: 'unreacted';
|
||||
body: {
|
||||
reaction: string;
|
||||
|
@ -142,13 +224,11 @@ export type NoteUpdatedEvent = {
|
|||
text: string;
|
||||
};
|
||||
} | {
|
||||
id: Note['id'];
|
||||
type: 'deleted';
|
||||
body: {
|
||||
deletedAt: string;
|
||||
};
|
||||
} | {
|
||||
id: Note['id'];
|
||||
type: 'pollVoted';
|
||||
body: {
|
||||
choice: number;
|
||||
|
@ -158,7 +238,8 @@ export type NoteUpdatedEvent = {
|
|||
|
||||
export type BroadcastEvents = {
|
||||
noteUpdated: (payload: NoteUpdatedEvent) => void;
|
||||
emojiAdded: (payload: {
|
||||
emoji: CustomEmoji;
|
||||
}) => void;
|
||||
emojiAdded: (payload: EmojiAdded) => void;
|
||||
emojiUpdated: (payload: EmojiUpdated) => void;
|
||||
emojiDeleted: (payload: EmojiDeleted) => void;
|
||||
announcementCreated: (payload: AnnouncementCreated) => void;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('API', () => {
|
|||
credential: 'TOKEN'
|
||||
});
|
||||
const res = await cli.request('meta', { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<Misskey.entities.MetaResponse>(res);
|
||||
});
|
||||
|
||||
test('conditional respose type (meta)', async () => {
|
||||
|
@ -18,16 +18,16 @@ describe('API', () => {
|
|||
});
|
||||
|
||||
const res = await cli.request('meta', { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<Misskey.entities.MetaResponse>(res);
|
||||
|
||||
const res2 = await cli.request('meta', { detail: false });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res2);
|
||||
expectType<Misskey.entities.MetaResponse>(res2);
|
||||
|
||||
const res3 = await cli.request('meta', { });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res3);
|
||||
expectType<Misskey.entities.MetaResponse>(res3);
|
||||
|
||||
const res4 = await cli.request('meta', { detail: true as boolean });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata | Misskey.entities.DetailedInstanceMetadata>(res4);
|
||||
expectType<Misskey.entities.MetaResponse>(res4);
|
||||
});
|
||||
|
||||
test('conditional respose type (users/show)', async () => {
|
||||
|
|
|
@ -9,18 +9,4 @@ describe('Streaming', () => {
|
|||
expectType<Misskey.entities.Notification>(notification);
|
||||
});
|
||||
});
|
||||
|
||||
test('params type', async () => {
|
||||
const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
// TODO: 「stream.useChannel の第二引数として受け入れる型が
|
||||
// {
|
||||
// otherparty?: User['id'] | null;
|
||||
// group?: UserGroup['id'] | null;
|
||||
// }
|
||||
// になっている」というテストを行いたいけどtsdでの書き方がわからない
|
||||
const messagingChannel = stream.useChannel('messaging', { otherparty: 'aaa' });
|
||||
messagingChannel.on('message', message => {
|
||||
expectType<Misskey.entities.MessagingMessage>(message);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/tsconfig",
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "nodenext",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue