You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
refactor: rename clip -> smart search (#6713)
This commit is contained in:
10
mobile/openapi/doc/SearchApi.md
generated
10
mobile/openapi/doc/SearchApi.md
generated
@@ -66,7 +66,7 @@ This endpoint does not need any parameter.
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **search**
|
||||
> SearchResponseDto search(clip, motion, q, query, recent, type, withArchived)
|
||||
> SearchResponseDto search(clip, motion, q, query, recent, smart, type, withArchived)
|
||||
|
||||
|
||||
|
||||
@@ -89,16 +89,17 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = SearchApi();
|
||||
final clip = true; // bool |
|
||||
final clip = true; // bool | @deprecated
|
||||
final motion = true; // bool |
|
||||
final q = q_example; // String |
|
||||
final query = query_example; // String |
|
||||
final recent = true; // bool |
|
||||
final smart = true; // bool |
|
||||
final type = type_example; // String |
|
||||
final withArchived = true; // bool |
|
||||
|
||||
try {
|
||||
final result = api_instance.search(clip, motion, q, query, recent, type, withArchived);
|
||||
final result = api_instance.search(clip, motion, q, query, recent, smart, type, withArchived);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SearchApi->search: $e\n');
|
||||
@@ -109,11 +110,12 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**clip** | **bool**| | [optional]
|
||||
**clip** | **bool**| @deprecated | [optional]
|
||||
**motion** | **bool**| | [optional]
|
||||
**q** | **String**| | [optional]
|
||||
**query** | **String**| | [optional]
|
||||
**recent** | **bool**| | [optional]
|
||||
**smart** | **bool**| | [optional]
|
||||
**type** | **String**| | [optional]
|
||||
**withArchived** | **bool**| | [optional]
|
||||
|
||||
|
2
mobile/openapi/doc/ServerFeaturesDto.md
generated
2
mobile/openapi/doc/ServerFeaturesDto.md
generated
@@ -8,7 +8,6 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**clipEncode** | **bool** | |
|
||||
**configFile** | **bool** | |
|
||||
**facialRecognition** | **bool** | |
|
||||
**map** | **bool** | |
|
||||
@@ -18,6 +17,7 @@ Name | Type | Description | Notes
|
||||
**reverseGeocoding** | **bool** | |
|
||||
**search** | **bool** | |
|
||||
**sidecar** | **bool** | |
|
||||
**smartSearch** | **bool** | |
|
||||
**trash** | **bool** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
15
mobile/openapi/lib/api/search_api.dart
generated
15
mobile/openapi/lib/api/search_api.dart
generated
@@ -64,6 +64,7 @@ class SearchApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [bool] clip:
|
||||
/// @deprecated
|
||||
///
|
||||
/// * [bool] motion:
|
||||
///
|
||||
@@ -73,10 +74,12 @@ class SearchApi {
|
||||
///
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [bool] smart:
|
||||
///
|
||||
/// * [String] type:
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<Response> searchWithHttpInfo({ bool? clip, bool? motion, String? q, String? query, bool? recent, String? type, bool? withArchived, }) async {
|
||||
Future<Response> searchWithHttpInfo({ bool? clip, bool? motion, String? q, String? query, bool? recent, bool? smart, String? type, bool? withArchived, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/search';
|
||||
|
||||
@@ -102,6 +105,9 @@ class SearchApi {
|
||||
if (recent != null) {
|
||||
queryParams.addAll(_queryParams('', 'recent', recent));
|
||||
}
|
||||
if (smart != null) {
|
||||
queryParams.addAll(_queryParams('', 'smart', smart));
|
||||
}
|
||||
if (type != null) {
|
||||
queryParams.addAll(_queryParams('', 'type', type));
|
||||
}
|
||||
@@ -126,6 +132,7 @@ class SearchApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [bool] clip:
|
||||
/// @deprecated
|
||||
///
|
||||
/// * [bool] motion:
|
||||
///
|
||||
@@ -135,11 +142,13 @@ class SearchApi {
|
||||
///
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [bool] smart:
|
||||
///
|
||||
/// * [String] type:
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<SearchResponseDto?> search({ bool? clip, bool? motion, String? q, String? query, bool? recent, String? type, bool? withArchived, }) async {
|
||||
final response = await searchWithHttpInfo( clip: clip, motion: motion, q: q, query: query, recent: recent, type: type, withArchived: withArchived, );
|
||||
Future<SearchResponseDto?> search({ bool? clip, bool? motion, String? q, String? query, bool? recent, bool? smart, String? type, bool? withArchived, }) async {
|
||||
final response = await searchWithHttpInfo( clip: clip, motion: motion, q: q, query: query, recent: recent, smart: smart, type: type, withArchived: withArchived, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
18
mobile/openapi/lib/model/server_features_dto.dart
generated
18
mobile/openapi/lib/model/server_features_dto.dart
generated
@@ -13,7 +13,6 @@ part of openapi.api;
|
||||
class ServerFeaturesDto {
|
||||
/// Returns a new [ServerFeaturesDto] instance.
|
||||
ServerFeaturesDto({
|
||||
required this.clipEncode,
|
||||
required this.configFile,
|
||||
required this.facialRecognition,
|
||||
required this.map,
|
||||
@@ -23,11 +22,10 @@ class ServerFeaturesDto {
|
||||
required this.reverseGeocoding,
|
||||
required this.search,
|
||||
required this.sidecar,
|
||||
required this.smartSearch,
|
||||
required this.trash,
|
||||
});
|
||||
|
||||
bool clipEncode;
|
||||
|
||||
bool configFile;
|
||||
|
||||
bool facialRecognition;
|
||||
@@ -46,11 +44,12 @@ class ServerFeaturesDto {
|
||||
|
||||
bool sidecar;
|
||||
|
||||
bool smartSearch;
|
||||
|
||||
bool trash;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto &&
|
||||
other.clipEncode == clipEncode &&
|
||||
other.configFile == configFile &&
|
||||
other.facialRecognition == facialRecognition &&
|
||||
other.map == map &&
|
||||
@@ -60,12 +59,12 @@ class ServerFeaturesDto {
|
||||
other.reverseGeocoding == reverseGeocoding &&
|
||||
other.search == search &&
|
||||
other.sidecar == sidecar &&
|
||||
other.smartSearch == smartSearch &&
|
||||
other.trash == trash;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(clipEncode.hashCode) +
|
||||
(configFile.hashCode) +
|
||||
(facialRecognition.hashCode) +
|
||||
(map.hashCode) +
|
||||
@@ -75,14 +74,14 @@ class ServerFeaturesDto {
|
||||
(reverseGeocoding.hashCode) +
|
||||
(search.hashCode) +
|
||||
(sidecar.hashCode) +
|
||||
(smartSearch.hashCode) +
|
||||
(trash.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerFeaturesDto[clipEncode=$clipEncode, configFile=$configFile, facialRecognition=$facialRecognition, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, trash=$trash]';
|
||||
String toString() => 'ServerFeaturesDto[configFile=$configFile, facialRecognition=$facialRecognition, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'clipEncode'] = this.clipEncode;
|
||||
json[r'configFile'] = this.configFile;
|
||||
json[r'facialRecognition'] = this.facialRecognition;
|
||||
json[r'map'] = this.map;
|
||||
@@ -92,6 +91,7 @@ class ServerFeaturesDto {
|
||||
json[r'reverseGeocoding'] = this.reverseGeocoding;
|
||||
json[r'search'] = this.search;
|
||||
json[r'sidecar'] = this.sidecar;
|
||||
json[r'smartSearch'] = this.smartSearch;
|
||||
json[r'trash'] = this.trash;
|
||||
return json;
|
||||
}
|
||||
@@ -104,7 +104,6 @@ class ServerFeaturesDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ServerFeaturesDto(
|
||||
clipEncode: mapValueOfType<bool>(json, r'clipEncode')!,
|
||||
configFile: mapValueOfType<bool>(json, r'configFile')!,
|
||||
facialRecognition: mapValueOfType<bool>(json, r'facialRecognition')!,
|
||||
map: mapValueOfType<bool>(json, r'map')!,
|
||||
@@ -114,6 +113,7 @@ class ServerFeaturesDto {
|
||||
reverseGeocoding: mapValueOfType<bool>(json, r'reverseGeocoding')!,
|
||||
search: mapValueOfType<bool>(json, r'search')!,
|
||||
sidecar: mapValueOfType<bool>(json, r'sidecar')!,
|
||||
smartSearch: mapValueOfType<bool>(json, r'smartSearch')!,
|
||||
trash: mapValueOfType<bool>(json, r'trash')!,
|
||||
);
|
||||
}
|
||||
@@ -162,7 +162,6 @@ class ServerFeaturesDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'clipEncode',
|
||||
'configFile',
|
||||
'facialRecognition',
|
||||
'map',
|
||||
@@ -172,6 +171,7 @@ class ServerFeaturesDto {
|
||||
'reverseGeocoding',
|
||||
'search',
|
||||
'sidecar',
|
||||
'smartSearch',
|
||||
'trash',
|
||||
};
|
||||
}
|
||||
|
2
mobile/openapi/test/search_api_test.dart
generated
2
mobile/openapi/test/search_api_test.dart
generated
@@ -22,7 +22,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<SearchResponseDto> search({ bool clip, bool motion, String q, String query, bool recent, String type, bool withArchived }) async
|
||||
//Future<SearchResponseDto> search({ bool clip, bool motion, String q, String query, bool recent, bool smart, String type, bool withArchived }) async
|
||||
test('test search', () async {
|
||||
// TODO
|
||||
});
|
||||
|
10
mobile/openapi/test/server_features_dto_test.dart
generated
10
mobile/openapi/test/server_features_dto_test.dart
generated
@@ -16,11 +16,6 @@ void main() {
|
||||
// final instance = ServerFeaturesDto();
|
||||
|
||||
group('test ServerFeaturesDto', () {
|
||||
// bool clipEncode
|
||||
test('to test the property `clipEncode`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool configFile
|
||||
test('to test the property `configFile`', () async {
|
||||
// TODO
|
||||
@@ -66,6 +61,11 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool smartSearch
|
||||
test('to test the property `smartSearch`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool trash
|
||||
test('to test the property `trash`', () async {
|
||||
// TODO
|
||||
|
Reference in New Issue
Block a user