/**
 * Jira Sprint Sync Functions
 *
 * Story 47-2: Sync sprint numbers with Jira sprint IDs
 *
 * These functions enable bidirectional sprint tracking between
 * Pennyfarthing's local sprint YAML and Jira's sprint system.
 */
export interface JiraSprintInfo {
    id: number;
    name: string;
    state: 'active' | 'closed' | 'future';
    startDate?: string;
    endDate?: string;
}
export interface SprintIssue {
    key: string;
    summary: string;
    status: string;
    points?: number;
    labels?: string[];
}
export interface SprintVelocityMetrics {
    totalPoints: number;
    completedPoints: number;
    remainingPoints: number;
    velocityPercentage?: number;
    issueCount?: number;
    completedCount?: number;
    byStatus?: Record<string, {
        count: number;
        points: number;
    }>;
}
export interface SprintSyncResult {
    success: boolean;
    error?: string;
    warning?: string;
}
export interface AddJiraSprintIdOptions {
    sprintPath: string;
    jiraSprintId: number;
    force?: boolean;
}
export interface AddJiraSprintIdResult extends SprintSyncResult {
    previousId?: number;
}
/**
 * Add or update jira_sprint_id field in sprint YAML
 */
export declare function addJiraSprintIdToYaml(options: AddJiraSprintIdOptions): Promise<AddJiraSprintIdResult>;
export interface GetJiraSprintInfoOptions {
    sprintId: number;
    _mockResponse?: JiraSprintInfo | null;
    _mockError?: string;
}
export interface GetJiraSprintInfoResult extends SprintSyncResult {
    sprint?: JiraSprintInfo;
}
/**
 * Get sprint details from Jira
 */
export declare function getJiraSprintInfo(options: GetJiraSprintInfoOptions): Promise<GetJiraSprintInfoResult>;
export interface GetSprintIssuesOptions {
    sprintId: number;
    label?: string;
    _mockResponse?: SprintIssue[];
    _mockError?: string;
}
export interface GetSprintIssuesResult extends SprintSyncResult {
    issues?: SprintIssue[];
}
/**
 * Get all issues in a Jira sprint
 */
export declare function getSprintIssues(options: GetSprintIssuesOptions): Promise<GetSprintIssuesResult>;
export interface IsStoryInJiraSprintOptions {
    jiraKey: string;
    sprintId: number;
    _mockResponse?: boolean;
    _mockError?: string;
}
export interface IsStoryInJiraSprintResult extends SprintSyncResult {
    inSprint?: boolean;
}
/**
 * Check if a specific story is in a Jira sprint
 */
export declare function isStoryInJiraSprint(options: IsStoryInJiraSprintOptions): Promise<IsStoryInJiraSprintResult>;
export interface GetSprintVelocityOptions {
    sprintId: number;
    _mockResponse?: SprintVelocityMetrics;
    _mockError?: string;
}
export interface GetSprintVelocityResult extends SprintSyncResult {
    metrics?: SprintVelocityMetrics;
}
/**
 * Get velocity metrics from Jira sprint
 */
export declare function getSprintVelocityFromJira(options: GetSprintVelocityOptions): Promise<GetSprintVelocityResult>;
export interface ValidateSprintAlignmentOptions {
    sprintPath: string;
    _mockJiraSprint?: JiraSprintInfo | null;
    _mockError?: string;
}
export interface ValidateSprintAlignmentResult extends SprintSyncResult {
    aligned?: boolean;
    localSprintName?: string;
    jiraSprintId?: number;
    jiraSprintName?: string;
}
/**
 * Validate that local sprint name matches Jira sprint name
 */
export declare function validateSprintAlignment(options: ValidateSprintAlignmentOptions): Promise<ValidateSprintAlignmentResult>;
export interface MissingStory extends SprintIssue {
    storyId: string;
}
export interface GetYamlStoryIdsOptions {
    sprintPath: string;
}
export interface GetYamlStoryIdsResult extends SprintSyncResult {
    storyIds?: string[];
}
export interface FindJiraOnlyStoriesOptions {
    jiraIssues: SprintIssue[];
    yamlStoryIds: string[];
    filterLabel?: string;
}
export interface FindJiraOnlyStoriesResult extends SprintSyncResult {
    missingStories?: MissingStory[];
}
export interface FormatMissingStoriesReportOptions {
    missingStories: MissingStory[];
    jiraBaseUrl?: string;
}
export interface FormatMissingStoriesReportResult extends SprintSyncResult {
    report?: string;
}
export interface ImportMissingStoriesToYamlOptions {
    sprintPath: string;
    missingStories: MissingStory[];
    targetEpicId: string;
    dryRun?: boolean;
}
export interface ImportMissingStoriesToYamlResult extends SprintSyncResult {
    importedCount?: number;
    wouldImport?: MissingStory[];
}
/**
 * Extract all story IDs from sprint YAML file
 */
