/**
 * RequisicionService - Servicio de requisiciones de obra
 *
 * Gestión de requisiciones de material con workflow:
 * draft -> submitted -> approved -> partially_served -> served
 *
 * @module Inventory
 */
import { Repository } from 'typeorm';
import { RequisicionObra, RequisitionStatus } from '../entities/requisicion-obra.entity';
import { RequisicionLinea } from '../entities/requisicion-linea.entity';
import { ServiceContext, PaginatedResult } from '../../../shared/services/base.service';
export interface CreateRequisicionDto {
    fraccionamientoId: string;
    requisitionDate: Date;
    requiredDate: Date;
    priority?: string;
    destinationWarehouseId?: string;
    notes?: string;
}
export interface AddLineaDto {
    productId: string;
    conceptoId?: string;
    loteId?: string;
    quantityRequested: number;
    unitId?: string;
    notes?: string;
}
export interface RequisicionFilters {
    fraccionamientoId?: string;
    status?: RequisitionStatus;
    priority?: string;
    dateFrom?: Date;
    dateTo?: Date;
}
export declare class RequisicionService {
    private readonly requisicionRepository;
    private readonly lineaRepository;
    constructor(requisicionRepository: Repository<RequisicionObra>, lineaRepository: Repository<RequisicionLinea>);
    private generateNumber;
    findWithFilters(ctx: ServiceContext, filters?: RequisicionFilters, page?: number, limit?: number): Promise<PaginatedResult<RequisicionObra>>;
    findById(ctx: ServiceContext, id: string): Promise<RequisicionObra | null>;
    findWithDetails(ctx: ServiceContext, id: string): Promise<RequisicionObra | null>;
    create(ctx: ServiceContext, dto: CreateRequisicionDto): Promise<RequisicionObra>;
    addLinea(ctx: ServiceContext, requisicionId: string, dto: AddLineaDto): Promise<RequisicionLinea>;
    removeLinea(ctx: ServiceContext, requisicionId: string, lineaId: string): Promise<boolean>;
    submit(ctx: ServiceContext, id: string): Promise<RequisicionObra | null>;
    approve(ctx: ServiceContext, id: string): Promise<RequisicionObra | null>;
    reject(ctx: ServiceContext, id: string, reason: string): Promise<RequisicionObra | null>;
    cancel(ctx: ServiceContext, id: string): Promise<RequisicionObra | null>;
    updateServedQuantity(ctx: ServiceContext, lineaId: string, quantityServed: number): Promise<RequisicionLinea | null>;
    private updateRequisitionStatus;
    softDelete(ctx: ServiceContext, id: string): Promise<boolean>;
}
//# sourceMappingURL=requisicion.service.d.ts.map