refactor(backend): すべてのエンドポイントの型チェックを強化
This commit is contained in:
parent
567acea2a3
commit
619b4fdf52
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { ApiError } from '@/server/api/error.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
|
@ -46,7 +48,7 @@ export const meta = {
|
|||
httpStatusCode: 400,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -77,7 +79,7 @@ export const paramDef = {
|
|||
'name',
|
||||
'method',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AbuseReportNotificationService } from '@/core/AbuseReportNotificationService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -14,7 +16,7 @@ export const meta = {
|
|||
requireModerator: true,
|
||||
secure: true,
|
||||
kind: 'write:admin:abuse-report:notification-recipient',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -27,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'id',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
} from '@/core/entities/AbuseReportNotificationRecipientEntityService.js';
|
||||
|
@ -25,7 +27,7 @@ export const meta = {
|
|||
ref: 'AbuseReportNotificationRecipient',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -39,7 +41,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
} from '@/core/entities/AbuseReportNotificationRecipientEntityService.js';
|
||||
|
@ -33,7 +35,7 @@ export const meta = {
|
|||
httpStatusCode: 404,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -44,7 +46,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { ApiError } from '@/server/api/error.js';
|
||||
import {
|
||||
AbuseReportNotificationRecipientEntityService,
|
||||
|
@ -46,7 +48,7 @@ export const meta = {
|
|||
httpStatusCode: 400,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -82,7 +84,7 @@ export const paramDef = {
|
|||
'name',
|
||||
'method',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AbuseUserReportsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -77,7 +79,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -91,7 +93,7 @@ export const paramDef = {
|
|||
forwarded: { type: 'boolean', default: false },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { UsersRepository } from '@/models/_.js';
|
||||
import { SignupService } from '@/core/SignupService.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -28,7 +30,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -37,7 +39,7 @@ export const paramDef = {
|
|||
password: passwordSchema,
|
||||
},
|
||||
required: ['username', 'password'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { UsersRepository } from '@/models/_.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -17,7 +19,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:account',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -25,7 +27,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { UserProfilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -29,7 +31,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'UserDetailedNotMe',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -37,7 +39,7 @@ export const paramDef = {
|
|||
email: { type: 'string' },
|
||||
},
|
||||
required: ['email'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AdsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -22,7 +24,7 @@ export const meta = {
|
|||
nullable: false,
|
||||
ref: 'Ad',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -38,7 +40,7 @@ export const paramDef = {
|
|||
dayOfWeek: { type: 'integer' },
|
||||
},
|
||||
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'startsAt', 'imageUrl', 'dayOfWeek'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AdsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'ccac9863-3a03-416e-b899-8a64041118b1',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -32,7 +34,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AdsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
ref: 'Ad',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -37,7 +39,7 @@ export const paramDef = {
|
|||
publishing: { type: 'boolean', default: null, nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AdsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'b7aa1727-1354-47bc-a182-3a9c3973d300',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -41,7 +43,7 @@ export const paramDef = {
|
|||
dayOfWeek: { type: 'integer' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -48,7 +50,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -64,7 +66,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true, default: null },
|
||||
},
|
||||
required: ['title', 'text', 'imageUrl'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AnnouncementsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'ecad8040-a276-4e85-bda9-015a708d291e',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -32,7 +34,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,6 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/models/_.js';
|
||||
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 { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -60,7 +62,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -72,7 +74,7 @@ export const paramDef = {
|
|||
status: { type: 'string', enum: ['all', 'active', 'archived'], default: 'active' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AnnouncementsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'd3aae5a7-6372-4cb4-b61c-f511ffc2d7cc',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -41,7 +43,7 @@ export const paramDef = {
|
|||
isActive: { type: 'boolean' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageAvatarDecorations',
|
||||
kind: 'write:admin:avatar-decorations',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -26,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['name', 'description', 'url'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DI } from '@/di-symbols.js';
|
||||
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
@ -17,7 +19,7 @@ export const meta = {
|
|||
kind: 'write:admin:avatar-decorations',
|
||||
errors: {
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -25,7 +27,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,6 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/models/_.js';
|
||||
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 { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -66,7 +68,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -77,7 +79,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DI } from '@/di-symbols.js';
|
||||
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
@ -18,7 +20,7 @@ export const meta = {
|
|||
|
||||
errors: {
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -32,7 +34,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DeleteAccountService } from '@/core/DeleteAccountService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:delete-account',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:delete-all-files-of-a-user',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,13 +15,13 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:drive',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -16,13 +18,13 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:drive',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
ref: 'DriveFile',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -45,7 +47,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -159,7 +161,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -171,7 +173,7 @@ export const paramDef = {
|
|||
{ required: ['fileId'] },
|
||||
{ required: ['url'] },
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -26,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
@ -35,7 +37,7 @@ export const meta = {
|
|||
type: 'object',
|
||||
ref: 'EmojiDetailed',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -58,7 +60,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['name', 'fileId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
// TODO: ロジックをサービスに切り出す
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { EmojisRepository } from '@/models/_.js';
|
||||
import type { MiDriveFile } from '@/models/DriveFile.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -44,7 +46,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -52,7 +54,7 @@ export const paramDef = {
|
|||
emojiId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['emojiId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
// TODO: ロジックをサービスに切り出す
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -21,7 +23,7 @@ export const meta = {
|
|||
id: 'be83669b-773a-44b7-b1f8-e5e5170ac3c2',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -29,7 +31,7 @@ export const paramDef = {
|
|||
id: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,13 +5,15 @@
|
|||
|
||||
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 { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
export const meta = {
|
||||
secure: true,
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -19,7 +21,7 @@ export const paramDef = {
|
|||
fileId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['fileId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { EmojisRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
@ -59,7 +61,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -76,7 +78,7 @@ export const paramDef = {
|
|||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { EmojisRepository } from '@/models/_.js';
|
||||
import type { MiEmoji } from '@/models/Emoji.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
|
@ -59,7 +61,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -70,7 +72,7 @@ export const paramDef = {
|
|||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -26,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -26,7 +28,7 @@ export const paramDef = {
|
|||
} },
|
||||
},
|
||||
required: ['ids', 'aliases'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -28,7 +30,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -28,7 +30,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['ids'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -34,7 +36,7 @@ export const meta = {
|
|||
id: '7180fe9d-1ee3-bff9-647d-fe9896d2ffb8',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -61,7 +63,7 @@ export const paramDef = {
|
|||
{ required: ['id'] },
|
||||
{ required: ['name'] },
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { InstancesRepository } from '@/models/_.js';
|
||||
import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
@ -16,7 +18,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -24,7 +26,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { FollowingsRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
host: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { InstancesRepository } from '@/models/_.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -17,7 +19,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -27,7 +29,7 @@ export const paramDef = {
|
|||
moderationNote: { type: 'string' },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -24,13 +26,13 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -37,13 +39,13 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
||||
|
@ -34,7 +36,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -42,7 +44,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RegistrationTicketsRepository } from '@/models/_.js';
|
||||
import { InviteCodeEntityService } from '@/core/entities/InviteCodeEntityService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -37,7 +39,7 @@ export const meta = {
|
|||
ref: 'InviteCode',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -46,7 +48,7 @@ export const paramDef = {
|
|||
expiresAt: { type: 'string', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RegistrationTicketsRepository } from '@/models/_.js';
|
||||
import { InviteCodeEntityService } from '@/core/entities/InviteCodeEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,7 +27,7 @@ export const meta = {
|
|||
ref: 'InviteCode',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -36,7 +38,7 @@ export const paramDef = {
|
|||
sort: { type: 'string', enum: ['+createdAt', '-createdAt', '+usedAt', '-usedAt'] },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { MetaService } from '@/core/MetaService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -493,14 +495,14 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { PromoNotesRepository } from '@/models/_.js';
|
||||
import { GetterService } from '@/server/api/GetterService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -30,7 +32,7 @@ export const meta = {
|
|||
id: 'ae427aa2-7a41-484f-a18c-2c1104051604',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -39,7 +41,7 @@ export const paramDef = {
|
|||
expiresAt: { type: 'integer' },
|
||||
},
|
||||
required: ['noteId', 'expiresAt'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
|
@ -14,13 +16,13 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:queue',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DeliverQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -36,13 +38,13 @@ export const meta = {
|
|||
12,
|
||||
]],
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { InboxQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -36,13 +38,13 @@ export const meta = {
|
|||
12,
|
||||
]],
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
|
@ -14,7 +16,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:queue',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -22,7 +24,7 @@ export const paramDef = {
|
|||
type: { type: 'string', enum: ['deliver', 'inbox'] },
|
||||
},
|
||||
required: ['type'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, UserWebhookDeliverQueue, SystemWebhookDeliverQueue } from '@/core/QueueModule.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -36,13 +38,13 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { RelayService } from '@/core/RelayService.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
||||
|
@ -50,7 +52,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -58,7 +60,7 @@ export const paramDef = {
|
|||
inbox: { type: 'string' },
|
||||
},
|
||||
required: ['inbox'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RelayService } from '@/core/RelayService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -44,13 +46,13 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RelayService } from '@/core/RelayService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:relays',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -21,7 +23,7 @@ export const paramDef = {
|
|||
inbox: { type: 'string' },
|
||||
},
|
||||
required: ['inbox'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { UsersRepository, UserProfilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
|
@ -30,7 +32,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -38,7 +40,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AbuseUserReportsRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
httpStatusCode: 404,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -35,7 +37,7 @@ export const paramDef = {
|
|||
forward: { type: 'boolean', default: false },
|
||||
},
|
||||
required: ['reportId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -36,7 +38,7 @@ export const meta = {
|
|||
id: '25b5bc31-dc79-4ebd-9bd2-c84978fd052c',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -52,7 +54,7 @@ export const paramDef = {
|
|||
'roleId',
|
||||
'userId',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
|
||||
|
@ -20,7 +22,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Role',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -57,7 +59,7 @@ export const paramDef = {
|
|||
'displayOrder',
|
||||
'policies',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'de0d6ecd-8e0a-4253-88ff-74bc89ae3d45',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -34,7 +36,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
|
@ -25,7 +27,7 @@ export const meta = {
|
|||
ref: 'Role',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -33,7 +35,7 @@ export const paramDef = {
|
|||
},
|
||||
required: [
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -30,7 +32,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Role',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -40,7 +42,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -42,7 +44,7 @@ export const meta = {
|
|||
id: '24636eee-e8c1-493e-94b2-e16ad401e262',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -54,7 +56,7 @@ export const paramDef = {
|
|||
'roleId',
|
||||
'userId',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:roles',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -27,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'policies',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { RolesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'cd23ef55-09ad-428a-ac61-95a45e124b32',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -50,7 +52,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'roleId',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,6 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
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 { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
|
@ -41,7 +43,7 @@ export const meta = {
|
|||
required: ['id', 'createdAt', 'user'],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -52,7 +54,7 @@ export const paramDef = {
|
|||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
},
|
||||
required: ['roleId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { EmailService } from '@/core/EmailService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -13,7 +15,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:send-email',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
text: { type: 'string' },
|
||||
},
|
||||
required: ['to', 'subject', 'text'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -9,6 +9,8 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -93,13 +95,13 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { ModerationLogsRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -55,7 +57,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -67,7 +69,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
||||
|
@ -174,7 +176,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -182,7 +184,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
||||
|
@ -27,7 +29,7 @@ export const meta = {
|
|||
ref: 'UserDetailed',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -46,7 +48,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { UsersRepository } from '@/models/_.js';
|
||||
import { UserSuspendService } from '@/core/UserSuspendService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -16,7 +18,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:suspend-user',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -24,7 +26,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -21,7 +23,7 @@ export const meta = {
|
|||
type: 'object',
|
||||
ref: 'SystemWebhook',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -59,7 +61,7 @@ export const paramDef = {
|
|||
'url',
|
||||
'secret',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -14,7 +16,7 @@ export const meta = {
|
|||
requireModerator: true,
|
||||
secure: true,
|
||||
kind: 'write:admin:system-webhook',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -27,7 +29,7 @@ export const paramDef = {
|
|||
required: [
|
||||
'id',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
ref: 'SystemWebhook',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -41,7 +43,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -31,7 +33,7 @@ export const meta = {
|
|||
httpStatusCode: 404,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -42,7 +44,7 @@ export const paramDef = {
|
|||
},
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { SystemWebhookEntityService } from '@/core/entities/SystemWebhookEntityService.js';
|
||||
import { systemWebhookEventTypes } from '@/models/SystemWebhook.js';
|
||||
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
|
||||
|
@ -21,7 +23,7 @@ export const meta = {
|
|||
type: 'object',
|
||||
ref: 'SystemWebhook',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -64,7 +66,7 @@ export const paramDef = {
|
|||
'url',
|
||||
'secret',
|
||||
],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unset-user-avatar',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@Injectable()
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unset-user-banner',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@Injectable()
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { UsersRepository } from '@/models/_.js';
|
||||
import { UserSuspendService } from '@/core/UserSuspendService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unsuspend-user',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
|||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -7,6 +7,8 @@ import { Injectable } from '@nestjs/common';
|
|||
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 { MetaService } from '@/core/MetaService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:meta',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -169,7 +171,7 @@ export const paramDef = {
|
|||
urlPreviewSummaryProxyUrl: { type: 'string', nullable: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { DI } from '@/di-symbols.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
|
||||
|
@ -15,7 +17,7 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:user-note',
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -24,7 +26,7 @@ export const paramDef = {
|
|||
text: { type: 'string' },
|
||||
},
|
||||
required: ['userId', 'text'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { QueryService } from '@/core/QueryService.js';
|
||||
import { AnnouncementEntityService } from '@/core/entities/AnnouncementEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,7 +27,7 @@ export const meta = {
|
|||
ref: 'Announcement',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -36,7 +38,7 @@ export const paramDef = {
|
|||
isActive: { type: 'boolean', default: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
|
@ -27,7 +29,7 @@ export const meta = {
|
|||
id: 'b57b5e1d-4f49-404a-9edb-46b00268f121',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -35,7 +37,7 @@ export const paramDef = {
|
|||
announcementId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['announcementId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { IdService } from '@/core/IdService.js';
|
||||
import type { UserListsRepository, AntennasRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
|
@ -41,7 +43,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Antenna',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -69,7 +71,7 @@ export const paramDef = {
|
|||
withFile: { type: 'boolean' },
|
||||
},
|
||||
required: ['name', 'src', 'keywords', 'excludeKeywords', 'users', 'caseSensitive', 'withReplies', 'withFile'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AntennasRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -24,7 +26,7 @@ export const meta = {
|
|||
id: 'b34dcf9d-348f-44bb-99d0-6c9314cfe2df',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -32,7 +34,7 @@ export const paramDef = {
|
|||
antennaId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AntennasRepository } from '@/models/_.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -25,13 +27,13 @@ export const meta = {
|
|||
ref: 'Antenna',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
required: [],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { NotesRepository, AntennasRepository } from '@/models/_.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { NoteReadService } from '@/core/NoteReadService.js';
|
||||
|
@ -41,7 +43,7 @@ export const meta = {
|
|||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -54,7 +56,7 @@ export const paramDef = {
|
|||
untilDate: { type: 'integer' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AntennasRepository } from '@/models/_.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -30,7 +32,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Antenna',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -38,7 +40,7 @@ export const paramDef = {
|
|||
antennaId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AntennasRepository, UserListsRepository } from '@/models/_.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { AntennaEntityService } from '@/core/entities/AntennaEntityService.js';
|
||||
|
@ -39,7 +41,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Antenna',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -68,7 +70,7 @@ export const paramDef = {
|
|||
withFile: { type: 'boolean' },
|
||||
},
|
||||
required: ['antennaId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { ApResolverService } from '@/core/activitypub/ApResolverService.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -34,7 +36,7 @@ export const paramDef = {
|
|||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { MiNote } from '@/models/Note.js';
|
||||
import type { MiLocalUser, MiUser } from '@/models/User.js';
|
||||
import { isActor, isPost, getApId } from '@/core/activitypub/type.js';
|
||||
|
@ -75,7 +77,7 @@ export const meta = {
|
|||
},
|
||||
],
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -83,7 +85,7 @@ export const paramDef = {
|
|||
uri: { type: 'string' },
|
||||
},
|
||||
required: ['uri'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AppsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { unique } from '@/misc/prelude/array.js';
|
||||
|
@ -22,7 +24,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'App',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -35,7 +37,7 @@ export const paramDef = {
|
|||
callbackUrl: { type: 'string', nullable: true },
|
||||
},
|
||||
required: ['name', 'description', 'permission'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
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 { AppsRepository } from '@/models/_.js';
|
||||
import { AppEntityService } from '@/core/entities/AppEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'App',
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -34,7 +36,7 @@ export const paramDef = {
|
|||
appId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['appId'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { AuthSessionsRepository, AppsRepository, AccessTokensRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
|
@ -26,7 +28,7 @@ export const meta = {
|
|||
id: '9c72d8de-391a-43c1-9d06-08d29efde8df',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -34,7 +36,7 @@ export const paramDef = {
|
|||
token: { type: 'string' },
|
||||
},
|
||||
required: ['token'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
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 { AppsRepository, AuthSessionsRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
|
@ -40,7 +42,7 @@ export const meta = {
|
|||
id: '92f93e63-428e-4f2f-a5a4-39e1407fe998',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
} as const satisfies IEndpointMeta;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
|
@ -48,7 +50,7 @@ export const paramDef = {
|
|||
appSecret: { type: 'string' },
|
||||
},
|
||||
required: ['appSecret'],
|
||||
} as const;
|
||||
} as const satisfies Schema;
|
||||
|
||||
@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