mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
refactor(server): album controller (#2539)
* refactor: album controller/service * chore: open-api * fix: tests
This commit is contained in:
parent
a1f1e5bc37
commit
49b74e9091
10 changed files with 339 additions and 407 deletions
16
mobile/openapi/README.md
generated
16
mobile/openapi/README.md
generated
|
@ -77,18 +77,18 @@ Class | Method | HTTP request | Description
|
||||||
*APIKeyApi* | [**getKey**](doc//APIKeyApi.md#getkey) | **GET** /api-key/{id} |
|
*APIKeyApi* | [**getKey**](doc//APIKeyApi.md#getkey) | **GET** /api-key/{id} |
|
||||||
*APIKeyApi* | [**getKeys**](doc//APIKeyApi.md#getkeys) | **GET** /api-key |
|
*APIKeyApi* | [**getKeys**](doc//APIKeyApi.md#getkeys) | **GET** /api-key |
|
||||||
*APIKeyApi* | [**updateKey**](doc//APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
|
*APIKeyApi* | [**updateKey**](doc//APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
|
||||||
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
|
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
|
||||||
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
|
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
|
||||||
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
|
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
|
||||||
*AlbumApi* | [**createAlbumSharedLink**](doc//AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
*AlbumApi* | [**createAlbumSharedLink**](doc//AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
||||||
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
|
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
|
||||||
*AlbumApi* | [**downloadArchive**](doc//AlbumApi.md#downloadarchive) | **GET** /album/{albumId}/download |
|
*AlbumApi* | [**downloadArchive**](doc//AlbumApi.md#downloadarchive) | **GET** /album/{id}/download |
|
||||||
*AlbumApi* | [**getAlbumCountByUserId**](doc//AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
*AlbumApi* | [**getAlbumCountByUserId**](doc//AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
||||||
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
|
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
|
||||||
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
|
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
|
||||||
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
|
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||||
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
|
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||||
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
|
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||||
*AssetApi* | [**addAssetsToSharedLink**](doc//AssetApi.md#addassetstosharedlink) | **PATCH** /asset/shared-link/add |
|
*AssetApi* | [**addAssetsToSharedLink**](doc//AssetApi.md#addassetstosharedlink) | **PATCH** /asset/shared-link/add |
|
||||||
*AssetApi* | [**checkDuplicateAsset**](doc//AssetApi.md#checkduplicateasset) | **POST** /asset/check |
|
*AssetApi* | [**checkDuplicateAsset**](doc//AssetApi.md#checkduplicateasset) | **POST** /asset/check |
|
||||||
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
|
|
80
mobile/openapi/doc/AlbumApi.md
generated
80
mobile/openapi/doc/AlbumApi.md
generated
|
@ -9,22 +9,22 @@ All URIs are relative to */api*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**addAssetsToAlbum**](AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
|
[**addAssetsToAlbum**](AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
|
||||||
[**addUsersToAlbum**](AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
|
[**addUsersToAlbum**](AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
|
||||||
[**createAlbum**](AlbumApi.md#createalbum) | **POST** /album |
|
[**createAlbum**](AlbumApi.md#createalbum) | **POST** /album |
|
||||||
[**createAlbumSharedLink**](AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
[**createAlbumSharedLink**](AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
||||||
[**deleteAlbum**](AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
|
[**deleteAlbum**](AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
|
||||||
[**downloadArchive**](AlbumApi.md#downloadarchive) | **GET** /album/{albumId}/download |
|
[**downloadArchive**](AlbumApi.md#downloadarchive) | **GET** /album/{id}/download |
|
||||||
[**getAlbumCountByUserId**](AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
[**getAlbumCountByUserId**](AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
||||||
[**getAlbumInfo**](AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
|
[**getAlbumInfo**](AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
|
||||||
[**getAllAlbums**](AlbumApi.md#getallalbums) | **GET** /album |
|
[**getAllAlbums**](AlbumApi.md#getallalbums) | **GET** /album |
|
||||||
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
|
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||||
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
|
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||||
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
|
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||||
|
|
||||||
|
|
||||||
# **addAssetsToAlbum**
|
# **addAssetsToAlbum**
|
||||||
> AddAssetsResponseDto addAssetsToAlbum(albumId, addAssetsDto, key)
|
> AddAssetsResponseDto addAssetsToAlbum(id, addAssetsDto, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,12 +47,12 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
|
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
|
||||||
final key = key_example; // String |
|
final key = key_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto, key);
|
final result = api_instance.addAssetsToAlbum(id, addAssetsDto, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
|
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
|
||||||
|
@ -63,7 +63,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**addAssetsDto** | [**AddAssetsDto**](AddAssetsDto.md)| |
|
**addAssetsDto** | [**AddAssetsDto**](AddAssetsDto.md)| |
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ Name | Type | Description | Notes
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **addUsersToAlbum**
|
# **addUsersToAlbum**
|
||||||
> AlbumResponseDto addUsersToAlbum(albumId, addUsersDto)
|
> AlbumResponseDto addUsersToAlbum(id, addUsersDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,11 +106,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final addUsersDto = AddUsersDto(); // AddUsersDto |
|
final addUsersDto = AddUsersDto(); // AddUsersDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.addUsersToAlbum(albumId, addUsersDto);
|
final result = api_instance.addUsersToAlbum(id, addUsersDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->addUsersToAlbum: $e\n');
|
print('Exception when calling AlbumApi->addUsersToAlbum: $e\n');
|
||||||
|
@ -121,7 +121,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**addUsersDto** | [**AddUsersDto**](AddUsersDto.md)| |
|
**addUsersDto** | [**AddUsersDto**](AddUsersDto.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -250,7 +250,7 @@ Name | Type | Description | Notes
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **deleteAlbum**
|
# **deleteAlbum**
|
||||||
> deleteAlbum(albumId)
|
> deleteAlbum(id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -273,10 +273,10 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
api_instance.deleteAlbum(albumId);
|
api_instance.deleteAlbum(id);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->deleteAlbum: $e\n');
|
print('Exception when calling AlbumApi->deleteAlbum: $e\n');
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ void (empty response body)
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **downloadArchive**
|
# **downloadArchive**
|
||||||
> MultipartFile downloadArchive(albumId, name, skip, key)
|
> MultipartFile downloadArchive(id, name, skip, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -327,13 +327,13 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final name = name_example; // String |
|
final name = name_example; // String |
|
||||||
final skip = 8.14; // num |
|
final skip = 8.14; // num |
|
||||||
final key = key_example; // String |
|
final key = key_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.downloadArchive(albumId, name, skip, key);
|
final result = api_instance.downloadArchive(id, name, skip, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->downloadArchive: $e\n');
|
print('Exception when calling AlbumApi->downloadArchive: $e\n');
|
||||||
|
@ -344,7 +344,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**name** | **String**| | [optional]
|
**name** | **String**| | [optional]
|
||||||
**skip** | **num**| | [optional]
|
**skip** | **num**| | [optional]
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
@ -416,7 +416,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)
|
[[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**
|
# **getAlbumInfo**
|
||||||
> AlbumResponseDto getAlbumInfo(albumId, key)
|
> AlbumResponseDto getAlbumInfo(id, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -439,11 +439,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final key = key_example; // String |
|
final key = key_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getAlbumInfo(albumId, key);
|
final result = api_instance.getAlbumInfo(id, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
|
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
|
||||||
|
@ -454,7 +454,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -530,7 +530,7 @@ Name | Type | Description | Notes
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **removeAssetFromAlbum**
|
# **removeAssetFromAlbum**
|
||||||
> AlbumResponseDto removeAssetFromAlbum(albumId, removeAssetsDto)
|
> AlbumResponseDto removeAssetFromAlbum(id, removeAssetsDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -553,11 +553,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
|
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
|
final result = api_instance.removeAssetFromAlbum(id, removeAssetsDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
|
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
|
||||||
|
@ -568,7 +568,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**removeAssetsDto** | [**RemoveAssetsDto**](RemoveAssetsDto.md)| |
|
**removeAssetsDto** | [**RemoveAssetsDto**](RemoveAssetsDto.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -587,7 +587,7 @@ Name | Type | Description | Notes
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **removeUserFromAlbum**
|
# **removeUserFromAlbum**
|
||||||
> removeUserFromAlbum(albumId, userId)
|
> removeUserFromAlbum(id, userId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -610,11 +610,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final userId = userId_example; // String |
|
final userId = userId_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
api_instance.removeUserFromAlbum(albumId, userId);
|
api_instance.removeUserFromAlbum(id, userId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->removeUserFromAlbum: $e\n');
|
print('Exception when calling AlbumApi->removeUserFromAlbum: $e\n');
|
||||||
}
|
}
|
||||||
|
@ -624,7 +624,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**userId** | **String**| |
|
**userId** | **String**| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -643,7 +643,7 @@ void (empty response body)
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **updateAlbumInfo**
|
# **updateAlbumInfo**
|
||||||
> AlbumResponseDto updateAlbumInfo(albumId, updateAlbumDto)
|
> AlbumResponseDto updateAlbumInfo(id, updateAlbumDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -666,11 +666,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AlbumApi();
|
final api_instance = AlbumApi();
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final updateAlbumDto = UpdateAlbumDto(); // UpdateAlbumDto |
|
final updateAlbumDto = UpdateAlbumDto(); // UpdateAlbumDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.updateAlbumInfo(albumId, updateAlbumDto);
|
final result = api_instance.updateAlbumInfo(id, updateAlbumDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AlbumApi->updateAlbumInfo: $e\n');
|
print('Exception when calling AlbumApi->updateAlbumInfo: $e\n');
|
||||||
|
@ -681,7 +681,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**albumId** | **String**| |
|
**id** | **String**| |
|
||||||
**updateAlbumDto** | [**UpdateAlbumDto**](UpdateAlbumDto.md)| |
|
**updateAlbumDto** | [**UpdateAlbumDto**](UpdateAlbumDto.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
128
mobile/openapi/lib/api/album_api.dart
generated
128
mobile/openapi/lib/api/album_api.dart
generated
|
@ -16,18 +16,18 @@ class AlbumApi {
|
||||||
|
|
||||||
final ApiClient apiClient;
|
final ApiClient apiClient;
|
||||||
|
|
||||||
/// Performs an HTTP 'PUT /album/{albumId}/assets' operation and returns the [Response].
|
/// Performs an HTTP 'PUT /album/{id}/assets' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [AddAssetsDto] addAssetsDto (required):
|
/// * [AddAssetsDto] addAssetsDto (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> addAssetsToAlbumWithHttpInfo(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
|
Future<Response> addAssetsToAlbumWithHttpInfo(String id, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}/assets'
|
final path = r'/album/{id}/assets'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody = addAssetsDto;
|
Object? postBody = addAssetsDto;
|
||||||
|
@ -56,13 +56,13 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [AddAssetsDto] addAssetsDto (required):
|
/// * [AddAssetsDto] addAssetsDto (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<AddAssetsResponseDto?> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
|
Future<AddAssetsResponseDto?> addAssetsToAlbum(String id, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||||
final response = await addAssetsToAlbumWithHttpInfo(albumId, addAssetsDto, key: key, );
|
final response = await addAssetsToAlbumWithHttpInfo(id, addAssetsDto, key: key, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
@ -76,16 +76,16 @@ class AlbumApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'PUT /album/{albumId}/users' operation and returns the [Response].
|
/// Performs an HTTP 'PUT /album/{id}/users' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [AddUsersDto] addUsersDto (required):
|
/// * [AddUsersDto] addUsersDto (required):
|
||||||
Future<Response> addUsersToAlbumWithHttpInfo(String albumId, AddUsersDto addUsersDto,) async {
|
Future<Response> addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}/users'
|
final path = r'/album/{id}/users'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody = addUsersDto;
|
Object? postBody = addUsersDto;
|
||||||
|
@ -110,11 +110,11 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [AddUsersDto] addUsersDto (required):
|
/// * [AddUsersDto] addUsersDto (required):
|
||||||
Future<AlbumResponseDto?> addUsersToAlbum(String albumId, AddUsersDto addUsersDto,) async {
|
Future<AlbumResponseDto?> addUsersToAlbum(String id, AddUsersDto addUsersDto,) async {
|
||||||
final response = await addUsersToAlbumWithHttpInfo(albumId, addUsersDto,);
|
final response = await addUsersToAlbumWithHttpInfo(id, addUsersDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
@ -222,14 +222,14 @@ class AlbumApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'DELETE /album/{albumId}' operation and returns the [Response].
|
/// Performs an HTTP 'DELETE /album/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
Future<Response> deleteAlbumWithHttpInfo(String albumId,) async {
|
Future<Response> deleteAlbumWithHttpInfo(String id,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}'
|
final path = r'/album/{id}'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -254,28 +254,28 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
Future<void> deleteAlbum(String albumId,) async {
|
Future<void> deleteAlbum(String id,) async {
|
||||||
final response = await deleteAlbumWithHttpInfo(albumId,);
|
final response = await deleteAlbumWithHttpInfo(id,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /album/{albumId}/download' operation and returns the [Response].
|
/// Performs an HTTP 'GET /album/{id}/download' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] name:
|
/// * [String] name:
|
||||||
///
|
///
|
||||||
/// * [num] skip:
|
/// * [num] skip:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> downloadArchiveWithHttpInfo(String albumId, { String? name, num? skip, String? key, }) async {
|
Future<Response> downloadArchiveWithHttpInfo(String id, { String? name, num? skip, String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}/download'
|
final path = r'/album/{id}/download'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -310,15 +310,15 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] name:
|
/// * [String] name:
|
||||||
///
|
///
|
||||||
/// * [num] skip:
|
/// * [num] skip:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<MultipartFile?> downloadArchive(String albumId, { String? name, num? skip, String? key, }) async {
|
Future<MultipartFile?> downloadArchive(String id, { String? name, num? skip, String? key, }) async {
|
||||||
final response = await downloadArchiveWithHttpInfo(albumId, name: name, skip: skip, key: key, );
|
final response = await downloadArchiveWithHttpInfo(id, name: name, skip: skip, key: key, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
@ -373,16 +373,16 @@ class AlbumApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /album/{albumId}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /album/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> getAlbumInfoWithHttpInfo(String albumId, { String? key, }) async {
|
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}'
|
final path = r'/album/{id}'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -411,11 +411,11 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<AlbumResponseDto?> getAlbumInfo(String albumId, { String? key, }) async {
|
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, }) async {
|
||||||
final response = await getAlbumInfoWithHttpInfo(albumId, key: key, );
|
final response = await getAlbumInfoWithHttpInfo(id, key: key, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
@ -492,16 +492,16 @@ class AlbumApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'DELETE /album/{albumId}/assets' operation and returns the [Response].
|
/// Performs an HTTP 'DELETE /album/{id}/assets' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
||||||
Future<Response> removeAssetFromAlbumWithHttpInfo(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
Future<Response> removeAssetFromAlbumWithHttpInfo(String id, RemoveAssetsDto removeAssetsDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}/assets'
|
final path = r'/album/{id}/assets'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody = removeAssetsDto;
|
Object? postBody = removeAssetsDto;
|
||||||
|
@ -526,11 +526,11 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
||||||
Future<AlbumResponseDto?> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
Future<AlbumResponseDto?> removeAssetFromAlbum(String id, RemoveAssetsDto removeAssetsDto,) async {
|
||||||
final response = await removeAssetFromAlbumWithHttpInfo(albumId, removeAssetsDto,);
|
final response = await removeAssetFromAlbumWithHttpInfo(id, removeAssetsDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
@ -544,16 +544,16 @@ class AlbumApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'DELETE /album/{albumId}/user/{userId}' operation and returns the [Response].
|
/// Performs an HTTP 'DELETE /album/{id}/user/{userId}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] userId (required):
|
/// * [String] userId (required):
|
||||||
Future<Response> removeUserFromAlbumWithHttpInfo(String albumId, String userId,) async {
|
Future<Response> removeUserFromAlbumWithHttpInfo(String id, String userId,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}/user/{userId}'
|
final path = r'/album/{id}/user/{userId}'
|
||||||
.replaceAll('{albumId}', albumId)
|
.replaceAll('{id}', id)
|
||||||
.replaceAll('{userId}', userId);
|
.replaceAll('{userId}', userId);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
|
@ -579,26 +579,26 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] userId (required):
|
/// * [String] userId (required):
|
||||||
Future<void> removeUserFromAlbum(String albumId, String userId,) async {
|
Future<void> removeUserFromAlbum(String id, String userId,) async {
|
||||||
final response = await removeUserFromAlbumWithHttpInfo(albumId, userId,);
|
final response = await removeUserFromAlbumWithHttpInfo(id, userId,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'PATCH /album/{albumId}' operation and returns the [Response].
|
/// Performs an HTTP 'PATCH /album/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
||||||
Future<Response> updateAlbumInfoWithHttpInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
|
Future<Response> updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/album/{albumId}'
|
final path = r'/album/{id}'
|
||||||
.replaceAll('{albumId}', albumId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody = updateAlbumDto;
|
Object? postBody = updateAlbumDto;
|
||||||
|
@ -623,11 +623,11 @@ class AlbumApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] albumId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
||||||
Future<AlbumResponseDto?> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
|
Future<AlbumResponseDto?> updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto,) async {
|
||||||
final response = await updateAlbumInfoWithHttpInfo(albumId, updateAlbumDto,);
|
final response = await updateAlbumInfoWithHttpInfo(id, updateAlbumDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
|
16
mobile/openapi/test/album_api_test.dart
generated
16
mobile/openapi/test/album_api_test.dart
generated
|
@ -17,12 +17,12 @@ void main() {
|
||||||
// final instance = AlbumApi();
|
// final instance = AlbumApi();
|
||||||
|
|
||||||
group('tests for AlbumApi', () {
|
group('tests for AlbumApi', () {
|
||||||
//Future<AddAssetsResponseDto> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto, { String key }) async
|
//Future<AddAssetsResponseDto> addAssetsToAlbum(String id, AddAssetsDto addAssetsDto, { String key }) async
|
||||||
test('test addAssetsToAlbum', () async {
|
test('test addAssetsToAlbum', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<AlbumResponseDto> addUsersToAlbum(String albumId, AddUsersDto addUsersDto) async
|
//Future<AlbumResponseDto> addUsersToAlbum(String id, AddUsersDto addUsersDto) async
|
||||||
test('test addUsersToAlbum', () async {
|
test('test addUsersToAlbum', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -37,12 +37,12 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future deleteAlbum(String albumId) async
|
//Future deleteAlbum(String id) async
|
||||||
test('test deleteAlbum', () async {
|
test('test deleteAlbum', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<MultipartFile> downloadArchive(String albumId, { String name, num skip, String key }) async
|
//Future<MultipartFile> downloadArchive(String id, { String name, num skip, String key }) async
|
||||||
test('test downloadArchive', () async {
|
test('test downloadArchive', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,7 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<AlbumResponseDto> getAlbumInfo(String albumId, { String key }) async
|
//Future<AlbumResponseDto> getAlbumInfo(String id, { String key }) async
|
||||||
test('test getAlbumInfo', () async {
|
test('test getAlbumInfo', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -62,17 +62,17 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<AlbumResponseDto> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto) async
|
//Future<AlbumResponseDto> removeAssetFromAlbum(String id, RemoveAssetsDto removeAssetsDto) async
|
||||||
test('test removeAssetFromAlbum', () async {
|
test('test removeAssetFromAlbum', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future removeUserFromAlbum(String albumId, String userId) async
|
//Future removeUserFromAlbum(String id, String userId) async
|
||||||
test('test removeUserFromAlbum', () async {
|
test('test removeUserFromAlbum', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<AlbumResponseDto> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto) async
|
//Future<AlbumResponseDto> updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto) async
|
||||||
test('test updateAlbumInfo', () async {
|
test('test updateAlbumInfo', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,124 +20,112 @@ import {
|
||||||
} from '../../constants/download.constant';
|
} from '../../constants/download.constant';
|
||||||
import { DownloadDto } from '../asset/dto/download-library.dto';
|
import { DownloadDto } from '../asset/dto/download-library.dto';
|
||||||
import { CreateAlbumShareLinkDto as CreateAlbumSharedLinkDto } from './dto/create-album-shared-link.dto';
|
import { CreateAlbumShareLinkDto as CreateAlbumSharedLinkDto } from './dto/create-album-shared-link.dto';
|
||||||
import { AlbumIdDto } from './dto/album-id.dto';
|
|
||||||
import { UseValidation } from '../../decorators/use-validation.decorator';
|
import { UseValidation } from '../../decorators/use-validation.decorator';
|
||||||
|
import { UUIDParamDto } from '../../controllers/dto/uuid-param.dto';
|
||||||
|
import { DownloadArchive } from '../../modules/download/download.service';
|
||||||
|
|
||||||
|
const handleDownload = (download: DownloadArchive, res: Res) => {
|
||||||
|
res.attachment(download.fileName);
|
||||||
|
res.setHeader(IMMICH_CONTENT_LENGTH_HINT, download.fileSize);
|
||||||
|
res.setHeader(IMMICH_ARCHIVE_FILE_COUNT, download.fileCount);
|
||||||
|
res.setHeader(IMMICH_ARCHIVE_COMPLETE, `${download.complete}`);
|
||||||
|
return download.stream;
|
||||||
|
};
|
||||||
|
|
||||||
@ApiTags('Album')
|
@ApiTags('Album')
|
||||||
@Controller('album')
|
@Controller('album')
|
||||||
@UseValidation()
|
@UseValidation()
|
||||||
export class AlbumController {
|
export class AlbumController {
|
||||||
constructor(private readonly albumService: AlbumService) {}
|
constructor(private readonly service: AlbumService) {}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Get('count-by-user-id')
|
@Get('count-by-user-id')
|
||||||
async getAlbumCountByUserId(@GetAuthUser() authUser: AuthUserDto): Promise<AlbumCountResponseDto> {
|
getAlbumCountByUserId(@GetAuthUser() authUser: AuthUserDto): Promise<AlbumCountResponseDto> {
|
||||||
return this.albumService.getAlbumCountByUserId(authUser);
|
return this.service.getCountByUserId(authUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Post()
|
@Post()
|
||||||
async createAlbum(@GetAuthUser() authUser: AuthUserDto, @Body() createAlbumDto: CreateAlbumDto) {
|
createAlbum(@GetAuthUser() authUser: AuthUserDto, @Body() dto: CreateAlbumDto) {
|
||||||
// TODO: Handle nonexistent sharedWithUserIds and assetIds.
|
// TODO: Handle nonexistent sharedWithUserIds and assetIds.
|
||||||
return this.albumService.create(authUser, createAlbumDto);
|
return this.service.create(authUser, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Put('/:albumId/users')
|
@Put(':id/users')
|
||||||
async addUsersToAlbum(
|
addUsersToAlbum(@GetAuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto, @Body() dto: AddUsersDto) {
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
|
||||||
@Body() addUsersDto: AddUsersDto,
|
|
||||||
@Param() { albumId }: AlbumIdDto,
|
|
||||||
) {
|
|
||||||
// TODO: Handle nonexistent sharedUserIds.
|
// TODO: Handle nonexistent sharedUserIds.
|
||||||
return this.albumService.addUsersToAlbum(authUser, addUsersDto, albumId);
|
return this.service.addUsers(authUser, id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated({ isShared: true })
|
@Authenticated({ isShared: true })
|
||||||
@Put('/:albumId/assets')
|
@Put(':id/assets')
|
||||||
async addAssetsToAlbum(
|
addAssetsToAlbum(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Body() addAssetsDto: AddAssetsDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Param() { albumId }: AlbumIdDto,
|
@Body() dto: AddAssetsDto,
|
||||||
): Promise<AddAssetsResponseDto> {
|
): Promise<AddAssetsResponseDto> {
|
||||||
// TODO: Handle nonexistent assetIds.
|
// TODO: Handle nonexistent assetIds.
|
||||||
// TODO: Disallow adding assets of another user to an album.
|
// TODO: Disallow adding assets of another user to an album.
|
||||||
return this.albumService.addAssetsToAlbum(authUser, addAssetsDto, albumId);
|
return this.service.addAssets(authUser, id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated({ isShared: true })
|
@Authenticated({ isShared: true })
|
||||||
@Get('/:albumId')
|
@Get(':id')
|
||||||
async getAlbumInfo(@GetAuthUser() authUser: AuthUserDto, @Param() { albumId }: AlbumIdDto) {
|
getAlbumInfo(@GetAuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto) {
|
||||||
return this.albumService.getAlbumInfo(authUser, albumId);
|
return this.service.get(authUser, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Delete('/:albumId/assets')
|
@Delete(':id/assets')
|
||||||
async removeAssetFromAlbum(
|
removeAssetFromAlbum(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Body() removeAssetsDto: RemoveAssetsDto,
|
@Body() dto: RemoveAssetsDto,
|
||||||
@Param() { albumId }: AlbumIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
): Promise<AlbumResponseDto> {
|
): Promise<AlbumResponseDto> {
|
||||||
return this.albumService.removeAssetsFromAlbum(authUser, removeAssetsDto, albumId);
|
return this.service.removeAssets(authUser, id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Delete('/:albumId')
|
@Delete(':id')
|
||||||
async deleteAlbum(@GetAuthUser() authUser: AuthUserDto, @Param() { albumId }: AlbumIdDto) {
|
deleteAlbum(@GetAuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto) {
|
||||||
return this.albumService.deleteAlbum(authUser, albumId);
|
return this.service.delete(authUser, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Delete('/:albumId/user/:userId')
|
@Delete(':id/user/:userId')
|
||||||
async removeUserFromAlbum(
|
removeUserFromAlbum(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Param() { albumId }: AlbumIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Param('userId', new ParseMeUUIDPipe({ version: '4' })) userId: string,
|
@Param('userId', new ParseMeUUIDPipe({ version: '4' })) userId: string,
|
||||||
) {
|
) {
|
||||||
return this.albumService.removeUserFromAlbum(authUser, albumId, userId);
|
return this.service.removeUser(authUser, id, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Patch('/:albumId')
|
@Patch(':id')
|
||||||
async updateAlbumInfo(
|
updateAlbumInfo(@GetAuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto, @Body() dto: UpdateAlbumDto) {
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
|
||||||
@Body() updateAlbumInfoDto: UpdateAlbumDto,
|
|
||||||
@Param() { albumId }: AlbumIdDto,
|
|
||||||
) {
|
|
||||||
// TODO: Handle nonexistent albumThumbnailAssetId.
|
// TODO: Handle nonexistent albumThumbnailAssetId.
|
||||||
// TODO: Disallow setting asset from other user as albumThumbnailAssetId.
|
// TODO: Disallow setting asset from other user as albumThumbnailAssetId.
|
||||||
return this.albumService.updateAlbumInfo(authUser, updateAlbumInfoDto, albumId);
|
return this.service.update(authUser, id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated({ isShared: true })
|
@Authenticated({ isShared: true })
|
||||||
@Get('/:albumId/download')
|
@Get(':id/download')
|
||||||
@ApiOkResponse({ content: { 'application/zip': { schema: { type: 'string', format: 'binary' } } } })
|
@ApiOkResponse({ content: { 'application/zip': { schema: { type: 'string', format: 'binary' } } } })
|
||||||
async downloadArchive(
|
downloadArchive(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Param() { albumId }: AlbumIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Query() dto: DownloadDto,
|
@Query() dto: DownloadDto,
|
||||||
@Response({ passthrough: true }) res: Res,
|
@Response({ passthrough: true }) res: Res,
|
||||||
) {
|
) {
|
||||||
this.albumService.checkDownloadAccess(authUser);
|
this.service.checkDownloadAccess(authUser);
|
||||||
|
return this.service.downloadArchive(authUser, id, dto).then((download) => handleDownload(download, res));
|
||||||
const { stream, fileName, fileSize, fileCount, complete } = await this.albumService.downloadArchive(
|
|
||||||
authUser,
|
|
||||||
albumId,
|
|
||||||
dto,
|
|
||||||
);
|
|
||||||
res.attachment(fileName);
|
|
||||||
res.setHeader(IMMICH_CONTENT_LENGTH_HINT, fileSize);
|
|
||||||
res.setHeader(IMMICH_ARCHIVE_FILE_COUNT, fileCount);
|
|
||||||
res.setHeader(IMMICH_ARCHIVE_COMPLETE, `${complete}`);
|
|
||||||
return stream;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Post('/create-shared-link')
|
@Post('create-shared-link')
|
||||||
async createAlbumSharedLink(
|
createAlbumSharedLink(@GetAuthUser() authUser: AuthUserDto, @Body() dto: CreateAlbumSharedLinkDto) {
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
return this.service.createSharedLink(authUser, dto);
|
||||||
@Body() createAlbumShareLinkDto: CreateAlbumSharedLinkDto,
|
|
||||||
) {
|
|
||||||
return this.albumService.createAlbumSharedLink(authUser, createAlbumShareLinkDto);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,14 +182,14 @@ describe('Album service', () => {
|
||||||
shared: false,
|
shared: false,
|
||||||
assetCount: 0,
|
assetCount: 0,
|
||||||
};
|
};
|
||||||
await expect(sut.getAlbumInfo(authUser, albumId)).resolves.toEqual(expectedResult);
|
await expect(sut.get(authUser, albumId)).resolves.toEqual(expectedResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('gets a shared album', async () => {
|
it('gets a shared album', async () => {
|
||||||
const albumEntity = _getSharedWithAuthUserAlbum();
|
const albumEntity = _getSharedWithAuthUserAlbum();
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
|
|
||||||
const result = await sut.getAlbumInfo(authUser, albumId);
|
const result = await sut.get(authUser, albumId);
|
||||||
expect(result.id).toEqual(albumId);
|
expect(result.id).toEqual(albumId);
|
||||||
expect(result.ownerId).toEqual(sharedAlbumOwnerId);
|
expect(result.ownerId).toEqual(sharedAlbumOwnerId);
|
||||||
expect(result.shared).toEqual(true);
|
expect(result.shared).toEqual(true);
|
||||||
|
@ -203,19 +203,19 @@ describe('Album service', () => {
|
||||||
const albumId = albumEntity.id;
|
const albumId = albumEntity.id;
|
||||||
|
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
await expect(sut.getAlbumInfo(authUser, albumId)).rejects.toBeInstanceOf(ForbiddenException);
|
await expect(sut.get(authUser, albumId)).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('throws a not found exception if the album is not found', async () => {
|
it('throws a not found exception if the album is not found', async () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve(null));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve(null));
|
||||||
await expect(sut.getAlbumInfo(authUser, '0002')).rejects.toBeInstanceOf(NotFoundException);
|
await expect(sut.get(authUser, '0002')).rejects.toBeInstanceOf(NotFoundException);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('deletes an owned album', async () => {
|
it('deletes an owned album', async () => {
|
||||||
const albumEntity = _getOwnedAlbum();
|
const albumEntity = _getOwnedAlbum();
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.delete.mockImplementation(() => Promise.resolve());
|
albumRepositoryMock.delete.mockImplementation(() => Promise.resolve());
|
||||||
await sut.deleteAlbum(authUser, albumId);
|
await sut.delete(authUser, albumId);
|
||||||
expect(albumRepositoryMock.delete).toHaveBeenCalledTimes(1);
|
expect(albumRepositoryMock.delete).toHaveBeenCalledTimes(1);
|
||||||
expect(albumRepositoryMock.delete).toHaveBeenCalledWith(albumEntity);
|
expect(albumRepositoryMock.delete).toHaveBeenCalledWith(albumEntity);
|
||||||
});
|
});
|
||||||
|
@ -223,14 +223,14 @@ describe('Album service', () => {
|
||||||
it('prevents deleting a shared album (shared with auth user)', async () => {
|
it('prevents deleting a shared album (shared with auth user)', async () => {
|
||||||
const albumEntity = _getSharedWithAuthUserAlbum();
|
const albumEntity = _getSharedWithAuthUserAlbum();
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
await expect(sut.deleteAlbum(authUser, albumId)).rejects.toBeInstanceOf(ForbiddenException);
|
await expect(sut.delete(authUser, albumId)).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('removes a shared user from an owned album', async () => {
|
it('removes a shared user from an owned album', async () => {
|
||||||
const albumEntity = _getOwnedSharedAlbum();
|
const albumEntity = _getOwnedSharedAlbum();
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
||||||
await expect(sut.removeUserFromAlbum(authUser, albumEntity.id, ownedAlbumSharedWithId)).resolves.toBeUndefined();
|
await expect(sut.removeUser(authUser, albumEntity.id, ownedAlbumSharedWithId)).resolves.toBeUndefined();
|
||||||
expect(albumRepositoryMock.removeUser).toHaveBeenCalledTimes(1);
|
expect(albumRepositoryMock.removeUser).toHaveBeenCalledTimes(1);
|
||||||
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, ownedAlbumSharedWithId);
|
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, ownedAlbumSharedWithId);
|
||||||
});
|
});
|
||||||
|
@ -242,7 +242,7 @@ describe('Album service', () => {
|
||||||
|
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
|
|
||||||
await expect(sut.removeUserFromAlbum(authUser, albumId, userIdToRemove)).rejects.toBeInstanceOf(ForbiddenException);
|
await expect(sut.removeUser(authUser, albumId, userIdToRemove)).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
expect(albumRepositoryMock.removeUser).not.toHaveBeenCalled();
|
expect(albumRepositoryMock.removeUser).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
||||||
|
|
||||||
await sut.removeUserFromAlbum(authUser, albumEntity.id, authUser.id);
|
await sut.removeUser(authUser, albumEntity.id, authUser.id);
|
||||||
expect(albumRepositoryMock.removeUser).toHaveReturnedTimes(1);
|
expect(albumRepositoryMock.removeUser).toHaveReturnedTimes(1);
|
||||||
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, authUser.id);
|
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, authUser.id);
|
||||||
});
|
});
|
||||||
|
@ -261,7 +261,7 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
albumRepositoryMock.removeUser.mockImplementation(() => Promise.resolve());
|
||||||
|
|
||||||
await sut.removeUserFromAlbum(authUser, albumEntity.id, 'me');
|
await sut.removeUser(authUser, albumEntity.id, 'me');
|
||||||
expect(albumRepositoryMock.removeUser).toHaveReturnedTimes(1);
|
expect(albumRepositoryMock.removeUser).toHaveReturnedTimes(1);
|
||||||
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, authUser.id);
|
expect(albumRepositoryMock.removeUser).toHaveBeenCalledWith(albumEntity, authUser.id);
|
||||||
});
|
});
|
||||||
|
@ -270,9 +270,7 @@ describe('Album service', () => {
|
||||||
const albumEntity = _getOwnedAlbum();
|
const albumEntity = _getOwnedAlbum();
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
|
|
||||||
await expect(sut.removeUserFromAlbum(authUser, albumEntity.id, authUser.id)).rejects.toBeInstanceOf(
|
await expect(sut.removeUser(authUser, albumEntity.id, authUser.id)).rejects.toBeInstanceOf(BadRequestException);
|
||||||
BadRequestException,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('updates a owned album', async () => {
|
it('updates a owned album', async () => {
|
||||||
|
@ -284,14 +282,10 @@ describe('Album service', () => {
|
||||||
const updatedAlbum = { ...albumEntity, albumName: updatedAlbumName };
|
const updatedAlbum = { ...albumEntity, albumName: updatedAlbumName };
|
||||||
albumRepositoryMock.updateAlbum.mockResolvedValue(updatedAlbum);
|
albumRepositoryMock.updateAlbum.mockResolvedValue(updatedAlbum);
|
||||||
|
|
||||||
const result = await sut.updateAlbumInfo(
|
const result = await sut.update(authUser, albumId, {
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
albumName: updatedAlbumName,
|
albumName: updatedAlbumName,
|
||||||
albumThumbnailAssetId: updatedAlbumThumbnailAssetId,
|
albumThumbnailAssetId: updatedAlbumThumbnailAssetId,
|
||||||
},
|
});
|
||||||
albumId,
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result.id).toEqual(albumId);
|
expect(result.id).toEqual(albumId);
|
||||||
expect(result.albumName).toEqual(updatedAlbumName);
|
expect(result.albumName).toEqual(updatedAlbumName);
|
||||||
|
@ -310,14 +304,10 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
sut.updateAlbumInfo(
|
sut.update(authUser, albumId, {
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
albumName: 'new album name',
|
albumName: 'new album name',
|
||||||
albumThumbnailAssetId: '69d2f917-0b31-48d8-9d7d-673b523f1aac',
|
albumThumbnailAssetId: '69d2f917-0b31-48d8-9d7d-673b523f1aac',
|
||||||
},
|
}),
|
||||||
albumId,
|
|
||||||
),
|
|
||||||
).rejects.toBeInstanceOf(ForbiddenException);
|
).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -334,13 +324,7 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
||||||
|
|
||||||
const result = (await sut.addAssetsToAlbum(
|
const result = (await sut.addAssets(authUser, albumId, { assetIds: ['1'] })) as AddAssetsResponseDto;
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
assetIds: ['1'],
|
|
||||||
},
|
|
||||||
albumId,
|
|
||||||
)) as AddAssetsResponseDto;
|
|
||||||
|
|
||||||
// TODO: stub and expect album rendered
|
// TODO: stub and expect album rendered
|
||||||
expect(result.album?.id).toEqual(albumId);
|
expect(result.album?.id).toEqual(albumId);
|
||||||
|
@ -359,13 +343,7 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
||||||
|
|
||||||
const result = (await sut.addAssetsToAlbum(
|
const result = (await sut.addAssets(authUser, albumId, { assetIds: ['1'] })) as AddAssetsResponseDto;
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
assetIds: ['1'],
|
|
||||||
},
|
|
||||||
albumId,
|
|
||||||
)) as AddAssetsResponseDto;
|
|
||||||
|
|
||||||
// TODO: stub and expect album rendered
|
// TODO: stub and expect album rendered
|
||||||
expect(result.album?.id).toEqual(albumId);
|
expect(result.album?.id).toEqual(albumId);
|
||||||
|
@ -384,15 +362,7 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
||||||
|
|
||||||
await expect(
|
await expect(sut.addAssets(authUser, albumId, { assetIds: ['1'] })).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
sut.addAssetsToAlbum(
|
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
assetIds: ['1'],
|
|
||||||
},
|
|
||||||
albumId,
|
|
||||||
),
|
|
||||||
).rejects.toBeInstanceOf(ForbiddenException);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('removes assets from owned album', async () => {
|
// it('removes assets from owned album', async () => {
|
||||||
|
@ -448,14 +418,6 @@ describe('Album service', () => {
|
||||||
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
albumRepositoryMock.get.mockImplementation(() => Promise.resolve<AlbumEntity>(albumEntity));
|
||||||
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
albumRepositoryMock.addAssets.mockImplementation(() => Promise.resolve<AddAssetsResponseDto>(albumResponse));
|
||||||
|
|
||||||
await expect(
|
await expect(sut.removeAssets(authUser, albumId, { assetIds: ['1'] })).rejects.toBeInstanceOf(ForbiddenException);
|
||||||
sut.removeAssetsFromAlbum(
|
|
||||||
authUser,
|
|
||||||
{
|
|
||||||
assetIds: ['1'],
|
|
||||||
},
|
|
||||||
albumId,
|
|
||||||
),
|
|
||||||
).rejects.toBeInstanceOf(ForbiddenException);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -61,18 +61,18 @@ export class AlbumService {
|
||||||
return mapAlbum(albumEntity);
|
return mapAlbum(albumEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAlbumInfo(authUser: AuthUserDto, albumId: string): Promise<AlbumResponseDto> {
|
async get(authUser: AuthUserDto, albumId: string): Promise<AlbumResponseDto> {
|
||||||
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
||||||
return mapAlbum(album);
|
return mapAlbum(album);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addUsersToAlbum(authUser: AuthUserDto, addUsersDto: AddUsersDto, albumId: string): Promise<AlbumResponseDto> {
|
async addUsers(authUser: AuthUserDto, albumId: string, dto: AddUsersDto): Promise<AlbumResponseDto> {
|
||||||
const album = await this._getAlbum({ authUser, albumId });
|
const album = await this._getAlbum({ authUser, albumId });
|
||||||
const updatedAlbum = await this.albumRepository.addSharedUsers(album, addUsersDto);
|
const updatedAlbum = await this.albumRepository.addSharedUsers(album, dto);
|
||||||
return mapAlbum(updatedAlbum);
|
return mapAlbum(updatedAlbum);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteAlbum(authUser: AuthUserDto, albumId: string): Promise<void> {
|
async delete(authUser: AuthUserDto, albumId: string): Promise<void> {
|
||||||
const album = await this._getAlbum({ authUser, albumId });
|
const album = await this._getAlbum({ authUser, albumId });
|
||||||
|
|
||||||
for (const sharedLink of album.sharedLinks) {
|
for (const sharedLink of album.sharedLinks) {
|
||||||
|
@ -83,7 +83,7 @@ export class AlbumService {
|
||||||
await this.jobRepository.queue({ name: JobName.SEARCH_REMOVE_ALBUM, data: { ids: [albumId] } });
|
await this.jobRepository.queue({ name: JobName.SEARCH_REMOVE_ALBUM, data: { ids: [albumId] } });
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeUserFromAlbum(authUser: AuthUserDto, albumId: string, userId: string | 'me'): Promise<void> {
|
async removeUser(authUser: AuthUserDto, albumId: string, userId: string | 'me'): Promise<void> {
|
||||||
const sharedUserId = userId == 'me' ? authUser.id : userId;
|
const sharedUserId = userId == 'me' ? authUser.id : userId;
|
||||||
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
||||||
if (album.ownerId != authUser.id && authUser.id != sharedUserId) {
|
if (album.ownerId != authUser.id && authUser.id != sharedUserId) {
|
||||||
|
@ -95,34 +95,26 @@ export class AlbumService {
|
||||||
await this.albumRepository.removeUser(album, sharedUserId);
|
await this.albumRepository.removeUser(album, sharedUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeAssetsFromAlbum(
|
async removeAssets(authUser: AuthUserDto, albumId: string, dto: RemoveAssetsDto): Promise<AlbumResponseDto> {
|
||||||
authUser: AuthUserDto,
|
|
||||||
removeAssetsDto: RemoveAssetsDto,
|
|
||||||
albumId: string,
|
|
||||||
): Promise<AlbumResponseDto> {
|
|
||||||
const album = await this._getAlbum({ authUser, albumId });
|
const album = await this._getAlbum({ authUser, albumId });
|
||||||
const deletedCount = await this.albumRepository.removeAssets(album, removeAssetsDto);
|
const deletedCount = await this.albumRepository.removeAssets(album, dto);
|
||||||
const newAlbum = await this._getAlbum({ authUser, albumId });
|
const newAlbum = await this._getAlbum({ authUser, albumId });
|
||||||
|
|
||||||
if (deletedCount !== removeAssetsDto.assetIds.length) {
|
if (deletedCount !== dto.assetIds.length) {
|
||||||
throw new BadRequestException('Some assets were not found in the album');
|
throw new BadRequestException('Some assets were not found in the album');
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapAlbum(newAlbum);
|
return mapAlbum(newAlbum);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addAssetsToAlbum(
|
async addAssets(authUser: AuthUserDto, albumId: string, dto: AddAssetsDto): Promise<AddAssetsResponseDto> {
|
||||||
authUser: AuthUserDto,
|
|
||||||
addAssetsDto: AddAssetsDto,
|
|
||||||
albumId: string,
|
|
||||||
): Promise<AddAssetsResponseDto> {
|
|
||||||
if (authUser.isPublicUser && !authUser.isAllowUpload) {
|
if (authUser.isPublicUser && !authUser.isAllowUpload) {
|
||||||
this.logger.warn('Deny public user attempt to add asset to album');
|
this.logger.warn('Deny public user attempt to add asset to album');
|
||||||
throw new ForbiddenException('Public user is not allowed to upload');
|
throw new ForbiddenException('Public user is not allowed to upload');
|
||||||
}
|
}
|
||||||
|
|
||||||
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
const album = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
||||||
const result = await this.albumRepository.addAssets(album, addAssetsDto);
|
const result = await this.albumRepository.addAssets(album, dto);
|
||||||
const newAlbum = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
const newAlbum = await this._getAlbum({ authUser, albumId, validateIsOwner: false });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -131,25 +123,21 @@ export class AlbumService {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateAlbumInfo(
|
async update(authUser: AuthUserDto, albumId: string, dto: UpdateAlbumDto): Promise<AlbumResponseDto> {
|
||||||
authUser: AuthUserDto,
|
|
||||||
updateAlbumDto: UpdateAlbumDto,
|
|
||||||
albumId: string,
|
|
||||||
): Promise<AlbumResponseDto> {
|
|
||||||
const album = await this._getAlbum({ authUser, albumId });
|
const album = await this._getAlbum({ authUser, albumId });
|
||||||
|
|
||||||
if (authUser.id != album.ownerId) {
|
if (authUser.id != album.ownerId) {
|
||||||
throw new BadRequestException('Unauthorized to change album info');
|
throw new BadRequestException('Unauthorized to change album info');
|
||||||
}
|
}
|
||||||
|
|
||||||
const updatedAlbum = await this.albumRepository.updateAlbum(album, updateAlbumDto);
|
const updatedAlbum = await this.albumRepository.updateAlbum(album, dto);
|
||||||
|
|
||||||
await this.jobRepository.queue({ name: JobName.SEARCH_INDEX_ALBUM, data: { ids: [updatedAlbum.id] } });
|
await this.jobRepository.queue({ name: JobName.SEARCH_INDEX_ALBUM, data: { ids: [updatedAlbum.id] } });
|
||||||
|
|
||||||
return mapAlbum(updatedAlbum);
|
return mapAlbum(updatedAlbum);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAlbumCountByUserId(authUser: AuthUserDto): Promise<AlbumCountResponseDto> {
|
async getCountByUserId(authUser: AuthUserDto): Promise<AlbumCountResponseDto> {
|
||||||
return this.albumRepository.getCountByUserId(authUser.id);
|
return this.albumRepository.getCountByUserId(authUser.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +148,7 @@ export class AlbumService {
|
||||||
return this.downloadService.downloadArchive(album.albumName, assets);
|
return this.downloadService.downloadArchive(album.albumName, assets);
|
||||||
}
|
}
|
||||||
|
|
||||||
async createAlbumSharedLink(authUser: AuthUserDto, dto: CreateAlbumShareLinkDto): Promise<SharedLinkResponseDto> {
|
async createSharedLink(authUser: AuthUserDto, dto: CreateAlbumShareLinkDto): Promise<SharedLinkResponseDto> {
|
||||||
const album = await this._getAlbum({ authUser, albumId: dto.albumId });
|
const album = await this._getAlbum({ authUser, albumId: dto.albumId });
|
||||||
|
|
||||||
const sharedLink = await this.shareCore.create(authUser.id, {
|
const sharedLink = await this.shareCore.create(authUser.id, {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
import { ValidateUUID } from 'apps/immich/src/decorators/validate-uuid.decorator';
|
|
||||||
|
|
||||||
export class AlbumIdDto {
|
|
||||||
@ValidateUUID()
|
|
||||||
albumId!: string;
|
|
||||||
}
|
|
|
@ -3627,12 +3627,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/album/{albumId}/users": {
|
"/album/{id}/users": {
|
||||||
"put": {
|
"put": {
|
||||||
"operationId": "addUsersToAlbum",
|
"operationId": "addUsersToAlbum",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3679,12 +3679,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/album/{albumId}/assets": {
|
"/album/{id}/assets": {
|
||||||
"put": {
|
"put": {
|
||||||
"operationId": "addAssetsToAlbum",
|
"operationId": "addAssetsToAlbum",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3742,7 +3742,7 @@
|
||||||
"operationId": "removeAssetFromAlbum",
|
"operationId": "removeAssetFromAlbum",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3789,12 +3789,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/album/{albumId}": {
|
"/album/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getAlbumInfo",
|
"operationId": "getAlbumInfo",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3842,7 +3842,7 @@
|
||||||
"operationId": "deleteAlbum",
|
"operationId": "deleteAlbum",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3875,7 +3875,7 @@
|
||||||
"operationId": "updateAlbumInfo",
|
"operationId": "updateAlbumInfo",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3922,12 +3922,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/album/{albumId}/user/{userId}": {
|
"/album/{id}/user/{userId}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"operationId": "removeUserFromAlbum",
|
"operationId": "removeUserFromAlbum",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3965,12 +3965,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/album/{albumId}/download": {
|
"/album/{id}/download": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "downloadArchive",
|
"operationId": "downloadArchive",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "albumId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
|
240
web/src/api/open-api/api.ts
generated
240
web/src/api/open-api/api.ts
generated
|
@ -3082,19 +3082,19 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddAssetsDto} addAssetsDto
|
* @param {AddAssetsDto} addAssetsDto
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
addAssetsToAlbum: async (id: string, addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('addAssetsToAlbum', 'albumId', albumId)
|
assertParamExists('addAssetsToAlbum', 'id', id)
|
||||||
// verify required parameter 'addAssetsDto' is not null or undefined
|
// verify required parameter 'addAssetsDto' is not null or undefined
|
||||||
assertParamExists('addAssetsToAlbum', 'addAssetsDto', addAssetsDto)
|
assertParamExists('addAssetsToAlbum', 'addAssetsDto', addAssetsDto)
|
||||||
const localVarPath = `/album/{albumId}/assets`
|
const localVarPath = `/album/{id}/assets`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3135,18 +3135,18 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddUsersDto} addUsersDto
|
* @param {AddUsersDto} addUsersDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addUsersToAlbum: async (albumId: string, addUsersDto: AddUsersDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
addUsersToAlbum: async (id: string, addUsersDto: AddUsersDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('addUsersToAlbum', 'albumId', albumId)
|
assertParamExists('addUsersToAlbum', 'id', id)
|
||||||
// verify required parameter 'addUsersDto' is not null or undefined
|
// verify required parameter 'addUsersDto' is not null or undefined
|
||||||
assertParamExists('addUsersToAlbum', 'addUsersDto', addUsersDto)
|
assertParamExists('addUsersToAlbum', 'addUsersDto', addUsersDto)
|
||||||
const localVarPath = `/album/{albumId}/users`
|
const localVarPath = `/album/{id}/users`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3271,15 +3271,15 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteAlbum: async (albumId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
deleteAlbum: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('deleteAlbum', 'albumId', albumId)
|
assertParamExists('deleteAlbum', 'id', id)
|
||||||
const localVarPath = `/album/{albumId}`
|
const localVarPath = `/album/{id}`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3313,18 +3313,18 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [name]
|
* @param {string} [name]
|
||||||
* @param {number} [skip]
|
* @param {number} [skip]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
downloadArchive: async (albumId: string, name?: string, skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
downloadArchive: async (id: string, name?: string, skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('downloadArchive', 'albumId', albumId)
|
assertParamExists('downloadArchive', 'id', id)
|
||||||
const localVarPath = `/album/{albumId}/download`
|
const localVarPath = `/album/{id}/download`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3408,16 +3408,16 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getAlbumInfo: async (albumId: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
getAlbumInfo: async (id: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('getAlbumInfo', 'albumId', albumId)
|
assertParamExists('getAlbumInfo', 'id', id)
|
||||||
const localVarPath = `/album/{albumId}`
|
const localVarPath = `/album/{id}`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3503,18 +3503,18 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {RemoveAssetsDto} removeAssetsDto
|
* @param {RemoveAssetsDto} removeAssetsDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
removeAssetFromAlbum: async (albumId: string, removeAssetsDto: RemoveAssetsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
removeAssetFromAlbum: async (id: string, removeAssetsDto: RemoveAssetsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('removeAssetFromAlbum', 'albumId', albumId)
|
assertParamExists('removeAssetFromAlbum', 'id', id)
|
||||||
// verify required parameter 'removeAssetsDto' is not null or undefined
|
// verify required parameter 'removeAssetsDto' is not null or undefined
|
||||||
assertParamExists('removeAssetFromAlbum', 'removeAssetsDto', removeAssetsDto)
|
assertParamExists('removeAssetFromAlbum', 'removeAssetsDto', removeAssetsDto)
|
||||||
const localVarPath = `/album/{albumId}/assets`
|
const localVarPath = `/album/{id}/assets`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3551,18 +3551,18 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
removeUserFromAlbum: async (albumId: string, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
removeUserFromAlbum: async (id: string, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('removeUserFromAlbum', 'albumId', albumId)
|
assertParamExists('removeUserFromAlbum', 'id', id)
|
||||||
// verify required parameter 'userId' is not null or undefined
|
// verify required parameter 'userId' is not null or undefined
|
||||||
assertParamExists('removeUserFromAlbum', 'userId', userId)
|
assertParamExists('removeUserFromAlbum', 'userId', userId)
|
||||||
const localVarPath = `/album/{albumId}/user/{userId}`
|
const localVarPath = `/album/{id}/user/{userId}`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)))
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
||||||
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
@ -3597,18 +3597,18 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {UpdateAlbumDto} updateAlbumDto
|
* @param {UpdateAlbumDto} updateAlbumDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateAlbumInfo: async (albumId: string, updateAlbumDto: UpdateAlbumDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
updateAlbumInfo: async (id: string, updateAlbumDto: UpdateAlbumDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'albumId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('updateAlbumInfo', 'albumId', albumId)
|
assertParamExists('updateAlbumInfo', 'id', id)
|
||||||
// verify required parameter 'updateAlbumDto' is not null or undefined
|
// verify required parameter 'updateAlbumDto' is not null or undefined
|
||||||
assertParamExists('updateAlbumInfo', 'updateAlbumDto', updateAlbumDto)
|
assertParamExists('updateAlbumInfo', 'updateAlbumDto', updateAlbumDto)
|
||||||
const localVarPath = `/album/{albumId}`
|
const localVarPath = `/album/{id}`
|
||||||
.replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
|
@ -3655,25 +3655,25 @@ export const AlbumApiFp = function(configuration?: Configuration) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddAssetsDto} addAssetsDto
|
* @param {AddAssetsDto} addAssetsDto
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AddAssetsResponseDto>> {
|
async addAssetsToAlbum(id: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AddAssetsResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(id, addAssetsDto, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddUsersDto} addUsersDto
|
* @param {AddUsersDto} addUsersDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
async addUsersToAlbum(id: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addUsersToAlbum(albumId, addUsersDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.addUsersToAlbum(id, addUsersDto, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -3698,25 +3698,25 @@ export const AlbumApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async deleteAlbum(albumId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
async deleteAlbum(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlbum(albumId, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlbum(id, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [name]
|
* @param {string} [name]
|
||||||
* @param {number} [skip]
|
* @param {number} [skip]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async downloadArchive(albumId: string, name?: string, skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
async downloadArchive(id: string, name?: string, skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(albumId, name, skip, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(id, name, skip, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -3730,13 +3730,13 @@ export const AlbumApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
async getAlbumInfo(id: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(id, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -3752,35 +3752,35 @@ export const AlbumApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {RemoveAssetsDto} removeAssetsDto
|
* @param {RemoveAssetsDto} removeAssetsDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
async removeAssetFromAlbum(id: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetFromAlbum(albumId, removeAssetsDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetFromAlbum(id, removeAssetsDto, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async removeUserFromAlbum(albumId: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
async removeUserFromAlbum(id: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.removeUserFromAlbum(albumId, userId, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.removeUserFromAlbum(id, userId, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {UpdateAlbumDto} updateAlbumDto
|
* @param {UpdateAlbumDto} updateAlbumDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
async updateAlbumInfo(id: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAlbumInfo(albumId, updateAlbumDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAlbumInfo(id, updateAlbumDto, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -3795,24 +3795,24 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddAssetsDto} addAssetsDto
|
* @param {AddAssetsDto} addAssetsDto
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise<AddAssetsResponseDto> {
|
addAssetsToAlbum(id: string, addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise<AddAssetsResponseDto> {
|
||||||
return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(axios, basePath));
|
return localVarFp.addAssetsToAlbum(id, addAssetsDto, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddUsersDto} addUsersDto
|
* @param {AddUsersDto} addUsersDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
addUsersToAlbum(id: string, addUsersDto: AddUsersDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
||||||
return localVarFp.addUsersToAlbum(albumId, addUsersDto, options).then((request) => request(axios, basePath));
|
return localVarFp.addUsersToAlbum(id, addUsersDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -3834,24 +3834,24 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteAlbum(albumId: string, options?: any): AxiosPromise<void> {
|
deleteAlbum(id: string, options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.deleteAlbum(albumId, options).then((request) => request(axios, basePath));
|
return localVarFp.deleteAlbum(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [name]
|
* @param {string} [name]
|
||||||
* @param {number} [skip]
|
* @param {number} [skip]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
downloadArchive(albumId: string, name?: string, skip?: number, key?: string, options?: any): AxiosPromise<File> {
|
downloadArchive(id: string, name?: string, skip?: number, key?: string, options?: any): AxiosPromise<File> {
|
||||||
return localVarFp.downloadArchive(albumId, name, skip, key, options).then((request) => request(axios, basePath));
|
return localVarFp.downloadArchive(id, name, skip, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -3863,13 +3863,13 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getAlbumInfo(albumId: string, key?: string, options?: any): AxiosPromise<AlbumResponseDto> {
|
getAlbumInfo(id: string, key?: string, options?: any): AxiosPromise<AlbumResponseDto> {
|
||||||
return localVarFp.getAlbumInfo(albumId, key, options).then((request) => request(axios, basePath));
|
return localVarFp.getAlbumInfo(id, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -3883,33 +3883,33 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {RemoveAssetsDto} removeAssetsDto
|
* @param {RemoveAssetsDto} removeAssetsDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
removeAssetFromAlbum(id: string, removeAssetsDto: RemoveAssetsDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
||||||
return localVarFp.removeAssetFromAlbum(albumId, removeAssetsDto, options).then((request) => request(axios, basePath));
|
return localVarFp.removeAssetFromAlbum(id, removeAssetsDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
removeUserFromAlbum(albumId: string, userId: string, options?: any): AxiosPromise<void> {
|
removeUserFromAlbum(id: string, userId: string, options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.removeUserFromAlbum(albumId, userId, options).then((request) => request(axios, basePath));
|
return localVarFp.removeUserFromAlbum(id, userId, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {UpdateAlbumDto} updateAlbumDto
|
* @param {UpdateAlbumDto} updateAlbumDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
updateAlbumInfo(id: string, updateAlbumDto: UpdateAlbumDto, options?: any): AxiosPromise<AlbumResponseDto> {
|
||||||
return localVarFp.updateAlbumInfo(albumId, updateAlbumDto, options).then((request) => request(axios, basePath));
|
return localVarFp.updateAlbumInfo(id, updateAlbumDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -3923,27 +3923,27 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath
|
||||||
export class AlbumApi extends BaseAPI {
|
export class AlbumApi extends BaseAPI {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddAssetsDto} addAssetsDto
|
* @param {AddAssetsDto} addAssetsDto
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) {
|
public addAssetsToAlbum(id: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).addAssetsToAlbum(id, addAssetsDto, key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {AddUsersDto} addUsersDto
|
* @param {AddUsersDto} addUsersDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig) {
|
public addUsersToAlbum(id: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).addUsersToAlbum(albumId, addUsersDto, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).addUsersToAlbum(id, addUsersDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3970,18 +3970,18 @@ export class AlbumApi extends BaseAPI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public deleteAlbum(albumId: string, options?: AxiosRequestConfig) {
|
public deleteAlbum(id: string, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).deleteAlbum(albumId, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).deleteAlbum(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [name]
|
* @param {string} [name]
|
||||||
* @param {number} [skip]
|
* @param {number} [skip]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
|
@ -3989,8 +3989,8 @@ export class AlbumApi extends BaseAPI {
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public downloadArchive(albumId: string, name?: string, skip?: number, key?: string, options?: AxiosRequestConfig) {
|
public downloadArchive(id: string, name?: string, skip?: number, key?: string, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).downloadArchive(albumId, name, skip, key, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).downloadArchive(id, name, skip, key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4005,14 +4005,14 @@ export class AlbumApi extends BaseAPI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig) {
|
public getAlbumInfo(id: string, key?: string, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).getAlbumInfo(albumId, key, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).getAlbumInfo(id, key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4029,38 +4029,38 @@ export class AlbumApi extends BaseAPI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {RemoveAssetsDto} removeAssetsDto
|
* @param {RemoveAssetsDto} removeAssetsDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig) {
|
public removeAssetFromAlbum(id: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).removeAssetFromAlbum(albumId, removeAssetsDto, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).removeAssetFromAlbum(id, removeAssetsDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public removeUserFromAlbum(albumId: string, userId: string, options?: AxiosRequestConfig) {
|
public removeUserFromAlbum(id: string, userId: string, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).removeUserFromAlbum(albumId, userId, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).removeUserFromAlbum(id, userId, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} albumId
|
* @param {string} id
|
||||||
* @param {UpdateAlbumDto} updateAlbumDto
|
* @param {UpdateAlbumDto} updateAlbumDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AlbumApi
|
* @memberof AlbumApi
|
||||||
*/
|
*/
|
||||||
public updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig) {
|
public updateAlbumInfo(id: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig) {
|
||||||
return AlbumApiFp(this.configuration).updateAlbumInfo(albumId, updateAlbumDto, options).then((request) => request(this.axios, this.basePath));
|
return AlbumApiFp(this.configuration).updateAlbumInfo(id, updateAlbumDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue