mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
refactor(server): use UUID dto in asset controller (#2641)
* refactor: assetId => id * chore: open api * chore: remove unused dto * fix(web): assetId => id * fix: web test
This commit is contained in:
parent
422ad20641
commit
a9fb1d435a
16 changed files with 184 additions and 196 deletions
10
mobile/openapi/README.md
generated
10
mobile/openapi/README.md
generated
|
@ -95,25 +95,25 @@ Class | Method | HTTP request | Description
|
||||||
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
*AssetApi* | [**createAssetsSharedLink**](doc//AssetApi.md#createassetssharedlink) | **POST** /asset/shared-link |
|
*AssetApi* | [**createAssetsSharedLink**](doc//AssetApi.md#createassetssharedlink) | **POST** /asset/shared-link |
|
||||||
*AssetApi* | [**deleteAsset**](doc//AssetApi.md#deleteasset) | **DELETE** /asset |
|
*AssetApi* | [**deleteAsset**](doc//AssetApi.md#deleteasset) | **DELETE** /asset |
|
||||||
*AssetApi* | [**downloadFile**](doc//AssetApi.md#downloadfile) | **GET** /asset/download/{assetId} |
|
*AssetApi* | [**downloadFile**](doc//AssetApi.md#downloadfile) | **GET** /asset/download/{id} |
|
||||||
*AssetApi* | [**downloadFiles**](doc//AssetApi.md#downloadfiles) | **POST** /asset/download-files |
|
*AssetApi* | [**downloadFiles**](doc//AssetApi.md#downloadfiles) | **POST** /asset/download-files |
|
||||||
*AssetApi* | [**downloadLibrary**](doc//AssetApi.md#downloadlibrary) | **GET** /asset/download-library |
|
*AssetApi* | [**downloadLibrary**](doc//AssetApi.md#downloadlibrary) | **GET** /asset/download-library |
|
||||||
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
|
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
|
||||||
*AssetApi* | [**getArchivedAssetCountByUserId**](doc//AssetApi.md#getarchivedassetcountbyuserid) | **GET** /asset/stat/archive |
|
*AssetApi* | [**getArchivedAssetCountByUserId**](doc//AssetApi.md#getarchivedassetcountbyuserid) | **GET** /asset/stat/archive |
|
||||||
*AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{assetId} |
|
*AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
||||||
*AssetApi* | [**getAssetByTimeBucket**](doc//AssetApi.md#getassetbytimebucket) | **POST** /asset/time-bucket |
|
*AssetApi* | [**getAssetByTimeBucket**](doc//AssetApi.md#getassetbytimebucket) | **POST** /asset/time-bucket |
|
||||||
*AssetApi* | [**getAssetCountByTimeBucket**](doc//AssetApi.md#getassetcountbytimebucket) | **POST** /asset/count-by-time-bucket |
|
*AssetApi* | [**getAssetCountByTimeBucket**](doc//AssetApi.md#getassetcountbytimebucket) | **POST** /asset/count-by-time-bucket |
|
||||||
*AssetApi* | [**getAssetCountByUserId**](doc//AssetApi.md#getassetcountbyuserid) | **GET** /asset/count-by-user-id |
|
*AssetApi* | [**getAssetCountByUserId**](doc//AssetApi.md#getassetcountbyuserid) | **GET** /asset/count-by-user-id |
|
||||||
*AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
*AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
||||||
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{assetId} |
|
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
||||||
*AssetApi* | [**getCuratedLocations**](doc//AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
*AssetApi* | [**getCuratedLocations**](doc//AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
||||||
*AssetApi* | [**getCuratedObjects**](doc//AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
*AssetApi* | [**getCuratedObjects**](doc//AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
||||||
*AssetApi* | [**getMapMarkers**](doc//AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
*AssetApi* | [**getMapMarkers**](doc//AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
||||||
*AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
*AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
||||||
*AssetApi* | [**removeAssetsFromSharedLink**](doc//AssetApi.md#removeassetsfromsharedlink) | **PATCH** /asset/shared-link/remove |
|
*AssetApi* | [**removeAssetsFromSharedLink**](doc//AssetApi.md#removeassetsfromsharedlink) | **PATCH** /asset/shared-link/remove |
|
||||||
*AssetApi* | [**searchAsset**](doc//AssetApi.md#searchasset) | **POST** /asset/search |
|
*AssetApi* | [**searchAsset**](doc//AssetApi.md#searchasset) | **POST** /asset/search |
|
||||||
*AssetApi* | [**serveFile**](doc//AssetApi.md#servefile) | **GET** /asset/file/{assetId} |
|
*AssetApi* | [**serveFile**](doc//AssetApi.md#servefile) | **GET** /asset/file/{id} |
|
||||||
*AssetApi* | [**updateAsset**](doc//AssetApi.md#updateasset) | **PUT** /asset/{assetId} |
|
*AssetApi* | [**updateAsset**](doc//AssetApi.md#updateasset) | **PUT** /asset/{id} |
|
||||||
*AssetApi* | [**uploadFile**](doc//AssetApi.md#uploadfile) | **POST** /asset/upload |
|
*AssetApi* | [**uploadFile**](doc//AssetApi.md#uploadfile) | **POST** /asset/upload |
|
||||||
*AuthenticationApi* | [**adminSignUp**](doc//AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
|
*AuthenticationApi* | [**adminSignUp**](doc//AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
|
||||||
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
||||||
|
|
50
mobile/openapi/doc/AssetApi.md
generated
50
mobile/openapi/doc/AssetApi.md
generated
|
@ -15,25 +15,25 @@ Method | HTTP request | Description
|
||||||
[**checkExistingAssets**](AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
[**checkExistingAssets**](AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
[**createAssetsSharedLink**](AssetApi.md#createassetssharedlink) | **POST** /asset/shared-link |
|
[**createAssetsSharedLink**](AssetApi.md#createassetssharedlink) | **POST** /asset/shared-link |
|
||||||
[**deleteAsset**](AssetApi.md#deleteasset) | **DELETE** /asset |
|
[**deleteAsset**](AssetApi.md#deleteasset) | **DELETE** /asset |
|
||||||
[**downloadFile**](AssetApi.md#downloadfile) | **GET** /asset/download/{assetId} |
|
[**downloadFile**](AssetApi.md#downloadfile) | **GET** /asset/download/{id} |
|
||||||
[**downloadFiles**](AssetApi.md#downloadfiles) | **POST** /asset/download-files |
|
[**downloadFiles**](AssetApi.md#downloadfiles) | **POST** /asset/download-files |
|
||||||
[**downloadLibrary**](AssetApi.md#downloadlibrary) | **GET** /asset/download-library |
|
[**downloadLibrary**](AssetApi.md#downloadlibrary) | **GET** /asset/download-library |
|
||||||
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
|
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
|
||||||
[**getArchivedAssetCountByUserId**](AssetApi.md#getarchivedassetcountbyuserid) | **GET** /asset/stat/archive |
|
[**getArchivedAssetCountByUserId**](AssetApi.md#getarchivedassetcountbyuserid) | **GET** /asset/stat/archive |
|
||||||
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{assetId} |
|
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
||||||
[**getAssetByTimeBucket**](AssetApi.md#getassetbytimebucket) | **POST** /asset/time-bucket |
|
[**getAssetByTimeBucket**](AssetApi.md#getassetbytimebucket) | **POST** /asset/time-bucket |
|
||||||
[**getAssetCountByTimeBucket**](AssetApi.md#getassetcountbytimebucket) | **POST** /asset/count-by-time-bucket |
|
[**getAssetCountByTimeBucket**](AssetApi.md#getassetcountbytimebucket) | **POST** /asset/count-by-time-bucket |
|
||||||
[**getAssetCountByUserId**](AssetApi.md#getassetcountbyuserid) | **GET** /asset/count-by-user-id |
|
[**getAssetCountByUserId**](AssetApi.md#getassetcountbyuserid) | **GET** /asset/count-by-user-id |
|
||||||
[**getAssetSearchTerms**](AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
[**getAssetSearchTerms**](AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
||||||
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{assetId} |
|
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
||||||
[**getCuratedLocations**](AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
[**getCuratedLocations**](AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
||||||
[**getCuratedObjects**](AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
[**getCuratedObjects**](AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
||||||
[**getMapMarkers**](AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
[**getMapMarkers**](AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
||||||
[**getUserAssetsByDeviceId**](AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
[**getUserAssetsByDeviceId**](AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
||||||
[**removeAssetsFromSharedLink**](AssetApi.md#removeassetsfromsharedlink) | **PATCH** /asset/shared-link/remove |
|
[**removeAssetsFromSharedLink**](AssetApi.md#removeassetsfromsharedlink) | **PATCH** /asset/shared-link/remove |
|
||||||
[**searchAsset**](AssetApi.md#searchasset) | **POST** /asset/search |
|
[**searchAsset**](AssetApi.md#searchasset) | **POST** /asset/search |
|
||||||
[**serveFile**](AssetApi.md#servefile) | **GET** /asset/file/{assetId} |
|
[**serveFile**](AssetApi.md#servefile) | **GET** /asset/file/{id} |
|
||||||
[**updateAsset**](AssetApi.md#updateasset) | **PUT** /asset/{assetId} |
|
[**updateAsset**](AssetApi.md#updateasset) | **PUT** /asset/{id} |
|
||||||
[**uploadFile**](AssetApi.md#uploadfile) | **POST** /asset/upload |
|
[**uploadFile**](AssetApi.md#uploadfile) | **POST** /asset/upload |
|
||||||
|
|
||||||
|
|
||||||
|
@ -378,7 +378,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)
|
||||||
|
|
||||||
# **downloadFile**
|
# **downloadFile**
|
||||||
> MultipartFile downloadFile(assetId, key)
|
> MultipartFile downloadFile(id, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,11 +401,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetId = 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.downloadFile(assetId, key);
|
final result = api_instance.downloadFile(id, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->downloadFile: $e\n');
|
print('Exception when calling AssetApi->downloadFile: $e\n');
|
||||||
|
@ -416,7 +416,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetId** | **String**| |
|
**id** | **String**| |
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -669,7 +669,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)
|
||||||
|
|
||||||
# **getAssetById**
|
# **getAssetById**
|
||||||
> AssetResponseDto getAssetById(assetId, key)
|
> AssetResponseDto getAssetById(id, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -694,11 +694,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetId = 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.getAssetById(assetId, key);
|
final result = api_instance.getAssetById(id, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->getAssetById: $e\n');
|
print('Exception when calling AssetApi->getAssetById: $e\n');
|
||||||
|
@ -709,7 +709,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetId** | **String**| |
|
**id** | **String**| |
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
@ -940,7 +940,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)
|
||||||
|
|
||||||
# **getAssetThumbnail**
|
# **getAssetThumbnail**
|
||||||
> MultipartFile getAssetThumbnail(assetId, format, key)
|
> MultipartFile getAssetThumbnail(id, format, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -963,12 +963,12 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final format = ; // ThumbnailFormat |
|
final format = ; // ThumbnailFormat |
|
||||||
final key = key_example; // String |
|
final key = key_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getAssetThumbnail(assetId, format, key);
|
final result = api_instance.getAssetThumbnail(id, format, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->getAssetThumbnail: $e\n');
|
print('Exception when calling AssetApi->getAssetThumbnail: $e\n');
|
||||||
|
@ -979,7 +979,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetId** | **String**| |
|
**id** | **String**| |
|
||||||
**format** | [**ThumbnailFormat**](.md)| | [optional]
|
**format** | [**ThumbnailFormat**](.md)| | [optional]
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
|
@ -1329,7 +1329,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)
|
||||||
|
|
||||||
# **serveFile**
|
# **serveFile**
|
||||||
> MultipartFile serveFile(assetId, isThumb, isWeb, key)
|
> MultipartFile serveFile(id, isThumb, isWeb, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1352,13 +1352,13 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final isThumb = true; // bool |
|
final isThumb = true; // bool |
|
||||||
final isWeb = true; // bool |
|
final isWeb = true; // bool |
|
||||||
final key = key_example; // String |
|
final key = key_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.serveFile(assetId, isThumb, isWeb, key);
|
final result = api_instance.serveFile(id, isThumb, isWeb, key);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->serveFile: $e\n');
|
print('Exception when calling AssetApi->serveFile: $e\n');
|
||||||
|
@ -1369,7 +1369,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetId** | **String**| |
|
**id** | **String**| |
|
||||||
**isThumb** | **bool**| | [optional]
|
**isThumb** | **bool**| | [optional]
|
||||||
**isWeb** | **bool**| | [optional]
|
**isWeb** | **bool**| | [optional]
|
||||||
**key** | **String**| | [optional]
|
**key** | **String**| | [optional]
|
||||||
|
@ -1390,7 +1390,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)
|
||||||
|
|
||||||
# **updateAsset**
|
# **updateAsset**
|
||||||
> AssetResponseDto updateAsset(assetId, updateAssetDto)
|
> AssetResponseDto updateAsset(id, updateAssetDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1415,11 +1415,11 @@ import 'package:openapi/api.dart';
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
final updateAssetDto = UpdateAssetDto(); // UpdateAssetDto |
|
final updateAssetDto = UpdateAssetDto(); // UpdateAssetDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.updateAsset(assetId, updateAssetDto);
|
final result = api_instance.updateAsset(id, updateAssetDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->updateAsset: $e\n');
|
print('Exception when calling AssetApi->updateAsset: $e\n');
|
||||||
|
@ -1430,7 +1430,7 @@ try {
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetId** | **String**| |
|
**id** | **String**| |
|
||||||
**updateAssetDto** | [**UpdateAssetDto**](UpdateAssetDto.md)| |
|
**updateAssetDto** | [**UpdateAssetDto**](UpdateAssetDto.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
76
mobile/openapi/lib/api/asset_api.dart
generated
76
mobile/openapi/lib/api/asset_api.dart
generated
|
@ -332,16 +332,16 @@ class AssetApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/download/{assetId}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /asset/download/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> downloadFileWithHttpInfo(String assetId, { String? key, }) async {
|
Future<Response> downloadFileWithHttpInfo(String id, { String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/download/{assetId}'
|
final path = r'/asset/download/{id}'
|
||||||
.replaceAll('{assetId}', assetId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -370,11 +370,11 @@ class AssetApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<MultipartFile?> downloadFile(String assetId, { String? key, }) async {
|
Future<MultipartFile?> downloadFile(String id, { String? key, }) async {
|
||||||
final response = await downloadFileWithHttpInfo(assetId, key: key, );
|
final response = await downloadFileWithHttpInfo(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));
|
||||||
}
|
}
|
||||||
|
@ -650,13 +650,13 @@ class AssetApi {
|
||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> getAssetByIdWithHttpInfo(String assetId, { String? key, }) async {
|
Future<Response> getAssetByIdWithHttpInfo(String id, { String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/assetById/{assetId}'
|
final path = r'/asset/assetById/{id}'
|
||||||
.replaceAll('{assetId}', assetId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -687,11 +687,11 @@ class AssetApi {
|
||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<AssetResponseDto?> getAssetById(String assetId, { String? key, }) async {
|
Future<AssetResponseDto?> getAssetById(String id, { String? key, }) async {
|
||||||
final response = await getAssetByIdWithHttpInfo(assetId, key: key, );
|
final response = await getAssetByIdWithHttpInfo(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));
|
||||||
}
|
}
|
||||||
|
@ -887,18 +887,18 @@ class AssetApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/thumbnail/{assetId}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /asset/thumbnail/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [ThumbnailFormat] format:
|
/// * [ThumbnailFormat] format:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> getAssetThumbnailWithHttpInfo(String assetId, { ThumbnailFormat? format, String? key, }) async {
|
Future<Response> getAssetThumbnailWithHttpInfo(String id, { ThumbnailFormat? format, String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/thumbnail/{assetId}'
|
final path = r'/asset/thumbnail/{id}'
|
||||||
.replaceAll('{assetId}', assetId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -930,13 +930,13 @@ class AssetApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [ThumbnailFormat] format:
|
/// * [ThumbnailFormat] format:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<MultipartFile?> getAssetThumbnail(String assetId, { ThumbnailFormat? format, String? key, }) async {
|
Future<MultipartFile?> getAssetThumbnail(String id, { ThumbnailFormat? format, String? key, }) async {
|
||||||
final response = await getAssetThumbnailWithHttpInfo(assetId, format: format, key: key, );
|
final response = await getAssetThumbnailWithHttpInfo(id, format: format, 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));
|
||||||
}
|
}
|
||||||
|
@ -1267,20 +1267,20 @@ class AssetApi {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/file/{assetId}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /asset/file/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [bool] isThumb:
|
/// * [bool] isThumb:
|
||||||
///
|
///
|
||||||
/// * [bool] isWeb:
|
/// * [bool] isWeb:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<Response> serveFileWithHttpInfo(String assetId, { bool? isThumb, bool? isWeb, String? key, }) async {
|
Future<Response> serveFileWithHttpInfo(String id, { bool? isThumb, bool? isWeb, String? key, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/file/{assetId}'
|
final path = r'/asset/file/{id}'
|
||||||
.replaceAll('{assetId}', assetId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
|
@ -1315,15 +1315,15 @@ class AssetApi {
|
||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [bool] isThumb:
|
/// * [bool] isThumb:
|
||||||
///
|
///
|
||||||
/// * [bool] isWeb:
|
/// * [bool] isWeb:
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
Future<MultipartFile?> serveFile(String assetId, { bool? isThumb, bool? isWeb, String? key, }) async {
|
Future<MultipartFile?> serveFile(String id, { bool? isThumb, bool? isWeb, String? key, }) async {
|
||||||
final response = await serveFileWithHttpInfo(assetId, isThumb: isThumb, isWeb: isWeb, key: key, );
|
final response = await serveFileWithHttpInfo(id, isThumb: isThumb, isWeb: isWeb, 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));
|
||||||
}
|
}
|
||||||
|
@ -1343,13 +1343,13 @@ class AssetApi {
|
||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [UpdateAssetDto] updateAssetDto (required):
|
/// * [UpdateAssetDto] updateAssetDto (required):
|
||||||
Future<Response> updateAssetWithHttpInfo(String assetId, UpdateAssetDto updateAssetDto,) async {
|
Future<Response> updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/{assetId}'
|
final path = r'/asset/{id}'
|
||||||
.replaceAll('{assetId}', assetId);
|
.replaceAll('{id}', id);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody = updateAssetDto;
|
Object? postBody = updateAssetDto;
|
||||||
|
@ -1376,11 +1376,11 @@ class AssetApi {
|
||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetId (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [UpdateAssetDto] updateAssetDto (required):
|
/// * [UpdateAssetDto] updateAssetDto (required):
|
||||||
Future<AssetResponseDto?> updateAsset(String assetId, UpdateAssetDto updateAssetDto,) async {
|
Future<AssetResponseDto?> updateAsset(String id, UpdateAssetDto updateAssetDto,) async {
|
||||||
final response = await updateAssetWithHttpInfo(assetId, updateAssetDto,);
|
final response = await updateAssetWithHttpInfo(id, updateAssetDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
|
10
mobile/openapi/test/asset_api_test.dart
generated
10
mobile/openapi/test/asset_api_test.dart
generated
|
@ -53,7 +53,7 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<MultipartFile> downloadFile(String assetId, { String key }) async
|
//Future<MultipartFile> downloadFile(String id, { String key }) async
|
||||||
test('test downloadFile', () async {
|
test('test downloadFile', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -84,7 +84,7 @@ void main() {
|
||||||
|
|
||||||
// Get a single asset's information
|
// Get a single asset's information
|
||||||
//
|
//
|
||||||
//Future<AssetResponseDto> getAssetById(String assetId, { String key }) async
|
//Future<AssetResponseDto> getAssetById(String id, { String key }) async
|
||||||
test('test getAssetById', () async {
|
test('test getAssetById', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -109,7 +109,7 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<MultipartFile> getAssetThumbnail(String assetId, { ThumbnailFormat format, String key }) async
|
//Future<MultipartFile> getAssetThumbnail(String id, { ThumbnailFormat format, String key }) async
|
||||||
test('test getAssetThumbnail', () async {
|
test('test getAssetThumbnail', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
@ -146,14 +146,14 @@ void main() {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<MultipartFile> serveFile(String assetId, { bool isThumb, bool isWeb, String key }) async
|
//Future<MultipartFile> serveFile(String id, { bool isThumb, bool isWeb, String key }) async
|
||||||
test('test serveFile', () async {
|
test('test serveFile', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update an asset
|
// Update an asset
|
||||||
//
|
//
|
||||||
//Future<AssetResponseDto> updateAsset(String assetId, UpdateAssetDto updateAssetDto) async
|
//Future<AssetResponseDto> updateAsset(String id, UpdateAssetDto updateAssetDto) async
|
||||||
test('test updateAsset', () async {
|
test('test updateAsset', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,7 +54,7 @@ import FileNotEmptyValidator from '../validation/file-not-empty-validator';
|
||||||
import { RemoveAssetsDto } from '../album/dto/remove-assets.dto';
|
import { RemoveAssetsDto } from '../album/dto/remove-assets.dto';
|
||||||
import { AssetBulkUploadCheckDto } from './dto/asset-check.dto';
|
import { AssetBulkUploadCheckDto } from './dto/asset-check.dto';
|
||||||
import { AssetBulkUploadCheckResponseDto } from './response-dto/asset-check-response.dto';
|
import { AssetBulkUploadCheckResponseDto } from './response-dto/asset-check-response.dto';
|
||||||
import { AssetIdDto } from './dto/asset-id.dto';
|
import { UUIDParamDto } from '../../controllers/dto/uuid-param.dto';
|
||||||
import { DeviceIdDto } from './dto/device-id.dto';
|
import { DeviceIdDto } from './dto/device-id.dto';
|
||||||
import { handleDownload } from '../../app.utils';
|
import { handleDownload } from '../../app.utils';
|
||||||
|
|
||||||
|
@ -114,14 +114,14 @@ export class AssetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SharedLinkRoute()
|
@SharedLinkRoute()
|
||||||
@Get('/download/:assetId')
|
@Get('/download/:id')
|
||||||
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
||||||
async downloadFile(
|
async downloadFile(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Response({ passthrough: true }) res: Res,
|
@Response({ passthrough: true }) res: Res,
|
||||||
@Param() { assetId }: AssetIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
) {
|
) {
|
||||||
return this.assetService.downloadFile(authUser, assetId).then(asStreamableFile);
|
return this.assetService.downloadFile(authUser, id).then(asStreamableFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SharedLinkRoute()
|
@SharedLinkRoute()
|
||||||
|
@ -153,7 +153,7 @@ export class AssetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SharedLinkRoute()
|
@SharedLinkRoute()
|
||||||
@Get('/file/:assetId')
|
@Get('/file/:id')
|
||||||
@Header('Cache-Control', 'max-age=31536000')
|
@Header('Cache-Control', 'max-age=31536000')
|
||||||
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
||||||
async serveFile(
|
async serveFile(
|
||||||
|
@ -161,25 +161,25 @@ export class AssetController {
|
||||||
@Headers() headers: Record<string, string>,
|
@Headers() headers: Record<string, string>,
|
||||||
@Response({ passthrough: true }) res: Res,
|
@Response({ passthrough: true }) res: Res,
|
||||||
@Query(new ValidationPipe({ transform: true })) query: ServeFileDto,
|
@Query(new ValidationPipe({ transform: true })) query: ServeFileDto,
|
||||||
@Param() { assetId }: AssetIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
) {
|
) {
|
||||||
await this.assetService.checkAssetsAccess(authUser, [assetId]);
|
await this.assetService.checkAssetsAccess(authUser, [id]);
|
||||||
return this.assetService.serveFile(authUser, assetId, query, res, headers);
|
return this.assetService.serveFile(authUser, id, query, res, headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SharedLinkRoute()
|
@SharedLinkRoute()
|
||||||
@Get('/thumbnail/:assetId')
|
@Get('/thumbnail/:id')
|
||||||
@Header('Cache-Control', 'max-age=31536000')
|
@Header('Cache-Control', 'max-age=31536000')
|
||||||
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
||||||
async getAssetThumbnail(
|
async getAssetThumbnail(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Headers() headers: Record<string, string>,
|
@Headers() headers: Record<string, string>,
|
||||||
@Response({ passthrough: true }) res: Res,
|
@Response({ passthrough: true }) res: Res,
|
||||||
@Param() { assetId }: AssetIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Query(new ValidationPipe({ transform: true })) query: GetAssetThumbnailDto,
|
@Query(new ValidationPipe({ transform: true })) query: GetAssetThumbnailDto,
|
||||||
) {
|
) {
|
||||||
await this.assetService.checkAssetsAccess(authUser, [assetId]);
|
await this.assetService.checkAssetsAccess(authUser, [id]);
|
||||||
return this.assetService.getAssetThumbnail(assetId, query, res, headers);
|
return this.assetService.getAssetThumbnail(id, query, res, headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('/curated-objects')
|
@Get('/curated-objects')
|
||||||
|
@ -259,26 +259,23 @@ export class AssetController {
|
||||||
* Get a single asset's information
|
* Get a single asset's information
|
||||||
*/
|
*/
|
||||||
@SharedLinkRoute()
|
@SharedLinkRoute()
|
||||||
@Get('/assetById/:assetId')
|
@Get('/assetById/:id')
|
||||||
async getAssetById(
|
async getAssetById(@GetAuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<AssetResponseDto> {
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
await this.assetService.checkAssetsAccess(authUser, [id]);
|
||||||
@Param() { assetId }: AssetIdDto,
|
return await this.assetService.getAssetById(authUser, id);
|
||||||
): Promise<AssetResponseDto> {
|
|
||||||
await this.assetService.checkAssetsAccess(authUser, [assetId]);
|
|
||||||
return await this.assetService.getAssetById(authUser, assetId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update an asset
|
* Update an asset
|
||||||
*/
|
*/
|
||||||
@Put('/:assetId')
|
@Put('/:id')
|
||||||
async updateAsset(
|
async updateAsset(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Param() { assetId }: AssetIdDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Body(ValidationPipe) dto: UpdateAssetDto,
|
@Body(ValidationPipe) dto: UpdateAssetDto,
|
||||||
): Promise<AssetResponseDto> {
|
): Promise<AssetResponseDto> {
|
||||||
await this.assetService.checkAssetsAccess(authUser, [assetId], true);
|
await this.assetService.checkAssetsAccess(authUser, [id], true);
|
||||||
return await this.assetService.updateAsset(authUser, assetId, dto);
|
return await this.assetService.updateAsset(authUser, id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete('/')
|
@Delete('/')
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { ApiProperty } from '@nestjs/swagger';
|
|
||||||
import { IsNotEmpty, IsUUID } from 'class-validator';
|
|
||||||
|
|
||||||
export class AssetIdDto {
|
|
||||||
@IsNotEmpty()
|
|
||||||
@IsUUID('4')
|
|
||||||
@ApiProperty({ format: 'uuid' })
|
|
||||||
assetId!: string;
|
|
||||||
}
|
|
|
@ -2801,12 +2801,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/asset/download/{assetId}": {
|
"/asset/download/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "downloadFile",
|
"operationId": "downloadFile",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "assetId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -2966,7 +2966,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/asset/file/{assetId}": {
|
"/asset/file/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "serveFile",
|
"operationId": "serveFile",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2989,7 +2989,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "assetId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3035,12 +3035,12 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/asset/thumbnail/{assetId}": {
|
"/asset/thumbnail/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getAssetThumbnail",
|
"operationId": "getAssetThumbnail",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "assetId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3563,13 +3563,13 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/asset/assetById/{assetId}": {
|
"/asset/assetById/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getAssetById",
|
"operationId": "getAssetById",
|
||||||
"description": "Get a single asset's information",
|
"description": "Get a single asset's information",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "assetId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -3614,13 +3614,13 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/asset/{assetId}": {
|
"/asset/{id}": {
|
||||||
"put": {
|
"put": {
|
||||||
"operationId": "updateAsset",
|
"operationId": "updateAsset",
|
||||||
"description": "Update an asset",
|
"description": "Update an asset",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "assetId",
|
"name": "id",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
|
140
web/src/api/open-api/api.ts
generated
140
web/src/api/open-api/api.ts
generated
|
@ -4847,16 +4847,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @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}
|
||||||
*/
|
*/
|
||||||
downloadFile: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
downloadFile: async (id: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('downloadFile', 'assetId', assetId)
|
assertParamExists('downloadFile', 'id', id)
|
||||||
const localVarPath = `/asset/download/{assetId}`
|
const localVarPath = `/asset/download/{id}`
|
||||||
.replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
|
.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;
|
||||||
|
@ -5097,16 +5097,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get a single asset\'s information
|
* Get a single asset\'s information
|
||||||
* @param {string} assetId
|
* @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}
|
||||||
*/
|
*/
|
||||||
getAssetById: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
getAssetById: async (id: string, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('getAssetById', 'assetId', assetId)
|
assertParamExists('getAssetById', 'id', id)
|
||||||
const localVarPath = `/asset/assetById/{assetId}`
|
const localVarPath = `/asset/assetById/{id}`
|
||||||
.replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
|
.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;
|
||||||
|
@ -5308,17 +5308,17 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {ThumbnailFormat} [format]
|
* @param {ThumbnailFormat} [format]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
getAssetThumbnail: async (id: string, format?: ThumbnailFormat, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('getAssetThumbnail', 'assetId', assetId)
|
assertParamExists('getAssetThumbnail', 'id', id)
|
||||||
const localVarPath = `/asset/thumbnail/{assetId}`
|
const localVarPath = `/asset/thumbnail/{id}`
|
||||||
.replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
|
.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;
|
||||||
|
@ -5628,18 +5628,18 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {boolean} [isThumb]
|
* @param {boolean} [isThumb]
|
||||||
* @param {boolean} [isWeb]
|
* @param {boolean} [isWeb]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
serveFile: async (assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
serveFile: async (id: string, isThumb?: boolean, isWeb?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('serveFile', 'assetId', assetId)
|
assertParamExists('serveFile', 'id', id)
|
||||||
const localVarPath = `/asset/file/{assetId}`
|
const localVarPath = `/asset/file/{id}`
|
||||||
.replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
|
.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;
|
||||||
|
@ -5685,18 +5685,18 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Update an asset
|
* Update an asset
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {UpdateAssetDto} updateAssetDto
|
* @param {UpdateAssetDto} updateAssetDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateAsset: async (assetId: string, updateAssetDto: UpdateAssetDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
updateAsset: async (id: string, updateAssetDto: UpdateAssetDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetId' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('updateAsset', 'assetId', assetId)
|
assertParamExists('updateAsset', 'id', id)
|
||||||
// verify required parameter 'updateAssetDto' is not null or undefined
|
// verify required parameter 'updateAssetDto' is not null or undefined
|
||||||
assertParamExists('updateAsset', 'updateAssetDto', updateAssetDto)
|
assertParamExists('updateAsset', 'updateAssetDto', updateAssetDto)
|
||||||
const localVarPath = `/asset/{assetId}`
|
const localVarPath = `/asset/{id}`
|
||||||
.replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
|
.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;
|
||||||
|
@ -5933,13 +5933,13 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @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 downloadFile(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
async downloadFile(id: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(assetId, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(id, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -5990,13 +5990,13 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get a single asset\'s information
|
* Get a single asset\'s information
|
||||||
* @param {string} assetId
|
* @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 getAssetById(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetResponseDto>> {
|
async getAssetById(id: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(id, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -6039,14 +6039,14 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {ThumbnailFormat} [format]
|
* @param {ThumbnailFormat} [format]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
async getAssetThumbnail(id: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(id, format, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -6112,26 +6112,26 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {boolean} [isThumb]
|
* @param {boolean} [isThumb]
|
||||||
* @param {boolean} [isWeb]
|
* @param {boolean} [isWeb]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
async serveFile(id: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(assetId, isThumb, isWeb, key, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(id, isThumb, isWeb, key, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Update an asset
|
* Update an asset
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {UpdateAssetDto} updateAssetDto
|
* @param {UpdateAssetDto} updateAssetDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async updateAsset(assetId: string, updateAssetDto: UpdateAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetResponseDto>> {
|
async updateAsset(id: string, updateAssetDto: UpdateAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAsset(assetId, updateAssetDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAsset(id, updateAssetDto, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -6225,13 +6225,13 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @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}
|
||||||
*/
|
*/
|
||||||
downloadFile(assetId: string, key?: string, options?: any): AxiosPromise<File> {
|
downloadFile(id: string, key?: string, options?: any): AxiosPromise<File> {
|
||||||
return localVarFp.downloadFile(assetId, key, options).then((request) => request(axios, basePath));
|
return localVarFp.downloadFile(id, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6277,13 +6277,13 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get a single asset\'s information
|
* Get a single asset\'s information
|
||||||
* @param {string} assetId
|
* @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}
|
||||||
*/
|
*/
|
||||||
getAssetById(assetId: string, key?: string, options?: any): AxiosPromise<AssetResponseDto> {
|
getAssetById(id: string, key?: string, options?: any): AxiosPromise<AssetResponseDto> {
|
||||||
return localVarFp.getAssetById(assetId, key, options).then((request) => request(axios, basePath));
|
return localVarFp.getAssetById(id, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6321,14 +6321,14 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {ThumbnailFormat} [format]
|
* @param {ThumbnailFormat} [format]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: any): AxiosPromise<File> {
|
getAssetThumbnail(id: string, format?: ThumbnailFormat, key?: string, options?: any): AxiosPromise<File> {
|
||||||
return localVarFp.getAssetThumbnail(assetId, format, key, options).then((request) => request(axios, basePath));
|
return localVarFp.getAssetThumbnail(id, format, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6387,25 +6387,25 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {boolean} [isThumb]
|
* @param {boolean} [isThumb]
|
||||||
* @param {boolean} [isWeb]
|
* @param {boolean} [isWeb]
|
||||||
* @param {string} [key]
|
* @param {string} [key]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: any): AxiosPromise<File> {
|
serveFile(id: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: any): AxiosPromise<File> {
|
||||||
return localVarFp.serveFile(assetId, isThumb, isWeb, key, options).then((request) => request(axios, basePath));
|
return localVarFp.serveFile(id, isThumb, isWeb, key, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Update an asset
|
* Update an asset
|
||||||
* @param {string} assetId
|
* @param {string} id
|
||||||
* @param {UpdateAssetDto} updateAssetDto
|
* @param {UpdateAssetDto} updateAssetDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateAsset(assetId: string, updateAssetDto: UpdateAssetDto, options?: any): AxiosPromise<AssetResponseDto> {
|
updateAsset(id: string, updateAssetDto: UpdateAssetDto, options?: any): AxiosPromise<AssetResponseDto> {
|
||||||
return localVarFp.updateAsset(assetId, updateAssetDto, options).then((request) => request(axios, basePath));
|
return localVarFp.updateAsset(id, updateAssetDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6541,7 +6541,7 @@ export interface AssetApiDownloadFileRequest {
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof AssetApiDownloadFile
|
* @memberof AssetApiDownloadFile
|
||||||
*/
|
*/
|
||||||
readonly assetId: string
|
readonly id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6653,7 +6653,7 @@ export interface AssetApiGetAssetByIdRequest {
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof AssetApiGetAssetById
|
* @memberof AssetApiGetAssetById
|
||||||
*/
|
*/
|
||||||
readonly assetId: string
|
readonly id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6702,7 +6702,7 @@ export interface AssetApiGetAssetThumbnailRequest {
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof AssetApiGetAssetThumbnail
|
* @memberof AssetApiGetAssetThumbnail
|
||||||
*/
|
*/
|
||||||
readonly assetId: string
|
readonly id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6807,7 +6807,7 @@ export interface AssetApiServeFileRequest {
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof AssetApiServeFile
|
* @memberof AssetApiServeFile
|
||||||
*/
|
*/
|
||||||
readonly assetId: string
|
readonly id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -6842,7 +6842,7 @@ export interface AssetApiUpdateAssetRequest {
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof AssetApiUpdateAsset
|
* @memberof AssetApiUpdateAsset
|
||||||
*/
|
*/
|
||||||
readonly assetId: string
|
readonly id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -7038,7 +7038,7 @@ export class AssetApi extends BaseAPI {
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public downloadFile(requestParameters: AssetApiDownloadFileRequest, options?: AxiosRequestConfig) {
|
public downloadFile(requestParameters: AssetApiDownloadFileRequest, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).downloadFile(requestParameters.assetId, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).downloadFile(requestParameters.id, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7092,7 +7092,7 @@ export class AssetApi extends BaseAPI {
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public getAssetById(requestParameters: AssetApiGetAssetByIdRequest, options?: AxiosRequestConfig) {
|
public getAssetById(requestParameters: AssetApiGetAssetByIdRequest, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).getAssetById(requestParameters.assetId, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).getAssetById(requestParameters.id, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7145,7 +7145,7 @@ export class AssetApi extends BaseAPI {
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public getAssetThumbnail(requestParameters: AssetApiGetAssetThumbnailRequest, options?: AxiosRequestConfig) {
|
public getAssetThumbnail(requestParameters: AssetApiGetAssetThumbnailRequest, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).getAssetThumbnail(requestParameters.assetId, requestParameters.format, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).getAssetThumbnail(requestParameters.id, requestParameters.format, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7220,7 +7220,7 @@ export class AssetApi extends BaseAPI {
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public serveFile(requestParameters: AssetApiServeFileRequest, options?: AxiosRequestConfig) {
|
public serveFile(requestParameters: AssetApiServeFileRequest, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).serveFile(requestParameters.assetId, requestParameters.isThumb, requestParameters.isWeb, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).serveFile(requestParameters.id, requestParameters.isThumb, requestParameters.isWeb, requestParameters.key, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7231,7 +7231,7 @@ export class AssetApi extends BaseAPI {
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public updateAsset(requestParameters: AssetApiUpdateAssetRequest, options?: AxiosRequestConfig) {
|
public updateAsset(requestParameters: AssetApiUpdateAssetRequest, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).updateAsset(requestParameters.assetId, requestParameters.updateAssetDto, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).updateAsset(requestParameters.id, requestParameters.updateAssetDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -87,7 +87,7 @@ describe('AlbumCard component', () => {
|
||||||
expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledTimes(1);
|
expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledTimes(1);
|
||||||
expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledWith(
|
expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledWith(
|
||||||
{
|
{
|
||||||
assetId: 'thumbnailIdOne',
|
id: 'thumbnailIdOne',
|
||||||
format: ThumbnailFormat.Jpeg
|
format: ThumbnailFormat.Jpeg
|
||||||
},
|
},
|
||||||
{ responseType: 'blob' }
|
{ responseType: 'blob' }
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
const { data } = await api.assetApi.getAssetThumbnail(
|
const { data } = await api.assetApi.getAssetThumbnail(
|
||||||
{
|
{
|
||||||
assetId: thubmnailId,
|
id: thubmnailId,
|
||||||
format: ThumbnailFormat.Jpeg
|
format: ThumbnailFormat.Jpeg
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
$downloadAssets[imageFileName] = 0;
|
$downloadAssets[imageFileName] = 0;
|
||||||
|
|
||||||
const { data, status } = await api.assetApi.downloadFile(
|
const { data, status } = await api.assetApi.downloadFile(
|
||||||
{ assetId, key },
|
{ id: assetId, key },
|
||||||
{
|
{
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
onDownloadProgress: (progressEvent) => {
|
onDownloadProgress: (progressEvent) => {
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
const toggleFavorite = async () => {
|
const toggleFavorite = async () => {
|
||||||
const { data } = await api.assetApi.updateAsset({
|
const { data } = await api.assetApi.updateAsset({
|
||||||
assetId: asset.id,
|
id: asset.id,
|
||||||
updateAssetDto: {
|
updateAssetDto: {
|
||||||
isFavorite: !asset.isFavorite
|
isFavorite: !asset.isFavorite
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
const toggleArchive = async () => {
|
const toggleArchive = async () => {
|
||||||
try {
|
try {
|
||||||
const { data } = await api.assetApi.updateAsset({
|
const { data } = await api.assetApi.updateAsset({
|
||||||
assetId: asset.id,
|
id: asset.id,
|
||||||
updateAssetDto: {
|
updateAssetDto: {
|
||||||
isArchived: !asset.isArchived
|
isArchived: !asset.isArchived
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
$: {
|
$: {
|
||||||
// Get latest description from server
|
// Get latest description from server
|
||||||
if (asset.id) {
|
if (asset.id) {
|
||||||
api.assetApi.getAssetById({ assetId: asset.id }).then((res) => {
|
api.assetApi.getAssetById({ id: asset.id }).then((res) => {
|
||||||
people = res.data?.people || [];
|
people = res.data?.people || [];
|
||||||
textarea.value = res.data?.exifInfo?.description || '';
|
textarea.value = res.data?.exifInfo?.description || '';
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
dispatch('description-focus-out');
|
dispatch('description-focus-out');
|
||||||
try {
|
try {
|
||||||
await api.assetApi.updateAsset({
|
await api.assetApi.updateAsset({
|
||||||
assetId: asset.id,
|
id: asset.id,
|
||||||
updateAssetDto: {
|
updateAssetDto: {
|
||||||
description: description
|
description: description
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
const loadAssetData = async () => {
|
const loadAssetData = async () => {
|
||||||
try {
|
try {
|
||||||
const { data } = await api.assetApi.serveFile(
|
const { data } = await api.assetApi.serveFile(
|
||||||
{ assetId: asset.id, isThumb: false, isWeb: true, key: publicSharedKey },
|
{ id: asset.id, isThumb: false, isWeb: true, key: publicSharedKey },
|
||||||
{
|
{
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
for (const asset of getAssets()) {
|
for (const asset of getAssets()) {
|
||||||
if (asset.isArchived !== isArchived) {
|
if (asset.isArchived !== isArchived) {
|
||||||
api.assetApi.updateAsset({ assetId: asset.id, updateAssetDto: { isArchived } });
|
api.assetApi.updateAsset({ id: asset.id, updateAssetDto: { isArchived } });
|
||||||
|
|
||||||
onAssetArchive(asset, isArchived);
|
onAssetArchive(asset, isArchived);
|
||||||
cnt = cnt + 1;
|
cnt = cnt + 1;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
let cnt = 0;
|
let cnt = 0;
|
||||||
for (const asset of getAssets()) {
|
for (const asset of getAssets()) {
|
||||||
if (asset.isFavorite !== isFavorite) {
|
if (asset.isFavorite !== isFavorite) {
|
||||||
api.assetApi.updateAsset({ assetId: asset.id, updateAssetDto: { isFavorite } });
|
api.assetApi.updateAsset({ id: asset.id, updateAssetDto: { isFavorite } });
|
||||||
onAssetFavorite(asset, isFavorite);
|
onAssetFavorite(asset, isFavorite);
|
||||||
cnt = cnt + 1;
|
cnt = cnt + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
assetId = link.assets[0].id;
|
assetId = link.assets[0].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data } = await api.assetApi.getAssetById({ assetId });
|
const { data } = await api.assetApi.getAssetById({ id: assetId });
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue