/**
 * Low-level Plane REST helper — the SINGLE auth chokepoint (cf. linearFetch).
 * Keep token + base-url resolution here; never re-implement at call sites.
 * Exported so a pipeline can issue raw calls the 6 methods don't cover.
 *
 * @param {string} path  path AFTER /api/v1, e.g.
 *   `/workspaces/acme/projects/<uuid>/work-items/`
 * @param {{method?:string, body?:any, query?:object, headers?:object}} [opts]
 * @returns {Promise<any>} parsed JSON (or {} for empty body)
 */
export function planeFetch(path: string, opts?: {
    method?: string;
    body?: any;
    query?: object;
    headers?: object;
}): Promise<any>;
/**
 * Normalize a Plane state into the neutral 5-bucket category.
 * @param {{name?:string, group?:string}} [state]
 * @returns {'todo'|'in_progress'|'done'|'blocked'|'unknown'}
 */
export function toStateCategory(state?: {
    name?: string;
    group?: string;
}): "todo" | "in_progress" | "done" | "blocked" | "unknown";
export namespace planeAdapter {
    export let id: string;
    export let envKeys: string[];
    export { planeFetch };
    export { toStateCategory };
    /**
     * listCandidates — poll work items for a (workspace, project).
     * @param {import('./types.js').ListCandidatesOptions & {ctx?: object}} [opts]
     * @returns {Promise<import('./types.js').NeutralTicket[]>}
     */
    export function listCandidates(opts?: import("./types.js").ListCandidatesOptions & {
        ctx?: object;
    }): Promise<import("./types.js").NeutralTicket[]>;
    /**
     * getTicket — one work item by uuid (Plane addresses work items by uuid, NOT
     * by the PROJ-42 human key).
     * TODO: if `key` looks like "PROJ-42", resolve sequence_id → uuid via a
     * filtered list call. For now assume a uuid.
     */
    export function getTicket(key: any, ctx?: {}): Promise<{
        id: any;
        key: any;
        title: any;
        body: any;
        state: any;
        stateCategory: "unknown" | "todo" | "in_progress" | "done" | "blocked";
        assignee: string;
        url: string;
        _raw: any;
    }>;
    /** getComments — newest first. */
    export function getComments(key: any, ctx?: {}): Promise<any>;
    /**
     * addComment — Plane comments are HTML, not markdown. We wrap plaintext in a
     * <p> so a markdown-y body at least renders as text.
     * TODO: confirm the API accepts comment_html on POST (vs comment_stripped),
     * and whether it sanitizes/strips.
     */
    export function addComment(key: any, body: any, ctx?: {}): Promise<{
        ok: boolean;
        id: any;
        _raw: any;
    }>;
    /**
     * transition — Plane has NO transition object (like Linear). Resolve the
     * target state NAME (or a neutral category word) to the project's matching
     * state uuid, then PATCH work-item { state: <uuid> }.
     */
    export function transition(key: any, targetStateName: any, ctx?: {}): Promise<{
        ok: boolean;
        error: string;
        availableStates: any;
        stateAfter?: undefined;
        stateCategoryAfter?: undefined;
        _raw?: undefined;
    } | {
        ok: boolean;
        stateAfter: any;
        stateCategoryAfter: "unknown" | "todo" | "in_progress" | "done" | "blocked";
        _raw: any;
        error?: undefined;
        availableStates?: undefined;
    }>;
    /**
     * linkPullRequest — Plane has no first-class "attachment URL on issue" like
     * Linear's attachmentCreate. The portable path is a comment with the link.
     * (Plane does have a GitHub *integration* for repo-level linking, but that's
     * an installed integration, not a per-issue API write.)
     * TODO: if a target Plane exposes a link/attachment endpoint, prefer it.
     */
    export function linkPullRequest(key: any, prUrl: any, title: any, ctx?: {}): Promise<{
        ok: boolean;
        via: string;
    }>;
}
export default planeAdapter;
