/**
 * Jira Bubble Utilities
 *
 * Helper functions for the Jira service integration.
 */
/**
 * Atlassian Document Format (ADF) types
 */
interface ADFMark {
    type: 'strong' | 'em' | 'code' | 'link' | 'strike';
    attrs?: {
        href?: string;
        title?: string;
    };
}
interface ADFTextNode {
    type: 'text';
    text: string;
    marks?: ADFMark[];
}
interface ADFInlineNode {
    type: 'hardBreak';
}
type ADFInlineContent = ADFTextNode | ADFInlineNode;
interface ADFParagraphNode {
    type: 'paragraph';
    content?: ADFInlineContent[];
}
interface ADFHeadingNode {
    type: 'heading';
    attrs: {
        level: 1 | 2 | 3 | 4 | 5 | 6;
    };
    content?: ADFInlineContent[];
}
interface ADFCodeBlockNode {
    type: 'codeBlock';
    attrs?: {
        language?: string;
    };
    content?: ADFTextNode[];
}
interface ADFListItemNode {
    type: 'listItem';
    content: (ADFParagraphNode | ADFBulletListNode | ADFOrderedListNode)[];
}
interface ADFBulletListNode {
    type: 'bulletList';
    content: ADFListItemNode[];
}
interface ADFOrderedListNode {
    type: 'orderedList';
    content: ADFListItemNode[];
}
interface ADFBlockquoteNode {
    type: 'blockquote';
    content: ADFParagraphNode[];
}
interface ADFRuleNode {
    type: 'rule';
}
type ADFBlockNode = ADFParagraphNode | ADFHeadingNode | ADFCodeBlockNode | ADFBulletListNode | ADFOrderedListNode | ADFBlockquoteNode | ADFRuleNode;
interface ADFDocument {
    type: 'doc';
    version: 1;
    content: ADFBlockNode[];
}
/**
 * Converts markdown or plain text to Atlassian Document Format (ADF).
 *
 * Jira's API requires descriptions and comments in ADF format.
 * This function converts markdown/plain text into proper ADF structure.
 *
 * Supported markdown:
 * - **bold** or __bold__
 * - *italic* or _italic_
 * - `inline code`
 * - [links](url)
 * - # Headings (h1-h6)
 * - - Bullet lists
 * - 1. Numbered lists
 * - > Blockquotes
 * - ``` Code blocks ```
 * - --- Horizontal rules
 * - ~~strikethrough~~
 *
 * @param text - Markdown or plain text to convert
 * @returns ADF document object
 *
 * @example
 * const adf = textToADF('**Bold** and *italic*');
 * const adf = textToADF('# Heading\n\nParagraph text');
 */
export declare function textToADF(text: string): ADFDocument;
/**
 * Converts ADF document back to plain text.
 *
 * Useful for displaying Jira content in a human-readable format.
 *
 * @param adf - ADF document to convert
 * @returns Plain text representation
 */
export declare function adfToText(adf: unknown): string;
/**
 * Enhances Jira API error messages with helpful hints.
 *
 * @param errorText - Raw error text from API
 * @param statusCode - HTTP status code
 * @param statusText - HTTP status text
 * @returns Enhanced error message
 */
export declare function enhanceErrorMessage(errorText: string, statusCode: number, statusText: string): string;
/**
 * Validates and normalizes a date string to YYYY-MM-DD format.
 *
 * @param date - Date string to validate
 * @returns Normalized date string or null if invalid
 */
export declare function normalizeDate(date: string | null | undefined): string | null;
/**
 * Finds a transition by target status name (case-insensitive).
 *
 * @param transitions - Available transitions
 * @param targetStatus - Target status name
 * @returns Matching transition or undefined
 */
export declare function findTransitionByStatus(transitions: Array<{
    id: string;
    name: string;
    to?: {
        name: string;
    };
}>, targetStatus: string): {
    id: string;
    name: string;
    to?: {
        name: string;
    };
} | undefined;
export {};
//# sourceMappingURL=jira.utils.d.ts.map