import { ChildTask, datetime, Quote, QuoteErrorDetails, TaskNote } from '@bringg/types';
import { Task } from '../ApiTypes/ApiTypes';
import { DataOptions } from '../data-entity';
import { Answer } from '../OrderExecutionActions/types';
import { KeysetPaginationRequest, KeysetPaginationResponse } from '../utils/consts/keyset-pagination.consts';
export declare enum GROUP_VALUES {
    General = 0,
    Open = 1,
    Planning = 2,
    Closed = 3,
    Invalid = 4,
    Unacknowledged = 5,
    Followers = 6
}
export declare enum TaskGroupTypes {
    Main = "main",
    Followers = "followers"
}
export declare const groupFilter: Map<GROUP_VALUES, (task: Task) => boolean>;
export declare const taskToGroupMapper: (task: Task) => GROUP_VALUES;
export type taskStates = 'open' | 'planning' | 'closed';
export type ClosedTasksByQueryResponse = {
    count: number;
    tasks: Task[];
};
export type HistoryTasksResponse = {
    success: boolean;
    items: Task[];
};
export type GetOpenTasksRequest = {
    columns?: string;
    limit?: number;
    offset?: number;
    apply_filter?: boolean;
};
export type TasksKeysetPaginationRequest = KeysetPaginationRequest<null> & {
    pgver: number;
    columns: string[];
};
export type TasksKeySetPaginationResponse = KeysetPaginationResponse<'tasks', Task[]>;
export type ItemsKeySetPaginationResponse = KeysetPaginationResponse<'items', Task[]>;
export declare enum noteTypes {
    TASK_NOTE = "TaskNote"
}
export type TaskPriority = {
    task_id: number;
    priority: number;
};
export type TaskLocation = {
    lat: number;
    lng: number;
    happened_at: datetime;
};
export type TaskResponse = {
    task: Task;
    success: boolean;
};
export type TaskGeneralResponse = {
    success: boolean;
    rc?: number;
};
export type TasksResponse = {
    tasks: Task[];
    success: boolean;
};
export type ChildTasksResponse = {
    child_tasks: ChildTask[];
    success: boolean;
};
export type TasksLocationsResponse = {
    data: TaskLocation[];
    success: boolean;
};
export type ScaneCodeResponse = {
    scan_string: string;
    success: boolean;
};
export type TaskIdsResponse = {
    task_ids: number[];
    success: boolean;
};
export type FormSubmitResponse = {
    form: TaskNote;
    success: boolean;
};
export type SuccessResponse = {
    success: boolean;
};
export type TasksCsvImportResponse = {
    success: boolean;
    imported_orders: number;
    failed_importing: null;
    errors: CsvImportError[];
    tasks: Task[];
};
export type CsvImportError = {
    line: number;
    error: string;
};
export type BroadcastToDriversResponse = {
    success: boolean;
    message: string;
    rc: number;
};
export type WayPointDeleteResponse = {
    success: boolean;
    message: string;
};
export type GetRescheduleQuotesResponse = {
    success: boolean;
    quotes: Quote[];
    available: boolean;
    quote_errors?: QuoteErrorDetails[];
};
export type AnswersResponse = {
    success: boolean;
    answers: Answer[];
};
export type HasDefectiveGeocodeResponse = {
    success: boolean;
    has_defective_geocode: boolean;
};
export declare const defaultExtractor: (a: any) => any;
export declare const taskExtractor: (response: TaskResponse) => Task;
export declare const successExtractor: (response: TaskResponse) => boolean;
export declare const tasksExtractor: (response: TasksResponse) => Task[];
export declare const childTasksExtractor: (response: ChildTasksResponse) => ChildTask[];
export declare const locationExtractor: (response: TasksLocationsResponse) => TaskLocation[];
export declare const scanCodeExtractor: (response: ScaneCodeResponse) => string;
export declare const taskIdsExtractor: (response: TaskIdsResponse) => number[];
export declare const formExtractor: (response: FormSubmitResponse) => TaskNote;
export declare const quotesExtractor: (response: GetRescheduleQuotesResponse) => Quote[];
export declare const answersExtractor: (response: AnswersResponse) => Answer[];
export declare enum TaskRealTimeEvents {
    TASK_UPDATE = "task update",
    WAYPOINT_ADDED = "waypoint added",
    WAYPOINT_DELETED = "waypoint deleted",
    WAYPOINT_UPDATED = "waypoint updated",
    NEW_SCAN = "new scan",
    NEW_NOTE = "new note",
    TASK_DELETED = "task deleted",
    NEW_TASK = "new task"
}
export interface TaskDataOptions extends DataOptions {
    teamIds?: number[];
}
export declare const baseRoute = "/tasks";
export declare const Routes: {
    GET_OPEN_TASKS: string;
    GET_PLANNING_TASKS: string;
    GET_INVALID_TASKS: string;
    GET_TASK: string;
    GET_CHILD_TASKS: string;
    BATCH_GET_TASK: string;
    GET_CLOSED_TASKS_WITH_QUERY: string;
    GET_HISTORY_TASKS: string;
    GET_HISTORY_TASKS_METADATA: string;
    UPDATE_TASK: string;
    CREATE_TASK: string;
    FINISH_TASK: string;
    CANCEL_TASK: string;
    ACKNOWLEDGE_TASK: string;
    MASS_TASK_ASSIGN: string;
    MASS_TASK_UNASSIGN: string;
    MASS_TASK_CANCEL: string;
    MOVE_TASKS_TO_PLANNING: string;
    RELEASE_TASKS_TO_DRIVERS: string;
    UPDATE_TASK_PREPARATION_STATUS: string;
    GET_TASK_LOCATIONS: string;
    CANCEL_ALL_OPEN_TASKS: string;
    MASS_DELETE_GROUPS: string;
    HAS_DEFECTIVE_GEOCODE: string;
    GET_TASK_ACTIVITY_LOG: string;
    CHANGE_TASK_TEAM: string;
    UPDATE_TASKS_PRIORITIES: string;
    LOCK_TASK: string;
    UNLOCK_TASK: string;
    DUPLICATE_TASK: string;
    RESCHEDULE_QUOTE: string;
    RESCHEDULE_CANCELED: string;
    GET_PICKUP_QR_CODE: string;
    RESCHEDULE_VIRTUAL_TASKS: string;
    FORM_SUBMIT: string;
    IMPORT_TASKS_CSV: string;
    BROADCAST_TO_DRIVERS: string;
    CREATE_TASK_NOTE: string;
    DELETE_WAYPOINT: string;
    GET_WAYPOINT_ANSWERS: string;
};
export declare const taskDefaultFields: (string | {
    way_points: string[];
})[];
