export namespace jiraAdapter {
    export let id: string;
    export { toStateCategory };
    export { toNeutral };
    /**
     * listCandidates — JQL search. `opts.query` is the JQL; if omitted we build a
     * bounded default. Returns newest-updated first.
     * @param {import('./types.js').ListCandidatesOptions} [opts]
     * @returns {Promise<import('./types.js').NeutralTicket[]>}
     */
    export function listCandidates(opts?: import("./types.js").ListCandidatesOptions): Promise<import("./types.js").NeutralTicket[]>;
    /**
     * getTicket — one issue by key. Uses jiraFetch (not jira_get_issue) so the
     * full status object incl. statusCategory is present for bucketing.
     */
    export function getTicket(key: any): Promise<{
        id: string;
        key: any;
        title: any;
        body: any;
        state: any;
        stateCategory: "unknown" | "todo" | "in_progress" | "done" | "blocked";
        assignee: any;
        url: string;
        _raw: any;
    }>;
    /** getComments — newest first (jira_get_comments already flattens ADF). */
    export function getComments(key: any): Promise<any>;
    /** addComment — delegates to jira_add_comment (wraps text in ADF). */
    export function addComment(key: any, body: any): Promise<{
        ok: boolean;
        id: any;
    }>;
    /**
     * transition — reuse jira_transition_issue's fuzzy matching (exact → core →
     * dice). Returns ok + the resulting raw state name and its bucket.
     */
    export function transition(key: any, targetStateName: any): Promise<{
        ok: boolean;
        error: any;
        _raw: any;
        stateAfter?: undefined;
        stateCategoryAfter?: undefined;
    } | {
        ok: boolean;
        stateAfter: any;
        stateCategoryAfter: "unknown" | "todo" | "in_progress" | "done" | "blocked";
        _raw: any;
        error?: undefined;
    }>;
    /**
     * linkPullRequest — try Jira's remote-link API; fall back to a comment.
     * Remote-link needs the granular `write:issue.remote-link:jira` scope; if it
     * 403s (or anything else), we still record the PR via a comment so the link
     * is never silently lost.
     */
    export function linkPullRequest(key: any, prUrl: any, title: any): Promise<{
        ok: boolean;
        via: string;
        error?: undefined;
    } | {
        ok: boolean;
        via: string;
        error: string;
    }>;
}
export default jiraAdapter;
/**
 * Map a Jira status into the neutral 5-bucket category.
 * @param {{name?: string, statusCategory?: {key?: string}}} [status]
 * @returns {'todo'|'in_progress'|'done'|'blocked'|'unknown'}
 */
declare function toStateCategory(status?: {
    name?: string;
    statusCategory?: {
        key?: string;
    };
}): "todo" | "in_progress" | "done" | "blocked" | "unknown";
/** Build a NeutralTicket from a full Jira issue REST payload. */
declare function toNeutral(issue: any, instanceUrl: any): {
    id: string;
    key: any;
    title: any;
    body: any;
    state: any;
    stateCategory: "unknown" | "todo" | "in_progress" | "done" | "blocked";
    assignee: any;
    url: string;
    _raw: any;
};
