/**
 * Local external issue importers — GitHub, Linear, and Jira JSON exports.
 * No hosted API or connector auth required.
 */
import type { Database } from "bun:sqlite";
import { type Task } from "../db/tasks.js";
import type { CreateTaskInput, TaskPriority } from "../types/index.js";
export declare const ISSUE_IMPORT_SCHEMA = "todos.issue_import.v1";
export declare const ISSUE_SOURCES: readonly ["github", "linear", "jira", "auto"];
export type IssueSource = (typeof ISSUE_SOURCES)[number];
export type ResolvedIssueSource = Exclude<IssueSource, "auto">;
export interface NormalizedExternalIssue {
    source: ResolvedIssueSource;
    external_ref: string;
    external_id: string;
    title: string;
    description?: string;
    status?: string;
    priority: TaskPriority;
    tags: string[];
    url?: string;
    raw_metadata: Record<string, unknown>;
}
export interface IssueImportInput {
    file_path?: string;
    json?: string;
    source?: IssueSource;
    project_id?: string;
    task_list_id?: string;
    agent_id?: string;
    tags?: string[];
}
export interface IssueImportPreviewItem {
    external_ref: string;
    external_id: string;
    title: string;
    duplicate_of: {
        task_id: string;
        short_id: string | null;
        title: string;
        score: number;
    } | null;
    create_task_input: CreateTaskInput;
}
export interface IssueImportPreview {
    schema_version: typeof ISSUE_IMPORT_SCHEMA;
    source: ResolvedIssueSource;
    file_path?: string;
    issue_count: number;
    duplicate_count: number;
    new_count: number;
    issues: IssueImportPreviewItem[];
}
export interface IssueImportOptions {
    dry_run?: boolean;
    skip_dedupe?: boolean;
    force?: boolean;
}
export interface IssueImportResult {
    schema_version: typeof ISSUE_IMPORT_SCHEMA;
    dry_run: boolean;
    source: ResolvedIssueSource;
    created: Task[];
    skipped_duplicates: Array<{
        external_ref: string;
        task_id: string;
        title: string;
    }>;
    errors: string[];
}
export declare function detectIssueExportSource(data: unknown): ResolvedIssueSource;
export declare function parseIssueExport(data: unknown, source?: IssueSource): NormalizedExternalIssue[];
export declare function loadIssueExportFromFile(path: string): unknown;
export declare function previewIssueImport(input: IssueImportInput, db?: Database): IssueImportPreview;
export declare function importIssues(input: IssueImportInput, options?: IssueImportOptions, db?: Database): IssueImportResult;
export declare function formatIssueImportPreviewText(preview: IssueImportPreview): string;
export declare function getIssueImportDocs(): string;
//# sourceMappingURL=issue-importers.d.ts.map