import { type TrackedPlan, type Priority, type IssueStatus } from '../../types/index.js'; type TrackedIssue = TrackedPlan; /** * Interface for tracking data adapter * Dependency Inversion Principle */ export interface ITrackingAdapter { read(): Promise; write(issues: TrackedIssue[]): Promise; add?(issue: TrackedIssue): Promise; remove?(trackingName: string): Promise; updatePriority?(trackingName: string, priority: string): Promise; } /** * Service for managing tracked issues * Single Responsibility: Issue tracking operations */ export declare class TrackingService { private adapter; constructor(adapter: ITrackingAdapter); /** * Returns the authenticated user id from the underlying adapter, if it * supports the concept (currently only RemoteTrackingAdapter). Returns * null when unsupported (e.g. local file adapter) or when the adapter * has not yet observed the id. */ getCurrentUserId(): string | null; /** * Get all tracked issues */ getAll(): Promise; /** * Get a specific tracked issue by number */ getByNumber(issueNumber: number): Promise; /** * Check if an issue is tracked */ exists(issueNumber: number): Promise; /** * Add a new issue to tracking */ add(issue: TrackedIssue): Promise; /** * Remove an issue from tracking by number. * WARNING: Matches the first issue with this number regardless of repo. * Prefer removeByName() for cross-repo safety. */ remove(issueNumber: number): Promise; /** * Remove an issue from tracking by name (owner/repo#number). * Safe for cross-repo scenarios where multiple repos may share the same issue number. */ removeByName(issueName: string): Promise; /** * Update a tracked issue */ update(issueNumber: number, updates: Partial): Promise; /** * Update issue status */ updateStatus(issueNumber: number, status: IssueStatus): Promise; /** * Update issue priority */ updatePriority(issueNumber: number, priority: Priority): Promise; /** * Update deployment status */ updateDeploymentStatus(issueNumber: number, status: 'pending' | 'success' | 'failed', timestamp?: string): Promise; /** * Mark that Copilot was notified about deployment failure */ markDeploymentNotified(issueNumber: number, timestamp: string): Promise; /** * Get issues by status */ getByStatus(status: IssueStatus): Promise; /** * Get issues by priority */ getByPriority(priority: Priority): Promise; /** * Sort issues by criteria */ sortIssues(issues: TrackedIssue[], sortBy: 'created' | 'updated' | 'number' | 'priority', direction?: 'asc' | 'desc'): TrackedIssue[]; /** * Clean up closed issues from GitHub * Since we only track 4 active statuses, this checks GitHub for closed issues */ cleanClosed(): Promise; } /** * File-based tracking adapter * Open/Closed Principle: Can extend with new adapters */ export declare class TrackingFileAdapter implements ITrackingAdapter { private filePath; constructor(filePath: string); read(): Promise; write(issues: TrackedIssue[]): Promise; } export {}; //# sourceMappingURL=TrackingService.d.ts.map