diff --git a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart b/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart index fbeebb1c8e..dd3abb3358 100644 --- a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart +++ b/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart @@ -57,7 +57,7 @@ class TimeBucketAssetResponseDto { List ratio; /// (stack ID, stack asset count) tuple - List stack; + List> stack; List thumbhash; @@ -169,9 +169,11 @@ class TimeBucketAssetResponseDto { ratio: json[r'ratio'] is Iterable ? (json[r'ratio'] as Iterable).cast().toList(growable: false) : const [], - stack: json[r'stack'] is Iterable - ? (json[r'stack'] as Iterable).cast().toList(growable: false) - : const [], + stack: json[r'stack'] is List + ? (json[r'stack'] as List).map((e) => + e == null ? null : (e as List).cast() + ).toList() + : const [], thumbhash: json[r'thumbhash'] is Iterable ? (json[r'thumbhash'] as Iterable).cast().toList(growable: false) : const [], diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index ff0428405a..9af17fd906 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -13648,11 +13648,14 @@ "stack": { "description": "(stack ID, stack asset count) tuple", "items": { + "items": { + "maxItems": 2, + "minItems": 2, + "type": "string" + }, "nullable": true, - "type": "string" + "type": "array" }, - "maxItems": 2, - "minItems": 2, "type": "array" }, "thumbhash": { diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index e2a833b80f..f0caab8941 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1399,7 +1399,7 @@ export type TimeBucketAssetResponseDto = { projectionType: (string | null)[]; ratio: number[]; /** (stack ID, stack asset count) tuple */ - stack?: (string | null)[]; + stack?: (string[] | null)[]; thumbhash: (string | null)[]; }; export type TimeBucketsResponseDto = { diff --git a/server/src/dtos/time-bucket.dto.ts b/server/src/dtos/time-bucket.dto.ts index ba1b303ddf..acc0914aa5 100644 --- a/server/src/dtos/time-bucket.dto.ts +++ b/server/src/dtos/time-bucket.dto.ts @@ -87,11 +87,10 @@ export class TimeBucketAssetResponseDto implements TimeBucketAssets { @ApiProperty({ type: 'array', items: { - type: 'string', + type: 'array', + items: { type: 'string', maxItems: 2, minItems: 2 }, nullable: true, }, - maxItems: 2, - minItems: 2, description: '(stack ID, stack asset count) tuple', }) stack?: ([string, string] | null)[];