mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
fix: suggest people (#4566)
* fix: suggest people * feat: remove hidden people * add hidden people when merging faces * pr feedback * fix: don't use reactive statement * fixed section height * improve merging * fix: migration * fix migration * feat: add asset count * fix: test * rename endpoint * add server test * improve responsive design * fix: remove videos from live photos in the asset count * pr feedback * fix: rename asset count endpoint * fix: return firstname and lastname * fix: reset people only on error * fix: search * fix: responsive design & div flickering * fix: cleanup * chore: open api --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
48
mobile/openapi/lib/api/person_api.dart
generated
48
mobile/openapi/lib/api/person_api.dart
generated
@@ -166,6 +166,54 @@ class PersonApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /person/{id}/statistics' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getPersonStatisticsWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/person/{id}/statistics'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PersonStatisticsResponseDto?> getPersonStatistics(String id,) async {
|
||||
final response = await getPersonStatisticsWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonStatisticsResponseDto',) as PersonStatisticsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /person/{id}/thumbnail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
13
mobile/openapi/lib/api/search_api.dart
generated
13
mobile/openapi/lib/api/search_api.dart
generated
@@ -220,7 +220,9 @@ class SearchApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] name (required):
|
||||
Future<Response> searchPersonWithHttpInfo(String name,) async {
|
||||
///
|
||||
/// * [bool] withHidden:
|
||||
Future<Response> searchPersonWithHttpInfo(String name, { bool? withHidden, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/search/person';
|
||||
|
||||
@@ -232,6 +234,9 @@ class SearchApi {
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'name', name));
|
||||
if (withHidden != null) {
|
||||
queryParams.addAll(_queryParams('', 'withHidden', withHidden));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
@@ -250,8 +255,10 @@ class SearchApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] name (required):
|
||||
Future<List<PersonResponseDto>?> searchPerson(String name,) async {
|
||||
final response = await searchPersonWithHttpInfo(name,);
|
||||
///
|
||||
/// * [bool] withHidden:
|
||||
Future<List<PersonResponseDto>?> searchPerson(String name, { bool? withHidden, }) async {
|
||||
final response = await searchPersonWithHttpInfo(name, withHidden: withHidden, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user