/**
 * TicketService - Servicio de tickets postventa
 *
 * Gestión de tickets de garantía con SLA.
 *
 * @module Quality
 */
import { Repository } from 'typeorm';
import { PostSaleTicket, TicketStatus, TicketPriority, TicketCategory } from '../entities/post-sale-ticket.entity';
import { TicketAssignment } from '../entities/ticket-assignment.entity';
import { ServiceContext, PaginatedResult } from '../../../shared/services/base.service';
export interface CreateTicketDto {
    loteId: string;
    derechohabienteId?: string;
    category: TicketCategory;
    title: string;
    description: string;
    photoUrl?: string;
    contactName?: string;
    contactPhone?: string;
}
export interface AssignTicketDto {
    technicianId: string;
    scheduledDate?: Date;
    scheduledTime?: string;
}
export interface ResolveTicketDto {
    resolutionNotes: string;
    resolutionPhotoUrl?: string;
}
export interface TicketFilters {
    loteId?: string;
    derechohabienteId?: string;
    category?: TicketCategory;
    priority?: TicketPriority;
    status?: TicketStatus;
    slaBreached?: boolean;
    assignedTo?: string;
    dateFrom?: Date;
    dateTo?: Date;
}
export declare class TicketService {
    private readonly ticketRepository;
    private readonly assignmentRepository;
    constructor(ticketRepository: Repository<PostSaleTicket>, assignmentRepository: Repository<TicketAssignment>);
    private generateTicketNumber;
    findWithFilters(ctx: ServiceContext, filters?: TicketFilters, page?: number, limit?: number): Promise<PaginatedResult<PostSaleTicket>>;
    findById(ctx: ServiceContext, id: string): Promise<PostSaleTicket | null>;
    findWithDetails(ctx: ServiceContext, id: string): Promise<PostSaleTicket | null>;
    create(ctx: ServiceContext, dto: CreateTicketDto): Promise<PostSaleTicket>;
    assign(ctx: ServiceContext, id: string, dto: AssignTicketDto): Promise<PostSaleTicket | null>;
    startWork(ctx: ServiceContext, id: string): Promise<PostSaleTicket | null>;
    resolve(ctx: ServiceContext, id: string, dto: ResolveTicketDto): Promise<PostSaleTicket | null>;
    close(ctx: ServiceContext, id: string, rating?: number, comment?: string): Promise<PostSaleTicket | null>;
    cancel(ctx: ServiceContext, id: string, reason: string): Promise<PostSaleTicket | null>;
    checkSlaBreaches(ctx: ServiceContext): Promise<number>;
    getSlaStats(ctx: ServiceContext): Promise<{
        total: number;
        breached: number;
        complianceRate: number;
    }>;
}
//# sourceMappingURL=ticket.service.d.ts.map