/** * JIRA Importer * * Imports JIRA issues/epics as External Items with JQL support and pagination. * Handles authentication and converts JIRA-specific data to platform-agnostic format. */ import type { Importer, ExternalItem, ImportConfig } from './external-importer.js'; /** * JIRA Importer Implementation * * Supports multi-project mode via optional projectKey parameter. * When projectKey is set, JQL queries are filtered to that project only. */ export declare class JiraImporter implements Importer { readonly platform: "jira"; private host; private email; private apiToken; private projectKey?; /** * Create a JIRA importer for 1-level structure (Project → SpecWeave Project) * * @param host - JIRA host URL (e.g., "your-domain.atlassian.net") * @param email - JIRA user email * @param apiToken - JIRA API token * @param projectKey - Optional project key for multi-project mode (e.g., "PROJ") */ constructor(host: string, email?: string, apiToken?: string, projectKey?: string); /** * Import all issues matching config * * Implements 3-phase import like ADO: * 1. Paginated JQL fetch (time-range based) * 2. Detect missing parent Epics * 3. Fetch missing parents to maintain hierarchy */ import(config?: ImportConfig): Promise; /** * Find parent keys that are referenced but not in fetched set * (Typically Epics that weren't modified in the time range) */ private findMissingParentKeys; /** * Fetch specific issues by their keys (for parent recovery) */ private fetchIssuesByKeys; /** * Paginate through JIRA issues using JQL search (50 per page) * * Uses 3-phase import to maintain hierarchy: * - Phase 1: Fetch all items matching JQL query with pagination * - Phase 2: Detect missing parent items (outside time range) * - Phase 3: Fetch missing parents to maintain hierarchy */ paginate(config?: ImportConfig): AsyncGenerator; /** * Make authenticated JIRA API request */ private makeJiraRequest; /** * Convert JIRA issue to ExternalItem */ private convertToExternalItem; /** * Map JIRA issue type to ExternalItem type */ private mapIssueType; /** * Map JIRA status category to ExternalItem status */ private mapStatusCategory; /** * Map JIRA priority to ExternalItem priority */ private mapPriority; /** * Extract plain text from JIRA description (handles ADF format) * * JIRA Cloud uses Atlassian Document Format (ADF) which is a JSON object. * This method converts ADF to plain text for processing. * * @param description - Either a string or ADF object * @returns Plain text string */ private extractTextFromDescription; /** * Extract acceptance criteria from description * Looks for patterns like: * - AC1: ... * - Acceptance Criteria: * - Given/When/Then */ private extractAcceptanceCriteria; } //# sourceMappingURL=jira-importer.d.ts.map