geo/frontend/types/onboarding.ts

119 lines
2.5 KiB
TypeScript

/**
* 新用户引导向导相关类型定义
*/
export type { HealthLevel } from "@/types/dashboard-health";
export { HEALTH_LEVEL_CONFIG as HEALTH_LEVELS } from "@/types/dashboard-health";
export { getHealthLevel } from "@/lib/dashboard-health";
export interface OnboardingState {
currentStep: number;
brandName: string;
competitors: string[];
platforms: string[];
frequency: "daily" | "weekly" | "monthly";
brandId: string | null;
healthReport: BrandHealthReport | null;
preCheckResult: import("@/lib/api/health-score").HealthScoreResponse | null;
}
export interface CompetitorRecommendation {
id: string;
name: string;
reason: string;
}
export interface BrandHealthReport {
brand_id: string;
brand_name: string;
overall_score: number;
health_level?: string;
health_level_label?: string;
platform_scores: Record<string, number>;
competitor_scores: Array<{
name: string;
score: number;
is_leading: boolean;
}>;
strengths: string[];
weaknesses: string[];
dimensions?: Array<{
name: string;
score: number;
max_score: number;
percentage: number;
status: string;
}>;
recommendations?: Array<{
priority: string;
dimension: string;
title: string;
description: string;
}>;
is_full_report?: boolean;
}
export interface ActionSuggestion {
id: string;
title: string;
description: string;
priority: "high" | "medium" | "low";
action_type: string;
is_paid_action?: boolean;
action_button_text?: string;
}
export interface OnboardingCreateBrandRequest {
name: string;
aliases?: string[];
competitors?: string[];
platforms: string[];
frequency: "daily" | "weekly" | "monthly";
}
export interface OnboardingStep {
id: number;
title: string;
description: string;
isSkippable: boolean;
}
export const ONBOARDING_STEPS: OnboardingStep[] = [
{
id: 0,
title: "健康分检测",
description: "免费检测品牌GEO健康分",
isSkippable: false,
},
{
id: 1,
title: "创建品牌",
description: "输入品牌名称开始监控",
isSkippable: false,
},
{
id: 2,
title: "确认竞品",
description: "选择与您品牌竞争的对手",
isSkippable: true,
},
{
id: 3,
title: "平台选择",
description: "选择监控平台和频率",
isSkippable: false,
},
{
id: 4,
title: "健康报告",
description: "查看详细诊断报告",
isSkippable: false,
},
{
id: 5,
title: "行动建议",
description: "获取提升品牌曝光的建议",
isSkippable: true,
},
];