/** * JSON File Reader for Automation * * Reads JSON files like bugs-wip.json and extracts items for Jira ticket creation */ /** * Bug metadata with Jira integration fields */ export interface BugMetadata { jiraIssueKey?: string; jiraIssueId?: string; jiraIssueUrl?: string; jiraSyncedAt?: string; testStatus?: string; createdAt?: string; updatedAt?: string; [key: string]: unknown; } /** * Bug item from bugs-wip.json */ export interface BugItem { id: string; title: string; category: string; status: string; severity: "low" | "medium" | "high" | "critical"; area?: string; component?: string; filePath?: string; summary: string; rootCause?: string; fixSummary?: string; testStatus?: string; createdAt?: string; updatedAt?: string; metadata?: BugMetadata; [key: string]: unknown; } /** * Bugs JSON file structure */ export interface BugsJson { bugs: BugItem[]; } /** * Generic JSON instruction item (from orchestrator) */ export interface JsonInstructionItem { id?: string; title: string; summary: string; description?: string; category?: string; type?: string; priority?: "low" | "medium" | "high" | "critical"; severity?: "low" | "medium" | "high" | "critical"; area?: string; component?: string; filePath?: string; labels?: string[]; metadata?: Record; [key: string]: unknown; } /** * Generic JSON instruction file structure */ export interface JsonInstructionFile { bugs?: JsonInstructionItem[]; items?: JsonInstructionItem[]; tasks?: JsonInstructionItem[]; issues?: JsonInstructionItem[]; [key: string]: unknown; } /** * Read bugs-wip.json file */ export declare function readBugsJson(filePath: string): BugsJson; /** * Read generic JSON instruction file (from orchestrator) */ export declare function readJsonInstructions(filePath: string): JsonInstructionItem[]; /** * Filter bugs by status */ export declare function filterBugsByStatus(bugs: BugItem[], status: string): BugItem[]; /** * Filter bugs that need Jira tickets * * Includes bugs with status: open, fix now, or any status that's not fixed/resolved/closed/sent_to_jira/unfixable */ export declare function filterBugsNeedingTickets(bugs: BugItem[]): BugItem[]; /** * Filter bugs that need immediate attention (fix now) */ export declare function filterBugsFixNow(bugs: BugItem[]): BugItem[]; /** * Convert bug item to JSON instruction item */ export declare function bugToInstruction(bug: BugItem): JsonInstructionItem; //# sourceMappingURL=json-reader.d.ts.map