import type { Response } from 'express';
import { ReportBuilderService } from '../services/report-builder.service';
import { ReportRenderService } from '../services/report-render.service';
import { ReportWorkflowService } from '../services/report-workflow.service';
import { ClauseLibraryService } from '../services/clause-library.service';
import { ReportAiService } from '../services/report-ai.service';
import { ReportDocxService } from '../services/report-docx.service';
import { ReportImageService } from '../services/report-image.service';
import { ReportPdfService } from '../services/report-pdf.service';
import { CreateReportDto } from '../dto/create-report.dto';
import { UpdateHeaderDto } from '../dto/update-header.dto';
import { UpsertClauseDto, BulkClausesDto } from '../dto/upsert-clause.dto';
import { UpsertSectionDto, SetAttendanceDto } from '../dto/section-and-attendance.dto';
import { RaiseNcDto, ReturnReportDto, SeedLibraryDto, ImportLibraryDto, CloneLibraryDto } from '../dto/workflow.dto';
export declare class AuditReportBuilderController {
    private readonly builder;
    private readonly renderer;
    private readonly workflow;
    private readonly library;
    private readonly ai;
    private readonly docx;
    private readonly imageSvc;
    private readonly pdfSvc;
    constructor(builder: ReportBuilderService, renderer: ReportRenderService, workflow: ReportWorkflowService, library: ClauseLibraryService, ai: ReportAiService, docx: ReportDocxService, imageSvc: ReportImageService, pdfSvc: ReportPdfService);
    list(q: any, req: any): Promise<{
        rows: any;
        total: number;
        page: number;
        limit: number;
        totalPages: number;
    }>;
    byAudit(rowId: number, req: any): Promise<any[]>;
    context(rowId: number, req: any): Promise<{
        audit: any;
        suggested_stage_type: import("../entities/audit-report.entity").StageType | null;
        standards: {
            id: number;
            name: string;
            title: string;
        }[];
        can_combine: boolean;
        reports: any[];
    }>;
    clauseLibrary(standardId: number, scope?: 'readiness' | 'full'): Promise<import("../entities/clause-library.entity").ClauseLibrary[]>;
    seedLibrary(key: string, dto: SeedLibraryDto, req: any): Promise<{
        set: string;
        inserted: number;
        skipped: number;
        evidence_filled: number;
    }>;
    importLibrary(dto: ImportLibraryDto, req: any): Promise<{
        inserted: number;
        updated: number;
        total: number;
    }>;
    cloneLibrary(dto: CloneLibraryDto, req: any): Promise<{
        inserted: number;
        skipped: number;
    }>;
    create(dto: CreateReportDto, req: any): Promise<{
        report: {
            id: number;
            report_no: string | null;
            audit_schedule_row_id: number;
            company_id: number;
            standard_id: number;
            is_combined: boolean;
            standard_label: string;
            all_standards: {
                id: number;
                name: string;
                title: string;
            }[];
            stage_type: import("../entities/audit-report.entity").StageType;
            stage_label: string;
            status: import("../entities/audit-report.entity").ReportStatus;
            conclusion: import("../entities/audit-report.entity").Conclusion | null;
            recommendation: import("../entities/audit-report.entity").Stage1Recommendation | null;
            next_audit_date: string | null;
            version: number;
            return_reason: string | null;
            has_pdf: boolean;
            submitted_at: Date | null;
            approved_at: Date | null;
            crm_refreshed_at: any;
        };
        fields: Record<string, string>;
        crm_fields: any;
        overridden: string[];
        extras: Record<string, any>;
        sections: {
            key: string;
            label: string;
            body: string;
        }[];
        clauses: import("../entities/audit-report-clause.entity").AuditReportClause[];
        attendance: import("../entities/audit-report-attendance.entity").AuditReportAttendance[];
        client_documents: any;
        ncs: any;
        options: {
            conclusion: {
                key: import("../entities/audit-report.entity").Conclusion;
                text: string;
            }[];
            stage1_recommendation: {
                key: import("../entities/audit-report.entity").Stage1Recommendation;
                text: string;
            }[];
            declarations: {
                key: string;
                text: string;
            }[];
            attachments: import("../report.standards").AttachmentItem[];
            mark_use: {
                key: string;
                text: string;
            }[];
            change_detail: {
                key: string;
                label: string;
                kind: "yesno" | "nonespecify";
            }[];
            editable_fields: readonly ["name", "address", "site_address", "employees", "emails", "contact_person", "telephone", "email", "multisite", "scope", "cert_no", "ea_code", "accreditation", "lead_auditor", "auditors", "technical_expert", "man_days", "audit_date"];
        };
        permissions: {
            can_edit: boolean;
            can_approve: boolean;
        };
    }>;
    get(id: number, req: any): Promise<{
        report: {
            id: number;
            report_no: string | null;
            audit_schedule_row_id: number;
            company_id: number;
            standard_id: number;
            is_combined: boolean;
            standard_label: string;
            all_standards: {
                id: number;
                name: string;
                title: string;
            }[];
            stage_type: import("../entities/audit-report.entity").StageType;
            stage_label: string;
            status: import("../entities/audit-report.entity").ReportStatus;
            conclusion: import("../entities/audit-report.entity").Conclusion | null;
            recommendation: import("../entities/audit-report.entity").Stage1Recommendation | null;
            next_audit_date: string | null;
            version: number;
            return_reason: string | null;
            has_pdf: boolean;
            submitted_at: Date | null;
            approved_at: Date | null;
            crm_refreshed_at: any;
        };
        fields: Record<string, string>;
        crm_fields: any;
        overridden: string[];
        extras: Record<string, any>;
        sections: {
            key: string;
            label: string;
            body: string;
        }[];
        clauses: import("../entities/audit-report-clause.entity").AuditReportClause[];
        attendance: import("../entities/audit-report-attendance.entity").AuditReportAttendance[];
        client_documents: any;
        ncs: any;
        options: {
            conclusion: {
                key: import("../entities/audit-report.entity").Conclusion;
                text: string;
            }[];
            stage1_recommendation: {
                key: import("../entities/audit-report.entity").Stage1Recommendation;
                text: string;
            }[];
            declarations: {
                key: string;
                text: string;
            }[];
            attachments: import("../report.standards").AttachmentItem[];
            mark_use: {
                key: string;
                text: string;
            }[];
            change_detail: {
                key: string;
                label: string;
                kind: "yesno" | "nonespecify";
            }[];
            editable_fields: readonly ["name", "address", "site_address", "employees", "emails", "contact_person", "telephone", "email", "multisite", "scope", "cert_no", "ea_code", "accreditation", "lead_auditor", "auditors", "technical_expert", "man_days", "audit_date"];
        };
        permissions: {
            can_edit: boolean;
            can_approve: boolean;
        };
    }>;
    preview(id: number, req: any, res: Response): Promise<void>;
    pdf(id: number, req: any, res: Response): Promise<Response<any, Record<string, any>> | undefined>;
    wordFile(id: number, req: any, res: Response): Promise<void>;
    aiEvidence(id: number, body: {
        clause_ids?: number[];
        overwrite?: boolean;
        mark_conforming?: boolean;
    }, req: any): Promise<{
        generated: number;
        skipped_findings: any;
        items: never[];
        requested?: undefined;
    } | {
        generated: number;
        requested: number;
        skipped_findings: any;
        items: any[];
    }>;
    aiFinding(id: number, body: {
        clause_id: number;
        note?: string;
        nc_type?: 'Major' | 'Minor' | 'Observation';
    }, req: any): Promise<{
        statement: string;
    }>;
    aiSections(id: number, body: {
        keys?: string[];
        overwrite?: boolean;
    }, req: any): Promise<{
        generated: number;
        items: {
            key: string;
            body: string;
        }[];
    }>;
    listImages(id: number, section_key: string, clause_id: string, req: any): Promise<{
        id: number;
        report_id: number;
        section_key: string;
        clause_id: number | null;
        original_name: string;
        mime: string;
        width: number;
        height: number;
        size_bytes: number;
        caption: string;
        sort_order: number;
        created_at: Date;
    }[]>;
    uploadImages(id: number, files: any[], body: {
        section_key?: string;
        clause_id?: string;
        caption?: string;
    }, req: any): Promise<{
        id: number;
        report_id: number;
        section_key: string;
        clause_id: number | null;
        original_name: string;
        mime: string;
        width: number;
        height: number;
        size_bytes: number;
        caption: string;
        sort_order: number;
        created_at: Date;
    }[]>;
    reorderImages(id: number, body: {
        ids: number[];
    }, req: any): Promise<{
        ok: boolean;
    }>;
    imageFile(id: number, imageId: number, req: any, res: Response): Promise<void>;
    updateImage(id: number, imageId: number, body: {
        caption?: string;
        section_key?: string;
    }, req: any): Promise<{
        id: number;
        report_id: number;
        section_key: string;
        clause_id: number | null;
        original_name: string;
        mime: string;
        width: number;
        height: number;
        size_bytes: number;
        caption: string;
        sort_order: number;
        created_at: Date;
    }>;
    deleteImage(id: number, imageId: number, req: any): Promise<{
        ok: boolean;
    }>;
    header(id: number, dto: UpdateHeaderDto, req: any): Promise<{
        ok: boolean;
    }>;
    bulk(id: number, dto: BulkClausesDto, req: any): Promise<{
        ok: boolean;
        saved: number;
    }>;
    clause(id: number, clauseId: number, dto: UpsertClauseDto, req: any): Promise<import("../entities/audit-report-clause.entity").AuditReportClause>;
    raiseNc(id: number, clauseId: number, dto: RaiseNcDto, req: any): Promise<{
        ok: boolean;
        nc_id: number;
        ncr_entry_id: number | null;
        reused_existing_nc: boolean;
    }>;
    section(id: number, key: string, dto: UpsertSectionDto, req: any): Promise<{
        ok: boolean;
    }>;
    attendance(id: number, dto: SetAttendanceDto, req: any): Promise<{
        ok: boolean;
        count: number;
    }>;
    refresh(id: number, req: any): Promise<{
        ok: boolean;
        changed: {
            field: string;
            from: string;
            to: string;
            overridden_by_auditor: boolean;
        }[];
    }>;
    submit(id: number, req: any): Promise<{
        ok: boolean;
        status: "submitted";
    }>;
    approve(id: number, req: any): Promise<{
        ok: boolean;
        status: "submitted";
        version: number;
        pdf_path: string;
        audit_row_column: string;
    }>;
    returnReport(id: number, dto: ReturnReportDto, req: any): Promise<{
        ok: boolean;
        status: "returned";
    }>;
    reopen(id: number, dto: ReturnReportDto, req: any): Promise<{
        ok: boolean;
        status: "returned";
        version: number;
    }>;
    lock(id: number, req: any): Promise<{
        ok: boolean;
        status: "locked";
    }>;
}
