import { RopidGTFSStopTimesModel } from "../../../../ropid-gtfs/RopidGTFSStopTimesModel";
import { RopidGTFSTripsModel } from "../../../../ropid-gtfs/RopidGTFSTripsModel";
import { BlockStopsRedisRepository, DelayComputationRedisRepository } from "../../../../ropid-gtfs/data-access/cache";
import { ILogger } from "@golemio/core/dist/helpers/logger";
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
import { MessageProperties } from "@golemio/core/dist/shared/amqplib";
import { PositionsRepository } from "../data-access/PositionsRepository";
import type { TripsRepository } from "../data-access/TripsRepository";
import { PositionsManager } from "../helpers/PositionsManager";
import { MetroShapePointsFixer } from "../helpers/metro/MetroShapePointsFixer";
import { IUpdateDelayInput } from "../interfaces/IUpdateDelayInput";
import { UpdateDelayValidationSchema } from "../schema/UpdateDelaySchema";
export declare class UpdateDelayTask extends AbstractTask<IUpdateDelayInput> {
    readonly queueName = "updateDelay";
    readonly queueTtl: number;
    readonly schema: typeof UpdateDelayValidationSchema;
    private readonly logger;
    private readonly tripsRepository;
    private readonly positionsRepository;
    private readonly delayComputationRedisRepository;
    private readonly tripStopsManager;
    private readonly delayComputationManager;
    private readonly metroShapePointsFixer;
    private readonly updateDelayLimiter;
    private readonly positionsManager;
    constructor(logger: ILogger, tripsRepository: TripsRepository, positionsRepository: PositionsRepository, delayComputationRedisRepository: DelayComputationRedisRepository, gtfsStopTimesRepository: RopidGTFSStopTimesModel, gtfsTripsRepository: RopidGTFSTripsModel, blockStopsRedisRepository: BlockStopsRedisRepository, metroShapePointsFixer: MetroShapePointsFixer, positionsManager: PositionsManager);
    protected execute(data: IUpdateDelayInput, messageProperties?: MessageProperties): Promise<void>;
    private enrichTripWithGtfsComputationData;
    /**
     * Propagate known position properties from trips positions to processed positions, when the processed position property is
     * `undefined`
     *
     * @param tripsPositions Trips positions to propagate properties from
     * @param processedPositions Processed positions to propagate properties to
     */
    private propagateKnownPositionProperties;
    /**
     * Take all newly computed positions and save it, then save the last ones to the trips
     *
     * @param processedPositions - Arrays of all newly computed positions
     */
    private updateComputedPositionsAndTrips;
    /**
     * Expire delay computation cache for given trips
     */
    private expireDelayComputationCache;
    private savePositions;
    /**
     * Invalidate positions after the last stop sequence of backtracked positions
     * We do this to improve historical data quality
     * as well as to prevent serving of incorrect stop times to API clients
     * (vehicle is expected to repeat some part of the trip)
     */
    private invalidateBacktrackedPositions;
    private getMaxStopSequence;
}
