mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
feat(web): timeline bucket for albums (4) (#3604)
* feat: server changes for album timeline * feat(web): album timeline view * chore: open api * chore: remove archive action * fix: favorite for non-owners
This commit is contained in:
6
mobile/openapi/doc/AlbumApi.md
generated
6
mobile/openapi/doc/AlbumApi.md
generated
@@ -298,7 +298,7 @@ This endpoint does not need any parameter.
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getAlbumInfo**
|
||||
> AlbumResponseDto getAlbumInfo(id, key)
|
||||
> AlbumResponseDto getAlbumInfo(id, withoutAssets, key)
|
||||
|
||||
|
||||
|
||||
@@ -322,10 +322,11 @@ import 'package:openapi/api.dart';
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final withoutAssets = true; // bool |
|
||||
final key = key_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.getAlbumInfo(id, key);
|
||||
final result = api_instance.getAlbumInfo(id, withoutAssets, key);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
|
||||
@@ -337,6 +338,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
**withoutAssets** | **bool**| | [optional]
|
||||
**key** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
3
mobile/openapi/doc/AlbumResponseDto.md
generated
3
mobile/openapi/doc/AlbumResponseDto.md
generated
@@ -14,12 +14,15 @@ Name | Type | Description | Notes
|
||||
**assets** | [**List<AssetResponseDto>**](AssetResponseDto.md) | | [default to const []]
|
||||
**createdAt** | [**DateTime**](DateTime.md) | |
|
||||
**description** | **String** | |
|
||||
**endDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**hasSharedLink** | **bool** | |
|
||||
**id** | **String** | |
|
||||
**lastModifiedAssetTimestamp** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**owner** | [**UserResponseDto**](UserResponseDto.md) | |
|
||||
**ownerId** | **String** | |
|
||||
**shared** | **bool** | |
|
||||
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | | [default to const []]
|
||||
**startDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedAt** | [**DateTime**](DateTime.md) | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
13
mobile/openapi/lib/api/album_api.dart
generated
13
mobile/openapi/lib/api/album_api.dart
generated
@@ -264,8 +264,10 @@ class AlbumApi {
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] withoutAssets:
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, }) async {
|
||||
Future<Response> getAlbumInfoWithHttpInfo(String id, { bool? withoutAssets, String? key, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
@@ -277,6 +279,9 @@ class AlbumApi {
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (withoutAssets != null) {
|
||||
queryParams.addAll(_queryParams('', 'withoutAssets', withoutAssets));
|
||||
}
|
||||
if (key != null) {
|
||||
queryParams.addAll(_queryParams('', 'key', key));
|
||||
}
|
||||
@@ -299,9 +304,11 @@ class AlbumApi {
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] withoutAssets:
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, }) async {
|
||||
final response = await getAlbumInfoWithHttpInfo(id, key: key, );
|
||||
Future<AlbumResponseDto?> getAlbumInfo(String id, { bool? withoutAssets, String? key, }) async {
|
||||
final response = await getAlbumInfoWithHttpInfo(id, withoutAssets: withoutAssets, key: key, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
44
mobile/openapi/lib/model/album_response_dto.dart
generated
44
mobile/openapi/lib/model/album_response_dto.dart
generated
@@ -19,12 +19,15 @@ class AlbumResponseDto {
|
||||
this.assets = const [],
|
||||
required this.createdAt,
|
||||
required this.description,
|
||||
this.endDate,
|
||||
required this.hasSharedLink,
|
||||
required this.id,
|
||||
this.lastModifiedAssetTimestamp,
|
||||
required this.owner,
|
||||
required this.ownerId,
|
||||
required this.shared,
|
||||
this.sharedUsers = const [],
|
||||
this.startDate,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
@@ -40,6 +43,16 @@ class AlbumResponseDto {
|
||||
|
||||
String description;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
DateTime? endDate;
|
||||
|
||||
bool hasSharedLink;
|
||||
|
||||
String id;
|
||||
|
||||
///
|
||||
@@ -58,6 +71,14 @@ class AlbumResponseDto {
|
||||
|
||||
List<UserResponseDto> sharedUsers;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
DateTime? startDate;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
@@ -68,12 +89,15 @@ class AlbumResponseDto {
|
||||
other.assets == assets &&
|
||||
other.createdAt == createdAt &&
|
||||
other.description == description &&
|
||||
other.endDate == endDate &&
|
||||
other.hasSharedLink == hasSharedLink &&
|
||||
other.id == id &&
|
||||
other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp &&
|
||||
other.owner == owner &&
|
||||
other.ownerId == ownerId &&
|
||||
other.shared == shared &&
|
||||
other.sharedUsers == sharedUsers &&
|
||||
other.startDate == startDate &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
@@ -85,16 +109,19 @@ class AlbumResponseDto {
|
||||
(assets.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(description.hashCode) +
|
||||
(endDate == null ? 0 : endDate!.hashCode) +
|
||||
(hasSharedLink.hashCode) +
|
||||
(id.hashCode) +
|
||||
(lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode) +
|
||||
(owner.hashCode) +
|
||||
(ownerId.hashCode) +
|
||||
(shared.hashCode) +
|
||||
(sharedUsers.hashCode) +
|
||||
(startDate == null ? 0 : startDate!.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, id=$id, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, updatedAt=$updatedAt]';
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, startDate=$startDate, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -108,6 +135,12 @@ class AlbumResponseDto {
|
||||
json[r'assets'] = this.assets;
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
json[r'description'] = this.description;
|
||||
if (this.endDate != null) {
|
||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'endDate'] = null;
|
||||
}
|
||||
json[r'hasSharedLink'] = this.hasSharedLink;
|
||||
json[r'id'] = this.id;
|
||||
if (this.lastModifiedAssetTimestamp != null) {
|
||||
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
|
||||
@@ -118,6 +151,11 @@ class AlbumResponseDto {
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
json[r'shared'] = this.shared;
|
||||
json[r'sharedUsers'] = this.sharedUsers;
|
||||
if (this.startDate != null) {
|
||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'startDate'] = null;
|
||||
}
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
return json;
|
||||
}
|
||||
@@ -136,12 +174,15 @@ class AlbumResponseDto {
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
description: mapValueOfType<String>(json, r'description')!,
|
||||
endDate: mapDateTime(json, r'endDate', ''),
|
||||
hasSharedLink: mapValueOfType<bool>(json, r'hasSharedLink')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', ''),
|
||||
owner: UserResponseDto.fromJson(json[r'owner'])!,
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
shared: mapValueOfType<bool>(json, r'shared')!,
|
||||
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
||||
startDate: mapDateTime(json, r'startDate', ''),
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
@@ -196,6 +237,7 @@ class AlbumResponseDto {
|
||||
'assets',
|
||||
'createdAt',
|
||||
'description',
|
||||
'hasSharedLink',
|
||||
'id',
|
||||
'owner',
|
||||
'ownerId',
|
||||
|
||||
2
mobile/openapi/test/album_api_test.dart
generated
2
mobile/openapi/test/album_api_test.dart
generated
@@ -42,7 +42,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<AlbumResponseDto> getAlbumInfo(String id, { String key }) async
|
||||
//Future<AlbumResponseDto> getAlbumInfo(String id, { bool withoutAssets, String key }) async
|
||||
test('test getAlbumInfo', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
15
mobile/openapi/test/album_response_dto_test.dart
generated
15
mobile/openapi/test/album_response_dto_test.dart
generated
@@ -46,6 +46,16 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DateTime endDate
|
||||
test('to test the property `endDate`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool hasSharedLink
|
||||
test('to test the property `hasSharedLink`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String id
|
||||
test('to test the property `id`', () async {
|
||||
// TODO
|
||||
@@ -76,6 +86,11 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DateTime startDate
|
||||
test('to test the property `startDate`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DateTime updatedAt
|
||||
test('to test the property `updatedAt`', () async {
|
||||
// TODO
|
||||
|
||||
Reference in New Issue
Block a user