You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-16 03:40:33 +02:00
chore(server): remove old asset search (#9104)
* chore(server): remove old asset search * chore: remove more unused search code
This commit is contained in:
@ -600,31 +600,6 @@ export type FileChecksumResponseDto = {
|
||||
export type FileReportFixDto = {
|
||||
items: FileReportItemDto[];
|
||||
};
|
||||
export type SearchFacetCountResponseDto = {
|
||||
count: number;
|
||||
value: string;
|
||||
};
|
||||
export type SearchFacetResponseDto = {
|
||||
counts: SearchFacetCountResponseDto[];
|
||||
fieldName: string;
|
||||
};
|
||||
export type SearchAlbumResponseDto = {
|
||||
count: number;
|
||||
facets: SearchFacetResponseDto[];
|
||||
items: AlbumResponseDto[];
|
||||
total: number;
|
||||
};
|
||||
export type SearchAssetResponseDto = {
|
||||
count: number;
|
||||
facets: SearchFacetResponseDto[];
|
||||
items: AssetResponseDto[];
|
||||
nextPage: string | null;
|
||||
total: number;
|
||||
};
|
||||
export type SearchResponseDto = {
|
||||
albums: SearchAlbumResponseDto;
|
||||
assets: SearchAssetResponseDto;
|
||||
};
|
||||
export type SearchExploreItem = {
|
||||
data: AssetResponseDto;
|
||||
value: string;
|
||||
@ -680,6 +655,31 @@ export type MetadataSearchDto = {
|
||||
withPeople?: boolean;
|
||||
withStacked?: boolean;
|
||||
};
|
||||
export type SearchFacetCountResponseDto = {
|
||||
count: number;
|
||||
value: string;
|
||||
};
|
||||
export type SearchFacetResponseDto = {
|
||||
counts: SearchFacetCountResponseDto[];
|
||||
fieldName: string;
|
||||
};
|
||||
export type SearchAlbumResponseDto = {
|
||||
count: number;
|
||||
facets: SearchFacetResponseDto[];
|
||||
items: AlbumResponseDto[];
|
||||
total: number;
|
||||
};
|
||||
export type SearchAssetResponseDto = {
|
||||
count: number;
|
||||
facets: SearchFacetResponseDto[];
|
||||
items: AssetResponseDto[];
|
||||
nextPage: string | null;
|
||||
total: number;
|
||||
};
|
||||
export type SearchResponseDto = {
|
||||
albums: SearchAlbumResponseDto;
|
||||
assets: SearchAssetResponseDto;
|
||||
};
|
||||
export type PlacesResponseDto = {
|
||||
admin1name?: string;
|
||||
admin2name?: string;
|
||||
@ -1530,106 +1530,6 @@ export function updateAsset({ id, updateAssetDto }: {
|
||||
body: updateAssetDto
|
||||
})));
|
||||
}
|
||||
export function searchAssets({ checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isNotInAlbum, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, personIds, previewPath, resizePath, size, state, takenAfter, takenBefore, thumbnailPath, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked }: {
|
||||
checksum?: string;
|
||||
city?: string;
|
||||
country?: string;
|
||||
createdAfter?: string;
|
||||
createdBefore?: string;
|
||||
deviceAssetId?: string;
|
||||
deviceId?: string;
|
||||
encodedVideoPath?: string;
|
||||
id?: string;
|
||||
isArchived?: boolean;
|
||||
isEncoded?: boolean;
|
||||
isExternal?: boolean;
|
||||
isFavorite?: boolean;
|
||||
isMotion?: boolean;
|
||||
isNotInAlbum?: boolean;
|
||||
isOffline?: boolean;
|
||||
isReadOnly?: boolean;
|
||||
isVisible?: boolean;
|
||||
lensModel?: string;
|
||||
libraryId?: string;
|
||||
make?: string;
|
||||
model?: string;
|
||||
order?: AssetOrder;
|
||||
originalFileName?: string;
|
||||
originalPath?: string;
|
||||
page?: number;
|
||||
personIds?: string[];
|
||||
previewPath?: string;
|
||||
resizePath?: string;
|
||||
size?: number;
|
||||
state?: string;
|
||||
takenAfter?: string;
|
||||
takenBefore?: string;
|
||||
thumbnailPath?: string;
|
||||
trashedAfter?: string;
|
||||
trashedBefore?: string;
|
||||
$type?: AssetTypeEnum;
|
||||
updatedAfter?: string;
|
||||
updatedBefore?: string;
|
||||
webpPath?: string;
|
||||
withArchived?: boolean;
|
||||
withDeleted?: boolean;
|
||||
withExif?: boolean;
|
||||
withPeople?: boolean;
|
||||
withStacked?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: AssetResponseDto[];
|
||||
}>(`/assets${QS.query(QS.explode({
|
||||
checksum,
|
||||
city,
|
||||
country,
|
||||
createdAfter,
|
||||
createdBefore,
|
||||
deviceAssetId,
|
||||
deviceId,
|
||||
encodedVideoPath,
|
||||
id,
|
||||
isArchived,
|
||||
isEncoded,
|
||||
isExternal,
|
||||
isFavorite,
|
||||
isMotion,
|
||||
isNotInAlbum,
|
||||
isOffline,
|
||||
isReadOnly,
|
||||
isVisible,
|
||||
lensModel,
|
||||
libraryId,
|
||||
make,
|
||||
model,
|
||||
order,
|
||||
originalFileName,
|
||||
originalPath,
|
||||
page,
|
||||
personIds,
|
||||
previewPath,
|
||||
resizePath,
|
||||
size,
|
||||
state,
|
||||
takenAfter,
|
||||
takenBefore,
|
||||
thumbnailPath,
|
||||
trashedAfter,
|
||||
trashedBefore,
|
||||
"type": $type,
|
||||
updatedAfter,
|
||||
updatedBefore,
|
||||
webpPath,
|
||||
withArchived,
|
||||
withDeleted,
|
||||
withExif,
|
||||
withPeople,
|
||||
withStacked
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getAuditDeletes({ after, entityType, userId }: {
|
||||
after: string;
|
||||
entityType: EntityType;
|
||||
@ -2201,36 +2101,6 @@ export function fixAuditFiles({ fileReportFixDto }: {
|
||||
body: fileReportFixDto
|
||||
})));
|
||||
}
|
||||
export function search({ clip, motion, page, q, query, recent, size, smart, $type, withArchived }: {
|
||||
clip?: boolean;
|
||||
motion?: boolean;
|
||||
page?: number;
|
||||
q?: string;
|
||||
query?: string;
|
||||
recent?: boolean;
|
||||
size?: number;
|
||||
smart?: boolean;
|
||||
$type?: "IMAGE" | "VIDEO" | "AUDIO" | "OTHER";
|
||||
withArchived?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: SearchResponseDto;
|
||||
}>(`/search${QS.query(QS.explode({
|
||||
clip,
|
||||
motion,
|
||||
page,
|
||||
q,
|
||||
query,
|
||||
recent,
|
||||
size,
|
||||
smart,
|
||||
"type": $type,
|
||||
withArchived
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getAssetsByCity(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
|
Reference in New Issue
Block a user