feat: 前端平台规则页面支持文档上传 + AI 解析
- 新增前端类型定义 (ParsedRulesData, BrandPlatformRuleResponse 等) - 新增 4 个 API 方法 (parsePlatformRule, confirmPlatformRule, listBrandPlatformRules, deletePlatformRule) - 重写品牌方规则页面平台规则 tab,支持文档上传→AI解析→确认/编辑→生效流程 - 保留违禁词/竞品/白名单三个 tab 原有功能 - 支持 USE_MOCK 双模式 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fed361b9b3
commit
3a2598c956
@@ -79,6 +79,54 @@ export interface PlatformListResponse {
|
||||
total: number
|
||||
}
|
||||
|
||||
// ===== 品牌方平台规则(文档上传 + AI 解析) =====
|
||||
|
||||
export interface ParsedRulesData {
|
||||
forbidden_words: string[]
|
||||
restricted_words: { word: string; condition: string; suggestion: string }[]
|
||||
duration: { min_seconds?: number; max_seconds?: number } | null
|
||||
content_requirements: string[]
|
||||
other_rules: { rule: string; description: string }[]
|
||||
}
|
||||
|
||||
export interface PlatformRuleParseRequest {
|
||||
document_url: string
|
||||
document_name: string
|
||||
platform: string
|
||||
brand_id: string
|
||||
}
|
||||
|
||||
export interface PlatformRuleParseResponse {
|
||||
id: string
|
||||
platform: string
|
||||
brand_id: string
|
||||
document_url: string
|
||||
document_name: string
|
||||
parsed_rules: ParsedRulesData
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface PlatformRuleConfirmRequest {
|
||||
parsed_rules: ParsedRulesData
|
||||
}
|
||||
|
||||
export interface BrandPlatformRuleResponse {
|
||||
id: string
|
||||
platform: string
|
||||
brand_id: string
|
||||
document_url: string
|
||||
document_name: string
|
||||
parsed_rules: ParsedRulesData
|
||||
status: string // draft / active / inactive
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface BrandPlatformRuleListResponse {
|
||||
items: BrandPlatformRuleResponse[]
|
||||
total: number
|
||||
}
|
||||
|
||||
// ===== 规则冲突检测 =====
|
||||
|
||||
export interface RuleValidateRequest {
|
||||
|
||||
Reference in New Issue
Block a user