pl-fe: refresh reports management, i hate masto admin api

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-07-28 00:11:09 +02:00
parent 5032cb1c07
commit 1b6757386f
11 changed files with 360 additions and 23 deletions

View File

@ -4238,7 +4238,7 @@ class PlApiClient {
return this.#paginatedGet('/api/v1/admin/reports', { params }, adminReportSchema);
} else {
return this.#paginatedPleromaReports({
state: params?.resolved === true ? 'resolved' : params?.resolved === false ? 'open' : undefined,
state: params?.resolved === true ? 'resolved' : 'open',
page_size: params?.limit || 100,
});
}
@ -4297,6 +4297,7 @@ class PlApiClient {
*
* Mark a report as resolved with no further action taken.
*
* `action_taken_comment` param requires features{@link Features.mastodonAdminResolveReportWithComment}.
* @param action_taken_comment Optional admin comment on the action taken in response to this report. Supported by GoToSocial only.
* @see {@link https://docs.joinmastodon.org/methods/admin/reports/#resolve}
*/

View File

@ -1210,6 +1210,8 @@ const getFeatures = (instance: Instance) => {
v.software === PLEROMA && v.build === PL,
]),
mastodonAdminResolveReportWithComment: v.software === GOTOSOCIAL,
/**
* @see POST /api/v1/admin/dimensions
* @see POST /api/v1/admin/measures

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "1.0.0-rc.86",
"version": "1.0.0-rc.87",
"type": "module",
"homepage": "https://codeberg.org/mkljczk/pl-fe/src/branch/develop/packages/pl-api",
"repository": {