From b9b339fd48e39b2a20fac05bb5ed29f210551971 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 16 Feb 2025 19:31:11 -0500 Subject: [PATCH] add `admin/reject-quotes` to new endpoints list --- .../backend/src/server/api/endpoint-list.ts | 1 + .../misskey-js/src/autogen/apiClientJSDoc.ts | 11 ++++ packages/misskey-js/src/autogen/endpoint.ts | 2 + packages/misskey-js/src/autogen/entities.ts | 1 + packages/misskey-js/src/autogen/types.ts | 66 +++++++++++++++++++ 5 files changed, 81 insertions(+) diff --git a/packages/backend/src/server/api/endpoint-list.ts b/packages/backend/src/server/api/endpoint-list.ts index 551d7b17c2..a641a14448 100644 --- a/packages/backend/src/server/api/endpoint-list.ts +++ b/packages/backend/src/server/api/endpoint-list.ts @@ -74,6 +74,7 @@ export * as 'admin/queue/deliver-delayed' from './endpoints/admin/queue/deliver- export * as 'admin/queue/inbox-delayed' from './endpoints/admin/queue/inbox-delayed.js'; export * as 'admin/queue/promote' from './endpoints/admin/queue/promote.js'; export * as 'admin/queue/stats' from './endpoints/admin/queue/stats.js'; +export * as 'admin/reject-quotes' from './endpoints/admin/reject-quotes.js'; export * as 'admin/relays/add' from './endpoints/admin/relays/add.js'; export * as 'admin/relays/list' from './endpoints/admin/relays/list.js'; export * as 'admin/relays/remove' from './endpoints/admin/relays/remove.js'; diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index 99e202a1b6..2f3cd3b2ad 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -713,6 +713,17 @@ declare module '../api.js' { credential?: string | null, ): Promise>; + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:admin:reject-quotes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + /** * No description provided. * diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index b31dd2d8f1..0ef2db70f6 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -83,6 +83,7 @@ import type { AdminQueueInboxDelayedResponse, AdminQueuePromoteRequest, AdminQueueStatsResponse, + AdminRejectQuotesRequest, AdminRelaysAddRequest, AdminRelaysAddResponse, AdminRelaysListResponse, @@ -674,6 +675,7 @@ export type Endpoints = { 'admin/queue/inbox-delayed': { req: EmptyRequest; res: AdminQueueInboxDelayedResponse }; 'admin/queue/promote': { req: AdminQueuePromoteRequest; res: EmptyResponse }; 'admin/queue/stats': { req: EmptyRequest; res: AdminQueueStatsResponse }; + 'admin/reject-quotes': { req: AdminRejectQuotesRequest; res: EmptyResponse }; 'admin/relays/add': { req: AdminRelaysAddRequest; res: AdminRelaysAddResponse }; 'admin/relays/list': { req: EmptyRequest; res: AdminRelaysListResponse }; 'admin/relays/remove': { req: AdminRelaysRemoveRequest; res: EmptyResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index c65669d056..df411153fd 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -86,6 +86,7 @@ export type AdminQueueDeliverDelayedResponse = operations['admin___queue___deliv export type AdminQueueInboxDelayedResponse = operations['admin___queue___inbox-delayed']['responses']['200']['content']['application/json']; export type AdminQueuePromoteRequest = operations['admin___queue___promote']['requestBody']['content']['application/json']; export type AdminQueueStatsResponse = operations['admin___queue___stats']['responses']['200']['content']['application/json']; +export type AdminRejectQuotesRequest = operations['admin___reject-quotes']['requestBody']['content']['application/json']; export type AdminRelaysAddRequest = operations['admin___relays___add']['requestBody']['content']['application/json']; export type AdminRelaysAddResponse = operations['admin___relays___add']['responses']['200']['content']['application/json']; export type AdminRelaysListResponse = operations['admin___relays___list']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 46356613ac..f1b0856c2e 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -594,6 +594,15 @@ export type paths = { */ post: operations['admin___queue___stats']; }; + '/admin/reject-quotes': { + /** + * admin/reject-quotes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:admin:reject-quotes* + */ + post: operations['admin___reject-quotes']; + }; '/admin/relays/add': { /** * admin/relays/add @@ -4061,6 +4070,7 @@ export type components = { twoFactorEnabled?: boolean; usePasswordLessLogin?: boolean; securityKeys?: boolean; + rejectQuotes?: boolean; isFollowing?: boolean; isFollowed?: boolean; hasPendingFollowRequestFromYou?: boolean; @@ -4408,6 +4418,7 @@ export type components = { url?: string; reactionAndUserPairCache?: string[]; clippedCount?: number; + processErrors?: string[] | null; myReaction?: string | null; }; NoteReaction: { @@ -4965,6 +4976,7 @@ export type components = { latestRequestReceivedAt: string | null; isNSFW: boolean; rejectReports: boolean; + rejectQuotes: boolean; moderationNote?: string | null; }; GalleryPost: { @@ -8286,6 +8298,7 @@ export type operations = { isNSFW?: boolean; rejectReports?: boolean; moderationNote?: string; + rejectQuotes?: boolean; }; }; }; @@ -9222,6 +9235,59 @@ export type operations = { }; }; }; + /** + * admin/reject-quotes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:admin:reject-quotes* + */ + 'admin___reject-quotes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + rejectQuotes: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * admin/relays/add * @description No description provided.