/** * Task Serialization Utilities * * Convert between ADO Task work items and local markdown files. * Tasks are stored in a single file per parent User Story: {parentId}-tasks.md * Supports upsert: update existing tasks or create new ones. */ /** * Task field names in ADO API */ export declare const TASK_FIELDS: { readonly title: "System.Title"; readonly description: "System.Description"; readonly state: "System.State"; readonly assignedTo: "System.AssignedTo"; readonly originalEstimate: "Microsoft.VSTS.Scheduling.OriginalEstimate"; readonly remainingWork: "Microsoft.VSTS.Scheduling.RemainingWork"; readonly completedWork: "Microsoft.VSTS.Scheduling.CompletedWork"; readonly effort: "Microsoft.VSTS.Scheduling.Effort"; readonly parent: "System.Parent"; readonly areaPath: "System.AreaPath"; readonly iterationPath: "System.IterationPath"; }; /** * Parsed task from markdown */ export interface ParsedTask { id: number | null; title: string; state: string; assignedTo?: string; iterationPath?: string; areaPath?: string; originalEstimate?: number; remainingWork?: number; completedWork?: number; effort?: number; revision?: number; description?: string; } /** * Tasks file frontmatter */ export interface TasksFileFrontmatter { parentId: number; parentTitle: string; project: string; lastSyncedAt: string; } /** * Parsed tasks file */ export interface ParsedTasksFile { frontmatter: TasksFileFrontmatter; tasks: ParsedTask[]; rawContent: string; } /** * Convert ADO tasks to markdown file content * * @param parentWorkItem - The parent work item (User Story) * @param tasks - Array of task work items * @param project - Project name * @returns Markdown content */ export declare function tasksToMarkdown(parentWorkItem: any, tasks: any[], project: string): string; /** * Parse a tasks markdown file to extract frontmatter and tasks */ export declare function parseTasksMarkdown(content: string): ParsedTasksFile; /** * Build patch operations for updating a task in ADO */ export declare function buildTaskPatchOperations(parsedTask: ParsedTask, currentTask: any, skipAutoConvert?: boolean): { operations: any[]; fieldsUpdated: string[]; convertedFields: string[]; }; /** * Build fields object for creating a new task in ADO */ export declare function buildNewTaskFields(parsedTask: ParsedTask, areaPath?: string, iterationPath?: string): Record; /** * Get the file path for a tasks file */ export declare function getTasksFilePath(folder: string, parentId: number): string; /** * Update the tasks file after creating new tasks * Replaces "## NEW TASK" sections with "## Task #ID" after creation */ export declare function updateTasksFileAfterCreate(content: string, createdTasks: { title: string; id: number; }[]): string; //# sourceMappingURL=task-serializer.d.ts.map