Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

New type

Manav Rathi012a79689408
diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.ts
index 47b6b27a2a..f10f9e95a3 100644
--- a/web/apps/photos/src/services/searchService.ts
+++ b/web/apps/photos/src/services/searchService.ts
@@ -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.
diff --git a/web/packages/new/photos/services/search/types.ts b/web/packages/new/photos/services/search/types.ts
index baddbfbb28..b375c05aeb 100644
--- a/web/packages/new/photos/services/search/types.ts
+++ b/web/packages/new/photos/services/search/types.ts
@@ -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.
*