mirror of
https://github.com/immich-app/immich.git
synced 2025-11-02 02:57:49 +09:00
chore(server): remove old asset search (#9104)
* chore(server): remove old asset search * chore: remove more unused search code
This commit is contained in:
114
mobile/openapi/lib/api/search_api.dart
generated
114
mobile/openapi/lib/api/search_api.dart
generated
@@ -184,120 +184,6 @@ class SearchApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /search' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [bool] clip:
|
||||
///
|
||||
/// * [bool] motion:
|
||||
///
|
||||
/// * [num] page:
|
||||
///
|
||||
/// * [String] q:
|
||||
///
|
||||
/// * [String] query:
|
||||
///
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [num] size:
|
||||
///
|
||||
/// * [bool] smart:
|
||||
///
|
||||
/// * [String] type:
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<Response> searchWithHttpInfo({ bool? clip, bool? motion, num? page, String? q, String? query, bool? recent, num? size, bool? smart, String? type, bool? withArchived, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/search';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (clip != null) {
|
||||
queryParams.addAll(_queryParams('', 'clip', clip));
|
||||
}
|
||||
if (motion != null) {
|
||||
queryParams.addAll(_queryParams('', 'motion', motion));
|
||||
}
|
||||
if (page != null) {
|
||||
queryParams.addAll(_queryParams('', 'page', page));
|
||||
}
|
||||
if (q != null) {
|
||||
queryParams.addAll(_queryParams('', 'q', q));
|
||||
}
|
||||
if (query != null) {
|
||||
queryParams.addAll(_queryParams('', 'query', query));
|
||||
}
|
||||
if (recent != null) {
|
||||
queryParams.addAll(_queryParams('', 'recent', recent));
|
||||
}
|
||||
if (size != null) {
|
||||
queryParams.addAll(_queryParams('', 'size', size));
|
||||
}
|
||||
if (smart != null) {
|
||||
queryParams.addAll(_queryParams('', 'smart', smart));
|
||||
}
|
||||
if (type != null) {
|
||||
queryParams.addAll(_queryParams('', 'type', type));
|
||||
}
|
||||
if (withArchived != null) {
|
||||
queryParams.addAll(_queryParams('', 'withArchived', withArchived));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [bool] clip:
|
||||
///
|
||||
/// * [bool] motion:
|
||||
///
|
||||
/// * [num] page:
|
||||
///
|
||||
/// * [String] q:
|
||||
///
|
||||
/// * [String] query:
|
||||
///
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [num] size:
|
||||
///
|
||||
/// * [bool] smart:
|
||||
///
|
||||
/// * [String] type:
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<SearchResponseDto?> search({ bool? clip, bool? motion, num? page, String? q, String? query, bool? recent, num? size, bool? smart, String? type, bool? withArchived, }) async {
|
||||
final response = await searchWithHttpInfo( clip: clip, motion: motion, page: page, q: q, query: query, recent: recent, size: size, smart: smart, type: type, withArchived: withArchived, );
|
||||
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), 'SearchResponseDto',) as SearchResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /search/metadata' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user