/** * SubcontractorService - Servicio de gestión de subcontratistas * * Catálogo de subcontratistas con evaluaciones. * * @module Contracts */ import { Repository } from 'typeorm'; import { Subcontractor, SubcontractorStatus, SubcontractorSpecialty } from '../entities/subcontractor.entity'; import { ServiceContext, PaginatedResult } from '../../../shared/services/base.service'; export interface CreateSubcontractorDto { businessName: string; tradeName?: string; rfc: string; address?: string; phone?: string; email?: string; contactName?: string; contactPhone?: string; primarySpecialty: SubcontractorSpecialty; secondarySpecialties?: string[]; bankName?: string; bankAccount?: string; clabe?: string; notes?: string; } export interface UpdateSubcontractorDto { tradeName?: string; address?: string; phone?: string; email?: string; contactName?: string; contactPhone?: string; secondarySpecialties?: string[]; bankName?: string; bankAccount?: string; clabe?: string; notes?: string; } export interface SubcontractorFilters { specialty?: SubcontractorSpecialty; status?: SubcontractorStatus; search?: string; minRating?: number; } export declare class SubcontractorService { private readonly subcontractorRepository; constructor(subcontractorRepository: Repository); private generateCode; findWithFilters(ctx: ServiceContext, filters?: SubcontractorFilters, page?: number, limit?: number): Promise>; findById(ctx: ServiceContext, id: string): Promise; findByRfc(ctx: ServiceContext, rfc: string): Promise; create(ctx: ServiceContext, dto: CreateSubcontractorDto): Promise; update(ctx: ServiceContext, id: string, dto: UpdateSubcontractorDto): Promise; updateRating(ctx: ServiceContext, id: string, rating: number): Promise; incrementContracts(ctx: ServiceContext, id: string, completed?: boolean): Promise; incrementIncidents(ctx: ServiceContext, id: string): Promise; deactivate(ctx: ServiceContext, id: string): Promise; blacklist(ctx: ServiceContext, id: string, reason: string): Promise; softDelete(ctx: ServiceContext, id: string): Promise; getBySpecialty(ctx: ServiceContext, specialty: SubcontractorSpecialty): Promise; } //# sourceMappingURL=subcontractor.service.d.ts.map