This commit is contained in:
tamaina
2023-05-10 19:18:48 +00:00
parent ac99cdce8b
commit 4f5d77391f
50 changed files with 218 additions and 171 deletions

View File

@@ -1,4 +1,4 @@
import type { Schema } from '@/misc/json-schema.js';
import type { JSONSchema7 } from 'schema-type';
import { RolePolicies } from '@/core/RoleService.js';
import * as ep___admin_meta from './endpoints/admin/meta.js';
@@ -686,7 +686,7 @@ export interface IEndpointMeta {
};
};
readonly res?: Schema;
readonly res?: JSONSchema7;
/**
* このエンドポイントにリクエストするのにユーザー情報が必須か否か
@@ -775,7 +775,7 @@ export interface IEndpointMeta {
export interface IEndpoint {
name: string;
meta: IEndpointMeta;
params: Schema;
params: JSONSchema7;
}
const endpoints: IEndpoint[] = (eps as [string, any]).map(([name, ep]) => {

View File

@@ -1,7 +1,7 @@
import type { Schema } from '@/misc/json-schema.js';
import type { JSONSchema7 } from 'schema-type';
import { refs } from 'misskey-js';
export function convertSchemaToOpenApiSchema(schema: Schema) {
export function convertSchemaToOpenApiSchema(schema: JSONSchema7) {
const res: any = schema;
if (schema.type === 'object' && schema.properties) {

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';
import Channel from '../channel.js';

View File

@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { checkWordMute } from '@/misc/check-word-mute.js';
import { isInstanceMuted } from '@/misc/is-instance-muted.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { MetaService } from '@/core/MetaService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';
import Channel from '../channel.js';

View File

@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { checkWordMute } from '@/misc/check-word-mute.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import { isInstanceMuted } from '@/misc/is-instance-muted.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';
import Channel from '../channel.js';

View File

@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { checkWordMute } from '@/misc/check-word-mute.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import { isInstanceMuted } from '@/misc/is-instance-muted.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { MetaService } from '@/core/MetaService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { checkWordMute } from '@/misc/check-word-mute.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { MetaService } from '@/core/MetaService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { bindThis } from '@/decorators.js';
import Channel from '../channel.js';

View File

@@ -2,7 +2,7 @@ import { Inject, Injectable } from '@nestjs/common';
import type { UserListJoiningsRepository, UserListsRepository } from '@/models/index.js';
import type { User } from '@/models/entities/User.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';

View File

@@ -1,6 +1,6 @@
import type { User } from '@/models/entities/User.js';
import type { AccessToken } from '@/models/entities/AccessToken.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import type { NoteReadService } from '@/core/NoteReadService.js';
import type { NotificationService } from '@/core/NotificationService.js';
import { bindThis } from '@/decorators.js';

View File

@@ -9,7 +9,7 @@ import type { UserList } from '@/models/entities/UserList.js';
import type { AbuseUserReport } from '@/models/entities/AbuseUserReport.js';
import type { Signin } from '@/models/entities/Signin.js';
import type { Page } from '@/models/entities/Page.js';
import type { Packed } from '@/misc/json-schema.js';
import type { Packed } from 'misskey-js';
import type { Webhook } from '@/models/entities/Webhook.js';
import type { Meta } from '@/models/entities/Meta.js';
import { Role, RoleAssignment } from '@/models';