diff --git a/src/api/types.gen.ts b/src/api/types.gen.ts index 50f2559..fe9d48c 100644 --- a/src/api/types.gen.ts +++ b/src/api/types.gen.ts @@ -253,7 +253,7 @@ export interface paths { content: { "application/json": { /** - * @example open + * @example dismissed * @enum {string|null} */ status?: "open" | "resolved" | "dismissed" | null; @@ -690,7 +690,7 @@ export interface paths { content: { "application/json": { /** - * @example desktop + * @example ios * @enum {string|null} */ platform?: "ios" | "android" | "web" | "desktop" | null; @@ -941,6 +941,33 @@ export interface paths { patch?: never; trace?: never; }; + "/api/admin/v1/studio/articles/{article}/preview": { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The article. + * @example architecto + */ + article: string; + }; + cookie?: never; + }; + /** + * [文章] Dimzou 草稿预览 + * @description 渲染文章当前 Dimzou 草稿(无草稿时回退到最新已发布版本)的正文为 HTML, + * 连同标题/摘要/封面返回,供后台预览。管理员权限,绕过 Dimzou 逐用户读权限。 + */ + get: operations["Dimzou"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/admin/v1/studio/articles": { parameters: { query?: never; @@ -1449,7 +1476,7 @@ export interface paths { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -1472,7 +1499,7 @@ export interface paths { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -1495,7 +1522,7 @@ export interface paths { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -1572,7 +1599,7 @@ export interface paths { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** @@ -1603,7 +1630,7 @@ export interface paths { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** @@ -2927,6 +2954,38 @@ export interface operations { requestBody?: never; responses: never; }; + Dimzou: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The article. + * @example architecto + */ + article: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @example false */ + success?: boolean; + /** @example Authentication required */ + message?: string; + /** @example UNAUTHENTICATED */ + code?: string; + }; + }; + }; + }; + }; getApiAdminV1StudioArticles: { parameters: { query?: never; @@ -3390,7 +3449,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -3406,7 +3465,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -3422,7 +3481,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; }; @@ -3740,7 +3799,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** @@ -3803,7 +3862,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** @@ -3872,7 +3931,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** @@ -3968,7 +4027,7 @@ export interface operations { path: { /** * @description The ID of the category. - * @example 2912b591-09f0-4c14-9190-866abd51cbee + * @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e */ category_id: string; /** diff --git a/src/api/types.ts b/src/api/types.ts index be08dd5..1f7282c 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -132,6 +132,8 @@ export interface StudioArticle { inline_images: Array<{ url: string; alt?: string | null }> | null inline_image_prompts: unknown[] | null status: ArticleStatus + /** LLM used to draft the body, e.g. { provider, model, params }. */ + drafting_model: { provider?: string; model?: string; [k: string]: unknown } | null publish_schedule: Record | null dimzou_document_id: number | null dimzou_publication_id: number | null diff --git a/src/routes/_authed/studio/articles.tsx b/src/routes/_authed/studio/articles.tsx index 543121f..3aefd98 100644 --- a/src/routes/_authed/studio/articles.tsx +++ b/src/routes/_authed/studio/articles.tsx @@ -127,6 +127,14 @@ function ArticlesPage() { { label: '标签', value: detail?.tags?.join('、') }, { label: 'SEO 关键词', value: detail?.seo_keywords?.join('、') }, { label: 'CTA', value: detail?.cta }, + { + label: '起草模型', + value: detail?.drafting_model + ? [detail.drafting_model.provider, detail.drafting_model.model] + .filter(Boolean) + .join(' / ') || '—' + : '—', + }, { label: '封面提示词', value: detail?.cover_image_prompt }, { label: 'Dimzou 文档', @@ -140,6 +148,7 @@ function ArticlesPage() { jsonBlocks={[ { label: '要点 key_takeaways', value: detail?.key_takeaways }, { label: '大纲 outline', value: detail?.outline }, + { label: '起草模型 drafting_model', value: detail?.drafting_model }, { label: '计划 plan', value: detail?.plan }, { label: '发布排期', value: detail?.publish_schedule }, ]}