import { Model } from "mongoose";
import { NotificationsService } from "./notifications.service";
import { BatchDocument } from "./schemas/batch.schema";
import { InventoryBalanceDocument } from "./schemas/inventory-balance.schema";
import { InventoryThresholdStateDocument } from "./schemas/inventory-threshold-state.schema";
import { ItemDocument } from "./schemas/item.schema";
import { StockInvoiceDocument } from "./schemas/stock-invoice.schema";
import { StockMovementSheetDocument } from "./schemas/stock-movement-sheet.schema";
import { StockTransactionDocument } from "./schemas/stock-transaction.schema";
import { UserDocument } from "./schemas/user.schema";
import { WarehouseDocument } from "./schemas/warehouse.schema";
export declare class StockMovementSheetsService {
    private readonly sheetModel;
    private readonly invoiceModel;
    private readonly itemModel;
    private readonly batchModel;
    private readonly warehouseModel;
    private readonly balanceModel;
    private readonly userModel;
    private readonly thresholdStateModel;
    private readonly stockTxModel;
    private readonly notificationsService;
    constructor(sheetModel: Model<StockMovementSheetDocument>, invoiceModel: Model<StockInvoiceDocument>, itemModel: Model<ItemDocument>, batchModel: Model<BatchDocument>, warehouseModel: Model<WarehouseDocument>, balanceModel: Model<InventoryBalanceDocument>, userModel: Model<UserDocument>, thresholdStateModel: Model<InventoryThresholdStateDocument>, stockTxModel: Model<StockTransactionDocument>, notificationsService: NotificationsService);
    create(payload: {
        companyName?: string;
        reportTitle?: string;
        stockReportFor?: string;
        documentDate?: string;
        documentNumber?: string;
        referenceNumber?: string;
        preparedBy?: string;
        reviewedBy?: string;
        approvedByField?: string;
        submittedBy?: string;
        invoice?: {
            documentNumber?: string | null;
            documentDate?: string | null;
            referenceNumber?: string | null;
            warehouseName?: string | null;
            itemCode?: string | null;
            itemName?: string | null;
            batchNumber?: string | null;
            allBatches?: string | null;
            expiryDate?: string | null;
            quantityMt?: number | null;
            unit?: string | null;
            unitPrice?: number | null;
            supplierName?: string | null;
            supplierTrn?: string | null;
            buyerName?: string | null;
            buyerTrn?: string | null;
            totalAmount?: number | null;
            vatAmount?: number | null;
            netAmount?: number | null;
            currency?: string | null;
            paymentTerms?: string | null;
            dueDate?: string | null;
        };
        lineItems: Array<{
            itemId: string;
            batchNumber: string;
            productionDate?: string;
            expiryDate: string;
            warehouseBags: Record<string, number>;
            totalMtOverride?: number | null;
            shipmentNo?: string;
            qualityReportNo?: string;
        }>;
    }): Promise<{
        lineItems?: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }>;
    findAll(): Promise<{
        lineItems?: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }[]>;
    findOne(id: string): Promise<{
        invoice: {
            id: string;
            documentNumber: any;
            documentDate: any;
            referenceNumber: any;
            warehouseName: any;
            itemCode: any;
            itemName: any;
            batchNumber: any;
            allBatches: any;
            expiryDate: any;
            quantityMt: any;
            unit: any;
            unitPrice: any;
            supplierName: any;
            supplierTrn: any;
            buyerName: any;
            buyerTrn: any;
            totalAmount: any;
            vatAmount: any;
            netAmount: any;
            currency: any;
            paymentTerms: any;
            dueDate: any;
        };
        lineItems: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    } | {
        invoice: null;
        lineItems: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }>;
    update(id: string, payload: Parameters<StockMovementSheetsService["create"]>[0]): Promise<{
        lineItems?: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }>;
    approve(id: string, approvedByName: string): Promise<{
        lineItems?: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }>;
    reject(id: string, rejectedByName: string, reason: string): Promise<{
        lineItems?: any;
        id: string;
        companyName: any;
        reportTitle: any;
        stockReportFor: any;
        documentDate: any;
        documentNumber: any;
        referenceNumber: any;
        preparedBy: any;
        reviewedBy: any;
        approvedByField: any;
        totalBagsAll: any;
        totalMtAll: any;
        approvalStatus: any;
        approvedBy: any;
        approvedAt: any;
        rejectedBy: any;
        rejectedAt: any;
        rejectedReason: any;
        submittedBy: any;
        invoiceId: any;
        createdAt: any;
    }>;
    private _upsertBalance;
    private _notifyKeepers;
    private _markThresholdReachedIfNeeded;
    private _getTotalAvailableMt;
    private _getHistoricalThresholdBasis;
    private _syncThresholdState;
    private _mapSheet;
    private _mapInvoice;
    private _mapSheetWithWarehouseNames;
}
