* 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
pull/18043/head^2
Min Idzelis2025-06-05 21:56:32 +07:00committed byGitHub
///Thelocaldateandtimewhenthephoto/videowastaken,derivedfromEXIFmetadata.Thisrepresentsthephotographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.
"description":"Filter assets belonging to a specific album",
"schema":{
"format":"uuid",
"type":"string"
@ -7352,6 +7353,7 @@
"name":"isFavorite",
"required":false,
"in":"query",
"description":"Filter by favorite status (true for favorites only, false for non-favorites only)",
"schema":{
"type":"boolean"
}
@ -7360,6 +7362,7 @@
"name":"isTrashed",
"required":false,
"in":"query",
"description":"Filter by trash status (true for trashed assets only, false for non-trashed only)",
"schema":{
"type":"boolean"
}
@ -7376,6 +7379,7 @@
"name":"order",
"required":false,
"in":"query",
"description":"Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)",
"schema":{
"$ref":"#/components/schemas/AssetOrder"
}
@ -7384,6 +7388,7 @@
"name":"personId",
"required":false,
"in":"query",
"description":"Filter assets containing a specific person (face recognition)",
"schema":{
"format":"uuid",
"type":"string"
@ -7393,6 +7398,7 @@
"name":"tagId",
"required":false,
"in":"query",
"description":"Filter assets with a specific tag",
"schema":{
"format":"uuid",
"type":"string"
@ -7402,7 +7408,9 @@
"name":"timeBucket",
"required":true,
"in":"query",
"description":"Time bucket identifier in YYYY-MM-DD format (e.g., \"2024-01-01\" for January 2024)",
"schema":{
"example":"2024-01-01",
"type":"string"
}
},
@ -7410,6 +7418,7 @@
"name":"userId",
"required":false,
"in":"query",
"description":"Filter assets by specific user ID",
"schema":{
"format":"uuid",
"type":"string"
@ -7419,6 +7428,7 @@
"name":"visibility",
"required":false,
"in":"query",
"description":"Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)",
"schema":{
"$ref":"#/components/schemas/AssetVisibility"
}
@ -7427,6 +7437,7 @@
"name":"withPartners",
"required":false,
"in":"query",
"description":"Include assets shared by partners",
"schema":{
"type":"boolean"
}
@ -7435,6 +7446,7 @@
"name":"withStacked",
"required":false,
"in":"query",
"description":"Include stacked assets in the response. When true, only primary assets from stacks are returned.",
"schema":{
"type":"boolean"
}
@ -7476,6 +7488,7 @@
"name":"albumId",
"required":false,
"in":"query",
"description":"Filter assets belonging to a specific album",
"schema":{
"format":"uuid",
"type":"string"
@ -7485,6 +7498,7 @@
"name":"isFavorite",
"required":false,
"in":"query",
"description":"Filter by favorite status (true for favorites only, false for non-favorites only)",
"schema":{
"type":"boolean"
}
@ -7493,6 +7507,7 @@
"name":"isTrashed",
"required":false,
"in":"query",
"description":"Filter by trash status (true for trashed assets only, false for non-trashed only)",
"schema":{
"type":"boolean"
}
@ -7509,6 +7524,7 @@
"name":"order",
"required":false,
"in":"query",
"description":"Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)",
"schema":{
"$ref":"#/components/schemas/AssetOrder"
}
@ -7517,6 +7533,7 @@
"name":"personId",
"required":false,
"in":"query",
"description":"Filter assets containing a specific person (face recognition)",
"schema":{
"format":"uuid",
"type":"string"
@ -7526,6 +7543,7 @@
"name":"tagId",
"required":false,
"in":"query",
"description":"Filter assets with a specific tag",
"schema":{
"format":"uuid",
"type":"string"
@ -7535,6 +7553,7 @@
"name":"userId",
"required":false,
"in":"query",
"description":"Filter assets by specific user ID",
"schema":{
"format":"uuid",
"type":"string"
@ -7544,6 +7563,7 @@
"name":"visibility",
"required":false,
"in":"query",
"description":"Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)",
"schema":{
"$ref":"#/components/schemas/AssetVisibility"
}
@ -7552,6 +7572,7 @@
"name":"withPartners",
"required":false,
"in":"query",
"description":"Include assets shared by partners",
"schema":{
"type":"boolean"
}
@ -7560,6 +7581,7 @@
"name":"withStacked",
"required":false,
"in":"query",
"description":"Include stacked assets in the response. When true, only primary assets from stacks are returned.",
"schema":{
"type":"boolean"
}
@ -9369,10 +9391,14 @@
"$ref":"#/components/schemas/ExifResponseDto"
},
"fileCreatedAt":{
"description":"The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken.",
"example":"2024-01-15T19:30:00.000Z",
"format":"date-time",
"type":"string"
},
"fileModifiedAt":{
"description":"The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.",
"example":"2024-01-16T10:15:00.000Z",
"format":"date-time",
"type":"string"
},
@ -9405,6 +9431,8 @@
"type":"string"
},
"localDateTime":{
"description":"The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.",
"example":"2024-01-15T14:30:00.000Z",
"format":"date-time",
"type":"string"
},
@ -9466,6 +9494,8 @@
"type":"array"
},
"updatedAt":{
"description":"The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.",
"example":"2024-01-16T12:45:30.000Z",
"format":"date-time",
"type":"string"
},
@ -14424,6 +14454,7 @@
"TimeBucketAssetResponseDto":{
"properties":{
"city":{
"description":"Array of city names extracted from EXIF GPS data",
"items":{
"nullable":true,
"type":"string"
@ -14431,6 +14462,7 @@
"type":"array"
},
"country":{
"description":"Array of country names extracted from EXIF GPS data",
"items":{
"nullable":true,
"type":"string"
@ -14438,56 +14470,72 @@
"type":"array"
},
"duration":{
"description":"Array of video durations in HH:MM:SS format (null for images)",
"items":{
"nullable":true,
"type":"string"
},
"type":"array"
},
"fileCreatedAt":{
"description":"Array of file creation timestamps in UTC (ISO 8601 format, without timezone)",
"items":{
"type":"string"
},
"type":"array"
},
"id":{
"description":"Array of asset IDs in the time bucket",
"items":{
"type":"string"
},
"type":"array"
},
"isFavorite":{
"description":"Array indicating whether each asset is favorited",
"items":{
"type":"boolean"
},
"type":"array"
},
"isImage":{
"description":"Array indicating whether each asset is an image (false for videos)",
"items":{
"type":"boolean"
},
"type":"array"
},
"isTrashed":{
"description":"Array indicating whether each asset is in the trash",
"items":{
"type":"boolean"
},
"type":"array"
},
"livePhotoVideoId":{
"description":"Array of live photo video asset IDs (null for non-live photos)",
"items":{
"nullable":true,
"type":"string"
},
"type":"array"
},
"localDateTime":{
"localOffsetHours":{
"description":"Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective.",
"items":{
"type":"string"
"type":"number"
},
"type":"array"
},
"ownerId":{
"description":"Array of owner IDs for each asset",
"items":{
"type":"string"
},
"type":"array"
},
"projectionType":{
"description":"Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\")",
"items":{
"nullable":true,
"type":"string"
@ -14495,13 +14543,14 @@
"type":"array"
},
"ratio":{
"description":"Array of aspect ratios (width/height) for each asset",
@ -312,7 +312,9 @@ export type AssetResponseDto = {
duplicateId?: string|null;
duration: string;
exifInfo?: ExifResponseDto;
/** The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken. */
fileCreatedAt: string;
/** The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken. */
fileModifiedAt: string;
hasMetadata: boolean;
id: string;
@ -323,6 +325,7 @@ export type AssetResponseDto = {
/** This property was deprecated in v1.106.0 */
libraryId?: string|null;
livePhotoVideoId?: string|null;
/** The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by "local" days and months. */
localDateTime: string;
originalFileName: string;
originalMimeType?: string;
@ -337,6 +340,7 @@ export type AssetResponseDto = {
/** The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified. */
updatedAt: string;
visibility: AssetVisibility;
};
@ -1442,25 +1446,43 @@ export type TagUpdateDto = {
color?: string|null;
};
exporttypeTimeBucketAssetResponseDto={
/** Array of city names extracted from EXIF GPS data */
city:(string|null)[];
/** Array of country names extracted from EXIF GPS data */
country:(string|null)[];
/** Array of video durations in HH:MM:SS format (null for images) */
duration:(string|null)[];
/** Array of file creation timestamps in UTC (ISO 8601 format, without timezone) */
fileCreatedAt: string[];
/** Array of asset IDs in the time bucket */
id: string[];
/** Array indicating whether each asset is favorited */
isFavorite: boolean[];
/** Array indicating whether each asset is an image (false for videos) */
isImage: boolean[];
/** Array indicating whether each asset is in the trash */
isTrashed: boolean[];
/** Array of live photo video asset IDs (null for non-live photos) */
livePhotoVideoId:(string|null)[];
localDateTime: string[];
/** Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective. */
localOffsetHours: number[];
/** Array of owner IDs for each asset */
ownerId: string[];
/** Array of projection types for 360° content (e.g., "EQUIRECTANGULAR", "CUBEFACE", "CYLINDRICAL") */
projectionType:(string|null)[];
/** Array of aspect ratios (width/height) for each asset */
ratio: number[];
/** (stack ID, stack asset count) tuple */
/** Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) */
stack?:(string[]|null)[];
/** Array of BlurHash strings for generating asset previews (base64 encoded) */
thumbhash:(string|null)[];
/** Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED) */
visibility: AssetVisibility[];
};
exporttypeTimeBucketsResponseDto={
/** Number of assets in this time bucket */
count: number;
/** Time bucket identifier in YYYY-MM-DD format representing the start of the time period */
@ -22,6 +22,13 @@ export class SanitizedAssetResponseDto {
type!:AssetType;
thumbhash!:string|null;
originalMimeType?: string;
@ApiProperty({
type:'string',
format:'date-time',
description:
'The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer\'s local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by "local" days and months.',
example:'2024-01-15T14:30:00.000Z',
})
localDateTime!:Date;
duration!:string;
livePhotoVideoId?: string|null;
@ -37,8 +44,29 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
libraryId?: string|null;
originalPath!:string;
originalFileName!:string;
@ApiProperty({
type:'string',
format:'date-time',
description:
'The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken.',
example:'2024-01-15T19:30:00.000Z',
})
fileCreatedAt!:Date;
@ApiProperty({
type:'string',
format:'date-time',
description:
'The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.',
example:'2024-01-16T10:15:00.000Z',
})
fileModifiedAt!:Date;
@ApiProperty({
type:'string',
format:'date-time',
description:
'The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.',
description:'Array of BlurHash strings for generating asset previews (base64 encoded)',
})
thumbhash!:(string|null)[];
localDateTime!:string[];
@ApiProperty({
type:'array',
items:{type:'string'},
description:'Array of file creation timestamps in UTC (ISO 8601 format, without timezone)',
})
fileCreatedAt!:string[];
@ApiProperty({
type:'array',
items:{type:'number'},
description:
"Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective.",