import { IsString, IsOptional, IsEnum, IsArray } from "class-validator"; /** * Export format enum */ export enum ExportFormat { MARKDOWN = "markdown", JSON = "json", } /** * DTO for export query parameters */ export class ExportQueryDto { @IsOptional() @IsEnum(ExportFormat, { message: "format must be either 'markdown' or 'json'" }) format?: ExportFormat = ExportFormat.MARKDOWN; @IsOptional() @IsArray({ message: "entryIds must be an array" }) @IsString({ each: true, message: "each entryId must be a string" }) entryIds?: string[]; } /** * Import result for a single entry */ export interface ImportResult { filename: string; success: boolean; entryId?: string; slug?: string; title?: string; error?: string; } /** * Response DTO for import operation */ export interface ImportResponseDto { success: boolean; totalFiles: number; imported: number; failed: number; results: ImportResult[]; }