diff --git a/locales/index.d.ts b/locales/index.d.ts index acc49834f3..f093bb3f33 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -2078,6 +2078,8 @@ export interface Locale { "read:flash-likes": string; "write:flash-likes": 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-all-files-of-a-user": string; "read:admin:index-stats": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 74b1329529..d1952eec86 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1983,6 +1983,8 @@ _permissions: "read:flash-likes": "Playのいいねを見る" "write:flash-likes": "Playのいいねを操作する" "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": "データベースインデックスに関する情報を見る" diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/create.ts b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/create.ts index cc50df8f24..0796a0547d 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/create.ts @@ -16,8 +16,8 @@ export const meta = { tags: ['admin'], requireCredential: true, - requireAdmin: true, + kind: 'write:admin:abuse-report-resolvers', res: { type: 'object', diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/delete.ts b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/delete.ts index 312a8b4c4c..a4d169caa4 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/delete.ts @@ -10,9 +10,11 @@ import type { AbuseReportResolversRepository } from '@/models/_.js'; import { ApiError } from '../../../error.js'; export const meta = { - requireCrendential: true, + tags: ['admin'], + requireCredential: true, requireAdmin: true, + kind: 'write:admin:abuse-report-resolvers', errors: { resolverNotFound: { diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/list.ts b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/list.ts index d806e73d92..1a13d116a2 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/list.ts @@ -11,9 +11,11 @@ import { QueryService } from '@/core/QueryService.js'; import type { AbuseReportResolversRepository } from '@/models/_.js'; export const meta = { - requireCredential: true, + tags: ['admin'], + requireCredential: true, requireAdmin: true, + kind: 'read:admin:abuse-report-resolvers', res: { type: 'array', diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/update.ts b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/update.ts index c15495fcd3..47afce88fa 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/update.ts @@ -12,9 +12,11 @@ import type { AbuseReportResolversRepository, MiAbuseReportResolver } from '@/mo import { ApiError } from '../../../error.js'; export const meta = { - requireCredential: true, + tags: ['admin'], + requireCredential: true, requireAdmin: true, + kind: 'write:admin:abuse-report-resolvers', errors: { resolverNotFound: { diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index df50bdd3b3..06e2e8d228 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -2552,7 +2552,7 @@ type PagesUpdateRequest = operations['pages/update']['requestBody']['content'][' function parse(acct: string): Acct; // @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) type PingResponse = operations['ping']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index 4be233bf29..043c83194f 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -1,6 +1,6 @@ /* * 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'; @@ -154,7 +154,7 @@ declare module '../api.js' { /** * No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ request( endpoint: E, @@ -165,7 +165,7 @@ declare module '../api.js' { /** * No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers* */ request( endpoint: E, @@ -176,7 +176,7 @@ declare module '../api.js' { /** * No description provided. * - * **Credential required**: *No* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ request( endpoint: E, @@ -187,7 +187,7 @@ declare module '../api.js' { /** * No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ request( endpoint: E, diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 8513a16a9b..1778f01d0a 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.1-io - * generatedAt: 2023-12-27T18:51:33.349Z + * generatedAt: 2023-12-27T19:40:57.223Z */ import type { diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 7201dd64f6..91473c2051 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.1-io - * generatedAt: 2023-12-27T18:51:33.346Z + * generatedAt: 2023-12-27T19:40:57.217Z */ import { operations } from './types.js'; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index f0d4dc185f..e0996867d3 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.1-io - * generatedAt: 2023-12-27T18:51:33.344Z + * generatedAt: 2023-12-27T19:40:57.214Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index ad921e32a2..5b18909b83 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * 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 * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ post: operations['admin/abuse-report-resolver/create']; }; @@ -148,7 +148,7 @@ export type paths = { * admin/abuse-report-resolver/list * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers* */ post: operations['admin/abuse-report-resolver/list']; }; @@ -157,7 +157,7 @@ export type paths = { * admin/abuse-report-resolver/delete * @description No description provided. * - * **Credential required**: *No* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ post: operations['admin/abuse-report-resolver/delete']; }; @@ -166,7 +166,7 @@ export type paths = { * admin/abuse-report-resolver/update * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ post: operations['admin/abuse-report-resolver/update']; }; @@ -5457,7 +5457,7 @@ export type operations = { * admin/abuse-report-resolver/create * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ 'admin/abuse-report-resolver/create': { requestBody: { @@ -5523,7 +5523,7 @@ export type operations = { * admin/abuse-report-resolver/list * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolvers* */ 'admin/abuse-report-resolver/list': { requestBody: { @@ -5588,7 +5588,7 @@ export type operations = { * admin/abuse-report-resolver/delete * @description No description provided. * - * **Credential required**: *No* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ 'admin/abuse-report-resolver/delete': { requestBody: { @@ -5640,7 +5640,7 @@ export type operations = { * admin/abuse-report-resolver/update * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolvers* */ 'admin/abuse-report-resolver/update': { requestBody: { diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index 0e446c1215..7ce1b66df2 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -46,6 +46,8 @@ export const permissions = [ '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',