import { datetime, OPTIMIZATION_TYPE, uuid } from '@bringg/types';
export type RouteOptimizationResponse = {
    success: boolean;
    uuid: string;
};
export type RouteOptimizationRequest = {
    optimize_for: string;
    optimization_type?: OPTIMIZATION_TYPE;
    request_uuid: uuid;
    task_ids: number[];
    team_id: number;
    scheduled_date?: string;
    custom_period?: {
        start_hour: number;
        end_hour: number;
    };
    preserve_current_runs?: boolean;
    driver_ids?: number[];
    delivery_block_resource_ids?: number[];
    scheduled_window?: {
        start_time: datetime;
        end_time: datetime;
    };
};
export type OptimizationResponseSuccess = {
    abilities: {
        progress: boolean;
        cancellable: boolean;
    };
    request_uuid: uuid;
    success: boolean;
};
export type OptimizationResponseFailed = {
    message: string;
    request_uuid: uuid;
    error: string;
    merchant_id: number;
    request_id: string;
    team_id: number;
};
export type OptimizationData = {
    eta?: number;
    etl?: number;
    priority?: number;
    route_idx: number;
    task_id?: number;
    type: string;
    user_id?: number;
    vehicle_id?: string;
    way_point_id?: number;
    depot_back_eta?: number;
    depot_etl?: number;
    power_unit_id?: string;
    transport_distance?: number;
    directions?: string[];
    run_id?: number;
    estimated_end_time?: number;
    estimated_start_time?: number;
    id?: string;
    position?: number;
    cost?: number;
};
export type RouteOptimizationResult = {
    merchant_id: number;
    request_uuid: uuid;
    origin?: string;
    team_id?: number;
    user_types?: Bringg.UserType[];
    data?: OptimizationData[];
};
export type OptimizationResult = {
    success: boolean;
    message?: string;
    route_optimization_result?: RouteOptimizationResult;
};
export type PlannedETAAsyncOperationResponse = {
    data?: OptimizationData[];
    error?: any;
};
export type OptimizationInProgressRealTime = {
    error: string;
    iteration: number;
    merchant_id: number;
    requestUuid: string;
    request_id: string;
    routeOptimizationRequestId: string;
    success: boolean;
    teamId: string;
    timestamp: number;
    totalIterations: number;
    userId: string;
};
export declare enum OptimizationEvents {
    IN_PROGRESS = "optimization progress",
    DONE = "optimization done"
}
export type OptimizationCallbacks = {
    onDone: (routeOptimizationResult: RouteOptimizationResult) => void;
    onFailed: (failedData: OptimizationResponseFailed) => void;
    onInProgress: (inProgress: OptimizationInProgressRealTime) => void;
};
export type OptimizationDone = RouteOptimizationResult & {
    error?: string;
};
export type TeamsToOptimize = {
    request_uuid: uuid;
    team_id: number;
}[];
export type UserOptimizationData = {
    data: OptimizationData[];
    modified_tasks?: Partial<Bringg.Task>[];
    merchant_id: number;
    team_id: number;
};
export type UpdateOptimizationModifiedData = UserOptimizationData & {
    request_uuid: string;
};
export type AssignUserManualData = UserOptimizationData & {
    user_id: number;
};
