mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 01:11:16 +03:00
feat(web): add search filter for camera lens model. (#21792)
This commit is contained in:
13
mobile/openapi/lib/api/search_api.dart
generated
13
mobile/openapi/lib/api/search_api.dart
generated
@@ -123,12 +123,14 @@ class SearchApi {
|
||||
/// * [bool] includeNull:
|
||||
/// This property was added in v111.0.0
|
||||
///
|
||||
/// * [String] lensModel:
|
||||
///
|
||||
/// * [String] make:
|
||||
///
|
||||
/// * [String] model:
|
||||
///
|
||||
/// * [String] state:
|
||||
Future<Response> getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? make, String? model, String? state, }) async {
|
||||
Future<Response> getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/search/suggestions';
|
||||
|
||||
@@ -145,6 +147,9 @@ class SearchApi {
|
||||
if (includeNull != null) {
|
||||
queryParams.addAll(_queryParams('', 'includeNull', includeNull));
|
||||
}
|
||||
if (lensModel != null) {
|
||||
queryParams.addAll(_queryParams('', 'lensModel', lensModel));
|
||||
}
|
||||
if (make != null) {
|
||||
queryParams.addAll(_queryParams('', 'make', make));
|
||||
}
|
||||
@@ -181,13 +186,15 @@ class SearchApi {
|
||||
/// * [bool] includeNull:
|
||||
/// This property was added in v111.0.0
|
||||
///
|
||||
/// * [String] lensModel:
|
||||
///
|
||||
/// * [String] make:
|
||||
///
|
||||
/// * [String] model:
|
||||
///
|
||||
/// * [String] state:
|
||||
Future<List<String>?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? make, String? model, String? state, }) async {
|
||||
final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, make: make, model: model, state: state, );
|
||||
Future<List<String>?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, }) async {
|
||||
final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, lensModel: lensModel, make: make, model: model, state: state, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ class SearchSuggestionType {
|
||||
static const city = SearchSuggestionType._(r'city');
|
||||
static const cameraMake = SearchSuggestionType._(r'camera-make');
|
||||
static const cameraModel = SearchSuggestionType._(r'camera-model');
|
||||
static const cameraLensModel = SearchSuggestionType._(r'camera-lens-model');
|
||||
|
||||
/// List of all possible values in this [enum][SearchSuggestionType].
|
||||
static const values = <SearchSuggestionType>[
|
||||
@@ -36,6 +37,7 @@ class SearchSuggestionType {
|
||||
city,
|
||||
cameraMake,
|
||||
cameraModel,
|
||||
cameraLensModel,
|
||||
];
|
||||
|
||||
static SearchSuggestionType? fromJson(dynamic value) => SearchSuggestionTypeTypeTransformer().decode(value);
|
||||
@@ -79,6 +81,7 @@ class SearchSuggestionTypeTypeTransformer {
|
||||
case r'city': return SearchSuggestionType.city;
|
||||
case r'camera-make': return SearchSuggestionType.cameraMake;
|
||||
case r'camera-model': return SearchSuggestionType.cameraModel;
|
||||
case r'camera-lens-model': return SearchSuggestionType.cameraLensModel;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
||||
Reference in New Issue
Block a user