import { DeparturesRepository } from "../../data-access";
import { IStop } from "../../interfaces/IStop";
import { ITransferOutputDto } from "../../interfaces/ITransferOutputDto";
import { IV4TransferDto } from "../../interfaces/IV4TransferDto";
import { TransferStops } from "../../interfaces/TransferStops";
import { TripsToTransfers } from "../../interfaces/TripsToTransfers";
import { GtfsTripStopsRepository } from "../../../ropid-gtfs/data-access/redis/GtfsTripStopsRepository";
import { DelayComputationRepository } from "../../../public/data-access/redis/DelayComputationRepository";
import { PublicGtfsDepartureRepository } from "../../../public/data-access/redis/PublicGtfsDepartureRepository";
import { PublicStopTimeRepository } from "../../../public/data-access/redis/PublicStopTimeRepository";
import { PublicVehiclePositionsRepository } from "../../../public/data-access/redis/PublicVehiclePositionsRepository";
import { ILogger } from "@golemio/core/dist/helpers";
import { Moment } from "@golemio/core/dist/shared/moment-timezone";
import { TransferDepartureTransformation } from "../transformations/TransferDepartureTransformation";
import { DepartureBoardsMinimalTransformation } from "../transformations/DepartureBoardsMinimalTransformation";
import { IDepartureBoardsMinimalOutput } from "../../interfaces/IDepartureBoardsMinimalOutput";
export type FilterTripToStops = {
    currentLine: TransferStops;
    currentStop: IStop;
    otherLinesMap: TripsToTransfers;
    tripsToKeep: Set<string>;
};
export type FilterSpecificOptions = {
    previousCountMax: number;
    isOppositeDirectionFilterStopNameStrict: boolean;
};
export type LineFilterDto = {
    data: FilterTripToStops;
    options: FilterSpecificOptions;
};
export type LineFilterFn = (params: LineFilterDto) => Promise<LineFilterDto>;
export declare class TransferFacade {
    private log;
    private publicDepartureRepository;
    private departuresRepository;
    private departureTransformation;
    private minimalTransformation;
    private tripRepository;
    private stopTimeRepository;
    private delayComputationRepository;
    private gtfsTripStopsRepository;
    private static readonly DEPARTURES_LIMIT_LOWER;
    private static readonly DEPARTURES_LIMIT_UPPER;
    private static readonly MINUTE_AS_MS;
    private static readonly OPEN_MINUTES_IN_PAST;
    private static readonly OPEN_MINUTES_IN_PAST_MS;
    constructor(log: ILogger, publicDepartureRepository: PublicGtfsDepartureRepository, departuresRepository: DeparturesRepository, departureTransformation: TransferDepartureTransformation, minimalTransformation: DepartureBoardsMinimalTransformation, tripRepository: PublicVehiclePositionsRepository, stopTimeRepository: PublicStopTimeRepository, delayComputationRepository: DelayComputationRepository, gtfsTripStopsRepository: GtfsTripStopsRepository);
    getTransferDepartures(stopIds: string[], tripNumber: string | null, currentMoment: Moment, minutesOffset: number, timeZone?: string): Promise<ITransferOutputDto[]>;
    getDepartureBoards(stopIds: string[], currentMoment: Moment, minutesAfter: number, timeZone?: string): Promise<IDepartureBoardsMinimalOutput[]>;
    private fetchAndFilterDepartures;
    private buildDepartureEntitiesForModel;
    private attachFlagsAndArrivals;
    private static sortByDepartureTime;
    private static isDifferentLine;
    private static allowedTransfers;
    private static jsonPathDataToLineFilterStop;
    private calculateTimeFrom;
    getTransferCache(stopId: string, stopIds: string[], limit: number, reqNumber: number, vehicleType: number, timeFrom: Date, sameNameStopIds: string[]): Promise<IV4TransferDto>;
    private static findStopTimeByStopId;
    /**
     * Find position from cache for a vehicle of given type and registration number. If no position was found and the vehicle type
     * given is bus, attempt fallback to trolleybus.
     */
    private getDetailedVehiclePositionWithFallback;
    private findVehicleArrival;
    private processMultiplePositionsForDeparturesAtOnce;
    private static findPreviousStop;
    private static isOtherEndNearCurrent;
    private static isOtherSubsetOfCurrent;
    private static isOppositeDirection;
    private static filterOutForwardSubgroupOfLine;
    private static filterOutLinesWithBacktrackingConflict;
    private static applyFiltersSequentially;
    private static rawTripLinesEntriesToTransfersMap;
    findRelevantTripIdsFromLines(tripIds: Set<string>, currentStopInput: IStop, currentTripId: string, previousCountMax?: number, isOppositeDirectionFilterStopNameStrict?: boolean): Promise<string[]>;
    private shouldSkipDeparture;
    /**
     * ROPID spec mandates these processing options for the minimal board — not user-configurable.
     */
    private get defaultDepartureBoardsMinimalOptions();
    /**
     * Fallback options as defined by ROPID
     */
    private get defaultOptions();
}
