import { EventEmitter2 } from '@nestjs/event-emitter';
import { Model } from 'mongoose';
import { PunchType, TripStatus } from '../common/constants/enums';
import type { JwtUserPayload } from '../auth/jwt.types';
import { TripsService } from '../trips/trips.service';
import { GeofencingService } from '../geofencing/geofencing.service';
import { PunchDocument } from './schemas/punch.schema';
import { ArrivalPunchDto, DeparturePunchDto, MeetingEndPunchDto, MeetingStartPunchDto } from './dto/punch.dto';
export declare class PunchesService {
    private readonly punchModel;
    private readonly trips;
    private readonly geofence;
    private readonly events;
    constructor(punchModel: Model<PunchDocument>, trips: TripsService, geofence: GeofencingService, events: EventEmitter2);
    recordDeparture(tripId: string, actor: JwtUserPayload, dto: DeparturePunchDto): Promise<{
        punch: {
            id: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address: string | undefined;
        };
        trip: {
            id: string;
            status: TripStatus;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    } | {
        punch: {
            id: string;
            _id: import("mongoose").Types.ObjectId;
            $locals: Record<string, unknown>;
            $op: "save" | "validate" | "remove" | null;
            $where: Record<string, unknown>;
            baseModelName?: string;
            collection: import("mongoose").Collection;
            db: import("mongoose").Connection;
            errors?: import("mongoose").Error.ValidationError;
            isNew: boolean;
            schema: import("mongoose").Schema;
            tripId: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address?: string;
            batteryPercent?: number;
            gpsAccuracy?: number;
            speed?: number;
            isMockLocation: boolean;
            meetingSummary?: string;
            leadType?: import("../common/constants/enums").LeadType;
            customerNotes?: string;
            __v: number;
        };
        trip: {
            id: string;
            status: TripStatus;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    }>;
    recordArrival(tripId: string, actor: JwtUserPayload, dto: ArrivalPunchDto): Promise<{
        punch: {
            id: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address: string | undefined;
        };
        trip: {
            id: string;
            status: TripStatus;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    } | {
        punch: {
            id: string;
            _id: import("mongoose").Types.ObjectId;
            $locals: Record<string, unknown>;
            $op: "save" | "validate" | "remove" | null;
            $where: Record<string, unknown>;
            baseModelName?: string;
            collection: import("mongoose").Collection;
            db: import("mongoose").Connection;
            errors?: import("mongoose").Error.ValidationError;
            isNew: boolean;
            schema: import("mongoose").Schema;
            tripId: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address?: string;
            batteryPercent?: number;
            gpsAccuracy?: number;
            speed?: number;
            isMockLocation: boolean;
            meetingSummary?: string;
            leadType?: import("../common/constants/enums").LeadType;
            customerNotes?: string;
            __v: number;
        };
        trip: {
            id: string;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            status: TripStatus;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    }>;
    recordMeetingStart(tripId: string, actor: JwtUserPayload, dto: MeetingStartPunchDto): Promise<{
        punch: {
            id: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address: string | undefined;
        };
        trip: {
            id: string;
            status: TripStatus;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    } | {
        punch: {
            id: string;
            _id: import("mongoose").Types.ObjectId;
            $locals: Record<string, unknown>;
            $op: "save" | "validate" | "remove" | null;
            $where: Record<string, unknown>;
            baseModelName?: string;
            collection: import("mongoose").Collection;
            db: import("mongoose").Connection;
            errors?: import("mongoose").Error.ValidationError;
            isNew: boolean;
            schema: import("mongoose").Schema;
            tripId: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address?: string;
            batteryPercent?: number;
            gpsAccuracy?: number;
            speed?: number;
            isMockLocation: boolean;
            meetingSummary?: string;
            leadType?: import("../common/constants/enums").LeadType;
            customerNotes?: string;
            __v: number;
        };
        trip: Record<string, unknown>;
    }>;
    recordMeetingEnd(tripId: string, actor: JwtUserPayload, dto: MeetingEndPunchDto): Promise<{
        punch: {
            id: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address: string | undefined;
            meetingSummary: string | undefined;
            leadType: import("../common/constants/enums").LeadType | undefined;
            customerNotes: string | undefined;
        };
        trip: {
            id: string;
            status: TripStatus;
            tripId: string;
            userId: string;
            requestDate: Date;
            city?: string;
            fromLocation?: string;
            toLocation?: string;
            originLat?: number;
            originLng?: number;
            clientName?: string;
            destinationLat?: number;
            destinationLng?: number;
            googlePlaceId?: string;
            plannedDistance?: number;
            vehicleType?: import("../common/constants/enums").VehicleType;
            fuelType?: import("../common/constants/enums").FuelType;
            purpose?: string;
            totalDistance: number;
            travelDuration: number;
            idleTime: number;
            meetingDuration: number;
            productivityScore?: number;
            tripEfficiency?: number;
            startedAt?: Date;
            arrivedAt?: Date;
            completedAt?: Date;
            tripLegs?: Record<string, unknown>[];
            currentLegIndex?: number;
            _id: import("mongoose").Types.ObjectId;
            __v: number;
        };
    } | {
        punch: {
            id: string;
            _id: import("mongoose").Types.ObjectId;
            $locals: Record<string, unknown>;
            $op: "save" | "validate" | "remove" | null;
            $where: Record<string, unknown>;
            baseModelName?: string;
            collection: import("mongoose").Collection;
            db: import("mongoose").Connection;
            errors?: import("mongoose").Error.ValidationError;
            isNew: boolean;
            schema: import("mongoose").Schema;
            tripId: string;
            type: PunchType;
            timestamp: Date;
            latitude: number;
            longitude: number;
            address?: string;
            batteryPercent?: number;
            gpsAccuracy?: number;
            speed?: number;
            isMockLocation: boolean;
            meetingSummary?: string;
            leadType?: import("../common/constants/enums").LeadType;
            customerNotes?: string;
            __v: number;
        };
        trip: Record<string, unknown>;
    }>;
    private getPersistedLegs;
    private saveLegPunchUpdate;
    private persistTripLegsFromPunches;
    private resolveTripOrigin;
    private resolveTripDestination;
    private resolveLegDepartureOrigin;
    private resolveLegArrivalDestination;
    private createPunch;
}
