import { z } from "zod";
export declare const PlatformSchema: z.ZodEnum<["youtube", "tiktok", "xiaohongshu", "douyin"]>;
export type Platform = z.infer<typeof PlatformSchema>;
/** The four known platform literals — the canonical allow-list. */
export declare const KNOWN_PLATFORMS: ["youtube", "tiktok", "xiaohongshu", "douyin"];
/**
 * Narrow an untrusted path segment to a known Platform (B2/B6 guard). This is the
 * single allow-list every trends route filters its `:platform` / body.platform
 * through before it ever reaches a filesystem path, defeating both unsupported
 * platforms and `../`-style path-segment injection (a non-literal value — even
 * `youtube/../evil` — simply isn't in the enum).
 */
export declare function isKnownPlatform(v: unknown): v is Platform;
export declare const ItemSourceSchema: z.ZodEnum<["scraper", "rss", "agent_websearch", "proxy"]>;
export type ItemSource = z.infer<typeof ItemSourceSchema>;
export declare const CoverAspectSchema: z.ZodEnum<["9:16", "1:1", "16:9"]>;
export type CoverAspect = z.infer<typeof CoverAspectSchema>;
export declare const TrendItemSchema: z.ZodObject<{
    id: z.ZodString;
    platform: z.ZodEnum<["youtube", "tiktok", "xiaohongshu", "douyin"]>;
    title: z.ZodString;
    sourceUrl: z.ZodString;
    source: z.ZodEnum<["scraper", "rss", "agent_websearch", "proxy"]>;
    scrapedAt: z.ZodString;
    cover: z.ZodObject<{
        url: z.ZodString;
        aspect: z.ZodEnum<["9:16", "1:1", "16:9"]>;
        cachedPath: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        aspect: "1:1" | "9:16" | "16:9";
        url: string;
        cachedPath?: string | undefined;
    }, {
        aspect: "1:1" | "9:16" | "16:9";
        url: string;
        cachedPath?: string | undefined;
    }>;
    metrics: z.ZodNullable<z.ZodObject<{
        views: z.ZodNullable<z.ZodNumber>;
        likes: z.ZodNullable<z.ZodNumber>;
        comments: z.ZodNullable<z.ZodNumber>;
        shares: z.ZodNullable<z.ZodNumber>;
        fetchedAt: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        views: number | null;
        likes: number | null;
        comments: number | null;
        shares: number | null;
        fetchedAt: string;
    }, {
        views: number | null;
        likes: number | null;
        comments: number | null;
        shares: number | null;
        fetchedAt: string;
    }>>;
    analysis: z.ZodObject<{
        heat: z.ZodNumber;
        competition: z.ZodEnum<["低", "中", "高"]>;
        opportunity: z.ZodEnum<["金矿", "蓝海", "红海"]>;
        description: z.ZodString;
        tags: z.ZodArray<z.ZodString, "many">;
        contentAngles: z.ZodArray<z.ZodString, "many">;
        exampleHook: z.ZodString;
        category: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        category: string;
        tags: string[];
        heat: number;
        competition: "低" | "中" | "高";
        opportunity: "金矿" | "蓝海" | "红海";
        description: string;
        contentAngles: string[];
        exampleHook: string;
    }, {
        category: string;
        tags: string[];
        heat: number;
        competition: "低" | "中" | "高";
        opportunity: "金矿" | "蓝海" | "红海";
        description: string;
        contentAngles: string[];
        exampleHook: string;
    }>;
}, "strip", z.ZodTypeAny, {
    id: string;
    cover: {
        aspect: "1:1" | "9:16" | "16:9";
        url: string;
        cachedPath?: string | undefined;
    };
    title: string;
    platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
    sourceUrl: string;
    source: "proxy" | "scraper" | "rss" | "agent_websearch";
    scrapedAt: string;
    metrics: {
        views: number | null;
        likes: number | null;
        comments: number | null;
        shares: number | null;
        fetchedAt: string;
    } | null;
    analysis: {
        category: string;
        tags: string[];
        heat: number;
        competition: "低" | "中" | "高";
        opportunity: "金矿" | "蓝海" | "红海";
        description: string;
        contentAngles: string[];
        exampleHook: string;
    };
}, {
    id: string;
    cover: {
        aspect: "1:1" | "9:16" | "16:9";
        url: string;
        cachedPath?: string | undefined;
    };
    title: string;
    platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
    sourceUrl: string;
    source: "proxy" | "scraper" | "rss" | "agent_websearch";
    scrapedAt: string;
    metrics: {
        views: number | null;
        likes: number | null;
        comments: number | null;
        shares: number | null;
        fetchedAt: string;
    } | null;
    analysis: {
        category: string;
        tags: string[];
        heat: number;
        competition: "低" | "中" | "高";
        opportunity: "金矿" | "蓝海" | "红海";
        description: string;
        contentAngles: string[];
        exampleHook: string;
    };
}>;
export type TrendItem = z.infer<typeof TrendItemSchema>;
export declare const TrendsCollectionResultSchema: z.ZodObject<{
    platform: z.ZodEnum<["youtube", "tiktok", "xiaohongshu", "douyin"]>;
    items: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        platform: z.ZodEnum<["youtube", "tiktok", "xiaohongshu", "douyin"]>;
        title: z.ZodString;
        sourceUrl: z.ZodString;
        source: z.ZodEnum<["scraper", "rss", "agent_websearch", "proxy"]>;
        scrapedAt: z.ZodString;
        cover: z.ZodObject<{
            url: z.ZodString;
            aspect: z.ZodEnum<["9:16", "1:1", "16:9"]>;
            cachedPath: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        }, {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        }>;
        metrics: z.ZodNullable<z.ZodObject<{
            views: z.ZodNullable<z.ZodNumber>;
            likes: z.ZodNullable<z.ZodNumber>;
            comments: z.ZodNullable<z.ZodNumber>;
            shares: z.ZodNullable<z.ZodNumber>;
            fetchedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        }, {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        }>>;
        analysis: z.ZodObject<{
            heat: z.ZodNumber;
            competition: z.ZodEnum<["低", "中", "高"]>;
            opportunity: z.ZodEnum<["金矿", "蓝海", "红海"]>;
            description: z.ZodString;
            tags: z.ZodArray<z.ZodString, "many">;
            contentAngles: z.ZodArray<z.ZodString, "many">;
            exampleHook: z.ZodString;
            category: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        }, {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        }>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        cover: {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        };
        title: string;
        platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
        sourceUrl: string;
        source: "proxy" | "scraper" | "rss" | "agent_websearch";
        scrapedAt: string;
        metrics: {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        } | null;
        analysis: {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        };
    }, {
        id: string;
        cover: {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        };
        title: string;
        platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
        sourceUrl: string;
        source: "proxy" | "scraper" | "rss" | "agent_websearch";
        scrapedAt: string;
        metrics: {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        } | null;
        analysis: {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        };
    }>, "many">;
    collectedAt: z.ZodString;
    pipelineStatus: z.ZodEnum<["ok", "partial", "failed"]>;
    errors: z.ZodArray<z.ZodString, "many">;
    validation: z.ZodObject<{
        passed: z.ZodBoolean;
        issues: z.ZodArray<z.ZodObject<{
            itemId: z.ZodOptional<z.ZodString>;
            path: z.ZodString;
            message: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            message: string;
            itemId?: string | undefined;
        }, {
            path: string;
            message: string;
            itemId?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        issues: {
            path: string;
            message: string;
            itemId?: string | undefined;
        }[];
        passed: boolean;
    }, {
        issues: {
            path: string;
            message: string;
            itemId?: string | undefined;
        }[];
        passed: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    validation: {
        issues: {
            path: string;
            message: string;
            itemId?: string | undefined;
        }[];
        passed: boolean;
    };
    platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
    items: {
        id: string;
        cover: {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        };
        title: string;
        platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
        sourceUrl: string;
        source: "proxy" | "scraper" | "rss" | "agent_websearch";
        scrapedAt: string;
        metrics: {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        } | null;
        analysis: {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        };
    }[];
    collectedAt: string;
    pipelineStatus: "failed" | "ok" | "partial";
    errors: string[];
}, {
    validation: {
        issues: {
            path: string;
            message: string;
            itemId?: string | undefined;
        }[];
        passed: boolean;
    };
    platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
    items: {
        id: string;
        cover: {
            aspect: "1:1" | "9:16" | "16:9";
            url: string;
            cachedPath?: string | undefined;
        };
        title: string;
        platform: "douyin" | "xiaohongshu" | "tiktok" | "youtube";
        sourceUrl: string;
        source: "proxy" | "scraper" | "rss" | "agent_websearch";
        scrapedAt: string;
        metrics: {
            views: number | null;
            likes: number | null;
            comments: number | null;
            shares: number | null;
            fetchedAt: string;
        } | null;
        analysis: {
            category: string;
            tags: string[];
            heat: number;
            competition: "低" | "中" | "高";
            opportunity: "金矿" | "蓝海" | "红海";
            description: string;
            contentAngles: string[];
            exampleHook: string;
        };
    }[];
    collectedAt: string;
    pipelineStatus: "failed" | "ok" | "partial";
    errors: string[];
}>;
export type TrendsCollectionResult = z.infer<typeof TrendsCollectionResultSchema>;
export type ValidationIssue = TrendsCollectionResult["validation"]["issues"][number];
export interface ValidationOutcome {
    passed: boolean;
    result: TrendsCollectionResult | null;
    issues: ValidationIssue[];
}
export declare function validateCollection(input: unknown): ValidationOutcome;
//# sourceMappingURL=schema.d.ts.map