import { Repository } from "typeorm";
import { CarListing } from "src/common/carmarketplace/car-listing.entity";
import { CarCatalogEntry } from "src/common/carmarketplace/car-catalog-entry.entity";
import { AdminCarListingModerationDto, CarListingQueryDto, CreateCarListingDto, UpdateCarListingDto, UpdateCarListingStatusDto } from "./car-listing.dto";
import { MarketplaceListingStatus } from "src/common/marketplace/marketplace-listing-status.enum";
export declare class CarListingService {
    private readonly carListingRepository;
    private readonly carCatalogRepository;
    constructor(carListingRepository: Repository<CarListing>, carCatalogRepository: Repository<CarCatalogEntry>);
    getConfig(page?: number, limit?: number): Promise<{
        years: number[];
        makes: {
            make: string;
            makeArabic: string;
            models: {
                model: string;
                modelArabic: string;
                years: number[];
            }[];
        }[];
        totalEntries: number;
        totalMakes: number;
        page: number;
        limit: number;
        filters: {
            condition: string[];
            fuelType: string[];
            transmissionType: string[];
        };
    }>;
    getCatalogEntryDefaults(make: string, model: string, year: number): Promise<{
        entry: CarCatalogEntry;
        defaults: {
            origin: string;
            bodyType: string;
            transmissionType: string;
            fuelType: string;
        };
    }>;
    decorateListing(listing: CarListing): {
        features: {
            doors: string;
            cylinders: string;
            seating: string;
            horsepower: string;
            steeringSide: string;
            engineCapacity: string;
            safety: string[];
            entertainment: string[];
            comfort: string[];
            exterior: string[];
        };
        isExpired: boolean;
        contact: {
            whatsappUrl: string;
        };
        id: number;
        parentListingId: number;
        sellerUserId: number;
        make: string;
        model: string;
        year: number;
        trim: string;
        exteriorColor: string;
        interiorColor: string;
        fuelType: string;
        transmissionType: string;
        mileage: number;
        carCondition: string;
        warrantyStatus: string;
        origin: string;
        bodyType: string;
        regionalSpecs: string;
        isInsured: boolean;
        title: string;
        doors: string;
        cylinders: string;
        seating: string;
        horsepower: string;
        steeringSide: string;
        engineCapacity: string;
        safetyFeatures: string[];
        entertainmentFeatures: string[];
        comfortFeatures: string[];
        exteriorFeatures: string[];
        previousOwners: number;
        registrationEmirate: string;
        locationName: string;
        latitude: number;
        longitude: number;
        chassisNumber: string;
        price: number;
        isNegotiable: boolean;
        description: string;
        accidentHistory: string;
        repaintingDetails: string;
        maintenanceDetails: string;
        modificationDetails: string;
        additionalNotes: string;
        sellerName: string;
        sellerMobile: string;
        sellerEmail: string;
        photoUrls: string[];
        isVisible: boolean;
        validityDays: number;
        approvedAt: Date;
        approvedByUserId: number;
        expiresAt: Date;
        publishedAt: Date;
        rejectionReason: string;
        status: MarketplaceListingStatus;
        createdAt: Date;
        updatedAt: Date;
    };
    createListing(userId: number, dto: CreateCarListingDto): Promise<CarListing>;
    findMarketplaceListings(query: CarListingQueryDto): Promise<CarListing[]>;
    findMyListings(userId: number): Promise<any[]>;
    findListing(id: number, requesterUserId?: number, allowPrivate?: boolean): Promise<any>;
    updateListing(id: number, userId: number, dto: UpdateCarListingDto): Promise<any>;
    importCatalogEntries(entries: Partial<CarCatalogEntry>[]): Promise<{
        insertedOrUpdated: number;
    }>;
    clearCatalog(): Promise<void>;
    getCatalogEntryCount(): Promise<number>;
    backfillCarListingSpecFields(batchSize?: number): Promise<{
        updated: number;
    }>;
    updateListingStatus(id: number, userId: number, dto: UpdateCarListingStatusDto): Promise<any>;
    removeListing(id: number, userId: number): Promise<any>;
    adminFindListings(query: CarListingQueryDto & {
        sellerUserId?: string;
    }): Promise<CarListing[]>;
    adminModerateListing(id: number, adminUserId: number, dto: AdminCarListingModerationDto): Promise<any>;
    private applyListingUpdateFields;
    private applyEditRequestFields;
    private buildOwnerPreviewListing;
    private applyQueryFilters;
    private expireListings;
    private calculateExpiryDate;
    private ensureOwnership;
    private ensureCatalogEntryExists;
    private isExpired;
    private normalizePhotoUrls;
    private buildWhatsappUrl;
    private nullable;
    private preserveNullable;
    private numberOrNull;
    private normalizeStringArray;
    private normalizeStructuredFeatures;
    private deriveStructuredFeatures;
    private buildStructuredFeatures;
}
