import type { Database } from "bun:sqlite";
import { type InboxItem } from "../db/inbox.js";
import type { Task, TaskPriority } from "../types/index.js";
import { type DuplicateTaskCandidate } from "./task-dedupe.js";
export declare const EXTERNAL_ISSUE_IMPORT_SCHEMA_VERSION = 1;
export type ExternalIssueProvider = "github" | "linear" | "jira" | "url";
export interface ExternalIssueRecord {
    provider: ExternalIssueProvider;
    external_id: string;
    key: string | null;
    title: string;
    body: string | null;
    url: string | null;
    state: string | null;
    labels: string[];
    assignee: string | null;
    priority: TaskPriority | null;
    metadata: Record<string, unknown>;
}
export interface ExternalIssueImportInput {
    provider?: ExternalIssueProvider;
    text?: string;
    json?: unknown;
    source_url?: string;
    source_name?: string;
    project_id?: string;
    task_list_id?: string;
    agent_id?: string;
    default_priority?: TaskPriority;
    apply?: boolean;
    allow_network?: boolean;
    create_inbox?: boolean;
    dedupe?: boolean;
}
export interface ExternalIssueExistingMatch {
    issue: ExternalIssueRecord;
    task: Task;
    reason: string;
}
export interface ExternalIssueImportResult {
    schema_version: 1;
    local_only: true;
    network_used: boolean;
    dry_run: boolean;
    imported_at: string;
    source: {
        provider: ExternalIssueProvider | null;
        source_url: string | null;
        source_name: string | null;
    };
    issues: ExternalIssueRecord[];
    created_tasks: Task[];
    inbox_items: InboxItem[];
    existing_matches: ExternalIssueExistingMatch[];
    duplicate_candidates: DuplicateTaskCandidate[];
    warnings: string[];
    commands: string[];
}
export declare function importExternalIssues(input: ExternalIssueImportInput, db?: Database): ExternalIssueImportResult;
//# sourceMappingURL=external-issue-importers.d.ts.map