/**
 * Base class for duplicate detection across external PM tools.
 * Implements 3-phase protection identical across GitHub, JIRA, and ADO.
 *
 * Usage:
 *   class GitHubDuplicateDetector extends DuplicateDetectorBase<GitHubIssue> {
 *     async searchExisting(query: SearchQuery): Promise<GitHubIssue[]> { ... }
 *     async closeItem(itemId: string, reason: string): Promise<void> { ... }
 *     getItemId(item: GitHubIssue): string { ... }
 *   }
 */
export interface SearchQuery {
    incrementId: string;
    title?: string;
    project?: string;
    board?: string;
}
export interface VerificationResult<T> {
    success: boolean;
    expectedCount: number;
    actualCount: number;
    duplicates: T[];
    message: string;
}
export interface DetectionResult<T> {
    hasDuplicates: boolean;
    existing: T[];
    message: string;
}
/**
 * Abstract base class for duplicate detection.
 * Subclass per external tool (GitHub, JIRA, ADO).
 */
export declare abstract class DuplicateDetectorBase<T> {
    protected toolName: string;
    constructor(toolName: string);
    /**
     * Search for existing items that might be duplicates.
     * Implementation is tool-specific (different APIs).
     */
    protected abstract searchExisting(query: SearchQuery): Promise<T[]>;
    /**
     * Close/archive a duplicate item.
     * Implementation is tool-specific (different APIs).
     */
    protected abstract closeItem(itemId: string, reason: string): Promise<void>;
    /**
     * Get the unique ID of an item.
     */
    protected abstract getItemId(item: T): string;
    /**
     * Get the title/summary of an item for display.
     */
    protected abstract getItemTitle(item: T): string;
    /**
     * Check for existing items before creating a new one.
     * Returns existing items if found, preventing duplicate creation.
     */
    detectBeforeCreate(query: SearchQuery): Promise<DetectionResult<T>>;
    /**
     * Verify that creation didn't accidentally create duplicates.
     * Called after a create operation to ensure only expected items exist.
     */
    verifyAfterCreate(query: SearchQuery, expectedCount: number): Promise<VerificationResult<T>>;
    /**
     * Automatically close duplicate items.
     * Called when duplicates are detected to clean them up.
     */
    closeDuplicates(duplicates: T[]): Promise<void>;
    private formatDetectionMessage;
    private formatVerificationMessage;
}
//# sourceMappingURL=duplicate-detector-base.d.ts.map