import type { components } from "./schema";

// 复用后端 OpenAPI 生成的 schema 类型，绝不手写共享类型（CLAUDE.md 命名契约）。
export type ProjectResponse = components["schemas"]["ProjectResponse"];
export type ProjectCreateRequest = components["schemas"]["ProjectCreateRequest"];
export type ProjectListResponse = components["schemas"]["ProjectListResponse"];
// AI 立项方案生成（灵感⑤）：向导阶段 project 未建，种子门控 + 结构化预览回填向导。
export type ProjectPlanGenerateRequest =
  components["schemas"]["ProjectPlanGenerateRequest"];
export type ProjectPlanView = components["schemas"]["ProjectPlanView"];
export type DraftSaveRequest = components["schemas"]["DraftSaveRequest"];
export type DraftResponse = components["schemas"]["DraftResponse"];
// GET .../draft 读端点：含正文，供工作台重访时重载编辑器（404→空编辑器）。
export type DraftView = components["schemas"]["DraftView"];
export type ProvidersResponse = components["schemas"]["ProvidersResponse"];
export type ProviderView = components["schemas"]["ProviderView"];
export type TierRoutingView = components["schemas"]["TierRoutingView"];
export type ProvidersUpsertRequest =
  components["schemas"]["ProvidersUpsertRequest"];
export type TestConnectionRequest =
  components["schemas"]["TestConnectionRequest"];
export type TestConnectionResponse =
  components["schemas"]["TestConnectionResponse"];
export type CapabilitiesView = components["schemas"]["CapabilitiesView"];

// M2 审/裁/验收（C3 扩）。
export type ReviewRequest = components["schemas"]["ReviewRequest"];
export type ReviewHistoryItem = components["schemas"]["ReviewHistoryItem"];
// 单条一致性冲突（chapter_reviews.conflicts 子项，强类型替代裸 dict）。
export type ReviewConflictView = components["schemas"]["ReviewConflictView"];
export type ReviewHistoryResponse =
  components["schemas"]["ReviewHistoryResponse"];
export type ConflictDecision = components["schemas"]["ConflictDecision"];
export type AcceptRequest = components["schemas"]["AcceptRequest"];
export type AcceptResponse = components["schemas"]["AcceptResponse"];

// Scope B 多章工作流链（发起 / 续跑；进度走 GET /jobs/{id} 轮询）。
export type ChainRunRequest = components["schemas"]["ChainRunRequest"];
export type ChainRunAccepted = components["schemas"]["ChainRunAccepted"];
export type ChainResumeRequest = components["schemas"]["ChainResumeRequest"];
export type ChainResumeAccepted = components["schemas"]["ChainResumeAccepted"];

// M3 伏笔 + 大纲（C3 扩 T3.2/T3.5）。
export type ForeshadowView = components["schemas"]["ForeshadowView"];
export type ForeshadowBoardResponse =
  components["schemas"]["ForeshadowBoardResponse"];
export type ForeshadowRegisterRequest =
  components["schemas"]["ForeshadowRegisterRequest"];
export type ForeshadowTransitionRequest =
  components["schemas"]["ForeshadowTransitionRequest"];
export type ForeshadowWindowView =
  components["schemas"]["ForeshadowWindowView"];
export type OutlineChapterView = components["schemas"]["OutlineChapterView"];
export type OutlineGenerateRequest =
  components["schemas"]["OutlineGenerateRequest"];
export type OutlineResponse = components["schemas"]["OutlineResponse"];

// M4 文风：学文风（jobs 异步）+ 最新指纹 + 回炉（C3 扩 T4.3）。
export type StyleLearnRequest = components["schemas"]["StyleLearnRequest"];
export type StyleLearnResponse = components["schemas"]["StyleLearnResponse"];
export type StyleFingerprintResponse =
  components["schemas"]["StyleFingerprintResponse"];
// 单个文风维度（name/value/evidence，强类型替代裸 dict）。
export type DimensionEntry = components["schemas"]["DimensionEntry"];
export type RefineRequest = components["schemas"]["RefineRequest"];
export type RefineResponse = components["schemas"]["RefineResponse"];

// M5 生成 + 设定库（C3 扩 T5.2）。
export type WorldGenerateRequest =
  components["schemas"]["WorldGenerateRequest"];
export type WorldGenPreviewResponse =
  components["schemas"]["WorldGenPreviewResponse"];
export type WorldEntityCardView =
  components["schemas"]["WorldEntityCardView"];
export type CharacterGenerateRequest =
  components["schemas"]["CharacterGenerateRequest"];
export type CharacterGenPreviewResponse =
  components["schemas"]["CharacterGenPreviewResponse"];
export type CharacterCardView = components["schemas"]["CharacterCardView"];
export type CharacterRelationView =
  components["schemas"]["CharacterRelationView"];
export type CharacterIngestRequest =
  components["schemas"]["CharacterIngestRequest"];
export type CharacterIngestResponse =
  components["schemas"]["CharacterIngestResponse"];
// 设定库 Codex 读端点（C3 扩 M5 R1 follow-up）：跨会话全量已入库角色/世界观。
export type CharacterListResponse =
  components["schemas"]["CharacterListResponse"];
export type WorldEntityListResponse =
  components["schemas"]["WorldEntityListResponse"];

// F3 提示词/模板库（单用户本地版；GET/POST/DELETE /templates）。
export type TemplateResponse = components["schemas"]["TemplateResponse"];
export type TemplateCreateRequest =
  components["schemas"]["TemplateCreateRequest"];

// K1 Kimi Code OAuth device-flow（C3 扩 K1.3）。
export type OAuthStartResponse = components["schemas"]["OAuthStartResponse"];
export type OAuthDisconnectResponse =
  components["schemas"]["OAuthDisconnectResponse"];
export type OAuthStatusResponse = components["schemas"]["OAuthStatusResponse"];

// M5 规则 + 技能（C3 扩 T5.2 / T5.5）。
export type RuleCreateRequest = components["schemas"]["RuleCreateRequest"];
export type RuleView = components["schemas"]["RuleView"];
export type RuleListResponse = components["schemas"]["RuleListResponse"];
export type SkillView = components["schemas"]["SkillView"];
export type SkillListResponse = components["schemas"]["SkillListResponse"];

// 创作工具箱：声明驱动的通用生成器（GET /skills/toolbox + 通用 generate/ingest）。
export type ToolboxListResponse =
  components["schemas"]["ToolboxListResponse"];
export type ToolDescriptorView =
  components["schemas"]["ToolDescriptorView"];
export type ToolInputFieldView =
  components["schemas"]["ToolInputFieldView"];
export type ToolGenerateRequest =
  components["schemas"]["ToolGenerateRequest"];
export type ToolGeneratePreviewResponse =
  components["schemas"]["ToolGeneratePreviewResponse"];
export type ToolIngestRequest = components["schemas"]["ToolIngestRequest"];
export type ToolIngestResponse = components["schemas"]["ToolIngestResponse"];
export type OutlineSceneIngestView =
  components["schemas"]["OutlineSceneIngestView"];
// F1：拆书入库产物（themes/archetypes/structure/hooks → 项目 rules 条目）。
export type TeardownIngestView =
  components["schemas"]["TeardownIngestView"];
