export type GithubReviewEvent = "COMMENT" | "REQUEST_CHANGES" | "APPROVE";
export type GithubReviewSide = "RIGHT" | "LEFT";
export interface PrWalkthroughChangesetRef {
    baseSha: string;
    headSha: string;
    provider?: string;
    externalUrl?: string;
    prUrl?: string;
    prNumber?: string | number;
    prTitle?: string;
    prBody?: string;
    title?: string;
    owner?: string;
    repo?: string;
    repository?: string;
}
export interface PrWalkthroughDiffLine {
    id: string;
    side: "old" | "new" | "context";
    oldLine?: number;
    newLine?: number;
    text: string;
    kind: "context" | "add" | "del";
}
export interface PrWalkthroughHunk {
    id: string;
    header: string;
    lines: PrWalkthroughDiffLine[];
}
export interface PrWalkthroughDiffBlock {
    id: string;
    filePath: string;
    oldPath?: string;
    hunks: PrWalkthroughHunk[];
    status?: string;
    isBinary?: boolean;
    isTruncated?: boolean;
}
export interface PrWalkthroughCard {
    id: string;
    phaseId: string;
    title: string;
    summary: string;
    diffBlocks: PrWalkthroughDiffBlock[];
}
export interface PrWalkthroughComment {
    id: string;
    cardId: string;
    diffBlockId?: string;
    lineId?: string;
    body: string;
    source: "custom" | "suggested";
    createdAt: string;
    updatedAt?: string;
}
export interface PrWalkthroughDecision {
    cardId: string;
    value: "liked" | "disliked";
    commentIds: string[];
    updatedAt: string;
}
export interface PrWalkthroughReviewDraft {
    changeset: PrWalkthroughChangesetRef;
    decisions: Record<string, PrWalkthroughDecision>;
    comments: PrWalkthroughComment[];
    completedCardIds: string[];
    updatedAt: string;
}
export interface WalkthroughExportWarning {
    code: string;
    severity: "info" | "warning" | "error";
    message: string;
    commentId?: string;
}
export interface GithubReviewTarget {
    provider: "github";
    owner: string;
    repo: string;
    prNumber: number;
    prUrl?: string;
    headSha?: string;
}
export interface GithubReviewPreviewRow {
    id: string;
    commentId: string;
    cardId: string;
    cardTitle?: string;
    diffBlockId?: string;
    lineId?: string;
    path?: string;
    side?: GithubReviewSide;
    line?: number;
    body: string;
    valid: boolean;
    reason?: string;
}
export interface GithubReviewPreview {
    provider: "github";
    target?: GithubReviewTarget;
    body: string;
    rows: GithubReviewPreviewRow[];
    validCommentCount: number;
    unmappableCommentCount: number;
    warnings: WalkthroughExportWarning[];
    generatedAt: string;
}
export interface SubmitGithubReviewConfirmation {
    confirm?: boolean;
    event?: GithubReviewEvent;
    token?: string;
}
export interface SubmitGithubReviewOptions {
    fetch?: FetchLike;
    apiBaseUrl?: string;
    token?: string;
}
export interface GithubReviewSubmitResult {
    ok: boolean;
    status: number;
    submitted: boolean;
    message: string;
    reviewUrl?: string;
    response?: unknown;
    warnings?: WalkthroughExportWarning[];
}
interface FetchHeadersLike {
    get(name: string): string | null;
}
interface FetchResponseLike {
    ok: boolean;
    status: number;
    statusText: string;
    headers?: FetchHeadersLike;
    json(): Promise<unknown>;
    text(): Promise<string>;
}
type FetchLike = (url: string, init?: {
    method?: string;
    headers?: Record<string, string>;
    body?: string;
    signal?: AbortSignal;
}) => Promise<FetchResponseLike>;
export declare function buildGithubReviewPreview(draft: PrWalkthroughReviewDraft, cards: PrWalkthroughCard[], changeset?: PrWalkthroughChangesetRef): GithubReviewPreview;
export declare function submitGithubReview(preview: GithubReviewPreview, confirmation: SubmitGithubReviewConfirmation, options?: SubmitGithubReviewOptions): Promise<GithubReviewSubmitResult>;
export declare function createGithubReviewPayload(preview: GithubReviewPreview, event?: GithubReviewEvent): Record<string, unknown>;
export {};
//# sourceMappingURL=export-mapper.d.ts.map