1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-03 05:46:58 +02:00

refactor: library type (#9525)

This commit is contained in:
Jason Rasmussen
2024-05-20 18:09:10 -04:00
committed by GitHub
parent 4353153fe6
commit 84d824d6a7
66 changed files with 183 additions and 984 deletions

View File

@ -130,7 +130,8 @@ export type AssetResponseDto = {
/** This property was deprecated in v1.104.0 */
isReadOnly?: boolean;
isTrashed: boolean;
libraryId: string;
/** This property was deprecated in v1.106.0 */
libraryId?: string | null;
livePhotoVideoId?: string | null;
localDateTime: string;
originalFileName: string;
@ -307,7 +308,6 @@ export type CreateAssetDto = {
isFavorite?: boolean;
isOffline?: boolean;
isVisible?: boolean;
libraryId?: string;
livePhotoData?: Blob;
sidecarData?: Blob;
};
@ -442,7 +442,6 @@ export type LibraryResponseDto = {
name: string;
ownerId: string;
refreshedAt: string | null;
"type": LibraryType;
updatedAt: string;
};
export type CreateLibraryDto = {
@ -450,7 +449,6 @@ export type CreateLibraryDto = {
importPaths?: string[];
name?: string;
ownerId: string;
"type": LibraryType;
};
export type UpdateLibraryDto = {
exclusionPatterns?: string[];
@ -1754,15 +1752,11 @@ export function sendJobCommand({ id, jobCommandDto }: {
body: jobCommandDto
})));
}
export function getAllLibraries({ $type }: {
$type?: LibraryType;
}, opts?: Oazapfts.RequestOpts) {
export function getAllLibraries(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryResponseDto[];
}>(`/library${QS.query(QS.explode({
"type": $type
}))}`, {
}>("/library", {
...opts
}));
}
@ -2913,10 +2907,6 @@ export enum JobCommand {
Empty = "empty",
ClearFailed = "clear-failed"
}
export enum LibraryType {
Upload = "UPLOAD",
External = "EXTERNAL"
}
export enum Type2 {
OnThisDay = "on_this_day"
}