import { ParkingSpotType, TaskStatus } from '@bringg/types';
type MatchedKeys<ResponseEntity, Exclusions = 'id' | 'matched_keys'> = Exclude<keyof ResponseEntity, Exclusions>[];
export type BaseSearchResponse = {
    next?: string;
};
export type UsersSearchResponse = BaseSearchResponse & {
    items: UsersSearchResponseItem[];
};
export type UsersSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<UsersSearchResponseItem>;
    name: string;
};
export type RunsSearchResponse = BaseSearchResponse & {
    items: RunsSearchResponseItem[];
};
export type RunsSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<RunsSearchResponseItem>;
    route_id: string;
};
/**
 * @deprecated please use TasksExternalIdSearchResponse
 */
export type TasksSearchResponse = BaseSearchResponse & {
    items: TasksSearchResponseItem[];
};
export type TasksExternalIdSearchResponse = BaseSearchResponse & {
    items: TasksExternalIdSearchResponseItem[];
};
/**
 * @deprecated please use TasksExternalIdSearchResponseItem
 */
export type TasksSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<TasksSearchResponseItem>;
    external_id: string;
};
export type TasksExternalIdSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<TasksExternalIdSearchResponseItem>;
    external_id: string;
};
export type ContextualSearchQuery = {
    ready_to_execute?: boolean;
    status?: TaskStatus[];
};
export type TasksTitleSearchQuery = BasePagelessSearchQuery & ContextualSearchQuery & {
    query: string;
};
export type TasksTitleSearchResponse = {
    items: TasksTitleSearchResponseItem[];
};
export type TasksTitleSearchResponseItem = {
    matched_keys: MatchedKeys<TasksTitleSearchResponseItem>;
    title: string;
};
export type PlannedRouteSearchResponse = BaseSearchResponse & {
    items: PlannedRouteSearchResponseItem[];
};
export type PlannedRouteSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<PlannedRouteSearchResponseItem>;
    title: string;
};
export type BaseSearchQuery = BasePagelessSearchQuery & {
    from?: string;
};
export type BaseTasksByExternalIdsSearchQuery = BaseSearchQuery & ContextualSearchQuery;
export type BasePagelessSearchQuery = {
    size?: number;
    query: string | number;
};
export type UsersSearchQuery = BaseSearchQuery & {
    roles: ('admin' | 'driver' | 'dispatcher')[];
    includeAllAdmins?: boolean;
    requiredFields?: ('email' | 'phone')[];
};
export type TeamsSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<TeamsSearchResponseItem>;
    name: string;
};
export type TeamsSearchResponse = BaseSearchResponse & {
    items: TeamsSearchResponseItem[];
};
export type WaypointPropertySearchQuery = BasePagelessSearchQuery & {
    query: string;
    position: 1 | 2;
};
export type WaypointZipcodeSearchResponse = {
    items: WaypointZipcodeSearchResponseItem[];
};
export type WaypointZipcodeSearchResponseItem = {
    matched_keys: ['zipcode'];
    zipcode: string;
};
export type WaypointAddressSearchResponse = {
    items: WaypointAddressSearchResponseItem[];
};
export type WaypointAddressSearchResponseItem = {
    matched_keys: ['address'];
    address: string;
};
export type WaypointCitySearchResponse = {
    items: WaypointCitySearchResponseItem[];
};
export type WaypointCitySearchResponseItem = {
    matched_keys: ['city'];
    city: string;
};
export type WaypointPhoneSearchResponse = {
    items: WaypointPhoneSearchResponseItem[];
};
export type WaypointPhoneSearchResponseItem = {
    matched_keys: ['phone'];
    phone: string;
};
export type CustomerNameSearchResponseItem = {
    matched_keys: MatchedKeys<CustomerNameSearchResponseItem>;
    name: string;
};
export type CustomerNameSearchResponse = BaseSearchResponse & {
    items: CustomerNameSearchResponseItem[];
};
export type CustomerOriginalPhoneSearchResponseItem = {
    matched_keys: MatchedKeys<CustomerOriginalPhoneSearchResponseItem>;
    original_phone_number: string;
};
export type CustomerOriginalPhoneSearchResponse = BaseSearchResponse & {
    items: CustomerOriginalPhoneSearchResponseItem[];
};
export type ParkingSpotsSearchQuery = BaseSearchQuery & {
    parking_type: ParkingSpotType.Customer | ParkingSpotType.Driver;
    team_ids: number[];
};
export type ParkingSpotsSearchResponse = BaseSearchResponse & {
    items: ParkingSpotsSearchResponseItem[];
};
export type ParkingSpotsSearchResponseItem = {
    id: number;
    matched_keys: MatchedKeys<ParkingSpotsSearchResponseItem>;
    name: string;
};
export {};
