import { AuditService } from '../audit/audit.service';
import { RequestUser } from '../common/request-user';
import { PrismaService } from '../database/prisma.service';
import { CreateVisitorDto } from './dto/create-visitor.dto';
import { CreateVisitorPassDto } from './dto/create-visitor-pass.dto';
import { UpdateVisitorRiskDto } from './dto/update-visitor-risk.dto';
export declare class VisitorsService {
    private readonly prisma;
    private readonly audit;
    constructor(prisma: PrismaService, audit: AuditService);
    findVisitors(user: RequestUser, estateId?: string, q?: string): import(".prisma/client").Prisma.PrismaPromise<{
        id: string;
        metadata: import("@prisma/client/runtime/library").JsonValue;
        estateId: string | null;
        name: string;
        phone: string | null;
        createdAt: Date;
        updatedAt: Date;
        photoUrl: string | null;
        vehiclePlate: string | null;
        riskScore: number;
        flagged: boolean;
        blacklisted: boolean;
        riskNotes: string | null;
        riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
    }[]>;
    createVisitor(dto: CreateVisitorDto, user: RequestUser): Promise<{
        id: string;
        metadata: import("@prisma/client/runtime/library").JsonValue;
        estateId: string | null;
        name: string;
        phone: string | null;
        createdAt: Date;
        updatedAt: Date;
        photoUrl: string | null;
        vehiclePlate: string | null;
        riskScore: number;
        flagged: boolean;
        blacklisted: boolean;
        riskNotes: string | null;
        riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
    }>;
    findPasses(user: RequestUser, estateId?: string): import(".prisma/client").Prisma.PrismaPromise<({
        visitor: {
            id: string;
            metadata: import("@prisma/client/runtime/library").JsonValue;
            estateId: string | null;
            name: string;
            phone: string | null;
            createdAt: Date;
            updatedAt: Date;
            photoUrl: string | null;
            vehiclePlate: string | null;
            riskScore: number;
            flagged: boolean;
            blacklisted: boolean;
            riskNotes: string | null;
            riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
        };
        hostResident: {
            status: import(".prisma/client").$Enums.AccountStatus;
            id: string;
            metadata: import("@prisma/client/runtime/library").JsonValue;
            estateId: string;
            name: string;
            firstName: string | null;
            lastName: string | null;
            phone: string;
            blockNumber: string | null;
            flatNumber: string | null;
            address: string | null;
            profileConfirmed: boolean;
            profilePictureUrl: string | null;
            emergencyContact: import("@prisma/client/runtime/library").JsonValue;
            unit: string;
            email: string | null;
            createdAt: Date;
            updatedAt: Date;
            profilePictureThumbnailUrl: string | null;
            profileCompletion: number;
            residentCode: string;
            householdMembers: import("@prisma/client/runtime/library").JsonValue;
            userId: string;
        };
    } & {
        status: import(".prisma/client").$Enums.VisitorPassStatus;
        id: string;
        estateId: string;
        createdAt: Date;
        updatedAt: Date;
        passType: import(".prisma/client").$Enums.VisitorPassType;
        validFrom: Date;
        validUntil: Date;
        maxEntries: number;
        entryCount: number;
        visitorId: string;
        hostResidentId: string;
        visitorCode: string;
        qrToken: string;
        revokedAt: Date | null;
    })[]>;
    createPass(dto: CreateVisitorPassDto, user: RequestUser): Promise<{
        qrPayload: {
            token: string;
        };
        visitor: {
            id: string;
            metadata: import("@prisma/client/runtime/library").JsonValue;
            estateId: string | null;
            name: string;
            phone: string | null;
            createdAt: Date;
            updatedAt: Date;
            photoUrl: string | null;
            vehiclePlate: string | null;
            riskScore: number;
            flagged: boolean;
            blacklisted: boolean;
            riskNotes: string | null;
            riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
        };
        hostResident: {
            status: import(".prisma/client").$Enums.AccountStatus;
            id: string;
            metadata: import("@prisma/client/runtime/library").JsonValue;
            estateId: string;
            name: string;
            firstName: string | null;
            lastName: string | null;
            phone: string;
            blockNumber: string | null;
            flatNumber: string | null;
            address: string | null;
            profileConfirmed: boolean;
            profilePictureUrl: string | null;
            emergencyContact: import("@prisma/client/runtime/library").JsonValue;
            unit: string;
            email: string | null;
            createdAt: Date;
            updatedAt: Date;
            profilePictureThumbnailUrl: string | null;
            profileCompletion: number;
            residentCode: string;
            householdMembers: import("@prisma/client/runtime/library").JsonValue;
            userId: string;
        };
        status: import(".prisma/client").$Enums.VisitorPassStatus;
        id: string;
        estateId: string;
        createdAt: Date;
        updatedAt: Date;
        passType: import(".prisma/client").$Enums.VisitorPassType;
        validFrom: Date;
        validUntil: Date;
        maxEntries: number;
        entryCount: number;
        visitorId: string;
        hostResidentId: string;
        visitorCode: string;
        qrToken: string;
        revokedAt: Date | null;
    }>;
    revokePass(id: string, user: RequestUser): Promise<{
        status: import(".prisma/client").$Enums.VisitorPassStatus;
        id: string;
        estateId: string;
        createdAt: Date;
        updatedAt: Date;
        passType: import(".prisma/client").$Enums.VisitorPassType;
        validFrom: Date;
        validUntil: Date;
        maxEntries: number;
        entryCount: number;
        visitorId: string;
        hostResidentId: string;
        visitorCode: string;
        qrToken: string;
        revokedAt: Date | null;
    }>;
    getVisitorHistory(id: string, user: RequestUser): Promise<{
        visitor: {
            passes: ({
                sessions: ({
                    guard: {
                        status: import(".prisma/client").$Enums.AccountStatus;
                        id: string;
                        metadata: import("@prisma/client/runtime/library").JsonValue;
                        estateId: string;
                        name: string;
                        firstName: string | null;
                        lastName: string | null;
                        phone: string;
                        address: string | null;
                        profileConfirmed: boolean;
                        guardCode: string;
                        assignedGateId: string | null;
                        assignedShifts: import("@prisma/client/runtime/library").JsonValue;
                        profilePictureUrl: string | null;
                        emergencyContact: import("@prisma/client/runtime/library").JsonValue;
                        deviceId: string | null;
                        createdAt: Date;
                        updatedAt: Date;
                        profilePictureThumbnailUrl: string | null;
                        profileCompletion: number;
                        userId: string;
                    };
                    gate: {
                        description: string | null;
                        type: import(".prisma/client").$Enums.EstateGateType;
                        id: string;
                        metadata: import("@prisma/client/runtime/library").JsonValue;
                        estateId: string;
                        name: string;
                        createdAt: Date;
                        updatedAt: Date;
                        isActive: boolean;
                    } | null;
                } & {
                    status: import(".prisma/client").$Enums.VisitSessionStatus;
                    id: string;
                    metadata: import("@prisma/client/runtime/library").JsonValue;
                    estateId: string;
                    deviceId: string | null;
                    createdAt: Date;
                    updatedAt: Date;
                    guardId: string;
                    hostResidentId: string | null;
                    visitorPassId: string;
                    gateId: string | null;
                    visitorPhone: string | null;
                    checkinTime: Date;
                    checkoutTime: Date | null;
                    entryGate: string | null;
                    exitGate: string | null;
                    offlineEventId: string | null;
                    scanLocation: import("@prisma/client/runtime/library").JsonValue;
                })[];
                hostResident: {
                    status: import(".prisma/client").$Enums.AccountStatus;
                    id: string;
                    metadata: import("@prisma/client/runtime/library").JsonValue;
                    estateId: string;
                    name: string;
                    firstName: string | null;
                    lastName: string | null;
                    phone: string;
                    blockNumber: string | null;
                    flatNumber: string | null;
                    address: string | null;
                    profileConfirmed: boolean;
                    profilePictureUrl: string | null;
                    emergencyContact: import("@prisma/client/runtime/library").JsonValue;
                    unit: string;
                    email: string | null;
                    createdAt: Date;
                    updatedAt: Date;
                    profilePictureThumbnailUrl: string | null;
                    profileCompletion: number;
                    residentCode: string;
                    householdMembers: import("@prisma/client/runtime/library").JsonValue;
                    userId: string;
                };
            } & {
                status: import(".prisma/client").$Enums.VisitorPassStatus;
                id: string;
                estateId: string;
                createdAt: Date;
                updatedAt: Date;
                passType: import(".prisma/client").$Enums.VisitorPassType;
                validFrom: Date;
                validUntil: Date;
                maxEntries: number;
                entryCount: number;
                visitorId: string;
                hostResidentId: string;
                visitorCode: string;
                qrToken: string;
                revokedAt: Date | null;
            })[];
            riskEvents: {
                id: string;
                actorId: string | null;
                metadata: import("@prisma/client/runtime/library").JsonValue;
                estateId: string | null;
                createdAt: Date;
                visitorId: string;
                reason: string;
                score: number;
                level: import(".prisma/client").$Enums.VisitorRiskLevel;
            }[];
        } & {
            id: string;
            metadata: import("@prisma/client/runtime/library").JsonValue;
            estateId: string | null;
            name: string;
            phone: string | null;
            createdAt: Date;
            updatedAt: Date;
            photoUrl: string | null;
            vehiclePlate: string | null;
            riskScore: number;
            flagged: boolean;
            blacklisted: boolean;
            riskNotes: string | null;
            riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
        };
        intelligence: {
            totalVisits: number;
            checkouts: number;
            openVisits: number;
            exitReliabilityPercent: number | null;
            residentsVisited: number;
            gatesUsed: (string | null)[];
            repeatVisitor: boolean;
            riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
            riskScore: number;
            flagged: boolean;
            blacklisted: boolean;
        };
    }>;
    updateRisk(id: string, dto: UpdateVisitorRiskDto, user: RequestUser): Promise<{
        id: string;
        metadata: import("@prisma/client/runtime/library").JsonValue;
        estateId: string | null;
        name: string;
        phone: string | null;
        createdAt: Date;
        updatedAt: Date;
        photoUrl: string | null;
        vehiclePlate: string | null;
        riskScore: number;
        flagged: boolean;
        blacklisted: boolean;
        riskNotes: string | null;
        riskLevel: import(".prisma/client").$Enums.VisitorRiskLevel;
    }>;
    private assertMonthlyPassLimit;
    private riskLevelFromScore;
    private defaultMaxEntries;
}
