import { type IssueEnvelope, type NormalizedIssueEnvelope } from './types.js';
export interface JiraAdapterConfig {
    baseUrl?: string;
    host?: string;
    email?: string;
    apiToken?: string;
    projectKey?: string;
    jql?: string;
}
export declare function normalizeJiraIssue(rawIssue: unknown): IssueEnvelope;
export declare function normalizeJiraIssueToEnvelope(rawIssue: unknown): NormalizedIssueEnvelope;
export declare function buildJiraTicketDescription(envelope: NormalizedIssueEnvelope): string;
export declare function buildJiraMetadata(envelope: NormalizedIssueEnvelope): Record<string, string>;
export declare function buildJiraSpawnContextMessage(envelope: NormalizedIssueEnvelope, additionalMessage?: string): string;
export declare function buildJiraIssueChoiceCommand(issueKey: string, projectId?: string): string;
export declare function getJiraIssueByKey(configInput: JiraAdapterConfig, issueKey: string, options?: {
    fetchImpl?: typeof fetch;
}): Promise<NormalizedIssueEnvelope | null>;
/**
 * Check if Jira is configured via environment variables.
 * Returns true if at least a base URL and API token are present.
 */
export declare function isJiraConfigured(config?: JiraAdapterConfig): boolean;
/**
 * Get the configured Jira project key from config or environment variables.
 */
export declare function getJiraProjectKey(config?: JiraAdapterConfig): string | undefined;
/**
 * Import a Jira issue into PMO as a linked ticket.
 *
 * Creates a new PMO ticket or updates an existing one that is linked
 * to the same Jira issue (matched by external_key or external_id).
 *
 * @returns Object with ticketId and whether it was newly created
 */
export declare function importJiraIssueToPmo(storage: {
    listTickets(projectId: string): Promise<Array<{
        id: string;
        metadata?: Record<string, string>;
    }>>;
    createTicket(projectId: string, input: {
        title: string;
        description: string;
        priority?: string;
        category?: string;
        labels: string[];
        metadata: Record<string, string>;
    }): Promise<{
        id: string;
    }>;
    updateTicket(ticketId: string, input: {
        title: string;
        description: string;
        priority?: string;
        category?: string;
        labels: string[];
        metadata: Record<string, string>;
    }): Promise<{
        id: string;
    }>;
}, projectId: string, envelope: NormalizedIssueEnvelope): Promise<{
    ticketId: string;
    created: boolean;
}>;
export declare function listJiraIssues(configInput: JiraAdapterConfig, options?: {
    limit?: number;
    jql?: string;
    fetchImpl?: typeof fetch;
}): Promise<NormalizedIssueEnvelope[]>;
