/**
 * Types for Issue Tracker Integration
 *
 * @module cli/helpers/issue-tracker/types
 */
import { SupportedLanguage } from '../../../core/i18n/types.js';
/**
 * Supported issue trackers
 */
export type IssueTracker = 'github' | 'jira' | 'ado' | 'none';
/**
 * GitHub instance type
 */
export type GitHubInstanceType = 'cloud' | 'enterprise';
/**
 * Jira instance type
 */
export type JiraInstanceType = 'cloud' | 'server';
/**
 * GitHub team mapping strategies
 */
export type GitHubStrategy = 'repository-per-team' | 'team-based' | 'team-multi-repo';
/**
 * GitHub credentials
 */
export interface GitHubCredentials {
    token: string;
    instanceType: GitHubInstanceType;
    apiEndpoint?: string;
    strategy?: GitHubStrategy;
    owner?: string;
    repos?: string[];
    repo?: string;
    teams?: string[];
    teamRepoMapping?: Record<string, string[]>;
}
/**
 * Jira team mapping strategies
 */
export type JiraStrategy = 'project-per-team' | 'component-based' | 'board-based';
/**
 * Per-project configuration for Jira
 *
 * NEW (v0.33.0): Mirrors AzureDevOpsProjectConfig for consistent 2-level structure
 * - JIRA: project → boards (like ADO: project → areaPaths)
 */
export interface JiraProjectConfig {
    /** Jira project key (e.g., "FRONTEND") */
    key: string;
    /** Jira project name (optional, for display) */
    name?: string;
    /** Jira project ID (populated after validation) */
    id?: string;
    /** Boards for this project (2-level structure) */
    boards?: Array<{
        id: string;
        name?: string;
    }>;
    /** Whether this is the default project */
    isDefault?: boolean;
}
/**
 * Jira credentials
 *
 * NEW (v0.33.0): Added `projectConfigs` for 2-level structure (project → boards)
 * This aligns with ADO's `projects[]` structure for consistency.
 */
export interface JiraCredentials {
    token: string;
    email: string;
    domain: string;
    instanceType: JiraInstanceType;
    strategy?: JiraStrategy;
    projects?: string[];
    projectConfigs?: JiraProjectConfig[];
    project?: string;
    components?: string[];
    boards?: string[];
}
/**
 * Azure DevOps team mapping strategies
 */
export type AzureDevOpsStrategy = 'project-per-team' | 'area-path-based';
/**
 * ADO Process Template types
 *
 * Detected automatically via ADO API to determine hierarchy mapping.
 * SAFe has 5 levels (Capability→Epic→Feature→Story→Task)
 * Others have 4 levels or less.
 */
export type AdoProcessTemplate = 'Agile' | 'Scrum' | 'CMMI' | 'Basic' | 'SAFe' | 'unknown';
/**
 * Per-project configuration for Azure DevOps
 *
 * Used when selecting multiple ADO projects during init
 */
export interface AzureDevOpsProjectConfig {
    name: string;
    areaPaths?: string[];
    isDefault?: boolean;
    isUmbrella?: boolean;
    /** Auto-detected process template (Agile, Scrum, CMMI, SAFe, etc.) */
    processTemplate?: AdoProcessTemplate;
    /** True if project has Capability work item type (indicates SAFe 5-level hierarchy) */
    hasCapability?: boolean;
}
/**
 * Azure DevOps credentials
 *
 * 2-level hierarchy: Project -> Area Path (teams deprecated)
 *
 * Supports both single project (backward compat) and multi-project modes:
 * - Single: `project` is set
 * - Multi: `projects` is set
 */
export interface AzureDevOpsCredentials {
    pat: string;
    org: string;
    /** Single project name (backward compatibility) */
    project?: string;
    /** Multi-project configuration (new in v0.28.x) */
    projects?: AzureDevOpsProjectConfig[];
    /** Area paths for single-project mode (leaf names only, e.g., ["Platform-Engineering"]) */
    areaPaths?: string[];
    /** Team mapping strategy (optional, defaults to 'area-path-based') */
    strategy?: AzureDevOpsStrategy;
}
/**
 * Union type for all credentials
 */
export type TrackerCredentials = GitHubCredentials | JiraCredentials | AzureDevOpsCredentials;
/**
 * Existing credentials source
 */
export interface ExistingCredentials {
    source: string;
    credentials: TrackerCredentials;
}
/**
 * Connection validation result
 */
export interface ValidationResult {
    success: boolean;
    username?: string;
    error?: string;
}
/**
 * Repository hosting types
 *
 * Simplified (v0581): provider only, no single/multirepo suffix.
 *
 * NOTE: 'local' is required for repositories without remote.
 */
export type RepositoryHosting = 'github' | 'bitbucket' | 'ado' | 'local' | 'other';
/**
 * ADO project selection from repository setup
 * Used to avoid duplicate prompts when ADO is selected for both repos and issues
 */
export interface AdoProjectSelection {
    org: string;
    pat: string;
    projects: string[];
}
/**
 * Setup options
 */
export interface SetupOptions {
    projectPath: string;
    language: SupportedLanguage;
    maxRetries?: number;
    setupRetryCount?: number;
    isFrameworkRepo?: boolean;
    repositoryHosting?: RepositoryHosting;
    /** ADO credentials from repository setup - reused when ADO is also selected for issue tracking */
    adoCredentialsFromRepoSetup?: AdoProjectSelection;
    /** GitHub credentials and cloned repos from repository setup - reused when GitHub Issues is selected for issue tracking (v1.0.4, enhanced v1.0.9) */
    githubCredentialsFromRepoSetup?: {
        org: string;
        pat: string;
        /** List of cloned repo names for 1:1 project mapping (v1.0.9) */
        clonedRepos?: string[];
    };
    /** Git URL format preference from repository setup (SSH or HTTPS) - v1.0.8+ */
    gitUrlFormat?: 'ssh' | 'https';
    /** Non-interactive mode (--quick flag or CI environment) - skips all prompts */
    isCI?: boolean;
}
/**
 * Sync settings for external tool integration
 */
export interface SyncSettings {
    includeStatus: boolean;
    autoApplyLabels: boolean;
}
/**
 * Sync permissions for external tool operations
 */
export interface SyncPermissions {
    canUpsertInternalItems: boolean;
    canUpdateExternalItems: boolean;
    canUpdateStatus: boolean;
}
/**
 * Rate limit information
 */
export interface RateLimitInfo {
    limit: number;
    remaining: number;
    reset: Date;
}
/**
 * Rate limit error
 */
export declare class RateLimitError extends Error {
    rateLimitInfo: RateLimitInfo;
    constructor(message: string, rateLimitInfo: RateLimitInfo);
}
//# sourceMappingURL=types.d.ts.map