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