mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: asset copy (#23172)
This commit is contained in:
parent
fdfb04d83c
commit
4ae7cadeae
20 changed files with 644 additions and 2 deletions
44
mobile/openapi/lib/api/assets_api.dart
generated
44
mobile/openapi/lib/api/assets_api.dart
generated
|
|
@ -128,6 +128,50 @@ class AssetsApi {
|
|||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `asset.copy` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AssetCopyDto] assetCopyDto (required):
|
||||
Future<Response> copyAssetWithHttpInfo(AssetCopyDto assetCopyDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/assets/copy';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetCopyDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `asset.copy` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AssetCopyDto] assetCopyDto (required):
|
||||
Future<void> copyAsset(AssetCopyDto assetCopyDto,) async {
|
||||
final response = await copyAssetWithHttpInfo(assetCopyDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint requires the `asset.update` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue