/**
 * Azure DevOps Provider Adapter
 *
 * Implements ProviderAdapter for ADO REST API v7.1.
 */
import { type ProviderAdapter, type ExternalRef, type UserStoryData, type FeatureData, type FieldChanges, type ExternalChange, type ItemState, type ExpectedState, type ReconcileResult, type DetectedHierarchy, type Label, type LabelConfig } from '../engine.js';
export interface AdoAdapterConfig {
    organization: string;
    project: string;
    pat: string;
    workItemType?: string;
    closedState?: string;
    activeState?: string;
}
export declare class AdoAdapter implements ProviderAdapter {
    readonly platform: "ado";
    readonly suffix: "A";
    private organization;
    private project;
    private pat;
    private baseUrl;
    private config;
    private cachedTemplate?;
    private templateDetected;
    constructor(config: AdoAdapterConfig);
    testConnection(): Promise<{
        ok: boolean;
        error?: string;
    }>;
    createIssue(story: UserStoryData, feature: FeatureData): Promise<ExternalRef>;
    updateIssue(ref: ExternalRef, changes: FieldChanges): Promise<void>;
    closeIssue(ref: ExternalRef, comment?: string): Promise<void>;
    reopenIssue(ref: ExternalRef): Promise<void>;
    pullChanges(since?: Date): Promise<ExternalChange[]>;
    getIssueState(ref: ExternalRef): Promise<ItemState>;
    applyLabels(ref: ExternalRef, labels: Label[]): Promise<void>;
    detectHierarchy(): Promise<DetectedHierarchy>;
    reconcile(items: ExpectedState[]): Promise<ReconcileResult>;
    generateLabels(config: LabelConfig): Label[];
    /**
     * Lazy-cached process template detection.
     * Calls ADO project capabilities API on first invocation, caches result.
     * Returns undefined if detection fails (no throw).
     */
    private getTemplate;
    private normalizeTemplateName;
    private getClosedState;
    private getActiveState;
    private buildDescription;
    private mapStatusToAdo;
    private extractUsId;
    private apiRequest;
}
//# sourceMappingURL=ado.d.ts.map