fix typecheck

This commit is contained in:
riku6460 2023-12-28 04:45:21 +09:00
parent cb81314b92
commit af56eea4d6
No known key found for this signature in database
GPG Key ID: 27414FA27DB94CF6
13 changed files with 34 additions and 22 deletions

2
locales/index.d.ts vendored
View File

@ -2078,6 +2078,8 @@ export interface Locale {
"read:flash-likes": string; "read:flash-likes": string;
"write:flash-likes": string; "write:flash-likes": string;
"read:admin:abuse-user-reports": string; "read:admin:abuse-user-reports": string;
"read:admin:abuse-report-resolvers": string;
"write:admin:abuse-report-resolvers": string;
"write:admin:delete-account": string; "write:admin:delete-account": string;
"write:admin:delete-all-files-of-a-user": string; "write:admin:delete-all-files-of-a-user": string;
"read:admin:index-stats": string; "read:admin:index-stats": string;

View File

@ -1983,6 +1983,8 @@ _permissions:
"read:flash-likes": "Playのいいねを見る" "read:flash-likes": "Playのいいねを見る"
"write:flash-likes": "Playのいいねを操作する" "write:flash-likes": "Playのいいねを操作する"
"read:admin:abuse-user-reports": "ユーザーからの通報を見る" "read:admin:abuse-user-reports": "ユーザーからの通報を見る"
"read:admin:abuse-report-resolvers": "リゾルバーを見る"
"write:admin:abuse-report-resolvers": "リゾルバーを編集する"
"write:admin:delete-account": "ユーザーアカウントを削除する" "write:admin:delete-account": "ユーザーアカウントを削除する"
"write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する" "write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する"
"read:admin:index-stats": "データベースインデックスに関する情報を見る" "read:admin:index-stats": "データベースインデックスに関する情報を見る"

View File

@ -16,8 +16,8 @@ export const meta = {
tags: ['admin'], tags: ['admin'],
requireCredential: true, requireCredential: true,
requireAdmin: true, requireAdmin: true,
kind: 'write:admin:abuse-report-resolvers',
res: { res: {
type: 'object', type: 'object',

View File

@ -10,9 +10,11 @@ import type { AbuseReportResolversRepository } from '@/models/_.js';
import { ApiError } from '../../../error.js'; import { ApiError } from '../../../error.js';
export const meta = { export const meta = {
requireCrendential: true, tags: ['admin'],
requireCredential: true,
requireAdmin: true, requireAdmin: true,
kind: 'write:admin:abuse-report-resolvers',
errors: { errors: {
resolverNotFound: { resolverNotFound: {

View File

@ -11,9 +11,11 @@ import { QueryService } from '@/core/QueryService.js';
import type { AbuseReportResolversRepository } from '@/models/_.js'; import type { AbuseReportResolversRepository } from '@/models/_.js';
export const meta = { export const meta = {
requireCredential: true, tags: ['admin'],
requireCredential: true,
requireAdmin: true, requireAdmin: true,
kind: 'read:admin:abuse-report-resolvers',
res: { res: {
type: 'array', type: 'array',

View File

@ -12,9 +12,11 @@ import type { AbuseReportResolversRepository, MiAbuseReportResolver } from '@/mo
import { ApiError } from '../../../error.js'; import { ApiError } from '../../../error.js';
export const meta = { export const meta = {
requireCredential: true, tags: ['admin'],
requireCredential: true,
requireAdmin: true, requireAdmin: true,
kind: 'write:admin:abuse-report-resolvers',
errors: { errors: {
resolverNotFound: { resolverNotFound: {

View File

@ -2552,7 +2552,7 @@ type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['
function parse(acct: string): Acct; function parse(acct: string): Acct;
// @public (undocumented) // @public (undocumented)
export const permissions: readonly ["read:account", "write:account", "read:blocks", "write:blocks", "read:drive", "write:drive", "read:favorites", "write:favorites", "read:following", "write:following", "read:messaging", "write:messaging", "read:mutes", "write:mutes", "write:notes", "read:notifications", "write:notifications", "read:reactions", "write:reactions", "write:votes", "read:pages", "write:pages", "write:page-likes", "read:page-likes", "read:user-groups", "write:user-groups", "read:channels", "write:channels", "read:gallery", "write:gallery", "read:gallery-likes", "write:gallery-likes", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "read:admin:abuse-user-reports", "write:admin:delete-account", "write:admin:delete-all-files-of-a-user", "read:admin:index-stats", "read:admin:table-stats", "read:admin:user-ips", "read:admin:meta", "write:admin:reset-password", "write:admin:resolve-abuse-user-report", "write:admin:send-email", "read:admin:server-info", "read:admin:show-moderation-log", "read:admin:show-user", "read:admin:show-users", "write:admin:suspend-user", "write:admin:unset-user-avatar", "write:admin:unset-user-banner", "write:admin:unsuspend-user", "write:admin:meta", "write:admin:user-note", "write:admin:roles", "read:admin:roles", "write:admin:relays", "read:admin:relays", "write:admin:invite-codes", "read:admin:invite-codes", "write:admin:announcements", "read:admin:announcements", "write:admin:avatar-decorations", "read:admin:avatar-decorations", "write:admin:federation", "write:admin:account", "read:admin:account", "write:admin:emoji", "read:admin:emoji", "write:admin:queue", "read:admin:queue", "write:admin:promo", "write:admin:drive", "read:admin:drive", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"]; export const permissions: readonly ["read:account", "write:account", "read:blocks", "write:blocks", "read:drive", "write:drive", "read:favorites", "write:favorites", "read:following", "write:following", "read:messaging", "write:messaging", "read:mutes", "write:mutes", "write:notes", "read:notifications", "write:notifications", "read:reactions", "write:reactions", "write:votes", "read:pages", "write:pages", "write:page-likes", "read:page-likes", "read:user-groups", "write:user-groups", "read:channels", "write:channels", "read:gallery", "write:gallery", "read:gallery-likes", "write:gallery-likes", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "read:admin:abuse-user-reports", "read:admin:abuse-report-resolvers", "write:admin:abuse-report-resolvers", "write:admin:delete-account", "write:admin:delete-all-files-of-a-user", "read:admin:index-stats", "read:admin:table-stats", "read:admin:user-ips", "read:admin:meta", "write:admin:reset-password", "write:admin:resolve-abuse-user-report", "write:admin:send-email", "read:admin:server-info", "read:admin:show-moderation-log", "read:admin:show-user", "read:admin:show-users", "write:admin:suspend-user", "write:admin:unset-user-avatar", "write:admin:unset-user-banner", "write:admin:unsuspend-user", "write:admin:meta", "write:admin:user-note", "write:admin:roles", "read:admin:roles", "write:admin:relays", "read:admin:relays", "write:admin:invite-codes", "read:admin:invite-codes", "write:admin:announcements", "read:admin:announcements", "write:admin:avatar-decorations", "read:admin:avatar-decorations", "write:admin:federation", "write:admin:account", "read:admin:account", "write:admin:emoji", "read:admin:emoji", "write:admin:queue", "read:admin:queue", "write:admin:promo", "write:admin:drive", "read:admin:drive", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"];
// @public (undocumented) // @public (undocumented)
type PingResponse = operations['ping']['responses']['200']['content']['application/json']; type PingResponse = operations['ping']['responses']['200']['content']['application/json'];

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.1-io * version: 2023.12.1-io
* generatedAt: 2023-12-27T18:51:33.354Z * generatedAt: 2023-12-27T19:40:57.229Z
*/ */
import type { SwitchCaseResponseType } from '../api.js'; import type { SwitchCaseResponseType } from '../api.js';
@ -154,7 +154,7 @@ declare module '../api.js' {
/** /**
* No description provided. * No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
request<E extends 'admin/abuse-report-resolver/create', P extends Endpoints[E]['req']>( request<E extends 'admin/abuse-report-resolver/create', P extends Endpoints[E]['req']>(
endpoint: E, endpoint: E,
@ -165,7 +165,7 @@ declare module '../api.js' {
/** /**
* No description provided. * No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers*
*/ */
request<E extends 'admin/abuse-report-resolver/list', P extends Endpoints[E]['req']>( request<E extends 'admin/abuse-report-resolver/list', P extends Endpoints[E]['req']>(
endpoint: E, endpoint: E,
@ -176,7 +176,7 @@ declare module '../api.js' {
/** /**
* No description provided. * No description provided.
* *
* **Credential required**: *No* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
request<E extends 'admin/abuse-report-resolver/delete', P extends Endpoints[E]['req']>( request<E extends 'admin/abuse-report-resolver/delete', P extends Endpoints[E]['req']>(
endpoint: E, endpoint: E,
@ -187,7 +187,7 @@ declare module '../api.js' {
/** /**
* No description provided. * No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
request<E extends 'admin/abuse-report-resolver/update', P extends Endpoints[E]['req']>( request<E extends 'admin/abuse-report-resolver/update', P extends Endpoints[E]['req']>(
endpoint: E, endpoint: E,

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.1-io * version: 2023.12.1-io
* generatedAt: 2023-12-27T18:51:33.349Z * generatedAt: 2023-12-27T19:40:57.223Z
*/ */
import type { import type {

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.1-io * version: 2023.12.1-io
* generatedAt: 2023-12-27T18:51:33.346Z * generatedAt: 2023-12-27T19:40:57.217Z
*/ */
import { operations } from './types.js'; import { operations } from './types.js';

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.1-io * version: 2023.12.1-io
* generatedAt: 2023-12-27T18:51:33.344Z * generatedAt: 2023-12-27T19:40:57.214Z
*/ */
import { components } from './types.js'; import { components } from './types.js';

View File

@ -3,7 +3,7 @@
/* /*
* version: 2023.12.1-io * version: 2023.12.1-io
* generatedAt: 2023-12-27T18:51:33.146Z * generatedAt: 2023-12-27T19:40:56.996Z
*/ */
/** /**
@ -139,7 +139,7 @@ export type paths = {
* admin/abuse-report-resolver/create * admin/abuse-report-resolver/create
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
post: operations['admin/abuse-report-resolver/create']; post: operations['admin/abuse-report-resolver/create'];
}; };
@ -148,7 +148,7 @@ export type paths = {
* admin/abuse-report-resolver/list * admin/abuse-report-resolver/list
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers*
*/ */
post: operations['admin/abuse-report-resolver/list']; post: operations['admin/abuse-report-resolver/list'];
}; };
@ -157,7 +157,7 @@ export type paths = {
* admin/abuse-report-resolver/delete * admin/abuse-report-resolver/delete
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *No* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
post: operations['admin/abuse-report-resolver/delete']; post: operations['admin/abuse-report-resolver/delete'];
}; };
@ -166,7 +166,7 @@ export type paths = {
* admin/abuse-report-resolver/update * admin/abuse-report-resolver/update
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
post: operations['admin/abuse-report-resolver/update']; post: operations['admin/abuse-report-resolver/update'];
}; };
@ -5457,7 +5457,7 @@ export type operations = {
* admin/abuse-report-resolver/create * admin/abuse-report-resolver/create
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
'admin/abuse-report-resolver/create': { 'admin/abuse-report-resolver/create': {
requestBody: { requestBody: {
@ -5523,7 +5523,7 @@ export type operations = {
* admin/abuse-report-resolver/list * admin/abuse-report-resolver/list
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers*
*/ */
'admin/abuse-report-resolver/list': { 'admin/abuse-report-resolver/list': {
requestBody: { requestBody: {
@ -5588,7 +5588,7 @@ export type operations = {
* admin/abuse-report-resolver/delete * admin/abuse-report-resolver/delete
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *No* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
'admin/abuse-report-resolver/delete': { 'admin/abuse-report-resolver/delete': {
requestBody: { requestBody: {
@ -5640,7 +5640,7 @@ export type operations = {
* admin/abuse-report-resolver/update * admin/abuse-report-resolver/update
* @description No description provided. * @description No description provided.
* *
* **Credential required**: *Yes* * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers*
*/ */
'admin/abuse-report-resolver/update': { 'admin/abuse-report-resolver/update': {
requestBody: { requestBody: {

View File

@ -46,6 +46,8 @@ export const permissions = [
'read:flash-likes', 'read:flash-likes',
'write:flash-likes', 'write:flash-likes',
'read:admin:abuse-user-reports', 'read:admin:abuse-user-reports',
'read:admin:abuse-report-resolvers',
'write:admin:abuse-report-resolvers',
'write:admin:delete-account', 'write:admin:delete-account',
'write:admin:delete-all-files-of-a-user', 'write:admin:delete-all-files-of-a-user',
'read:admin:index-stats', 'read:admin:index-stats',