replace Schema with ValidatableSchema
This commit is contained in:
parent
22adc78906
commit
d05b65f403
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
|
@ -79,7 +79,7 @@ export const paramDef = {
|
|||
'name',
|
||||
'method',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { AbuseReportNotificationService } from '@/core/AbuseReportNotificationService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -29,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'id',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
} from '@/core/entities/AbuseReportNotificationRecipientEntityService.js';
|
||||
|
@ -41,7 +41,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
} from '@/core/entities/AbuseReportNotificationRecipientEntityService.js';
|
||||
|
@ -46,7 +46,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
|
@ -84,7 +84,7 @@ export const paramDef = {
|
|||
'name',
|
||||
'method',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AbuseUserReportsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -93,7 +93,7 @@ export const paramDef = {
|
|||
forwarded: { type: 'boolean', default: false },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import { IsNull } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { SignupService } from '@/core/SignupService.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -39,7 +39,7 @@ export const paramDef = {
|
|||
password: passwordSchema,
|
||||
},
|
||||
required: ['username', 'password'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -27,7 +27,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UserProfilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -39,7 +39,7 @@ export const paramDef = {
|
|||
email: { type: 'string' },
|
||||
},
|
||||
required: ['email'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AdsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -40,7 +40,7 @@ export const paramDef = {
|
|||
dayOfWeek: { type: 'integer' },
|
||||
},
|
||||
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'startsAt', 'imageUrl', 'dayOfWeek'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AdsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -34,7 +34,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AdsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -39,7 +39,7 @@ export const paramDef = {
|
|||
publishing: { type: 'boolean', default: null, nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AdsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -43,7 +43,7 @@ export const paramDef = {
|
|||
dayOfWeek: { type: 'integer' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -66,7 +66,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true, default: null },
|
||||
},
|
||||
required: ['title', 'text', 'imageUrl'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AnnouncementsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
@ -34,7 +34,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -8,7 +8,7 @@ import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/mod
|
|||
import type { MiAnnouncement } from '@/models/Announcement.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -74,7 +74,7 @@ export const paramDef = {
|
|||
status: { type: 'string', enum: ['all', 'active', 'archived'], default: 'active' },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AnnouncementsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
@ -43,7 +43,7 @@ export const paramDef = {
|
|||
isActive: { type: 'boolean' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -28,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['name', 'description', 'url'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
@ -27,7 +27,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -8,7 +8,7 @@ import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/mod
|
|||
import type { MiAnnouncement } from '@/models/Announcement.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -79,7 +79,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
@ -34,7 +34,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DeleteAccountService } from '@/core/DeleteAccountService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -21,7 +21,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { IsNull } from 'typeorm';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -24,7 +24,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
|
||||
|
@ -47,7 +47,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { DriveFilesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -173,7 +173,7 @@ export const paramDef = {
|
|||
{ required: ['fileId'] },
|
||||
{ required: ['url'] },
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -28,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
@ -60,7 +60,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['name', 'fileId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
// TODO: ロジックをサービスに切り出す
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { EmojisRepository } from '@/models/_.js';
|
||||
import type { MiDriveFile } from '@/models/DriveFile.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -54,7 +54,7 @@ export const paramDef = {
|
|||
emojiId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['emojiId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
// TODO: ロジックをサービスに切り出す
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -31,7 +31,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -21,7 +21,7 @@ export const paramDef = {
|
|||
fileId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['fileId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { EmojisRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
@ -78,7 +78,7 @@ export const paramDef = {
|
|||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { EmojisRepository } from '@/models/_.js';
|
||||
import type { MiEmoji } from '@/models/Emoji.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
|
@ -72,7 +72,7 @@ export const paramDef = {
|
|||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -28,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -28,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -30,7 +30,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -30,7 +30,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -63,7 +63,7 @@ export const paramDef = {
|
|||
{ required: ['id'] },
|
||||
{ required: ['name'] },
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { InstancesRepository } from '@/models/_.js';
|
||||
import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
@ -26,7 +26,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { FollowingsRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { InstancesRepository } from '@/models/_.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -29,7 +29,7 @@ export const paramDef = {
|
|||
moderationNote: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import { DataSource } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -32,7 +32,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import { DataSource } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -45,7 +45,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UserIpsRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
||||
|
@ -44,7 +44,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RegistrationTicketsRepository } from '@/models/_.js';
|
||||
import { InviteCodeEntityService } from '@/core/entities/InviteCodeEntityService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -48,7 +48,7 @@ export const paramDef = {
|
|||
expiresAt: { type: 'string', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RegistrationTicketsRepository } from '@/models/_.js';
|
||||
import { InviteCodeEntityService } from '@/core/entities/InviteCodeEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -38,7 +38,7 @@ export const paramDef = {
|
|||
sort: { type: 'string', enum: ['+createdAt', '-createdAt', '+usedAt', '-usedAt'] },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -502,7 +502,7 @@ export const paramDef = {
|
|||
properties: {
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { PromoNotesRepository } from '@/models/_.js';
|
||||
import { GetterService } from '@/server/api/GetterService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -41,7 +41,7 @@ export const paramDef = {
|
|||
expiresAt: { type: 'integer' },
|
||||
},
|
||||
required: ['noteId', 'expiresAt'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
|
@ -22,7 +22,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { URL } from 'node:url';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DeliverQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -44,7 +44,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { URL } from 'node:url';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { InboxQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -44,7 +44,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
|
@ -24,7 +24,7 @@ export const paramDef = {
|
|||
type: { type: 'string', enum: ['deliver', 'inbox'] },
|
||||
},
|
||||
required: ['type'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, UserWebhookDeliverQueue, SystemWebhookDeliverQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -44,7 +44,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { URL } from 'node:url';
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { RelayService } from '@/core/RelayService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
||||
|
@ -60,7 +60,7 @@ export const paramDef = {
|
|||
inbox: { type: 'string' },
|
||||
},
|
||||
required: ['inbox'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { RelayService } from '@/core/RelayService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -52,7 +52,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { RelayService } from '@/core/RelayService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -23,7 +23,7 @@ export const paramDef = {
|
|||
inbox: { type: 'string' },
|
||||
},
|
||||
required: ['inbox'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import bcrypt from 'bcryptjs';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UsersRepository, UserProfilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
|
@ -40,7 +40,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AbuseUserReportsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -37,7 +37,7 @@ export const paramDef = {
|
|||
forward: { type: 'boolean', default: false },
|
||||
},
|
||||
required: ['reportId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -54,7 +54,7 @@ export const paramDef = {
|
|||
'roleId',
|
||||
'userId',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
|
||||
|
@ -59,7 +59,7 @@ export const paramDef = {
|
|||
'displayOrder',
|
||||
'policies',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -36,7 +36,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
|
@ -35,7 +35,7 @@ export const paramDef = {
|
|||
},
|
||||
required: [
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -42,7 +42,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -56,7 +56,7 @@ export const paramDef = {
|
|||
'roleId',
|
||||
'userId',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -29,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'policies',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -52,7 +52,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Brackets } from 'typeorm';
|
|||
import type { RoleAssignmentsRepository, RolesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -54,7 +54,7 @@ export const paramDef = {
|
|||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
},
|
||||
required: ['roleId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { EmailService } from '@/core/EmailService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
text: { type: 'string' },
|
||||
},
|
||||
required: ['to', 'subject', 'text'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -10,7 +10,7 @@ import { DataSource } from 'typeorm';
|
|||
import * as Redis from 'ioredis';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -101,7 +101,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { ModerationLogsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -69,7 +69,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UsersRepository, SigninsRepository, UserProfilesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
|
@ -184,7 +184,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
||||
|
@ -48,7 +48,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { UserSuspendService } from '@/core/UserSuspendService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -26,7 +26,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -61,7 +61,7 @@ export const paramDef = {
|
|||
'url',
|
||||
'secret',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -29,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'id',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -43,7 +43,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -44,7 +44,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['id'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -66,7 +66,7 @@ export const paramDef = {
|
|||
'url',
|
||||
'secret',
|
||||
],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@Injectable()
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@Injectable()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { UserSuspendService } from '@/core/UserSuspendService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -8,7 +8,7 @@ import type { MiMeta } from '@/models/Meta.js';
|
|||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -171,7 +171,7 @@ export const paramDef = {
|
|||
urlPreviewSummaryProxyUrl: { type: 'string', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { UserProfilesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -26,7 +26,7 @@ export const paramDef = {
|
|||
text: { type: 'string' },
|
||||
},
|
||||
required: ['userId', 'text'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import { Brackets } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { AnnouncementEntityService } from '@/core/entities/AnnouncementEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -38,7 +38,7 @@ export const paramDef = {
|
|||
isActive: { type: 'boolean', default: true },
|
||||
},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Injectable } from '@nestjs/common';
|
|||
import { EntityNotFoundError } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
|
@ -37,7 +37,7 @@ export const paramDef = {
|
|||
announcementId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['announcementId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import type { UserListsRepository, AntennasRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
|
@ -71,7 +71,7 @@ export const paramDef = {
|
|||
withFile: { type: 'boolean' },
|
||||
},
|
||||
required: ['name', 'src', 'keywords', 'excludeKeywords', 'users', 'caseSensitive', 'withReplies', 'withFile'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AntennasRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -34,7 +34,7 @@ export const paramDef = {
|
|||
antennaId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AntennasRepository } from '@/models/_.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -33,7 +33,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import * as Redis from 'ioredis';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { NotesRepository, AntennasRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { NoteReadService } from '@/core/NoteReadService.js';
|
||||
|
@ -56,7 +56,7 @@ export const paramDef = {
|
|||
untilDate: { type: 'integer' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AntennasRepository } from '@/models/_.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -40,7 +40,7 @@ export const paramDef = {
|
|||
antennaId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AntennasRepository, UserListsRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
|
@ -70,7 +70,7 @@ export const paramDef = {
|
|||
withFile: { type: 'boolean' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Injectable } from '@nestjs/common';
|
|||
import ms from 'ms';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import { ApResolverService } from '@/core/activitypub/ApResolverService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -36,7 +36,7 @@ export const paramDef = {
|
|||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Injectable } from '@nestjs/common';
|
|||
import ms from 'ms';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { MiNote } from '@/models/Note.js';
|
||||
import type { MiLocalUser, MiUser } from '@/models/User.js';
|
||||
import { isActor, isPost, getApId } from '@/core/activitypub/type.js';
|
||||
|
@ -85,7 +85,7 @@ export const paramDef = {
|
|||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema, ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AppsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { unique } from '@/misc/prelude/array.js';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AppsRepository } from '@/models/_.js';
|
||||
import { AppEntityService } from '@/core/entities/AppEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -36,7 +36,7 @@ export const paramDef = {
|
|||
appId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['appId'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import * as crypto from 'node:crypto';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AuthSessionsRepository, AppsRepository, AccessTokensRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
|
@ -36,7 +36,7 @@ export const paramDef = {
|
|||
token: { type: 'string' },
|
||||
},
|
||||
required: ['token'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import type { ValidatableSchema } from '@/misc/json-schema.js';
|
||||
import type { AppsRepository, AuthSessionsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
|
@ -50,7 +50,7 @@ export const paramDef = {
|
|||
appSecret: { type: 'string' },
|
||||
},
|
||||
required: ['appSecret'],
|
||||
} as const satisfies Schema;
|
||||
} as const satisfies ValidatableSchema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue