mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: Download the edited version when downloading multiple photos (#26259)
* fix: download the edited version when downloading multiple photos * test: update tests * chore: clean up --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
@@ -5052,7 +5052,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AssetIdsDto"
|
||||
"$ref": "#/components/schemas/DownloadArchiveDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -17662,6 +17662,26 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"DownloadArchiveDto": {
|
||||
"properties": {
|
||||
"assetIds": {
|
||||
"description": "Asset IDs",
|
||||
"items": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"edited": {
|
||||
"description": "Download edited asset if available",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"assetIds"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"DownloadArchiveInfo": {
|
||||
"properties": {
|
||||
"assetIds": {
|
||||
|
||||
@@ -1132,9 +1132,11 @@ export type ValidateAccessTokenResponseDto = {
|
||||
/** Authentication status */
|
||||
authStatus: boolean;
|
||||
};
|
||||
export type AssetIdsDto = {
|
||||
export type DownloadArchiveDto = {
|
||||
/** Asset IDs */
|
||||
assetIds: string[];
|
||||
/** Download edited asset if available */
|
||||
edited?: boolean;
|
||||
};
|
||||
export type DownloadInfoDto = {
|
||||
/** Album ID to download */
|
||||
@@ -2309,6 +2311,10 @@ export type SharedLinkEditDto = {
|
||||
/** Custom URL slug */
|
||||
slug?: string | null;
|
||||
};
|
||||
export type AssetIdsDto = {
|
||||
/** Asset IDs */
|
||||
assetIds: string[];
|
||||
};
|
||||
export type AssetIdsResponseDto = {
|
||||
/** Asset ID */
|
||||
assetId: string;
|
||||
@@ -4433,10 +4439,10 @@ export function validateAccessToken(opts?: Oazapfts.RequestOpts) {
|
||||
/**
|
||||
* Download asset archive
|
||||
*/
|
||||
export function downloadArchive({ key, slug, assetIdsDto }: {
|
||||
export function downloadArchive({ key, slug, downloadArchiveDto }: {
|
||||
key?: string;
|
||||
slug?: string;
|
||||
assetIdsDto: AssetIdsDto;
|
||||
downloadArchiveDto: DownloadArchiveDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
@@ -4447,7 +4453,7 @@ export function downloadArchive({ key, slug, assetIdsDto }: {
|
||||
}))}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: assetIdsDto
|
||||
body: downloadArchiveDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user