export declare function getYamlStoryIds(options: GetYamlStoryIdsOptions): Promise<GetYamlStoryIdsResult>;
/**
 * Find stories that are in Jira but not in the sprint YAML
 */
export declare function findJiraOnlyStories(options: FindJiraOnlyStoriesOptions): Promise<FindJiraOnlyStoriesResult>;
/**
 * Generate a human-readable report of missing stories
 */
export declare function formatMissingStoriesReport(options: FormatMissingStoriesReportOptions): Promise<FormatMissingStoriesReportResult>;
/**
 * Import missing stories from Jira into sprint YAML
 */
export declare function importMissingStoriesToYaml(options: ImportMissingStoriesToYamlOptions): Promise<ImportMissingStoriesToYamlResult>;
export interface StorySprintMembership {
    storyId: string;
    jiraKey: string;
    inSprint: boolean;
    jiraSprintId?: number;
}
export interface SyncStorySprintMembershipOptions {
    sprintPath: string;
    jiraSprintId: number;
    _mockJiraIssues?: SprintIssue[];
    _mockError?: string;
}
export interface SyncStorySprintMembershipResult extends SprintSyncResult {
    updated?: number;
    added?: string[];
    removed?: string[];
    unchanged?: number;
}
/**
 * Sync story sprint membership between YAML and Jira
 *
 * Direction: Jira → YAML
 * - Stories in Jira sprint get in_sprint: true
 * - Stories not in Jira sprint get in_sprint: false
 */
export declare function syncStorySprintMembershipFromJira(options: SyncStorySprintMembershipOptions): Promise<SyncStorySprintMembershipResult>;
export interface AddStoryToJiraSprintOptions {
    jiraKey: string;
    sprintId: number;
    _mockSuccess?: boolean;
    _mockError?: string;
}
export interface AddStoryToJiraSprintResult extends SprintSyncResult {
    added?: boolean;
}
/**
 * Add a story to a Jira sprint
 *
 * Direction: YAML → Jira
 * Uses: jira sprint add {sprintId} {jiraKey}
 */
export declare function addStoryToJiraSprint(options: AddStoryToJiraSprintOptions): Promise<AddStoryToJiraSprintResult>;
export interface RemoveStoryFromJiraSprintOptions {
    jiraKey: string;
    _mockSuccess?: boolean;
    _mockError?: string;
}
export interface RemoveStoryFromJiraSprintResult extends SprintSyncResult {
    removed?: boolean;
}
/**
 * Remove a story from its current Jira sprint (move to backlog)
 *
 * Direction: YAML → Jira
 * Uses: jira issue edit {jiraKey} --sprint "" or move to backlog
 */
export declare function removeStoryFromJiraSprint(options: RemoveStoryFromJiraSprintOptions): Promise<RemoveStoryFromJiraSprintResult>;
export interface SyncStorySprintMembershipToJiraOptions {
    sprintPath: string;
    jiraSprintId: number;
    dryRun?: boolean;
    _mockAddSuccess?: boolean;
    _mockRemoveSuccess?: boolean;
    _mockError?: string;
}
export interface SyncStorySprintMembershipToJiraResult extends SprintSyncResult {
    toAdd?: string[];
    toRemove?: string[];
    added?: string[];
    removed?: string[];
    failed?: string[];
}
/**
 * Sync story sprint membership from YAML to Jira
 *
 * Direction: YAML → Jira
 * - Stories with in_sprint: true are added to Jira sprint
 * - Stories with in_sprint: false are removed from Jira sprint
 */
export declare function syncStorySprintMembershipToJira(options: SyncStorySprintMembershipToJiraOptions): Promise<SyncStorySprintMembershipToJiraResult>;
//# sourceMappingURL=jira-sprint-sync.d.ts.map