1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-17 10:37:45 +02:00

fix: regression: sort day by fileCreatedAt again (#18732)

* fix: regression: sort day by fileCreatedAt again

* lint

* e2e test

* inline function

* e2e

* Address comments. Drop dayGroup and timezone in favor of localOffsetMinutes

* lint and some api-doc

* lint, more api-doc

* format

* Move minutes to fractional hours

* make sql

* merge/conflict

* merge fallout, review comments

* spelling

* drop offset from returned date

* move description into decorator where possible, regen api
This commit is contained in:
Min Idzelis
2025-06-05 21:56:32 -04:00
committed by GitHub
parent 81423420c8
commit 55f4e93456
23 changed files with 687 additions and 247 deletions

View File

@ -20,28 +20,39 @@ class TimelineApi {
/// Parameters:
///
/// * [String] timeBucket (required):
/// Time bucket identifier in YYYY-MM-DD format (e.g., \"2024-01-01\" for January 2024)
///
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
/// * [bool] isTrashed:
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
///
/// * [String] key:
///
/// * [AssetOrder] order:
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
///
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
/// * [String] userId:
/// Filter assets by specific user ID
///
/// * [AssetVisibility] visibility:
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
///
/// * [bool] withPartners:
/// Include assets shared by partners
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/bucket';
@ -105,28 +116,39 @@ class TimelineApi {
/// Parameters:
///
/// * [String] timeBucket (required):
/// Time bucket identifier in YYYY-MM-DD format (e.g., \"2024-01-01\" for January 2024)
///
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
/// * [bool] isTrashed:
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
///
/// * [String] key:
///
/// * [AssetOrder] order:
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
///
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
/// * [String] userId:
/// Filter assets by specific user ID
///
/// * [AssetVisibility] visibility:
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
///
/// * [bool] withPartners:
/// Include assets shared by partners
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
@ -146,26 +168,36 @@ class TimelineApi {
/// Parameters:
///
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
/// * [bool] isTrashed:
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
///
/// * [String] key:
///
/// * [AssetOrder] order:
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
///
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
/// * [String] userId:
/// Filter assets by specific user ID
///
/// * [AssetVisibility] visibility:
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
///
/// * [bool] withPartners:
/// Include assets shared by partners
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/buckets';
@ -228,26 +260,36 @@ class TimelineApi {
/// Parameters:
///
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
/// * [bool] isTrashed:
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
///
/// * [String] key:
///
/// * [AssetOrder] order:
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
///
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
/// * [String] userId:
/// Filter assets by specific user ID
///
/// * [AssetVisibility] visibility:
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
///
/// * [bool] withPartners:
/// Include assets shared by partners
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {