import { Repository } from 'typeorm';
import { Certificate } from './certificate.entity';
import { Codebook } from './codebook.entity';
export interface PaginatedResult<T> {
    data: T[];
    total: number;
    page: number;
    limit: number;
    lastPage: number;
    hasNext: boolean;
    hasPrev: boolean;
}
export declare class ExcelService {
    private readonly certificateRepo;
    private readonly codebookRepo;
    constructor(certificateRepo: Repository<Certificate>, codebookRepo: Repository<Codebook>);
    private parseExcelDate;
    importExcel(filePath: string): Promise<{
        message: string;
        inserted: number;
        skipped: number;
        totalRows: number;
    }>;
    getAllCertificates(options: {
        page: number;
        limit: number;
        sort: string;
        order: string;
    }): Promise<PaginatedResult<Certificate>>;
    searchCertificates(query: {
        q?: string;
        standard?: string;
        status?: string;
        from_date?: string;
        to_date?: string;
        month?: number;
        year?: number;
        page: number;
        limit: number;
    }): Promise<PaginatedResult<Certificate>>;
    getStats(): Promise<{
        total: number;
        byStandard: {
            standard: string;
            count: number;
        }[];
        byStatus: {
            status: string;
            count: number;
        }[];
        recentCount: number;
    }>;
    getAllCodebooks(options: {
        page: number;
        limit: number;
        search?: string;
    }): Promise<PaginatedResult<Codebook>>;
    private getCellValue;
    private getCellColor;
    findByCompanyName(companyName: string): Promise<Certificate[]>;
    importCodebookExcel(filePath: string): Promise<{
        message: string;
        count: number;
    }>;
    addManualLegacy(dto: {
        cert_no: string;
        company_name: string;
        standard: string;
        orginally_reg?: string;
        issue_date?: string;
        expire_date?: string;
        status?: string;
    }): Promise<Certificate>;
    updateLegacy(id: number, dto: Partial<{
        cert_no: string;
        company_name: string;
        standard: string;
        orginally_reg: string;
        issue_date: string;
        expire_date: string;
        status: string;
    }>): Promise<Certificate>;
    deleteLegacy(id: number): Promise<{
        message: string;
    }>;
    getLegacyById(id: number): Promise<Certificate>;
}
