/** * ContractService - Servicio de gestión de contratos * * Gestión de contratos con workflow de aprobación. * * @module Contracts */ import { Repository } from 'typeorm'; import { Contract, ContractStatus, ContractType } from '../entities/contract.entity'; import { ContractAddendum } from '../entities/contract-addendum.entity'; import { ServiceContext, PaginatedResult } from '../../../shared/services/base.service'; export interface CreateContractDto { projectId?: string; fraccionamientoId?: string; contractType: ContractType; clientContractType?: string; name: string; description?: string; clientName?: string; clientRfc?: string; clientAddress?: string; subcontractorId?: string; specialty?: string; startDate: Date; endDate: Date; contractAmount: number; currency?: string; paymentTerms?: string; retentionPercentage?: number; advancePercentage?: number; notes?: string; } export interface CreateAddendumDto { addendumType: string; title: string; description: string; effectiveDate: Date; newEndDate?: Date; amountChange?: number; scopeChanges?: string; notes?: string; } export interface ContractFilters { projectId?: string; fraccionamientoId?: string; contractType?: ContractType; subcontractorId?: string; status?: ContractStatus; expiringInDays?: number; } export declare class ContractService { private readonly contractRepository; private readonly addendumRepository; constructor(contractRepository: Repository, addendumRepository: Repository); private generateContractNumber; private generateAddendumNumber; findWithFilters(ctx: ServiceContext, filters?: ContractFilters, page?: number, limit?: number): Promise>; findById(ctx: ServiceContext, id: string): Promise; findWithDetails(ctx: ServiceContext, id: string): Promise; create(ctx: ServiceContext, dto: CreateContractDto): Promise; submitForReview(ctx: ServiceContext, id: string): Promise; approveLegal(ctx: ServiceContext, id: string): Promise; approve(ctx: ServiceContext, id: string): Promise; activate(ctx: ServiceContext, id: string, signedDocumentUrl?: string): Promise; complete(ctx: ServiceContext, id: string): Promise; terminate(ctx: ServiceContext, id: string, reason: string): Promise; updateProgress(ctx: ServiceContext, id: string, progressPercentage: number, invoicedAmount?: number, paidAmount?: number): Promise; createAddendum(ctx: ServiceContext, contractId: string, dto: CreateAddendumDto): Promise; approveAddendum(ctx: ServiceContext, addendumId: string): Promise; softDelete(ctx: ServiceContext, id: string): Promise; getExpiringContracts(ctx: ServiceContext, days?: number): Promise; } //# sourceMappingURL=contract.service.d.ts.map