feat: find large files utility (#18040)

feat: large asset utility

Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
Alwin Lohrie 2025-07-29 00:48:39 +02:00 committed by GitHub
parent 7d759edfcc
commit ae1d60e259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 964 additions and 4 deletions

View file

@ -2954,6 +2954,79 @@ export function getExploreData(opts?: Oazapfts.RequestOpts) {
...opts
}));
}
export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: {
albumIds?: string[];
city?: string | null;
country?: string | null;
createdAfter?: string;
createdBefore?: string;
deviceId?: string;
isEncoded?: boolean;
isFavorite?: boolean;
isMotion?: boolean;
isNotInAlbum?: boolean;
isOffline?: boolean;
lensModel?: string | null;
libraryId?: string | null;
make?: string;
minFileSize?: number;
model?: string | null;
personIds?: string[];
rating?: number;
size?: number;
state?: string | null;
tagIds?: string[] | null;
takenAfter?: string;
takenBefore?: string;
trashedAfter?: string;
trashedBefore?: string;
$type?: AssetTypeEnum;
updatedAfter?: string;
updatedBefore?: string;
visibility?: AssetVisibility;
withDeleted?: boolean;
withExif?: boolean;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetResponseDto[];
}>(`/search/large-assets${QS.query(QS.explode({
albumIds,
city,
country,
createdAfter,
createdBefore,
deviceId,
isEncoded,
isFavorite,
isMotion,
isNotInAlbum,
isOffline,
lensModel,
libraryId,
make,
minFileSize,
model,
personIds,
rating,
size,
state,
tagIds,
takenAfter,
takenBefore,
trashedAfter,
trashedBefore,
"type": $type,
updatedAfter,
updatedBefore,
visibility,
withDeleted,
withExif
}))}`, {
...opts,
method: "POST"
}));
}
export function searchAssets({ metadataSearchDto }: {
metadataSearchDto: MetadataSearchDto;
}, opts?: Oazapfts.RequestOpts) {