rename new API field to albumUsers
This commit is contained in:
Generated
+9
@@ -16,6 +16,8 @@ doc/AddUsersDto.md
|
|||||||
doc/AlbumApi.md
|
doc/AlbumApi.md
|
||||||
doc/AlbumCountResponseDto.md
|
doc/AlbumCountResponseDto.md
|
||||||
doc/AlbumResponseDto.md
|
doc/AlbumResponseDto.md
|
||||||
|
doc/AlbumUserResponseDto.md
|
||||||
|
doc/AlbumUserRole.md
|
||||||
doc/AllJobStatusResponseDto.md
|
doc/AllJobStatusResponseDto.md
|
||||||
doc/AssetApi.md
|
doc/AssetApi.md
|
||||||
doc/AssetBulkDeleteDto.md
|
doc/AssetBulkDeleteDto.md
|
||||||
@@ -185,6 +187,7 @@ doc/TranscodeHWAccel.md
|
|||||||
doc/TranscodePolicy.md
|
doc/TranscodePolicy.md
|
||||||
doc/TrashApi.md
|
doc/TrashApi.md
|
||||||
doc/UpdateAlbumDto.md
|
doc/UpdateAlbumDto.md
|
||||||
|
doc/UpdateAlbumUserDto.md
|
||||||
doc/UpdateAssetDto.md
|
doc/UpdateAssetDto.md
|
||||||
doc/UpdateLibraryDto.md
|
doc/UpdateLibraryDto.md
|
||||||
doc/UpdatePartnerDto.md
|
doc/UpdatePartnerDto.md
|
||||||
@@ -242,6 +245,8 @@ lib/model/activity_statistics_response_dto.dart
|
|||||||
lib/model/add_users_dto.dart
|
lib/model/add_users_dto.dart
|
||||||
lib/model/album_count_response_dto.dart
|
lib/model/album_count_response_dto.dart
|
||||||
lib/model/album_response_dto.dart
|
lib/model/album_response_dto.dart
|
||||||
|
lib/model/album_user_response_dto.dart
|
||||||
|
lib/model/album_user_role.dart
|
||||||
lib/model/all_job_status_response_dto.dart
|
lib/model/all_job_status_response_dto.dart
|
||||||
lib/model/api_key_create_dto.dart
|
lib/model/api_key_create_dto.dart
|
||||||
lib/model/api_key_create_response_dto.dart
|
lib/model/api_key_create_response_dto.dart
|
||||||
@@ -395,6 +400,7 @@ lib/model/tone_mapping.dart
|
|||||||
lib/model/transcode_hw_accel.dart
|
lib/model/transcode_hw_accel.dart
|
||||||
lib/model/transcode_policy.dart
|
lib/model/transcode_policy.dart
|
||||||
lib/model/update_album_dto.dart
|
lib/model/update_album_dto.dart
|
||||||
|
lib/model/update_album_user_dto.dart
|
||||||
lib/model/update_asset_dto.dart
|
lib/model/update_asset_dto.dart
|
||||||
lib/model/update_library_dto.dart
|
lib/model/update_library_dto.dart
|
||||||
lib/model/update_partner_dto.dart
|
lib/model/update_partner_dto.dart
|
||||||
@@ -420,6 +426,8 @@ test/add_users_dto_test.dart
|
|||||||
test/album_api_test.dart
|
test/album_api_test.dart
|
||||||
test/album_count_response_dto_test.dart
|
test/album_count_response_dto_test.dart
|
||||||
test/album_response_dto_test.dart
|
test/album_response_dto_test.dart
|
||||||
|
test/album_user_response_dto_test.dart
|
||||||
|
test/album_user_role_test.dart
|
||||||
test/all_job_status_response_dto_test.dart
|
test/all_job_status_response_dto_test.dart
|
||||||
test/api_key_api_test.dart
|
test/api_key_api_test.dart
|
||||||
test/api_key_create_dto_test.dart
|
test/api_key_create_dto_test.dart
|
||||||
@@ -594,6 +602,7 @@ test/transcode_hw_accel_test.dart
|
|||||||
test/transcode_policy_test.dart
|
test/transcode_policy_test.dart
|
||||||
test/trash_api_test.dart
|
test/trash_api_test.dart
|
||||||
test/update_album_dto_test.dart
|
test/update_album_dto_test.dart
|
||||||
|
test/update_album_user_dto_test.dart
|
||||||
test/update_asset_dto_test.dart
|
test/update_asset_dto_test.dart
|
||||||
test/update_library_dto_test.dart
|
test/update_library_dto_test.dart
|
||||||
test/update_partner_dto_test.dart
|
test/update_partner_dto_test.dart
|
||||||
|
|||||||
Generated
+4
@@ -91,6 +91,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||||
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||||
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||||
|
*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/permission/{userId} |
|
||||||
*AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
|
*AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
|
||||||
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
|
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
|
||||||
@@ -235,6 +236,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [AddUsersDto](doc//AddUsersDto.md)
|
- [AddUsersDto](doc//AddUsersDto.md)
|
||||||
- [AlbumCountResponseDto](doc//AlbumCountResponseDto.md)
|
- [AlbumCountResponseDto](doc//AlbumCountResponseDto.md)
|
||||||
- [AlbumResponseDto](doc//AlbumResponseDto.md)
|
- [AlbumResponseDto](doc//AlbumResponseDto.md)
|
||||||
|
- [AlbumUserResponseDto](doc//AlbumUserResponseDto.md)
|
||||||
|
- [AlbumUserRole](doc//AlbumUserRole.md)
|
||||||
- [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md)
|
- [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md)
|
||||||
- [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md)
|
- [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md)
|
||||||
- [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md)
|
- [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md)
|
||||||
@@ -384,6 +387,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [TranscodeHWAccel](doc//TranscodeHWAccel.md)
|
- [TranscodeHWAccel](doc//TranscodeHWAccel.md)
|
||||||
- [TranscodePolicy](doc//TranscodePolicy.md)
|
- [TranscodePolicy](doc//TranscodePolicy.md)
|
||||||
- [UpdateAlbumDto](doc//UpdateAlbumDto.md)
|
- [UpdateAlbumDto](doc//UpdateAlbumDto.md)
|
||||||
|
- [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md)
|
||||||
- [UpdateAssetDto](doc//UpdateAssetDto.md)
|
- [UpdateAssetDto](doc//UpdateAssetDto.md)
|
||||||
- [UpdateLibraryDto](doc//UpdateLibraryDto.md)
|
- [UpdateLibraryDto](doc//UpdateLibraryDto.md)
|
||||||
- [UpdatePartnerDto](doc//UpdatePartnerDto.md)
|
- [UpdatePartnerDto](doc//UpdatePartnerDto.md)
|
||||||
|
|||||||
Generated
+2
-2
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**albumName** | **String** | |
|
**albumName** | **String** | |
|
||||||
**albumThumbnailAssetId** | **String** | |
|
**albumThumbnailAssetId** | **String** | |
|
||||||
|
**albumUsers** | [**List<AlbumUserResponseDto>**](AlbumUserResponseDto.md) | | [default to const []]
|
||||||
**assetCount** | **int** | |
|
**assetCount** | **int** | |
|
||||||
**assets** | [**List<AssetResponseDto>**](AssetResponseDto.md) | | [default to const []]
|
**assets** | [**List<AssetResponseDto>**](AssetResponseDto.md) | | [default to const []]
|
||||||
**createdAt** | [**DateTime**](DateTime.md) | |
|
**createdAt** | [**DateTime**](DateTime.md) | |
|
||||||
@@ -23,8 +24,7 @@ Name | Type | Description | Notes
|
|||||||
**owner** | [**UserResponseDto**](UserResponseDto.md) | |
|
**owner** | [**UserResponseDto**](UserResponseDto.md) | |
|
||||||
**ownerId** | **String** | |
|
**ownerId** | **String** | |
|
||||||
**shared** | **bool** | |
|
**shared** | **bool** | |
|
||||||
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | Deprecated in favor of sharedUsersV2 | [default to const []]
|
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | Deprecated in favor of albumUsers | [default to const []]
|
||||||
**sharedUsersV2** | [**List<AlbumUserResponseDto>**](AlbumUserResponseDto.md) | | [default to const []]
|
|
||||||
**startDate** | [**DateTime**](DateTime.md) | | [optional]
|
**startDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
**updatedAt** | [**DateTime**](DateTime.md) | |
|
**updatedAt** | [**DateTime**](DateTime.md) | |
|
||||||
|
|
||||||
|
|||||||
Generated
+3
@@ -64,6 +64,8 @@ part 'model/activity_statistics_response_dto.dart';
|
|||||||
part 'model/add_users_dto.dart';
|
part 'model/add_users_dto.dart';
|
||||||
part 'model/album_count_response_dto.dart';
|
part 'model/album_count_response_dto.dart';
|
||||||
part 'model/album_response_dto.dart';
|
part 'model/album_response_dto.dart';
|
||||||
|
part 'model/album_user_response_dto.dart';
|
||||||
|
part 'model/album_user_role.dart';
|
||||||
part 'model/all_job_status_response_dto.dart';
|
part 'model/all_job_status_response_dto.dart';
|
||||||
part 'model/asset_bulk_delete_dto.dart';
|
part 'model/asset_bulk_delete_dto.dart';
|
||||||
part 'model/asset_bulk_update_dto.dart';
|
part 'model/asset_bulk_update_dto.dart';
|
||||||
@@ -213,6 +215,7 @@ part 'model/tone_mapping.dart';
|
|||||||
part 'model/transcode_hw_accel.dart';
|
part 'model/transcode_hw_accel.dart';
|
||||||
part 'model/transcode_policy.dart';
|
part 'model/transcode_policy.dart';
|
||||||
part 'model/update_album_dto.dart';
|
part 'model/update_album_dto.dart';
|
||||||
|
part 'model/update_album_user_dto.dart';
|
||||||
part 'model/update_asset_dto.dart';
|
part 'model/update_asset_dto.dart';
|
||||||
part 'model/update_library_dto.dart';
|
part 'model/update_library_dto.dart';
|
||||||
part 'model/update_partner_dto.dart';
|
part 'model/update_partner_dto.dart';
|
||||||
|
|||||||
Generated
+6
@@ -202,6 +202,10 @@ class ApiClient {
|
|||||||
return AlbumCountResponseDto.fromJson(value);
|
return AlbumCountResponseDto.fromJson(value);
|
||||||
case 'AlbumResponseDto':
|
case 'AlbumResponseDto':
|
||||||
return AlbumResponseDto.fromJson(value);
|
return AlbumResponseDto.fromJson(value);
|
||||||
|
case 'AlbumUserResponseDto':
|
||||||
|
return AlbumUserResponseDto.fromJson(value);
|
||||||
|
case 'AlbumUserRole':
|
||||||
|
return AlbumUserRoleTypeTransformer().decode(value);
|
||||||
case 'AllJobStatusResponseDto':
|
case 'AllJobStatusResponseDto':
|
||||||
return AllJobStatusResponseDto.fromJson(value);
|
return AllJobStatusResponseDto.fromJson(value);
|
||||||
case 'AssetBulkDeleteDto':
|
case 'AssetBulkDeleteDto':
|
||||||
@@ -500,6 +504,8 @@ class ApiClient {
|
|||||||
return TranscodePolicyTypeTransformer().decode(value);
|
return TranscodePolicyTypeTransformer().decode(value);
|
||||||
case 'UpdateAlbumDto':
|
case 'UpdateAlbumDto':
|
||||||
return UpdateAlbumDto.fromJson(value);
|
return UpdateAlbumDto.fromJson(value);
|
||||||
|
case 'UpdateAlbumUserDto':
|
||||||
|
return UpdateAlbumUserDto.fromJson(value);
|
||||||
case 'UpdateAssetDto':
|
case 'UpdateAssetDto':
|
||||||
return UpdateAssetDto.fromJson(value);
|
return UpdateAssetDto.fromJson(value);
|
||||||
case 'UpdateLibraryDto':
|
case 'UpdateLibraryDto':
|
||||||
|
|||||||
+10
-10
@@ -15,6 +15,7 @@ class AlbumResponseDto {
|
|||||||
AlbumResponseDto({
|
AlbumResponseDto({
|
||||||
required this.albumName,
|
required this.albumName,
|
||||||
required this.albumThumbnailAssetId,
|
required this.albumThumbnailAssetId,
|
||||||
|
this.albumUsers = const [],
|
||||||
required this.assetCount,
|
required this.assetCount,
|
||||||
this.assets = const [],
|
this.assets = const [],
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
@@ -29,7 +30,6 @@ class AlbumResponseDto {
|
|||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
required this.shared,
|
required this.shared,
|
||||||
this.sharedUsers = const [],
|
this.sharedUsers = const [],
|
||||||
this.sharedUsersV2 = const [],
|
|
||||||
this.startDate,
|
this.startDate,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
});
|
});
|
||||||
@@ -38,6 +38,8 @@ class AlbumResponseDto {
|
|||||||
|
|
||||||
String? albumThumbnailAssetId;
|
String? albumThumbnailAssetId;
|
||||||
|
|
||||||
|
List<AlbumUserResponseDto> albumUsers;
|
||||||
|
|
||||||
int assetCount;
|
int assetCount;
|
||||||
|
|
||||||
List<AssetResponseDto> assets;
|
List<AssetResponseDto> assets;
|
||||||
@@ -82,11 +84,9 @@ class AlbumResponseDto {
|
|||||||
|
|
||||||
bool shared;
|
bool shared;
|
||||||
|
|
||||||
/// Deprecated in favor of sharedUsersV2
|
/// Deprecated in favor of albumUsers
|
||||||
List<UserResponseDto> sharedUsers;
|
List<UserResponseDto> sharedUsers;
|
||||||
|
|
||||||
List<AlbumUserResponseDto> sharedUsersV2;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@@ -101,6 +101,7 @@ class AlbumResponseDto {
|
|||||||
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
|
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
|
||||||
other.albumName == albumName &&
|
other.albumName == albumName &&
|
||||||
other.albumThumbnailAssetId == albumThumbnailAssetId &&
|
other.albumThumbnailAssetId == albumThumbnailAssetId &&
|
||||||
|
_deepEquality.equals(other.albumUsers, albumUsers) &&
|
||||||
other.assetCount == assetCount &&
|
other.assetCount == assetCount &&
|
||||||
_deepEquality.equals(other.assets, assets) &&
|
_deepEquality.equals(other.assets, assets) &&
|
||||||
other.createdAt == createdAt &&
|
other.createdAt == createdAt &&
|
||||||
@@ -115,7 +116,6 @@ class AlbumResponseDto {
|
|||||||
other.ownerId == ownerId &&
|
other.ownerId == ownerId &&
|
||||||
other.shared == shared &&
|
other.shared == shared &&
|
||||||
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
|
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
|
||||||
_deepEquality.equals(other.sharedUsersV2, sharedUsersV2) &&
|
|
||||||
other.startDate == startDate &&
|
other.startDate == startDate &&
|
||||||
other.updatedAt == updatedAt;
|
other.updatedAt == updatedAt;
|
||||||
|
|
||||||
@@ -124,6 +124,7 @@ class AlbumResponseDto {
|
|||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(albumName.hashCode) +
|
(albumName.hashCode) +
|
||||||
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
|
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
|
||||||
|
(albumUsers.hashCode) +
|
||||||
(assetCount.hashCode) +
|
(assetCount.hashCode) +
|
||||||
(assets.hashCode) +
|
(assets.hashCode) +
|
||||||
(createdAt.hashCode) +
|
(createdAt.hashCode) +
|
||||||
@@ -138,12 +139,11 @@ class AlbumResponseDto {
|
|||||||
(ownerId.hashCode) +
|
(ownerId.hashCode) +
|
||||||
(shared.hashCode) +
|
(shared.hashCode) +
|
||||||
(sharedUsers.hashCode) +
|
(sharedUsers.hashCode) +
|
||||||
(sharedUsersV2.hashCode) +
|
|
||||||
(startDate == null ? 0 : startDate!.hashCode) +
|
(startDate == null ? 0 : startDate!.hashCode) +
|
||||||
(updatedAt.hashCode);
|
(updatedAt.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, sharedUsersV2=$sharedUsersV2, startDate=$startDate, updatedAt=$updatedAt]';
|
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, startDate=$startDate, updatedAt=$updatedAt]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@@ -153,6 +153,7 @@ class AlbumResponseDto {
|
|||||||
} else {
|
} else {
|
||||||
// json[r'albumThumbnailAssetId'] = null;
|
// json[r'albumThumbnailAssetId'] = null;
|
||||||
}
|
}
|
||||||
|
json[r'albumUsers'] = this.albumUsers;
|
||||||
json[r'assetCount'] = this.assetCount;
|
json[r'assetCount'] = this.assetCount;
|
||||||
json[r'assets'] = this.assets;
|
json[r'assets'] = this.assets;
|
||||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||||
@@ -179,7 +180,6 @@ class AlbumResponseDto {
|
|||||||
json[r'ownerId'] = this.ownerId;
|
json[r'ownerId'] = this.ownerId;
|
||||||
json[r'shared'] = this.shared;
|
json[r'shared'] = this.shared;
|
||||||
json[r'sharedUsers'] = this.sharedUsers;
|
json[r'sharedUsers'] = this.sharedUsers;
|
||||||
json[r'sharedUsersV2'] = this.sharedUsersV2;
|
|
||||||
if (this.startDate != null) {
|
if (this.startDate != null) {
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
@@ -199,6 +199,7 @@ class AlbumResponseDto {
|
|||||||
return AlbumResponseDto(
|
return AlbumResponseDto(
|
||||||
albumName: mapValueOfType<String>(json, r'albumName')!,
|
albumName: mapValueOfType<String>(json, r'albumName')!,
|
||||||
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
||||||
|
albumUsers: AlbumUserResponseDto.listFromJson(json[r'albumUsers']),
|
||||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||||
@@ -213,7 +214,6 @@ class AlbumResponseDto {
|
|||||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||||
shared: mapValueOfType<bool>(json, r'shared')!,
|
shared: mapValueOfType<bool>(json, r'shared')!,
|
||||||
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
||||||
sharedUsersV2: AlbumUserResponseDto.listFromJson(json[r'sharedUsersV2']),
|
|
||||||
startDate: mapDateTime(json, r'startDate', r''),
|
startDate: mapDateTime(json, r'startDate', r''),
|
||||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||||
);
|
);
|
||||||
@@ -265,6 +265,7 @@ class AlbumResponseDto {
|
|||||||
static const requiredKeys = <String>{
|
static const requiredKeys = <String>{
|
||||||
'albumName',
|
'albumName',
|
||||||
'albumThumbnailAssetId',
|
'albumThumbnailAssetId',
|
||||||
|
'albumUsers',
|
||||||
'assetCount',
|
'assetCount',
|
||||||
'assets',
|
'assets',
|
||||||
'createdAt',
|
'createdAt',
|
||||||
@@ -276,7 +277,6 @@ class AlbumResponseDto {
|
|||||||
'ownerId',
|
'ownerId',
|
||||||
'shared',
|
'shared',
|
||||||
'sharedUsers',
|
'sharedUsers',
|
||||||
'sharedUsersV2',
|
|
||||||
'updatedAt',
|
'updatedAt',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -26,6 +26,11 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// List<AlbumUserResponseDto> albumUsers (default value: const [])
|
||||||
|
test('to test the property `albumUsers`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
// int assetCount
|
// int assetCount
|
||||||
test('to test the property `assetCount`', () async {
|
test('to test the property `assetCount`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
@@ -91,17 +96,12 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deprecated in favor of sharedUsersV2
|
// Deprecated in favor of albumUsers
|
||||||
// List<UserResponseDto> sharedUsers (default value: const [])
|
// List<UserResponseDto> sharedUsers (default value: const [])
|
||||||
test('to test the property `sharedUsers`', () async {
|
test('to test the property `sharedUsers`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// List<AlbumUserResponseDto> sharedUsersV2 (default value: const [])
|
|
||||||
test('to test the property `sharedUsersV2`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// DateTime startDate
|
// DateTime startDate
|
||||||
test('to test the property `startDate`', () async {
|
test('to test the property `startDate`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@@ -7261,6 +7261,12 @@
|
|||||||
"nullable": true,
|
"nullable": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"albumUsers": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/AlbumUserResponseDto"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
"assetCount": {
|
"assetCount": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@@ -7308,18 +7314,12 @@
|
|||||||
},
|
},
|
||||||
"sharedUsers": {
|
"sharedUsers": {
|
||||||
"deprecated": true,
|
"deprecated": true,
|
||||||
"description": "Deprecated in favor of sharedUsersV2",
|
"description": "Deprecated in favor of albumUsers",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/UserResponseDto"
|
"$ref": "#/components/schemas/UserResponseDto"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"sharedUsersV2": {
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/AlbumUserResponseDto"
|
|
||||||
},
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
"startDate": {
|
"startDate": {
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -7332,6 +7332,7 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"albumName",
|
"albumName",
|
||||||
"albumThumbnailAssetId",
|
"albumThumbnailAssetId",
|
||||||
|
"albumUsers",
|
||||||
"assetCount",
|
"assetCount",
|
||||||
"assets",
|
"assets",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
@@ -7343,7 +7344,6 @@
|
|||||||
"ownerId",
|
"ownerId",
|
||||||
"shared",
|
"shared",
|
||||||
"sharedUsers",
|
"sharedUsers",
|
||||||
"sharedUsersV2",
|
|
||||||
"updatedAt"
|
"updatedAt"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
|||||||
@@ -38,6 +38,28 @@ export type ActivityCreateDto = {
|
|||||||
export type ActivityStatisticsResponseDto = {
|
export type ActivityStatisticsResponseDto = {
|
||||||
comments: number;
|
comments: number;
|
||||||
};
|
};
|
||||||
|
export type UserResponseDto = {
|
||||||
|
avatarColor: UserAvatarColor;
|
||||||
|
createdAt: string;
|
||||||
|
deletedAt: string | null;
|
||||||
|
email: string;
|
||||||
|
id: string;
|
||||||
|
isAdmin: boolean;
|
||||||
|
memoriesEnabled?: boolean;
|
||||||
|
name: string;
|
||||||
|
oauthId: string;
|
||||||
|
profileImagePath: string;
|
||||||
|
quotaSizeInBytes: number | null;
|
||||||
|
quotaUsageInBytes: number | null;
|
||||||
|
shouldChangePassword: boolean;
|
||||||
|
status: UserStatus;
|
||||||
|
storageLabel: string | null;
|
||||||
|
updatedAt: string;
|
||||||
|
};
|
||||||
|
export type AlbumUserResponseDto = {
|
||||||
|
role: AlbumUserRole;
|
||||||
|
user: UserResponseDto;
|
||||||
|
};
|
||||||
export type ExifResponseDto = {
|
export type ExifResponseDto = {
|
||||||
city?: string | null;
|
city?: string | null;
|
||||||
country?: string | null;
|
country?: string | null;
|
||||||
@@ -61,24 +83,6 @@ export type ExifResponseDto = {
|
|||||||
state?: string | null;
|
state?: string | null;
|
||||||
timeZone?: string | null;
|
timeZone?: string | null;
|
||||||
};
|
};
|
||||||
export type UserResponseDto = {
|
|
||||||
avatarColor: UserAvatarColor;
|
|
||||||
createdAt: string;
|
|
||||||
deletedAt: string | null;
|
|
||||||
email: string;
|
|
||||||
id: string;
|
|
||||||
isAdmin: boolean;
|
|
||||||
memoriesEnabled?: boolean;
|
|
||||||
name: string;
|
|
||||||
oauthId: string;
|
|
||||||
profileImagePath: string;
|
|
||||||
quotaSizeInBytes: number | null;
|
|
||||||
quotaUsageInBytes: number | null;
|
|
||||||
shouldChangePassword: boolean;
|
|
||||||
status: UserStatus;
|
|
||||||
storageLabel: string | null;
|
|
||||||
updatedAt: string;
|
|
||||||
};
|
|
||||||
export type AssetFaceWithoutPersonResponseDto = {
|
export type AssetFaceWithoutPersonResponseDto = {
|
||||||
boundingBoxX1: number;
|
boundingBoxX1: number;
|
||||||
boundingBoxX2: number;
|
boundingBoxX2: number;
|
||||||
@@ -141,13 +145,10 @@ export type AssetResponseDto = {
|
|||||||
"type": AssetTypeEnum;
|
"type": AssetTypeEnum;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
};
|
};
|
||||||
export type AlbumUserResponseDto = {
|
|
||||||
role: AlbumUserRole;
|
|
||||||
user: UserResponseDto;
|
|
||||||
};
|
|
||||||
export type AlbumResponseDto = {
|
export type AlbumResponseDto = {
|
||||||
albumName: string;
|
albumName: string;
|
||||||
albumThumbnailAssetId: string | null;
|
albumThumbnailAssetId: string | null;
|
||||||
|
albumUsers: AlbumUserResponseDto[];
|
||||||
assetCount: number;
|
assetCount: number;
|
||||||
assets: AssetResponseDto[];
|
assets: AssetResponseDto[];
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
@@ -161,9 +162,8 @@ export type AlbumResponseDto = {
|
|||||||
owner: UserResponseDto;
|
owner: UserResponseDto;
|
||||||
ownerId: string;
|
ownerId: string;
|
||||||
shared: boolean;
|
shared: boolean;
|
||||||
/** Deprecated in favor of sharedUsersV2 */
|
/** Deprecated in favor of albumUsers */
|
||||||
sharedUsers: UserResponseDto[];
|
sharedUsers: UserResponseDto[];
|
||||||
sharedUsersV2: AlbumUserResponseDto[];
|
|
||||||
startDate?: string;
|
startDate?: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
};
|
};
|
||||||
@@ -2920,6 +2920,10 @@ export enum UserAvatarColor {
|
|||||||
Gray = "gray",
|
Gray = "gray",
|
||||||
Amber = "amber"
|
Amber = "amber"
|
||||||
}
|
}
|
||||||
|
export enum AlbumUserRole {
|
||||||
|
Editor = "editor",
|
||||||
|
Viewer = "viewer"
|
||||||
|
}
|
||||||
export enum UserStatus {
|
export enum UserStatus {
|
||||||
Active = "active",
|
Active = "active",
|
||||||
Removing = "removing",
|
Removing = "removing",
|
||||||
@@ -2940,10 +2944,6 @@ export enum AssetOrder {
|
|||||||
Asc = "asc",
|
Asc = "asc",
|
||||||
Desc = "desc"
|
Desc = "desc"
|
||||||
}
|
}
|
||||||
export enum AlbumUserRole {
|
|
||||||
Editor = "editor",
|
|
||||||
Viewer = "viewer"
|
|
||||||
}
|
|
||||||
export enum Error {
|
export enum Error {
|
||||||
Duplicate = "duplicate",
|
Duplicate = "duplicate",
|
||||||
NoPermission = "no_permission",
|
NoPermission = "no_permission",
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ export class AlbumResponseDto {
|
|||||||
updatedAt!: Date;
|
updatedAt!: Date;
|
||||||
albumThumbnailAssetId!: string | null;
|
albumThumbnailAssetId!: string | null;
|
||||||
shared!: boolean;
|
shared!: boolean;
|
||||||
@ApiProperty({ deprecated: true, description: 'Deprecated in favor of sharedUsersV2' })
|
@ApiProperty({ deprecated: true, description: 'Deprecated in favor of albumUsers' })
|
||||||
sharedUsers!: UserResponseDto[];
|
sharedUsers!: UserResponseDto[];
|
||||||
sharedUsersV2!: AlbumUserResponseDto[];
|
albumUsers!: AlbumUserResponseDto[];
|
||||||
hasSharedLink!: boolean;
|
hasSharedLink!: boolean;
|
||||||
assets!: AssetResponseDto[];
|
assets!: AssetResponseDto[];
|
||||||
owner!: UserResponseDto;
|
owner!: UserResponseDto;
|
||||||
@@ -158,7 +158,7 @@ export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDt
|
|||||||
ownerId: entity.ownerId,
|
ownerId: entity.ownerId,
|
||||||
owner: mapUser(entity.owner),
|
owner: mapUser(entity.owner),
|
||||||
sharedUsers,
|
sharedUsers,
|
||||||
sharedUsersV2,
|
albumUsers: sharedUsersV2,
|
||||||
shared: hasSharedUser || hasSharedLink,
|
shared: hasSharedUser || hasSharedLink,
|
||||||
hasSharedLink,
|
hasSharedLink,
|
||||||
startDate,
|
startDate,
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ const albumResponse: AlbumResponseDto = {
|
|||||||
ownerId: 'admin_id',
|
ownerId: 'admin_id',
|
||||||
owner: mapUser(userStub.admin),
|
owner: mapUser(userStub.admin),
|
||||||
sharedUsers: [],
|
sharedUsers: [],
|
||||||
sharedUsersV2: [],
|
albumUsers: [],
|
||||||
shared: false,
|
shared: false,
|
||||||
hasSharedLink: false,
|
hasSharedLink: false,
|
||||||
assets: [],
|
assets: [],
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<p class="text-sm">Owner</p>
|
<p class="text-sm">Owner</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#each album.sharedUsersV2.toSorted((a, b) => {
|
{#each album.albumUsers.toSorted((a, b) => {
|
||||||
if (a.role === AlbumUserRole.Viewer && b.role === AlbumUserRole.Editor) {
|
if (a.role === AlbumUserRole.Viewer && b.role === AlbumUserRole.Editor) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,8 +137,8 @@
|
|||||||
$: showActivityStatus =
|
$: showActivityStatus =
|
||||||
album.sharedUsers.length > 0 && !$showAssetViewer && (album.isActivityEnabled || $numberOfComments > 0);
|
album.sharedUsers.length > 0 && !$showAssetViewer && (album.isActivityEnabled || $numberOfComments > 0);
|
||||||
|
|
||||||
$: isEditor = album.sharedUsersV2.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor;
|
$: isEditor = album.albumUsers.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor;
|
||||||
$: albumHasViewers = album.sharedUsersV2.some(({ role }) => role === AlbumUserRole.Viewer);
|
$: albumHasViewers = album.albumUsers.some(({ role }) => role === AlbumUserRole.Viewer);
|
||||||
|
|
||||||
afterNavigate(({ from }) => {
|
afterNavigate(({ from }) => {
|
||||||
assetViewingStore.showAssetViewer(false);
|
assetViewingStore.showAssetViewer(false);
|
||||||
@@ -585,7 +585,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- users with write access (collaborators) -->
|
<!-- users with write access (collaborators) -->
|
||||||
{#each album.sharedUsersV2.filter(({ role }) => role === AlbumUserRole.Editor) as { user } (user.id)}
|
{#each album.albumUsers.filter(({ role }) => role === AlbumUserRole.Editor) as { user } (user.id)}
|
||||||
<button on:click={() => (viewMode = ViewMode.VIEW_USERS)}>
|
<button on:click={() => (viewMode = ViewMode.VIEW_USERS)}>
|
||||||
<UserAvatar {user} size="md" />
|
<UserAvatar {user} size="md" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const albumFactory = Sync.makeFactory<AlbumResponseDto>({
|
|||||||
owner: userFactory.build(),
|
owner: userFactory.build(),
|
||||||
shared: false,
|
shared: false,
|
||||||
sharedUsers: [],
|
sharedUsers: [],
|
||||||
sharedUsersV2: [],
|
albumUsers: [],
|
||||||
hasSharedLink: false,
|
hasSharedLink: false,
|
||||||
isActivityEnabled: true,
|
isActivityEnabled: true,
|
||||||
order: AssetOrder.Desc,
|
order: AssetOrder.Desc,
|
||||||
|
|||||||
Reference in New Issue
Block a user