feat(moderation): comment/event report and dimzou translation pages

New 内容审核 nav group covering the remaining admin API groups:
- /comment-reports — status filter; hide/delete comment or dismiss
- /event-reports — status filter; hide/delete/resolve/dismiss
- /dimzou-translations — language/status filters, draft block progress,
  requeue machine translation

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-11 13:28:28 +08:00
co-authored by Claude Fable 5
parent ebe7665620
commit 999d5353fd
11 changed files with 908 additions and 9 deletions
+200 -9
View File
@@ -253,7 +253,7 @@ export interface paths {
content: {
"application/json": {
/**
* @example dismissed
* @example resolved
* @enum {string|null}
*/
status?: "open" | "resolved" | "dismissed" | null;
@@ -284,7 +284,7 @@ export interface paths {
* {
* "id": 1,
* "comment_id": 10,
* "reason": "invalid",
* "reason": "spam",
* "message": "Contains spam links",
* "status": "open",
* "created_at": "2025-12-01T10:10:00Z",
@@ -306,7 +306,7 @@ export interface paths {
id?: number;
/** @example 10 */
comment_id?: number;
/** @example invalid */
/** @example spam */
reason?: string;
/** @example Contains spam links */
message?: string;
@@ -420,7 +420,7 @@ export interface paths {
path: {
/**
* @description The ID of the report.
* @example 16
* @example 3
*/
report_id: number;
/**
@@ -445,7 +445,7 @@ export interface paths {
path: {
/**
* @description The ID of the report.
* @example 16
* @example 3
*/
report_id: number;
/**
@@ -565,6 +565,197 @@ export interface paths {
};
trace?: never;
};
"/api/admin/v1/dimzou/translations": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* [运营] 译文列表
* @description 分页列出全站译文档,含最新草稿版本的块翻译进度,用于决定是否重新入队翻译。仅平台管理员可用。
*/
get: {
parameters: {
query?: {
/**
* @description 可选。按目标语言过滤。 示例: fr
* @example architecto
*/
language_code?: string;
/**
* @description 可选。按状态过滤: draft, awaiting_publish, published。 示例: draft
* @example architecto
*/
status?: string;
/**
* @description 可选。按源文档过滤。 示例: 1
* @example 16
*/
source_document_id?: number;
/**
* @description 可选。页码。 示例: 1
* @example 16
*/
page?: number;
/**
* @description 可选。每页数量,最大100。 示例: 20
* @example 16
*/
page_size?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/**
* @description Must not be greater than 8 characters.
* @example bngzmiyv
*/
language_code?: string;
/**
* @example draft
* @enum {string}
*/
status?: "draft" | "awaiting_publish" | "published";
/** @example 16 */
source_document_id?: number;
/**
* @description Must be at least 1.
* @example 22
*/
page?: number;
/**
* @description Must be at least 1. Must not be greater than 100.
* @example 7
*/
page_size?: number;
};
};
};
responses: {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
/** @example true */
success?: boolean;
/**
* @example [
* {
* "kind": "dimzou_document_translation",
* "id": 1,
* "language_code": "fr",
* "status": "draft",
* "source_document": {
* "id": 10,
* "title": "家电维修入门"
* },
* "translated_document_id": 11,
* "created_by_uid": "01HXXXX",
* "creator": {
* "uid": "01HXXXX",
* "display_name": "Alice"
* },
* "draft_version_id": 5,
* "blocks": {
* "total": 12,
* "needs_translation": 3,
* "translation_failed": 1
* },
* "created_at": "2026-06-01T10:00:00Z",
* "updated_at": "2026-06-02T10:00:00Z"
* }
* ]
*/
data?: {
/** @example dimzou_document_translation */
kind?: string;
/** @example 1 */
id?: number;
/** @example fr */
language_code?: string;
/** @example draft */
status?: string;
source_document?: {
/** @example 10 */
id?: number;
/** @example 家电维修入门 */
title?: string;
};
/** @example 11 */
translated_document_id?: number;
/** @example 01HXXXX */
created_by_uid?: string;
creator?: {
/** @example 01HXXXX */
uid?: string;
/** @example Alice */
display_name?: string;
};
/** @example 5 */
draft_version_id?: number;
blocks?: {
/** @example 12 */
total?: number;
/** @example 3 */
needs_translation?: number;
/** @example 1 */
translation_failed?: number;
};
/** @example 2026-06-01T10:00:00Z */
created_at?: string;
/** @example 2026-06-02T10:00:00Z */
updated_at?: string;
}[];
pagination?: {
/** @example 1 */
current_page?: number;
/** @example null */
next_page?: string;
/** @example 20 */
page_size?: number;
/** @example null */
prev_page?: string;
/** @example 1 */
total_count?: number;
/** @example 1 */
total_pages?: number;
};
};
};
};
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
/** @example false */
success?: boolean;
/** @example FORBIDDEN */
code?: string;
/** @example 无权限访问 */
message?: string;
};
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/admin/v1/dimzou/translations/{translation_id}/retranslate": {
parameters: {
query?: never;
@@ -690,7 +881,7 @@ export interface paths {
content: {
"application/json": {
/**
* @example android
* @example ios
* @enum {string|null}
*/
platform?: "ios" | "android" | "web" | "desktop" | null;
@@ -1155,7 +1346,7 @@ export interface paths {
content: {
"application/json": {
/**
* @example resolved
* @example open
* @enum {string|null}
*/
status?: "open" | "resolved" | "dismissed" | null;
@@ -1290,7 +1481,7 @@ export interface paths {
path: {
/**
* @description The ID of the report.
* @example 16
* @example 1
*/
report_id: number;
/** @description Optional parameter. 必需。举报ID。 示例: 1 */
@@ -1312,7 +1503,7 @@ export interface paths {
path: {
/**
* @description The ID of the report.
* @example 16
* @example 1
*/
report_id: number;
/** @description Optional parameter. 必需。举报ID。 示例: 1 */