New type
This commit is contained in:
@@ -14,8 +14,8 @@ import {
|
||||
SuggestionType,
|
||||
} from "@/new/photos/services/search/types";
|
||||
import type { LocationTag } from "@/new/photos/services/user-entity";
|
||||
import { EnteFile } from "@/new/photos/types/file";
|
||||
import { Collection } from "types/collection";
|
||||
import { type EnteFile } from "@/new/photos/types/file";
|
||||
import { type Collection } from "types/collection";
|
||||
import { getUniqueFiles } from "utils/file";
|
||||
|
||||
// Suggestions shown in the search dropdown when the user has typed something.
|
||||
|
||||
@@ -140,6 +140,17 @@ export interface SearchResultSummary {
|
||||
fileCount: number;
|
||||
}
|
||||
|
||||
export type SearchSuggestion = { label: string } & (
|
||||
| { type: "collection"; collectionID: number }
|
||||
| { type: "files"; fileIDs: number[] }
|
||||
| { type: "fileType"; fileType: FileType }
|
||||
| { type: "date"; dateComponents: SearchDateComponents }
|
||||
| { type: "location"; locationTag: LocationTag }
|
||||
| { type: "city"; city: City }
|
||||
| { type: "clip"; clipScoreForFileID: Map<number, number> }
|
||||
| { type: "cgroup"; cgroup: SearchPerson }
|
||||
);
|
||||
|
||||
/**
|
||||
* An option shown in the the search bar's select dropdown.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user