This commit is contained in:
Manav Rathi
2024-09-11 17:05:28 +05:30
parent cc3caf2e5d
commit 012a796894
2 changed files with 13 additions and 2 deletions

View File

@@ -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.

View File

@@ -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.
*