import { PrismaService } from "../../../core/database/prisma/prisma.service";
import { Prisma } from '@prisma/client';
import { CheckInDto, CheckOutDto, AdjustInventoryDto, TransferInventoryDto, QueryInventoryLogsDto, InventoryStatsDto, BulkInventoryOperationDto } from '../dto/inventory.dto';
import { PartsService } from './parts.service';
export declare class InventoryService {
    private readonly prisma;
    private readonly partsService;
    constructor(prisma: PrismaService, partsService: PartsService);
    checkIn(checkInDto: CheckInDto, userId: string, userName: string): Promise<{
        part: {
            station: string | null;
            id: string;
            createdAt: Date;
            status: import("@prisma/client").$Enums.PartStatus;
            source: string | null;
            metadata: Prisma.JsonValue;
            updatedAt: Date;
            deletedAt: Date | null;
            customFields: Prisma.JsonValue | null;
            partNumber: string;
            partNameEn: string;
            partNameCn: string | null;
            unit: string;
            specifications: string | null;
            remark: string | null;
            currentStock: number;
            minStock: number;
            maxStock: number | null;
            warehouseLocation: string | null;
            warehouseId: string | null;
            storageLocationId: string | null;
            imageUrl: string | null;
            stationId: string | null;
        };
        log: {
            station: string | null;
            id: string;
            createdAt: Date;
            metadata: Prisma.JsonValue;
            operationType: import("@prisma/client").$Enums.InventoryOperationType;
            reason: string | null;
            operatorId: string;
            warehouseLocation: string | null;
            partId: string;
            quantity: number;
            previousStock: number;
            newStock: number;
            referenceType: string | null;
            referenceId: string | null;
            operatorName: string;
            scannedCode: string | null;
            deviceInfo: Prisma.JsonValue | null;
        };
        message: string;
    }>;
    checkOut(checkOutDto: CheckOutDto, userId: string, userName: string): Promise<{
        part: {
            station: string | null;
            id: string;
            createdAt: Date;
            status: import("@prisma/client").$Enums.PartStatus;
            source: string | null;
            metadata: Prisma.JsonValue;
            updatedAt: Date;
            deletedAt: Date | null;
            customFields: Prisma.JsonValue | null;
            partNumber: string;
            partNameEn: string;
            partNameCn: string | null;
            unit: string;
            specifications: string | null;
            remark: string | null;
            currentStock: number;
            minStock: number;
            maxStock: number | null;
            warehouseLocation: string | null;
            warehouseId: string | null;
            storageLocationId: string | null;
            imageUrl: string | null;
            stationId: string | null;
        };
        log: {
            station: string | null;
            id: string;
            createdAt: Date;
            metadata: Prisma.JsonValue;
            operationType: import("@prisma/client").$Enums.InventoryOperationType;
            reason: string | null;
            operatorId: string;
            warehouseLocation: string | null;
            partId: string;
            quantity: number;
            previousStock: number;
            newStock: number;
            referenceType: string | null;
            referenceId: string | null;
            operatorName: string;
            scannedCode: string | null;
            deviceInfo: Prisma.JsonValue | null;
        };
        message: string;
    }>;
    adjustInventory(adjustDto: AdjustInventoryDto, userId: string, userName: string): Promise<{
        part: {
            station: string | null;
            id: string;
            createdAt: Date;
            status: import("@prisma/client").$Enums.PartStatus;
            source: string | null;
            metadata: Prisma.JsonValue;
            updatedAt: Date;
            deletedAt: Date | null;
            customFields: Prisma.JsonValue | null;
            partNumber: string;
            partNameEn: string;
            partNameCn: string | null;
            unit: string;
            specifications: string | null;
            remark: string | null;
            currentStock: number;
            minStock: number;
            maxStock: number | null;
            warehouseLocation: string | null;
            warehouseId: string | null;
            storageLocationId: string | null;
            imageUrl: string | null;
            stationId: string | null;
        };
        log: {
            station: string | null;
            id: string;
            createdAt: Date;
            metadata: Prisma.JsonValue;
            operationType: import("@prisma/client").$Enums.InventoryOperationType;
            reason: string | null;
            operatorId: string;
            warehouseLocation: string | null;
            partId: string;
            quantity: number;
            previousStock: number;
            newStock: number;
            referenceType: string | null;
            referenceId: string | null;
            operatorName: string;
            scannedCode: string | null;
            deviceInfo: Prisma.JsonValue | null;
        };
        message: string;
    }>;
    transferInventory(transferDto: TransferInventoryDto, userId: string, userName: string): Promise<{
        log: {
            station: string | null;
            id: string;
            createdAt: Date;
            metadata: Prisma.JsonValue;
            operationType: import("@prisma/client").$Enums.InventoryOperationType;
            reason: string | null;
            operatorId: string;
            warehouseLocation: string | null;
            partId: string;
            quantity: number;
            previousStock: number;
            newStock: number;
            referenceType: string | null;
            referenceId: string | null;
            operatorName: string;
            scannedCode: string | null;
            deviceInfo: Prisma.JsonValue | null;
        };
        message: string;
    }>;
    findLogs(query: QueryInventoryLogsDto): Promise<{
        items: ({
            part: {
                id: string;
                partNumber: string;
                partNameEn: string;
                partNameCn: string | null;
                unit: string;
                currentStock: number;
            };
        } & {
            station: string | null;
            id: string;
            createdAt: Date;
            metadata: Prisma.JsonValue;
            operationType: import("@prisma/client").$Enums.InventoryOperationType;
            reason: string | null;
            operatorId: string;
            warehouseLocation: string | null;
            partId: string;
            quantity: number;
            previousStock: number;
            newStock: number;
            referenceType: string | null;
            referenceId: string | null;
            operatorName: string;
            scannedCode: string | null;
            deviceInfo: Prisma.JsonValue | null;
        })[];
        total: number;
        page: number;
        limit: number;
        totalPages: number;
    }>;
    getPartInventoryHistory(partId: string, days?: number): Promise<{
        station: string | null;
        createdAt: Date;
        operationType: import("@prisma/client").$Enums.InventoryOperationType;
        quantity: number;
        previousStock: number;
        newStock: number;
        operatorName: string;
    }[]>;
    getStats(query: InventoryStatsDto): Promise<{
        totalOperations: number;
        checkIns: number;
        checkOuts: number;
        adjustments: number;
        operationsByType: (Prisma.PickEnumerable<Prisma.InventoryLogGroupByOutputType, "operationType"[]> & {
            _count: number;
            _sum: {
                quantity: number | null;
            };
        })[];
        operationsByStation: (Prisma.PickEnumerable<Prisma.InventoryLogGroupByOutputType, "station"[]> & {
            _count: number;
        })[];
        topParts: {
            part: {
                id: string;
                partNumber: string;
                partNameEn: string;
                partNameCn: string | null;
                currentStock: number;
            } | undefined;
            partId: string;
            _count: number;
        }[];
    }>;
    bulkOperation(bulkDto: BulkInventoryOperationDto, userId: string, userName: string): Promise<{
        total: number;
        success: number;
        failed: number;
        errors: any[];
    }>;
}
