1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

feat(web): manual face tagging and deletion (#16062)

This commit is contained in:
Alex
2025-02-21 09:58:25 -06:00
committed by GitHub
parent 94c0e8253a
commit 007eaaceb9
35 changed files with 2054 additions and 106 deletions

View File

@ -16,6 +16,89 @@ class FacesApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /faces' operation and returns the [Response].
/// Parameters:
///
/// * [AssetFaceCreateDto] assetFaceCreateDto (required):
Future<Response> createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto,) async {
// ignore: prefer_const_declarations
final path = r'/faces';
// ignore: prefer_final_locals
Object? postBody = assetFaceCreateDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [AssetFaceCreateDto] assetFaceCreateDto (required):
Future<void> createFace(AssetFaceCreateDto assetFaceCreateDto,) async {
final response = await createFaceWithHttpInfo(assetFaceCreateDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'DELETE /faces/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):
Future<Response> deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {
// ignore: prefer_const_declarations
final path = r'/faces/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = assetFaceDeleteDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):
Future<void> deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {
final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /faces' operation and returns the [Response].
/// Parameters:
///