Skip to content

High performance self-hosted photo and video management solution.

feat: enhance search (#7127)

Alex69983ff83a71
diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES
index aeb3d49cb4..f42a9c82ca 100644
--- a/mobile/openapi/.openapi-generator/FILES
+++ b/mobile/openapi/.openapi-generator/FILES
@@ -90,6 +90,7 @@ doc/MapMarkerResponseDto.md
doc/MapTheme.md
doc/MemoryLaneResponseDto.md
doc/MergePersonDto.md
+doc/MetadataSearchDto.md
doc/ModelType.md
doc/OAuthApi.md
doc/OAuthAuthorizeResponseDto.md
@@ -137,6 +138,7 @@ doc/SharedLinkResponseDto.md
doc/SharedLinkType.md
doc/SignUpDto.md
doc/SmartInfoResponseDto.md
+doc/SmartSearchDto.md
doc/SystemConfigApi.md
doc/SystemConfigDto.md
doc/SystemConfigFFmpegDto.md
@@ -288,6 +290,7 @@ lib/model/map_marker_response_dto.dart
lib/model/map_theme.dart
lib/model/memory_lane_response_dto.dart
lib/model/merge_person_dto.dart
+lib/model/metadata_search_dto.dart
lib/model/model_type.dart
lib/model/o_auth_authorize_response_dto.dart
lib/model/o_auth_callback_dto.dart
@@ -329,6 +332,7 @@ lib/model/shared_link_response_dto.dart
lib/model/shared_link_type.dart
lib/model/sign_up_dto.dart
lib/model/smart_info_response_dto.dart
+lib/model/smart_search_dto.dart
lib/model/system_config_dto.dart
lib/model/system_config_f_fmpeg_dto.dart
lib/model/system_config_job_dto.dart
@@ -457,6 +461,7 @@ test/map_marker_response_dto_test.dart
test/map_theme_test.dart
test/memory_lane_response_dto_test.dart
test/merge_person_dto_test.dart
+test/metadata_search_dto_test.dart
test/model_type_test.dart
test/o_auth_api_test.dart
test/o_auth_authorize_response_dto_test.dart
@@ -504,6 +509,7 @@ test/shared_link_response_dto_test.dart
test/shared_link_type_test.dart
test/sign_up_dto_test.dart
test/smart_info_response_dto_test.dart
+test/smart_search_dto_test.dart
test/system_config_api_test.dart
test/system_config_dto_test.dart
test/system_config_f_fmpeg_dto_test.dart
diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md
index 12d20ea13d..9e241b0a44 100644
--- a/mobile/openapi/README.md
+++ b/mobile/openapi/README.md
@@ -163,9 +163,9 @@ Class | Method | HTTP request | Description
*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore |
*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions |
*SearchApi* | [**search**](doc//SearchApi.md#search) | **GET** /search |
-*SearchApi* | [**searchMetadata**](doc//SearchApi.md#searchmetadata) | **GET** /search/metadata |
+*SearchApi* | [**searchMetadata**](doc//SearchApi.md#searchmetadata) | **POST** /search/metadata |
*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person |
-*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **GET** /search/smart |
+*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart |
*ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
*ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |
@@ -290,6 +290,7 @@ Class | Method | HTTP request | Description
- [MapTheme](doc//MapTheme.md)
- [MemoryLaneResponseDto](doc//MemoryLaneResponseDto.md)
- [MergePersonDto](doc//MergePersonDto.md)
+ - [MetadataSearchDto](doc//MetadataSearchDto.md)
- [ModelType](doc//ModelType.md)
- [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md)
- [OAuthCallbackDto](doc//OAuthCallbackDto.md)
@@ -331,6 +332,7 @@ Class | Method | HTTP request | Description
- [SharedLinkType](doc//SharedLinkType.md)
- [SignUpDto](doc//SignUpDto.md)
- [SmartInfoResponseDto](doc//SmartInfoResponseDto.md)
+ - [SmartSearchDto](doc//SmartSearchDto.md)
- [SystemConfigDto](doc//SystemConfigDto.md)
- [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md)
- [SystemConfigJobDto](doc//SystemConfigJobDto.md)
diff --git a/mobile/openapi/doc/AssetApi.md b/mobile/openapi/doc/AssetApi.md
index 963e2e66c5..5691965bc7 100644
--- a/mobile/openapi/doc/AssetApi.md
+++ b/mobile/openapi/doc/AssetApi.md
@@ -1036,7 +1036,7 @@ void (empty response body)
[[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)
# **searchAssets**
-> List<AssetResponseDto> searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked)
+> List<AssetResponseDto> searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isNotInAlbum, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, personIds, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked)
@@ -1073,6 +1073,7 @@ final isEncoded = true; // bool |
final isExternal = true; // bool |
final isFavorite = true; // bool |
final isMotion = true; // bool |
+final isNotInAlbum = true; // bool |
final isOffline = true; // bool |
final isReadOnly = true; // bool |
final isVisible = true; // bool |
@@ -1084,6 +1085,7 @@ final order = ; // AssetOrder |
final originalFileName = originalFileName_example; // String |
final originalPath = originalPath_example; // String |
final page = 8.14; // num |
+final personIds = []; // List<String> |
final resizePath = resizePath_example; // String |
final size = 8.14; // num |
final state = state_example; // String |
@@ -1102,7 +1104,7 @@ final withPeople = true; // bool |
final withStacked = true; // bool |
try {
- final result = api_instance.searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked);
+ final result = api_instance.searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isNotInAlbum, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, personIds, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked);
print(result);
} catch (e) {
print('Exception when calling AssetApi->searchAssets: $e\n');
@@ -1127,6 +1129,7 @@ Name | Type | Description | Notes
**isExternal** | **bool**| | [optional]
**isFavorite** | **bool**| | [optional]
**isMotion** | **bool**| | [optional]
+ **isNotInAlbum** | **bool**| | [optional]
**isOffline** | **bool**| | [optional]
**isReadOnly** | **bool**| | [optional]
**isVisible** | **bool**| | [optional]
@@ -1138,6 +1141,7 @@ Name | Type | Description | Notes
**originalFileName** | **String**| | [optional]
**originalPath** | **String**| | [optional]
**page** | **num**| | [optional]
+ **personIds** | [**List<String>**](String.md)| | [optional] [default to const []]
**resizePath** | **String**| | [optional]
**size** | **num**| | [optional]
**state** | **String**| | [optional]
diff --git a/mobile/openapi/doc/MetadataSearchDto.md b/mobile/openapi/doc/MetadataSearchDto.md
new file mode 100644
index 0000000000..bfbf81749e
--- /dev/null
+++ b/mobile/openapi/doc/MetadataSearchDto.md
@@ -0,0 +1,57 @@
+# openapi.model.MetadataSearchDto
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**checksum** | **String** | | [optional]
+**city** | **String** | | [optional]
+**country** | **String** | | [optional]
+**createdAfter** | [**DateTime**](DateTime.md) | | [optional]
+**createdBefore** | [**DateTime**](DateTime.md) | | [optional]
+**deviceAssetId** | **String** | | [optional]
+**deviceId** | **String** | | [optional]
+**encodedVideoPath** | **String** | | [optional]
+**id** | **String** | | [optional]
+**isArchived** | **bool** | | [optional]
+**isEncoded** | **bool** | | [optional]
+**isExternal** | **bool** | | [optional]
+**isFavorite** | **bool** | | [optional]
+**isMotion** | **bool** | | [optional]
+**isNotInAlbum** | **bool** | | [optional]
+**isOffline** | **bool** | | [optional]
+**isReadOnly** | **bool** | | [optional]
+**isVisible** | **bool** | | [optional]
+**lensModel** | **String** | | [optional]
+**libraryId** | **String** | | [optional]
+**make** | **String** | | [optional]
+**model** | **String** | | [optional]
+**order** | [**AssetOrder**](AssetOrder.md) | | [optional]
+**originalFileName** | **String** | | [optional]
+**originalPath** | **String** | | [optional]
+**page** | **num** | | [optional]
+**personIds** | **List<String>** | | [optional] [default to const []]
+**resizePath** | **String** | | [optional]
+**size** | **num** | | [optional]
+**state** | **String** | | [optional]
+**takenAfter** | [**DateTime**](DateTime.md) | | [optional]
+**takenBefore** | [**DateTime**](DateTime.md) | | [optional]
+**trashedAfter** | [**DateTime**](DateTime.md) | | [optional]
+**trashedBefore** | [**DateTime**](DateTime.md) | | [optional]
+**type** | [**AssetTypeEnum**](AssetTypeEnum.md) | | [optional]
+**updatedAfter** | [**DateTime**](DateTime.md) | | [optional]
+**updatedBefore** | [**DateTime**](DateTime.md) | | [optional]
+**webpPath** | **String** | | [optional]
+**withArchived** | **bool** | | [optional]
+**withDeleted** | **bool** | | [optional]
+**withExif** | **bool** | | [optional]
+**withPeople** | **bool** | | [optional]
+**withStacked** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/mobile/openapi/doc/SearchApi.md b/mobile/openapi/doc/SearchApi.md
index 8c924428f6..f975e94484 100644
--- a/mobile/openapi/doc/SearchApi.md
+++ b/mobile/openapi/doc/SearchApi.md
@@ -12,9 +12,9 @@ Method | HTTP request | Description
[**getExploreData**](SearchApi.md#getexploredata) | **GET** /search/explore |
[**getSearchSuggestions**](SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions |
[**search**](SearchApi.md#search) | **GET** /search |
-[**searchMetadata**](SearchApi.md#searchmetadata) | **GET** /search/metadata |
+[**searchMetadata**](SearchApi.md#searchmetadata) | **POST** /search/metadata |
[**searchPerson**](SearchApi.md#searchperson) | **GET** /search/person |
-[**searchSmart**](SearchApi.md#searchsmart) | **GET** /search/smart |
+[**searchSmart**](SearchApi.md#searchsmart) | **POST** /search/smart |
# **getExploreData**
@@ -205,7 +205,7 @@ Name | Type | Description | Notes
[[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)
# **searchMetadata**
-> SearchResponseDto searchMetadata(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked)
+> SearchResponseDto searchMetadata(metadataSearchDto)
@@ -228,50 +228,10 @@ import 'package:openapi/api.dart';
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = SearchApi();
-final checksum = checksum_example; // String |
-final city = city_example; // String |
-final country = country_example; // String |
-final createdAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final createdBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final deviceAssetId = deviceAssetId_example; // String |
-final deviceId = deviceId_example; // String |
-final encodedVideoPath = encodedVideoPath_example; // String |
-final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
-final isArchived = true; // bool |
-final isEncoded = true; // bool |
-final isExternal = true; // bool |
-final isFavorite = true; // bool |
-final isMotion = true; // bool |
-final isOffline = true; // bool |
-final isReadOnly = true; // bool |
-final isVisible = true; // bool |
-final lensModel = lensModel_example; // String |
-final libraryId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
-final make = make_example; // String |
-final model = model_example; // String |
-final order = ; // AssetOrder |
-final originalFileName = originalFileName_example; // String |
-final originalPath = originalPath_example; // String |
-final page = 8.14; // num |
-final resizePath = resizePath_example; // String |
-final size = 8.14; // num |
-final state = state_example; // String |
-final takenAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final takenBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final trashedAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final trashedBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final type = ; // AssetTypeEnum |
-final updatedAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final updatedBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final webpPath = webpPath_example; // String |
-final withArchived = true; // bool |
-final withDeleted = true; // bool |
-final withExif = true; // bool |
-final withPeople = true; // bool |
-final withStacked = true; // bool |
+final metadataSearchDto = MetadataSearchDto(); // MetadataSearchDto |
try {
- final result = api_instance.searchMetadata(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked);
+ final result = api_instance.searchMetadata(metadataSearchDto);
print(result);
} catch (e) {
print('Exception when calling SearchApi->searchMetadata: $e\n');
@@ -282,47 +242,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **checksum** | **String**| | [optional]
- **city** | **String**| | [optional]
- **country** | **String**| | [optional]
- **createdAfter** | **DateTime**| | [optional]
- **createdBefore** | **DateTime**| | [optional]
- **deviceAssetId** | **String**| | [optional]
- **deviceId** | **String**| | [optional]
- **encodedVideoPath** | **String**| | [optional]
- **id** | **String**| | [optional]
- **isArchived** | **bool**| | [optional]
- **isEncoded** | **bool**| | [optional]
- **isExternal** | **bool**| | [optional]
- **isFavorite** | **bool**| | [optional]
- **isMotion** | **bool**| | [optional]
- **isOffline** | **bool**| | [optional]
- **isReadOnly** | **bool**| | [optional]
- **isVisible** | **bool**| | [optional]
- **lensModel** | **String**| | [optional]
- **libraryId** | **String**| | [optional]
- **make** | **String**| | [optional]
- **model** | **String**| | [optional]
- **order** | [**AssetOrder**](.md)| | [optional]
- **originalFileName** | **String**| | [optional]
- **originalPath** | **String**| | [optional]
- **page** | **num**| | [optional]
- **resizePath** | **String**| | [optional]
- **size** | **num**| | [optional]
- **state** | **String**| | [optional]
- **takenAfter** | **DateTime**| | [optional]
- **takenBefore** | **DateTime**| | [optional]
- **trashedAfter** | **DateTime**| | [optional]
- **trashedBefore** | **DateTime**| | [optional]
- **type** | [**AssetTypeEnum**](.md)| | [optional]
- **updatedAfter** | **DateTime**| | [optional]
- **updatedBefore** | **DateTime**| | [optional]
- **webpPath** | **String**| | [optional]
- **withArchived** | **bool**| | [optional]
- **withDeleted** | **bool**| | [optional]
- **withExif** | **bool**| | [optional]
- **withPeople** | **bool**| | [optional]
- **withStacked** | **bool**| | [optional]
+ **metadataSearchDto** | [**MetadataSearchDto**](MetadataSearchDto.md)| |
### Return type
@@ -334,7 +254,7 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
[[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)
@@ -397,7 +317,7 @@ Name | Type | Description | Notes
[[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)
# **searchSmart**
-> SearchResponseDto searchSmart(query, city, country, createdAfter, createdBefore, deviceId, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, page, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, withArchived, withDeleted, withExif)
+> SearchResponseDto searchSmart(smartSearchDto)
@@ -420,40 +340,10 @@ import 'package:openapi/api.dart';
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = SearchApi();
-final query = query_example; // String |
-final city = city_example; // String |
-final country = country_example; // String |
-final createdAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final createdBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final deviceId = deviceId_example; // String |
-final isArchived = true; // bool |
-final isEncoded = true; // bool |
-final isExternal = true; // bool |
-final isFavorite = true; // bool |
-final isMotion = true; // bool |
-final isOffline = true; // bool |
-final isReadOnly = true; // bool |
-final isVisible = true; // bool |
-final lensModel = lensModel_example; // String |
-final libraryId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
-final make = make_example; // String |
-final model = model_example; // String |
-final page = 8.14; // num |
-final size = 8.14; // num |
-final state = state_example; // String |
-final takenAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final takenBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final trashedAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final trashedBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final type = ; // AssetTypeEnum |
-final updatedAfter = 2013-10-20T19:20:30+01:00; // DateTime |
-final updatedBefore = 2013-10-20T19:20:30+01:00; // DateTime |
-final withArchived = true; // bool |
-final withDeleted = true; // bool |
-final withExif = true; // bool |
+final smartSearchDto = SmartSearchDto(); // SmartSearchDto |
try {
- final result = api_instance.searchSmart(query, city, country, createdAfter, createdBefore, deviceId, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, page, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, withArchived, withDeleted, withExif);
+ final result = api_instance.searchSmart(smartSearchDto);
print(result);
} catch (e) {
print('Exception when calling SearchApi->searchSmart: $e\n');
@@ -464,37 +354,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **query** | **String**| |
- **city** | **String**| | [optional]
- **country** | **String**| | [optional]
- **createdAfter** | **DateTime**| | [optional]
- **createdBefore** | **DateTime**| | [optional]
- **deviceId** | **String**| | [optional]
- **isArchived** | **bool**| | [optional]
- **isEncoded** | **bool**| | [optional]
- **isExternal** | **bool**| | [optional]
- **isFavorite** | **bool**| | [optional]
- **isMotion** | **bool**| | [optional]
- **isOffline** | **bool**| | [optional]
- **isReadOnly** | **bool**| | [optional]
- **isVisible** | **bool**| | [optional]
- **lensModel** | **String**| | [optional]
- **libraryId** | **String**| | [optional]
- **make** | **String**| | [optional]
- **model** | **String**| | [optional]
- **page** | **num**| | [optional]
- **size** | **num**| | [optional]
- **state** | **String**| | [optional]
- **takenAfter** | **DateTime**| | [optional]
- **takenBefore** | **DateTime**| | [optional]
- **trashedAfter** | **DateTime**| | [optional]
- **trashedBefore** | **DateTime**| | [optional]
- **type** | [**AssetTypeEnum**](.md)| | [optional]
- **updatedAfter** | **DateTime**| | [optional]
- **updatedBefore** | **DateTime**| | [optional]
- **withArchived** | **bool**| | [optional]
- **withDeleted** | **bool**| | [optional]
- **withExif** | **bool**| | [optional]
+ **smartSearchDto** | [**SmartSearchDto**](SmartSearchDto.md)| |
### Return type
@@ -506,7 +366,7 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
[[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)
diff --git a/mobile/openapi/doc/SmartSearchDto.md b/mobile/openapi/doc/SmartSearchDto.md
new file mode 100644
index 0000000000..5d34143df2
--- /dev/null
+++ b/mobile/openapi/doc/SmartSearchDto.md
@@ -0,0 +1,45 @@
+# openapi.model.SmartSearchDto
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**city** | **String** | | [optional]
+**country** | **String** | | [optional]
+**createdAfter** | [**DateTime**](DateTime.md) | | [optional]
+**createdBefore** | [**DateTime**](DateTime.md) | | [optional]
+**deviceId** | **String** | | [optional]
+**isArchived** | **bool** | | [optional]
+**isEncoded** | **bool** | | [optional]
+**isExternal** | **bool** | | [optional]
+**isFavorite** | **bool** | | [optional]
+**isMotion** | **bool** | | [optional]
+**isOffline** | **bool** | | [optional]
+**isReadOnly** | **bool** | | [optional]
+**isVisible** | **bool** | | [optional]
+**lensModel** | **String** | | [optional]
+**libraryId** | **String** | | [optional]
+**make** | **String** | | [optional]
+**model** | **String** | | [optional]
+**page** | **num** | | [optional]
+**query** | **String** | |
+**size** | **num** | | [optional]
+**state** | **String** | | [optional]
+**takenAfter** | [**DateTime**](DateTime.md) | | [optional]
+**takenBefore** | [**DateTime**](DateTime.md) | | [optional]
+**trashedAfter** | [**DateTime**](DateTime.md) | | [optional]
+**trashedBefore** | [**DateTime**](DateTime.md) | | [optional]
+**type** | [**AssetTypeEnum**](AssetTypeEnum.md) | | [optional]
+**updatedAfter** | [**DateTime**](DateTime.md) | | [optional]
+**updatedBefore** | [**DateTime**](DateTime.md) | | [optional]
+**withArchived** | **bool** | | [optional]
+**withDeleted** | **bool** | | [optional]
+**withExif** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart
index f2903e3516..3816a05b3b 100644
--- a/mobile/openapi/lib/api.dart
+++ b/mobile/openapi/lib/api.dart
@@ -127,6 +127,7 @@ part 'model/map_marker_response_dto.dart';
part 'model/map_theme.dart';
part 'model/memory_lane_response_dto.dart';
part 'model/merge_person_dto.dart';
+part 'model/metadata_search_dto.dart';
part 'model/model_type.dart';
part 'model/o_auth_authorize_response_dto.dart';
part 'model/o_auth_callback_dto.dart';
@@ -168,6 +169,7 @@ part 'model/shared_link_response_dto.dart';
part 'model/shared_link_type.dart';
part 'model/sign_up_dto.dart';
part 'model/smart_info_response_dto.dart';
+part 'model/smart_search_dto.dart';
part 'model/system_config_dto.dart';
part 'model/system_config_f_fmpeg_dto.dart';
part 'model/system_config_job_dto.dart';
diff --git a/mobile/openapi/lib/api/asset_api.dart b/mobile/openapi/lib/api/asset_api.dart
index 97c9e7cbec..bdcb874092 100644
--- a/mobile/openapi/lib/api/asset_api.dart
+++ b/mobile/openapi/lib/api/asset_api.dart
@@ -1140,6 +1140,8 @@ class AssetApi {
///
/// * [bool] isMotion:
///
+ /// * [bool] isNotInAlbum:
+ ///
/// * [bool] isOffline:
///
/// * [bool] isReadOnly:
@@ -1162,6 +1164,8 @@ class AssetApi {
///
/// * [num] page:
///
+ /// * [List<String>] personIds:
+ ///
/// * [String] resizePath:
///
/// * [num] size:
@@ -1193,7 +1197,7 @@ class AssetApi {
/// * [bool] withPeople:
///
/// * [bool] withStacked:
- Future<Response> searchAssetsWithHttpInfo({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
+ Future<Response> searchAssetsWithHttpInfo({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, List<String>? personIds, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final path = r'/assets';
@@ -1246,6 +1250,9 @@ class AssetApi {
if (isMotion != null) {
queryParams.addAll(_queryParams('', 'isMotion', isMotion));
}
+ if (isNotInAlbum != null) {
+ queryParams.addAll(_queryParams('', 'isNotInAlbum', isNotInAlbum));
+ }
if (isOffline != null) {
queryParams.addAll(_queryParams('', 'isOffline', isOffline));
}
@@ -1279,6 +1286,9 @@ class AssetApi {
if (page != null) {
queryParams.addAll(_queryParams('', 'page', page));
}
+ if (personIds != null) {
+ queryParams.addAll(_queryParams('multi', 'personIds', personIds));
+ }
if (resizePath != null) {
queryParams.addAll(_queryParams('', 'resizePath', resizePath));
}
@@ -1372,6 +1382,8 @@ class AssetApi {
///
/// * [bool] isMotion:
///
+ /// * [bool] isNotInAlbum:
+ ///
/// * [bool] isOffline:
///
/// * [bool] isReadOnly:
@@ -1394,6 +1406,8 @@ class AssetApi {
///
/// * [num] page:
///
+ /// * [List<String>] personIds:
+ ///
/// * [String] resizePath:
///
/// * [num] size:
@@ -1425,8 +1439,8 @@ class AssetApi {
/// * [bool] withPeople:
///
/// * [bool] withStacked:
- Future<List<AssetResponseDto>?> searchAssets({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
- final response = await searchAssetsWithHttpInfo( checksum: checksum, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, deviceAssetId: deviceAssetId, deviceId: deviceId, encodedVideoPath: encodedVideoPath, id: id, isArchived: isArchived, isEncoded: isEncoded, isExternal: isExternal, isFavorite: isFavorite, isMotion: isMotion, isOffline: isOffline, isReadOnly: isReadOnly, isVisible: isVisible, lensModel: lensModel, libraryId: libraryId, make: make, model: model, order: order, originalFileName: originalFileName, originalPath: originalPath, page: page, resizePath: resizePath, size: size, state: state, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, webpPath: webpPath, withArchived: withArchived, withDeleted: withDeleted, withExif: withExif, withPeople: withPeople, withStacked: withStacked, );
+ Future<List<AssetResponseDto>?> searchAssets({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, List<String>? personIds, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
+ final response = await searchAssetsWithHttpInfo( checksum: checksum, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, deviceAssetId: deviceAssetId, deviceId: deviceId, encodedVideoPath: encodedVideoPath, id: id, isArchived: isArchived, isEncoded: isEncoded, isExternal: isExternal, isFavorite: isFavorite, isMotion: isMotion, isNotInAlbum: isNotInAlbum, isOffline: isOffline, isReadOnly: isReadOnly, isVisible: isVisible, lensModel: lensModel, libraryId: libraryId, make: make, model: model, order: order, originalFileName: originalFileName, originalPath: originalPath, page: page, personIds: personIds, resizePath: resizePath, size: size, state: state, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, webpPath: webpPath, withArchived: withArchived, withDeleted: withDeleted, withExif: withExif, withPeople: withPeople, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart
index 16d2b3003e..062ca4a50b 100644
--- a/mobile/openapi/lib/api/search_api.dart
+++ b/mobile/openapi/lib/api/search_api.dart
@@ -254,231 +254,27 @@ class SearchApi {
return null;
}
- /// Performs an HTTP 'GET /search/metadata' operation and returns the [Response].
+ /// Performs an HTTP 'POST /search/metadata' operation and returns the [Response].
/// Parameters:
///
- /// * [String] checksum:
- ///
- /// * [String] city:
- ///
- /// * [String] country:
- ///
- /// * [DateTime] createdAfter:
- ///
- /// * [DateTime] createdBefore:
- ///
- /// * [String] deviceAssetId:
- ///
- /// * [String] deviceId:
- ///
- /// * [String] encodedVideoPath:
- ///
- /// * [String] id:
- ///
- /// * [bool] isArchived:
- ///
- /// * [bool] isEncoded:
- ///
- /// * [bool] isExternal:
- ///
- /// * [bool] isFavorite:
- ///
- /// * [bool] isMotion:
- ///
- /// * [bool] isOffline:
- ///
- /// * [bool] isReadOnly:
- ///
- /// * [bool] isVisible:
- ///
- /// * [String] lensModel:
- ///
- /// * [String] libraryId:
- ///
- /// * [String] make:
- ///
- /// * [String] model:
- ///
- /// * [AssetOrder] order:
- ///
- /// * [String] originalFileName:
- ///
- /// * [String] originalPath:
- ///
- /// * [num] page:
- ///
- /// * [String] resizePath:
- ///
- /// * [num] size:
- ///
- /// * [String] state:
- ///
- /// * [DateTime] takenAfter:
- ///
- /// * [DateTime] takenBefore:
- ///
- /// * [DateTime] trashedAfter:
- ///
- /// * [DateTime] trashedBefore:
- ///
- /// * [AssetTypeEnum] type:
- ///
- /// * [DateTime] updatedAfter:
- ///
- /// * [DateTime] updatedBefore:
- ///
- /// * [String] webpPath:
- ///
- /// * [bool] withArchived:
- ///
- /// * [bool] withDeleted:
- ///
- /// * [bool] withExif:
- ///
- /// * [bool] withPeople:
- ///
- /// * [bool] withStacked:
- Future<Response> searchMetadataWithHttpInfo({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
+ /// * [MetadataSearchDto] metadataSearchDto (required):
+ Future<Response> searchMetadataWithHttpInfo(MetadataSearchDto metadataSearchDto,) async {
// ignore: prefer_const_declarations
final path = r'/search/metadata';
// ignore: prefer_final_locals
- Object? postBody;
+ Object? postBody = metadataSearchDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
- if (checksum != null) {
- queryParams.addAll(_queryParams('', 'checksum', checksum));
- }
- if (city != null) {
- queryParams.addAll(_queryParams('', 'city', city));
- }
- if (country != null) {
- queryParams.addAll(_queryParams('', 'country', country));
- }
- if (createdAfter != null) {
- queryParams.addAll(_queryParams('', 'createdAfter', createdAfter));
- }
- if (createdBefore != null) {
- queryParams.addAll(_queryParams('', 'createdBefore', createdBefore));
- }
- if (deviceAssetId != null) {
- queryParams.addAll(_queryParams('', 'deviceAssetId', deviceAssetId));
- }
- if (deviceId != null) {
- queryParams.addAll(_queryParams('', 'deviceId', deviceId));
- }
- if (encodedVideoPath != null) {
- queryParams.addAll(_queryParams('', 'encodedVideoPath', encodedVideoPath));
- }
- if (id != null) {
- queryParams.addAll(_queryParams('', 'id', id));
- }
- if (isArchived != null) {
- queryParams.addAll(_queryParams('', 'isArchived', isArchived));
- }
- if (isEncoded != null) {
- queryParams.addAll(_queryParams('', 'isEncoded', isEncoded));
- }
- if (isExternal != null) {
- queryParams.addAll(_queryParams('', 'isExternal', isExternal));
- }
- if (isFavorite != null) {
- queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
- }
- if (isMotion != null) {
- queryParams.addAll(_queryParams('', 'isMotion', isMotion));
- }
- if (isOffline != null) {
- queryParams.addAll(_queryParams('', 'isOffline', isOffline));
- }
- if (isReadOnly != null) {
- queryParams.addAll(_queryParams('', 'isReadOnly', isReadOnly));
- }
- if (isVisible != null) {
- queryParams.addAll(_queryParams('', 'isVisible', isVisible));
- }
- if (lensModel != null) {
- queryParams.addAll(_queryParams('', 'lensModel', lensModel));
- }
- if (libraryId != null) {
- queryParams.addAll(_queryParams('', 'libraryId', libraryId));
- }
- if (make != null) {
- queryParams.addAll(_queryParams('', 'make', make));
- }
- if (model != null) {
- queryParams.addAll(_queryParams('', 'model', model));
- }
- if (order != null) {
- queryParams.addAll(_queryParams('', 'order', order));
- }
- if (originalFileName != null) {
- queryParams.addAll(_queryParams('', 'originalFileName', originalFileName));
- }
- if (originalPath != null) {
- queryParams.addAll(_queryParams('', 'originalPath', originalPath));
- }
- if (page != null) {
- queryParams.addAll(_queryParams('', 'page', page));
- }
- if (resizePath != null) {
- queryParams.addAll(_queryParams('', 'resizePath', resizePath));
- }
- if (size != null) {
- queryParams.addAll(_queryParams('', 'size', size));
- }
- if (state != null) {
- queryParams.addAll(_queryParams('', 'state', state));
- }
- if (takenAfter != null) {
- queryParams.addAll(_queryParams('', 'takenAfter', takenAfter));
- }
- if (takenBefore != null) {
- queryParams.addAll(_queryParams('', 'takenBefore', takenBefore));
- }
- if (trashedAfter != null) {
- queryParams.addAll(_queryParams('', 'trashedAfter', trashedAfter));
- }
- if (trashedBefore != null) {
- queryParams.addAll(_queryParams('', 'trashedBefore', trashedBefore));
- }
- if (type != null) {
- queryParams.addAll(_queryParams('', 'type', type));
- }
- if (updatedAfter != null) {
- queryParams.addAll(_queryParams('', 'updatedAfter', updatedAfter));
- }
- if (updatedBefore != null) {
- queryParams.addAll(_queryParams('', 'updatedBefore', updatedBefore));
- }
- if (webpPath != null) {
- queryParams.addAll(_queryParams('', 'webpPath', webpPath));
- }
- if (withArchived != null) {
- queryParams.addAll(_queryParams('', 'withArchived', withArchived));
- }
- if (withDeleted != null) {
- queryParams.addAll(_queryParams('', 'withDeleted', withDeleted));
- }
- if (withExif != null) {
- queryParams.addAll(_queryParams('', 'withExif', withExif));
- }
- if (withPeople != null) {
- queryParams.addAll(_queryParams('', 'withPeople', withPeople));
- }
- if (withStacked != null) {
- queryParams.addAll(_queryParams('', 'withStacked', withStacked));
- }
-
- const contentTypes = <String>[];
+ const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
- 'GET',
+ 'POST',
queryParams,
postBody,
headerParams,
@@ -489,89 +285,9 @@ class SearchApi {
/// Parameters:
///
- /// * [String] checksum:
- ///
- /// * [String] city:
- ///
- /// * [String] country:
- ///
- /// * [DateTime] createdAfter:
- ///
- /// * [DateTime] createdBefore:
- ///
- /// * [String] deviceAssetId:
- ///
- /// * [String] deviceId:
- ///
- /// * [String] encodedVideoPath:
- ///
- /// * [String] id:
- ///
- /// * [bool] isArchived:
- ///
- /// * [bool] isEncoded:
- ///
- /// * [bool] isExternal:
- ///
- /// * [bool] isFavorite:
- ///
- /// * [bool] isMotion:
- ///
- /// * [bool] isOffline:
- ///
- /// * [bool] isReadOnly:
- ///
- /// * [bool] isVisible:
- ///
- /// * [String] lensModel:
- ///
- /// * [String] libraryId:
- ///
- /// * [String] make:
- ///
- /// * [String] model:
- ///
- /// * [AssetOrder] order:
- ///
- /// * [String] originalFileName:
- ///
- /// * [String] originalPath:
- ///
- /// * [num] page:
- ///
- /// * [String] resizePath:
- ///
- /// * [num] size:
- ///
- /// * [String] state:
- ///
- /// * [DateTime] takenAfter:
- ///
- /// * [DateTime] takenBefore:
- ///
- /// * [DateTime] trashedAfter:
- ///
- /// * [DateTime] trashedBefore:
- ///
- /// * [AssetTypeEnum] type:
- ///
- /// * [DateTime] updatedAfter:
- ///
- /// * [DateTime] updatedBefore:
- ///
- /// * [String] webpPath:
- ///
- /// * [bool] withArchived:
- ///
- /// * [bool] withDeleted:
- ///
- /// * [bool] withExif:
- ///
- /// * [bool] withPeople:
- ///
- /// * [bool] withStacked:
- Future<SearchResponseDto?> searchMetadata({ String? checksum, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceAssetId, String? deviceId, String? encodedVideoPath, String? id, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, AssetOrder? order, String? originalFileName, String? originalPath, num? page, String? resizePath, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, String? webpPath, bool? withArchived, bool? withDeleted, bool? withExif, bool? withPeople, bool? withStacked, }) async {
- final response = await searchMetadataWithHttpInfo( checksum: checksum, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, deviceAssetId: deviceAssetId, deviceId: deviceId, encodedVideoPath: encodedVideoPath, id: id, isArchived: isArchived, isEncoded: isEncoded, isExternal: isExternal, isFavorite: isFavorite, isMotion: isMotion, isOffline: isOffline, isReadOnly: isReadOnly, isVisible: isVisible, lensModel: lensModel, libraryId: libraryId, make: make, model: model, order: order, originalFileName: originalFileName, originalPath: originalPath, page: page, resizePath: resizePath, size: size, state: state, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, webpPath: webpPath, withArchived: withArchived, withDeleted: withDeleted, withExif: withExif, withPeople: withPeople, withStacked: withStacked, );
+ /// * [MetadataSearchDto] metadataSearchDto (required):
+ Future<SearchResponseDto?> searchMetadata(MetadataSearchDto metadataSearchDto,) async {
+ final response = await searchMetadataWithHttpInfo(metadataSearchDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -644,179 +360,27 @@ class SearchApi {
return null;
}
- /// Performs an HTTP 'GET /search/smart' operation and returns the [Response].
+ /// Performs an HTTP 'POST /search/smart' operation and returns the [Response].
/// Parameters:
///
- /// * [String] query (required):
- ///
- /// * [String] city:
- ///
- /// * [String] country:
- ///
- /// * [DateTime] createdAfter:
- ///
- /// * [DateTime] createdBefore:
- ///
- /// * [String] deviceId:
- ///
- /// * [bool] isArchived:
- ///
- /// * [bool] isEncoded:
- ///
- /// * [bool] isExternal:
- ///
- /// * [bool] isFavorite:
- ///
- /// * [bool] isMotion:
- ///
- /// * [bool] isOffline:
- ///
- /// * [bool] isReadOnly:
- ///
- /// * [bool] isVisible:
- ///
- /// * [String] lensModel:
- ///
- /// * [String] libraryId:
- ///
- /// * [String] make:
- ///
- /// * [String] model:
- ///
- /// * [num] page:
- ///
- /// * [num] size:
- ///
- /// * [String] state:
- ///
- /// * [DateTime] takenAfter:
- ///
- /// * [DateTime] takenBefore:
- ///
- /// * [DateTime] trashedAfter:
- ///
- /// * [DateTime] trashedBefore:
- ///
- /// * [AssetTypeEnum] type:
- ///
- /// * [DateTime] updatedAfter:
- ///
- /// * [DateTime] updatedBefore:
- ///
- /// * [bool] withArchived:
- ///
- /// * [bool] withDeleted:
- ///
- /// * [bool] withExif:
- Future<Response> searchSmartWithHttpInfo(String query, { String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceId, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, num? page, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, bool? withArchived, bool? withDeleted, bool? withExif, }) async {
+ /// * [SmartSearchDto] smartSearchDto (required):
+ Future<Response> searchSmartWithHttpInfo(SmartSearchDto smartSearchDto,) async {
// ignore: prefer_const_declarations
final path = r'/search/smart';
// ignore: prefer_final_locals
- Object? postBody;
+ Object? postBody = smartSearchDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
- if (city != null) {
- queryParams.addAll(_queryParams('', 'city', city));
- }
- if (country != null) {
- queryParams.addAll(_queryParams('', 'country', country));
- }
- if (createdAfter != null) {
- queryParams.addAll(_queryParams('', 'createdAfter', createdAfter));
- }
- if (createdBefore != null) {
- queryParams.addAll(_queryParams('', 'createdBefore', createdBefore));
- }
- if (deviceId != null) {
- queryParams.addAll(_queryParams('', 'deviceId', deviceId));
- }
- if (isArchived != null) {
- queryParams.addAll(_queryParams('', 'isArchived', isArchived));
- }
- if (isEncoded != null) {
- queryParams.addAll(_queryParams('', 'isEncoded', isEncoded));
- }
- if (isExternal != null) {
- queryParams.addAll(_queryParams('', 'isExternal', isExternal));
- }
- if (isFavorite != null) {
- queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
- }
- if (isMotion != null) {
- queryParams.addAll(_queryParams('', 'isMotion', isMotion));
- }
- if (isOffline != null) {
- queryParams.addAll(_queryParams('', 'isOffline', isOffline));
- }
- if (isReadOnly != null) {
- queryParams.addAll(_queryParams('', 'isReadOnly', isReadOnly));
- }
- if (isVisible != null) {
- queryParams.addAll(_queryParams('', 'isVisible', isVisible));
- }
- if (lensModel != null) {
- queryParams.addAll(_queryParams('', 'lensModel', lensModel));
- }
- if (libraryId != null) {
- queryParams.addAll(_queryParams('', 'libraryId', libraryId));
- }
- if (make != null) {
- queryParams.addAll(_queryParams('', 'make', make));
- }
- if (model != null) {
- queryParams.addAll(_queryParams('', 'model', model));
- }
- if (page != null) {
- queryParams.addAll(_queryParams('', 'page', page));
- }
- queryParams.addAll(_queryParams('', 'query', query));
- if (size != null) {
- queryParams.addAll(_queryParams('', 'size', size));
- }
- if (state != null) {
- queryParams.addAll(_queryParams('', 'state', state));
- }
- if (takenAfter != null) {
- queryParams.addAll(_queryParams('', 'takenAfter', takenAfter));
- }
- if (takenBefore != null) {
- queryParams.addAll(_queryParams('', 'takenBefore', takenBefore));
- }
- if (trashedAfter != null) {
- queryParams.addAll(_queryParams('', 'trashedAfter', trashedAfter));
- }
- if (trashedBefore != null) {
- queryParams.addAll(_queryParams('', 'trashedBefore', trashedBefore));
- }
- if (type != null) {
- queryParams.addAll(_queryParams('', 'type', type));
- }
- if (updatedAfter != null) {
- queryParams.addAll(_queryParams('', 'updatedAfter', updatedAfter));
- }
- if (updatedBefore != null) {
- queryParams.addAll(_queryParams('', 'updatedBefore', updatedBefore));
- }
- if (withArchived != null) {
- queryParams.addAll(_queryParams('', 'withArchived', withArchived));
- }
- if (withDeleted != null) {
- queryParams.addAll(_queryParams('', 'withDeleted', withDeleted));
- }
- if (withExif != null) {
- queryParams.addAll(_queryParams('', 'withExif', withExif));
- }
-
- const contentTypes = <String>[];
+ const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
- 'GET',
+ 'POST',
queryParams,
postBody,
headerParams,
@@ -827,69 +391,9 @@ class SearchApi {
/// Parameters:
///
- /// * [String] query (required):
- ///
- /// * [String] city:
- ///
- /// * [String] country:
- ///
- /// * [DateTime] createdAfter:
- ///
- /// * [DateTime] createdBefore:
- ///
- /// * [String] deviceId:
- ///
- /// * [bool] isArchived:
- ///
- /// * [bool] isEncoded:
- ///
- /// * [bool] isExternal:
- ///
- /// * [bool] isFavorite:
- ///
- /// * [bool] isMotion:
- ///
- /// * [bool] isOffline:
- ///
- /// * [bool] isReadOnly:
- ///
- /// * [bool] isVisible:
- ///
- /// * [String] lensModel:
- ///
- /// * [String] libraryId:
- ///
- /// * [String] make:
- ///
- /// * [String] model:
- ///
- /// * [num] page:
- ///
- /// * [num] size:
- ///
- /// * [String] state:
- ///
- /// * [DateTime] takenAfter:
- ///
- /// * [DateTime] takenBefore:
- ///
- /// * [DateTime] trashedAfter:
- ///
- /// * [DateTime] trashedBefore:
- ///
- /// * [AssetTypeEnum] type:
- ///
- /// * [DateTime] updatedAfter:
- ///
- /// * [DateTime] updatedBefore:
- ///
- /// * [bool] withArchived:
- ///
- /// * [bool] withDeleted:
- ///
- /// * [bool] withExif:
- Future<SearchResponseDto?> searchSmart(String query, { String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceId, bool? isArchived, bool? isEncoded, bool? isExternal, bool? isFavorite, bool? isMotion, bool? isOffline, bool? isReadOnly, bool? isVisible, String? lensModel, String? libraryId, String? make, String? model, num? page, num? size, String? state, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, bool? withArchived, bool? withDeleted, bool? withExif, }) async {
- final response = await searchSmartWithHttpInfo(query, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, deviceId: deviceId, isArchived: isArchived, isEncoded: isEncoded, isExternal: isExternal, isFavorite: isFavorite, isMotion: isMotion, isOffline: isOffline, isReadOnly: isReadOnly, isVisible: isVisible, lensModel: lensModel, libraryId: libraryId, make: make, model: model, page: page, size: size, state: state, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, withArchived: withArchived, withDeleted: withDeleted, withExif: withExif, );
+ /// * [SmartSearchDto] smartSearchDto (required):
+ Future<SearchResponseDto?> searchSmart(SmartSearchDto smartSearchDto,) async {
+ final response = await searchSmartWithHttpInfo(smartSearchDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart
index a8cf4c34c1..3a0e535e73 100644
--- a/mobile/openapi/lib/api_client.dart
+++ b/mobile/openapi/lib/api_client.dart
@@ -336,6 +336,8 @@ class ApiClient {
return MemoryLaneResponseDto.fromJson(value);
case 'MergePersonDto':
return MergePersonDto.fromJson(value);
+ case 'MetadataSearchDto':
+ return MetadataSearchDto.fromJson(value);
case 'ModelType':
return ModelTypeTypeTransformer().decode(value);
case 'OAuthAuthorizeResponseDto':
@@ -418,6 +420,8 @@ class ApiClient {
return SignUpDto.fromJson(value);
case 'SmartInfoResponseDto':
return SmartInfoResponseDto.fromJson(value);
+ case 'SmartSearchDto':
+ return SmartSearchDto.fromJson(value);
case 'SystemConfigDto':
return SystemConfigDto.fromJson(value);
case 'SystemConfigFFmpegDto':
diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart
new file mode 100644
index 0000000000..47756cd527
--- /dev/null
+++ b/mobile/openapi/lib/model/metadata_search_dto.dart
@@ -0,0 +1,813 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.12
+
+// ignore_for_file: unused_element, unused_import
+// ignore_for_file: always_put_required_named_parameters_first
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: lines_longer_than_80_chars
+
+part of openapi.api;
+
+class MetadataSearchDto {
+ /// Returns a new [MetadataSearchDto] instance.
+ MetadataSearchDto({
+ this.checksum,
+ this.city,
+ this.country,
+ this.createdAfter,
+ this.createdBefore,
+ this.deviceAssetId,
+ this.deviceId,
+ this.encodedVideoPath,
+ this.id,
+ this.isArchived,
+ this.isEncoded,
+ this.isExternal,
+ this.isFavorite,
+ this.isMotion,
+ this.isNotInAlbum,
+ this.isOffline,
+ this.isReadOnly,
+ this.isVisible,
+ this.lensModel,
+ this.libraryId,
+ this.make,
+ this.model,
+ this.order,
+ this.originalFileName,
+ this.originalPath,
+ this.page,
+ this.personIds = const [],
+ this.resizePath,
+ this.size,
+ this.state,
+ this.takenAfter,
+ this.takenBefore,
+ this.trashedAfter,
+ this.trashedBefore,
+ this.type,
+ this.updatedAfter,
+ this.updatedBefore,
+ this.webpPath,
+ this.withArchived,
+ this.withDeleted,
+ this.withExif,
+ this.withPeople,
+ this.withStacked,
+ });
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? checksum;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? city;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? country;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? createdAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? createdBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? deviceAssetId;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? deviceId;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? encodedVideoPath;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? id;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isArchived;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isEncoded;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isExternal;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isFavorite;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isMotion;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isNotInAlbum;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isOffline;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isReadOnly;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isVisible;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? lensModel;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? libraryId;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? make;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? model;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ AssetOrder? order;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? originalFileName;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? originalPath;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ num? page;
+
+ List<String> personIds;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? resizePath;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ num? size;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? state;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? takenAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? takenBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? trashedAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? trashedBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ AssetTypeEnum? type;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? updatedAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? updatedBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? webpPath;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withArchived;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withDeleted;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withExif;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withPeople;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withStacked;
+
+ @override
+ bool operator ==(Object other) => identical(this, other) || other is MetadataSearchDto &&
+ other.checksum == checksum &&
+ other.city == city &&
+ other.country == country &&
+ other.createdAfter == createdAfter &&
+ other.createdBefore == createdBefore &&
+ other.deviceAssetId == deviceAssetId &&
+ other.deviceId == deviceId &&
+ other.encodedVideoPath == encodedVideoPath &&
+ other.id == id &&
+ other.isArchived == isArchived &&
+ other.isEncoded == isEncoded &&
+ other.isExternal == isExternal &&
+ other.isFavorite == isFavorite &&
+ other.isMotion == isMotion &&
+ other.isNotInAlbum == isNotInAlbum &&
+ other.isOffline == isOffline &&
+ other.isReadOnly == isReadOnly &&
+ other.isVisible == isVisible &&
+ other.lensModel == lensModel &&
+ other.libraryId == libraryId &&
+ other.make == make &&
+ other.model == model &&
+ other.order == order &&
+ other.originalFileName == originalFileName &&
+ other.originalPath == originalPath &&
+ other.page == page &&
+ _deepEquality.equals(other.personIds, personIds) &&
+ other.resizePath == resizePath &&
+ other.size == size &&
+ other.state == state &&
+ other.takenAfter == takenAfter &&
+ other.takenBefore == takenBefore &&
+ other.trashedAfter == trashedAfter &&
+ other.trashedBefore == trashedBefore &&
+ other.type == type &&
+ other.updatedAfter == updatedAfter &&
+ other.updatedBefore == updatedBefore &&
+ other.webpPath == webpPath &&
+ other.withArchived == withArchived &&
+ other.withDeleted == withDeleted &&
+ other.withExif == withExif &&
+ other.withPeople == withPeople &&
+ other.withStacked == withStacked;
+
+ @override
+ int get hashCode =>
+ // ignore: unnecessary_parenthesis
+ (checksum == null ? 0 : checksum!.hashCode) +
+ (city == null ? 0 : city!.hashCode) +
+ (country == null ? 0 : country!.hashCode) +
+ (createdAfter == null ? 0 : createdAfter!.hashCode) +
+ (createdBefore == null ? 0 : createdBefore!.hashCode) +
+ (deviceAssetId == null ? 0 : deviceAssetId!.hashCode) +
+ (deviceId == null ? 0 : deviceId!.hashCode) +
+ (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) +
+ (id == null ? 0 : id!.hashCode) +
+ (isArchived == null ? 0 : isArchived!.hashCode) +
+ (isEncoded == null ? 0 : isEncoded!.hashCode) +
+ (isExternal == null ? 0 : isExternal!.hashCode) +
+ (isFavorite == null ? 0 : isFavorite!.hashCode) +
+ (isMotion == null ? 0 : isMotion!.hashCode) +
+ (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) +
+ (isOffline == null ? 0 : isOffline!.hashCode) +
+ (isReadOnly == null ? 0 : isReadOnly!.hashCode) +
+ (isVisible == null ? 0 : isVisible!.hashCode) +
+ (lensModel == null ? 0 : lensModel!.hashCode) +
+ (libraryId == null ? 0 : libraryId!.hashCode) +
+ (make == null ? 0 : make!.hashCode) +
+ (model == null ? 0 : model!.hashCode) +
+ (order == null ? 0 : order!.hashCode) +
+ (originalFileName == null ? 0 : originalFileName!.hashCode) +
+ (originalPath == null ? 0 : originalPath!.hashCode) +
+ (page == null ? 0 : page!.hashCode) +
+ (personIds.hashCode) +
+ (resizePath == null ? 0 : resizePath!.hashCode) +
+ (size == null ? 0 : size!.hashCode) +
+ (state == null ? 0 : state!.hashCode) +
+ (takenAfter == null ? 0 : takenAfter!.hashCode) +
+ (takenBefore == null ? 0 : takenBefore!.hashCode) +
+ (trashedAfter == null ? 0 : trashedAfter!.hashCode) +
+ (trashedBefore == null ? 0 : trashedBefore!.hashCode) +
+ (type == null ? 0 : type!.hashCode) +
+ (updatedAfter == null ? 0 : updatedAfter!.hashCode) +
+ (updatedBefore == null ? 0 : updatedBefore!.hashCode) +
+ (webpPath == null ? 0 : webpPath!.hashCode) +
+ (withArchived == null ? 0 : withArchived!.hashCode) +
+ (withDeleted == null ? 0 : withDeleted!.hashCode) +
+ (withExif == null ? 0 : withExif!.hashCode) +
+ (withPeople == null ? 0 : withPeople!.hashCode) +
+ (withStacked == null ? 0 : withStacked!.hashCode);
+
+ @override
+ String toString() => 'MetadataSearchDto[checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceAssetId=$deviceAssetId, deviceId=$deviceId, encodedVideoPath=$encodedVideoPath, id=$id, isArchived=$isArchived, isEncoded=$isEncoded, isExternal=$isExternal, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, resizePath=$resizePath, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, webpPath=$webpPath, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]';
+
+ Map<String, dynamic> toJson() {
+ final json = <String, dynamic>{};
+ if (this.checksum != null) {
+ json[r'checksum'] = this.checksum;
+ } else {
+ // json[r'checksum'] = null;
+ }
+ if (this.city != null) {
+ json[r'city'] = this.city;
+ } else {
+ // json[r'city'] = null;
+ }
+ if (this.country != null) {
+ json[r'country'] = this.country;
+ } else {
+ // json[r'country'] = null;
+ }
+ if (this.createdAfter != null) {
+ json[r'createdAfter'] = this.createdAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'createdAfter'] = null;
+ }
+ if (this.createdBefore != null) {
+ json[r'createdBefore'] = this.createdBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'createdBefore'] = null;
+ }
+ if (this.deviceAssetId != null) {
+ json[r'deviceAssetId'] = this.deviceAssetId;
+ } else {
+ // json[r'deviceAssetId'] = null;
+ }
+ if (this.deviceId != null) {
+ json[r'deviceId'] = this.deviceId;
+ } else {
+ // json[r'deviceId'] = null;
+ }
+ if (this.encodedVideoPath != null) {
+ json[r'encodedVideoPath'] = this.encodedVideoPath;
+ } else {
+ // json[r'encodedVideoPath'] = null;
+ }
+ if (this.id != null) {
+ json[r'id'] = this.id;
+ } else {
+ // json[r'id'] = null;
+ }
+ if (this.isArchived != null) {
+ json[r'isArchived'] = this.isArchived;
+ } else {
+ // json[r'isArchived'] = null;
+ }
+ if (this.isEncoded != null) {
+ json[r'isEncoded'] = this.isEncoded;
+ } else {
+ // json[r'isEncoded'] = null;
+ }
+ if (this.isExternal != null) {
+ json[r'isExternal'] = this.isExternal;
+ } else {
+ // json[r'isExternal'] = null;
+ }
+ if (this.isFavorite != null) {
+ json[r'isFavorite'] = this.isFavorite;
+ } else {
+ // json[r'isFavorite'] = null;
+ }
+ if (this.isMotion != null) {
+ json[r'isMotion'] = this.isMotion;
+ } else {
+ // json[r'isMotion'] = null;
+ }
+ if (this.isNotInAlbum != null) {
+ json[r'isNotInAlbum'] = this.isNotInAlbum;
+ } else {
+ // json[r'isNotInAlbum'] = null;
+ }
+ if (this.isOffline != null) {
+ json[r'isOffline'] = this.isOffline;
+ } else {
+ // json[r'isOffline'] = null;
+ }
+ if (this.isReadOnly != null) {
+ json[r'isReadOnly'] = this.isReadOnly;
+ } else {
+ // json[r'isReadOnly'] = null;
+ }
+ if (this.isVisible != null) {
+ json[r'isVisible'] = this.isVisible;
+ } else {
+ // json[r'isVisible'] = null;
+ }
+ if (this.lensModel != null) {
+ json[r'lensModel'] = this.lensModel;
+ } else {
+ // json[r'lensModel'] = null;
+ }
+ if (this.libraryId != null) {
+ json[r'libraryId'] = this.libraryId;
+ } else {
+ // json[r'libraryId'] = null;
+ }
+ if (this.make != null) {
+ json[r'make'] = this.make;
+ } else {
+ // json[r'make'] = null;
+ }
+ if (this.model != null) {
+ json[r'model'] = this.model;
+ } else {
+ // json[r'model'] = null;
+ }
+ if (this.order != null) {
+ json[r'order'] = this.order;
+ } else {
+ // json[r'order'] = null;
+ }
+ if (this.originalFileName != null) {
+ json[r'originalFileName'] = this.originalFileName;
+ } else {
+ // json[r'originalFileName'] = null;
+ }
+ if (this.originalPath != null) {
+ json[r'originalPath'] = this.originalPath;
+ } else {
+ // json[r'originalPath'] = null;
+ }
+ if (this.page != null) {
+ json[r'page'] = this.page;
+ } else {
+ // json[r'page'] = null;
+ }
+ json[r'personIds'] = this.personIds;
+ if (this.resizePath != null) {
+ json[r'resizePath'] = this.resizePath;
+ } else {
+ // json[r'resizePath'] = null;
+ }
+ if (this.size != null) {
+ json[r'size'] = this.size;
+ } else {
+ // json[r'size'] = null;
+ }
+ if (this.state != null) {
+ json[r'state'] = this.state;
+ } else {
+ // json[r'state'] = null;
+ }
+ if (this.takenAfter != null) {
+ json[r'takenAfter'] = this.takenAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'takenAfter'] = null;
+ }
+ if (this.takenBefore != null) {
+ json[r'takenBefore'] = this.takenBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'takenBefore'] = null;
+ }
+ if (this.trashedAfter != null) {
+ json[r'trashedAfter'] = this.trashedAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'trashedAfter'] = null;
+ }
+ if (this.trashedBefore != null) {
+ json[r'trashedBefore'] = this.trashedBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'trashedBefore'] = null;
+ }
+ if (this.type != null) {
+ json[r'type'] = this.type;
+ } else {
+ // json[r'type'] = null;
+ }
+ if (this.updatedAfter != null) {
+ json[r'updatedAfter'] = this.updatedAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'updatedAfter'] = null;
+ }
+ if (this.updatedBefore != null) {
+ json[r'updatedBefore'] = this.updatedBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'updatedBefore'] = null;
+ }
+ if (this.webpPath != null) {
+ json[r'webpPath'] = this.webpPath;
+ } else {
+ // json[r'webpPath'] = null;
+ }
+ if (this.withArchived != null) {
+ json[r'withArchived'] = this.withArchived;
+ } else {
+ // json[r'withArchived'] = null;
+ }
+ if (this.withDeleted != null) {
+ json[r'withDeleted'] = this.withDeleted;
+ } else {
+ // json[r'withDeleted'] = null;
+ }
+ if (this.withExif != null) {
+ json[r'withExif'] = this.withExif;
+ } else {
+ // json[r'withExif'] = null;
+ }
+ if (this.withPeople != null) {
+ json[r'withPeople'] = this.withPeople;
+ } else {
+ // json[r'withPeople'] = null;
+ }
+ if (this.withStacked != null) {
+ json[r'withStacked'] = this.withStacked;
+ } else {
+ // json[r'withStacked'] = null;
+ }
+ return json;
+ }
+
+ /// Returns a new [MetadataSearchDto] instance and imports its values from
+ /// [value] if it's a [Map], null otherwise.
+ // ignore: prefer_constructors_over_static_methods
+ static MetadataSearchDto? fromJson(dynamic value) {
+ if (value is Map) {
+ final json = value.cast<String, dynamic>();
+
+ return MetadataSearchDto(
+ checksum: mapValueOfType<String>(json, r'checksum'),
+ city: mapValueOfType<String>(json, r'city'),
+ country: mapValueOfType<String>(json, r'country'),
+ createdAfter: mapDateTime(json, r'createdAfter', r''),
+ createdBefore: mapDateTime(json, r'createdBefore', r''),
+ deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId'),
+ deviceId: mapValueOfType<String>(json, r'deviceId'),
+ encodedVideoPath: mapValueOfType<String>(json, r'encodedVideoPath'),
+ id: mapValueOfType<String>(json, r'id'),
+ isArchived: mapValueOfType<bool>(json, r'isArchived'),
+ isEncoded: mapValueOfType<bool>(json, r'isEncoded'),
+ isExternal: mapValueOfType<bool>(json, r'isExternal'),
+ isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
+ isMotion: mapValueOfType<bool>(json, r'isMotion'),
+ isNotInAlbum: mapValueOfType<bool>(json, r'isNotInAlbum'),
+ isOffline: mapValueOfType<bool>(json, r'isOffline'),
+ isReadOnly: mapValueOfType<bool>(json, r'isReadOnly'),
+ isVisible: mapValueOfType<bool>(json, r'isVisible'),
+ lensModel: mapValueOfType<String>(json, r'lensModel'),
+ libraryId: mapValueOfType<String>(json, r'libraryId'),
+ make: mapValueOfType<String>(json, r'make'),
+ model: mapValueOfType<String>(json, r'model'),
+ order: AssetOrder.fromJson(json[r'order']),
+ originalFileName: mapValueOfType<String>(json, r'originalFileName'),
+ originalPath: mapValueOfType<String>(json, r'originalPath'),
+ page: num.parse('${json[r'page']}'),
+ personIds: json[r'personIds'] is Iterable
+ ? (json[r'personIds'] as Iterable).cast<String>().toList(growable: false)
+ : const [],
+ resizePath: mapValueOfType<String>(json, r'resizePath'),
+ size: num.parse('${json[r'size']}'),
+ state: mapValueOfType<String>(json, r'state'),
+ takenAfter: mapDateTime(json, r'takenAfter', r''),
+ takenBefore: mapDateTime(json, r'takenBefore', r''),
+ trashedAfter: mapDateTime(json, r'trashedAfter', r''),
+ trashedBefore: mapDateTime(json, r'trashedBefore', r''),
+ type: AssetTypeEnum.fromJson(json[r'type']),
+ updatedAfter: mapDateTime(json, r'updatedAfter', r''),
+ updatedBefore: mapDateTime(json, r'updatedBefore', r''),
+ webpPath: mapValueOfType<String>(json, r'webpPath'),
+ withArchived: mapValueOfType<bool>(json, r'withArchived'),
+ withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
+ withExif: mapValueOfType<bool>(json, r'withExif'),
+ withPeople: mapValueOfType<bool>(json, r'withPeople'),
+ withStacked: mapValueOfType<bool>(json, r'withStacked'),
+ );
+ }
+ return null;
+ }
+
+ static List<MetadataSearchDto> listFromJson(dynamic json, {bool growable = false,}) {
+ final result = <MetadataSearchDto>[];
+ if (json is List && json.isNotEmpty) {
+ for (final row in json) {
+ final value = MetadataSearchDto.fromJson(row);
+ if (value != null) {
+ result.add(value);
+ }
+ }
+ }
+ return result.toList(growable: growable);
+ }
+
+ static Map<String, MetadataSearchDto> mapFromJson(dynamic json) {
+ final map = <String, MetadataSearchDto>{};
+ if (json is Map && json.isNotEmpty) {
+ json = json.cast<String, dynamic>(); // ignore: parameter_assignments
+ for (final entry in json.entries) {
+ final value = MetadataSearchDto.fromJson(entry.value);
+ if (value != null) {
+ map[entry.key] = value;
+ }
+ }
+ }
+ return map;
+ }
+
+ // maps a json object with a list of MetadataSearchDto-objects as value to a dart map
+ static Map<String, List<MetadataSearchDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
+ final map = <String, List<MetadataSearchDto>>{};
+ if (json is Map && json.isNotEmpty) {
+ // ignore: parameter_assignments
+ json = json.cast<String, dynamic>();
+ for (final entry in json.entries) {
+ map[entry.key] = MetadataSearchDto.listFromJson(entry.value, growable: growable,);
+ }
+ }
+ return map;
+ }
+
+ /// The list of required keys that must be present in a JSON.
+ static const requiredKeys = <String>{
+ };
+}
+
diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart
new file mode 100644
index 0000000000..b82a3345fb
--- /dev/null
+++ b/mobile/openapi/lib/model/smart_search_dto.dart
@@ -0,0 +1,608 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.12
+
+// ignore_for_file: unused_element, unused_import
+// ignore_for_file: always_put_required_named_parameters_first
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: lines_longer_than_80_chars
+
+part of openapi.api;
+
+class SmartSearchDto {
+ /// Returns a new [SmartSearchDto] instance.
+ SmartSearchDto({
+ this.city,
+ this.country,
+ this.createdAfter,
+ this.createdBefore,
+ this.deviceId,
+ this.isArchived,
+ this.isEncoded,
+ this.isExternal,
+ this.isFavorite,
+ this.isMotion,
+ this.isOffline,
+ this.isReadOnly,
+ this.isVisible,
+ this.lensModel,
+ this.libraryId,
+ this.make,
+ this.model,
+ this.page,
+ required this.query,
+ this.size,
+ this.state,
+ this.takenAfter,
+ this.takenBefore,
+ this.trashedAfter,
+ this.trashedBefore,
+ this.type,
+ this.updatedAfter,
+ this.updatedBefore,
+ this.withArchived,
+ this.withDeleted,
+ this.withExif,
+ });
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? city;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? country;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? createdAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? createdBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? deviceId;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isArchived;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isEncoded;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isExternal;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isFavorite;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isMotion;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isOffline;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isReadOnly;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? isVisible;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? lensModel;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? libraryId;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? make;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? model;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ num? page;
+
+ String query;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ num? size;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ String? state;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? takenAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? takenBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? trashedAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? trashedBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ AssetTypeEnum? type;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? updatedAfter;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ DateTime? updatedBefore;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withArchived;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withDeleted;
+
+ ///
+ /// Please note: This property should have been non-nullable! Since the specification file
+ /// does not include a default value (using the "default:" property), however, the generated
+ /// source code must fall back to having a nullable type.
+ /// Consider adding a "default:" property in the specification file to hide this note.
+ ///
+ bool? withExif;
+
+ @override
+ bool operator ==(Object other) => identical(this, other) || other is SmartSearchDto &&
+ other.city == city &&
+ other.country == country &&
+ other.createdAfter == createdAfter &&
+ other.createdBefore == createdBefore &&
+ other.deviceId == deviceId &&
+ other.isArchived == isArchived &&
+ other.isEncoded == isEncoded &&
+ other.isExternal == isExternal &&
+ other.isFavorite == isFavorite &&
+ other.isMotion == isMotion &&
+ other.isOffline == isOffline &&
+ other.isReadOnly == isReadOnly &&
+ other.isVisible == isVisible &&
+ other.lensModel == lensModel &&
+ other.libraryId == libraryId &&
+ other.make == make &&
+ other.model == model &&
+ other.page == page &&
+ other.query == query &&
+ other.size == size &&
+ other.state == state &&
+ other.takenAfter == takenAfter &&
+ other.takenBefore == takenBefore &&
+ other.trashedAfter == trashedAfter &&
+ other.trashedBefore == trashedBefore &&
+ other.type == type &&
+ other.updatedAfter == updatedAfter &&
+ other.updatedBefore == updatedBefore &&
+ other.withArchived == withArchived &&
+ other.withDeleted == withDeleted &&
+ other.withExif == withExif;
+
+ @override
+ int get hashCode =>
+ // ignore: unnecessary_parenthesis
+ (city == null ? 0 : city!.hashCode) +
+ (country == null ? 0 : country!.hashCode) +
+ (createdAfter == null ? 0 : createdAfter!.hashCode) +
+ (createdBefore == null ? 0 : createdBefore!.hashCode) +
+ (deviceId == null ? 0 : deviceId!.hashCode) +
+ (isArchived == null ? 0 : isArchived!.hashCode) +
+ (isEncoded == null ? 0 : isEncoded!.hashCode) +
+ (isExternal == null ? 0 : isExternal!.hashCode) +
+ (isFavorite == null ? 0 : isFavorite!.hashCode) +
+ (isMotion == null ? 0 : isMotion!.hashCode) +
+ (isOffline == null ? 0 : isOffline!.hashCode) +
+ (isReadOnly == null ? 0 : isReadOnly!.hashCode) +
+ (isVisible == null ? 0 : isVisible!.hashCode) +
+ (lensModel == null ? 0 : lensModel!.hashCode) +
+ (libraryId == null ? 0 : libraryId!.hashCode) +
+ (make == null ? 0 : make!.hashCode) +
+ (model == null ? 0 : model!.hashCode) +
+ (page == null ? 0 : page!.hashCode) +
+ (query.hashCode) +
+ (size == null ? 0 : size!.hashCode) +
+ (state == null ? 0 : state!.hashCode) +
+ (takenAfter == null ? 0 : takenAfter!.hashCode) +
+ (takenBefore == null ? 0 : takenBefore!.hashCode) +
+ (trashedAfter == null ? 0 : trashedAfter!.hashCode) +
+ (trashedBefore == null ? 0 : trashedBefore!.hashCode) +
+ (type == null ? 0 : type!.hashCode) +
+ (updatedAfter == null ? 0 : updatedAfter!.hashCode) +
+ (updatedBefore == null ? 0 : updatedBefore!.hashCode) +
+ (withArchived == null ? 0 : withArchived!.hashCode) +
+ (withDeleted == null ? 0 : withDeleted!.hashCode) +
+ (withExif == null ? 0 : withExif!.hashCode);
+
+ @override
+ String toString() => 'SmartSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isArchived=$isArchived, isEncoded=$isEncoded, isExternal=$isExternal, isFavorite=$isFavorite, isMotion=$isMotion, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, page=$page, query=$query, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif]';
+
+ Map<String, dynamic> toJson() {
+ final json = <String, dynamic>{};
+ if (this.city != null) {
+ json[r'city'] = this.city;
+ } else {
+ // json[r'city'] = null;
+ }
+ if (this.country != null) {
+ json[r'country'] = this.country;
+ } else {
+ // json[r'country'] = null;
+ }
+ if (this.createdAfter != null) {
+ json[r'createdAfter'] = this.createdAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'createdAfter'] = null;
+ }
+ if (this.createdBefore != null) {
+ json[r'createdBefore'] = this.createdBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'createdBefore'] = null;
+ }
+ if (this.deviceId != null) {
+ json[r'deviceId'] = this.deviceId;
+ } else {
+ // json[r'deviceId'] = null;
+ }
+ if (this.isArchived != null) {
+ json[r'isArchived'] = this.isArchived;
+ } else {
+ // json[r'isArchived'] = null;
+ }
+ if (this.isEncoded != null) {
+ json[r'isEncoded'] = this.isEncoded;
+ } else {
+ // json[r'isEncoded'] = null;
+ }
+ if (this.isExternal != null) {
+ json[r'isExternal'] = this.isExternal;
+ } else {
+ // json[r'isExternal'] = null;
+ }
+ if (this.isFavorite != null) {
+ json[r'isFavorite'] = this.isFavorite;
+ } else {
+ // json[r'isFavorite'] = null;
+ }
+ if (this.isMotion != null) {
+ json[r'isMotion'] = this.isMotion;
+ } else {
+ // json[r'isMotion'] = null;
+ }
+ if (this.isOffline != null) {
+ json[r'isOffline'] = this.isOffline;
+ } else {
+ // json[r'isOffline'] = null;
+ }
+ if (this.isReadOnly != null) {
+ json[r'isReadOnly'] = this.isReadOnly;
+ } else {
+ // json[r'isReadOnly'] = null;
+ }
+ if (this.isVisible != null) {
+ json[r'isVisible'] = this.isVisible;
+ } else {
+ // json[r'isVisible'] = null;
+ }
+ if (this.lensModel != null) {
+ json[r'lensModel'] = this.lensModel;
+ } else {
+ // json[r'lensModel'] = null;
+ }
+ if (this.libraryId != null) {
+ json[r'libraryId'] = this.libraryId;
+ } else {
+ // json[r'libraryId'] = null;
+ }
+ if (this.make != null) {
+ json[r'make'] = this.make;
+ } else {
+ // json[r'make'] = null;
+ }
+ if (this.model != null) {
+ json[r'model'] = this.model;
+ } else {
+ // json[r'model'] = null;
+ }
+ if (this.page != null) {
+ json[r'page'] = this.page;
+ } else {
+ // json[r'page'] = null;
+ }
+ json[r'query'] = this.query;
+ if (this.size != null) {
+ json[r'size'] = this.size;
+ } else {
+ // json[r'size'] = null;
+ }
+ if (this.state != null) {
+ json[r'state'] = this.state;
+ } else {
+ // json[r'state'] = null;
+ }
+ if (this.takenAfter != null) {
+ json[r'takenAfter'] = this.takenAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'takenAfter'] = null;
+ }
+ if (this.takenBefore != null) {
+ json[r'takenBefore'] = this.takenBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'takenBefore'] = null;
+ }
+ if (this.trashedAfter != null) {
+ json[r'trashedAfter'] = this.trashedAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'trashedAfter'] = null;
+ }
+ if (this.trashedBefore != null) {
+ json[r'trashedBefore'] = this.trashedBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'trashedBefore'] = null;
+ }
+ if (this.type != null) {
+ json[r'type'] = this.type;
+ } else {
+ // json[r'type'] = null;
+ }
+ if (this.updatedAfter != null) {
+ json[r'updatedAfter'] = this.updatedAfter!.toUtc().toIso8601String();
+ } else {
+ // json[r'updatedAfter'] = null;
+ }
+ if (this.updatedBefore != null) {
+ json[r'updatedBefore'] = this.updatedBefore!.toUtc().toIso8601String();
+ } else {
+ // json[r'updatedBefore'] = null;
+ }
+ if (this.withArchived != null) {
+ json[r'withArchived'] = this.withArchived;
+ } else {
+ // json[r'withArchived'] = null;
+ }
+ if (this.withDeleted != null) {
+ json[r'withDeleted'] = this.withDeleted;
+ } else {
+ // json[r'withDeleted'] = null;
+ }
+ if (this.withExif != null) {
+ json[r'withExif'] = this.withExif;
+ } else {
+ // json[r'withExif'] = null;
+ }
+ return json;
+ }
+
+ /// Returns a new [SmartSearchDto] instance and imports its values from
+ /// [value] if it's a [Map], null otherwise.
+ // ignore: prefer_constructors_over_static_methods
+ static SmartSearchDto? fromJson(dynamic value) {
+ if (value is Map) {
+ final json = value.cast<String, dynamic>();
+
+ return SmartSearchDto(
+ city: mapValueOfType<String>(json, r'city'),
+ country: mapValueOfType<String>(json, r'country'),
+ createdAfter: mapDateTime(json, r'createdAfter', r''),
+ createdBefore: mapDateTime(json, r'createdBefore', r''),
+ deviceId: mapValueOfType<String>(json, r'deviceId'),
+ isArchived: mapValueOfType<bool>(json, r'isArchived'),
+ isEncoded: mapValueOfType<bool>(json, r'isEncoded'),
+ isExternal: mapValueOfType<bool>(json, r'isExternal'),
+ isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
+ isMotion: mapValueOfType<bool>(json, r'isMotion'),
+ isOffline: mapValueOfType<bool>(json, r'isOffline'),
+ isReadOnly: mapValueOfType<bool>(json, r'isReadOnly'),
+ isVisible: mapValueOfType<bool>(json, r'isVisible'),
+ lensModel: mapValueOfType<String>(json, r'lensModel'),
+ libraryId: mapValueOfType<String>(json, r'libraryId'),
+ make: mapValueOfType<String>(json, r'make'),
+ model: mapValueOfType<String>(json, r'model'),
+ page: num.parse('${json[r'page']}'),
+ query: mapValueOfType<String>(json, r'query')!,
+ size: num.parse('${json[r'size']}'),
+ state: mapValueOfType<String>(json, r'state'),
+ takenAfter: mapDateTime(json, r'takenAfter', r''),
+ takenBefore: mapDateTime(json, r'takenBefore', r''),
+ trashedAfter: mapDateTime(json, r'trashedAfter', r''),
+ trashedBefore: mapDateTime(json, r'trashedBefore', r''),
+ type: AssetTypeEnum.fromJson(json[r'type']),
+ updatedAfter: mapDateTime(json, r'updatedAfter', r''),
+ updatedBefore: mapDateTime(json, r'updatedBefore', r''),
+ withArchived: mapValueOfType<bool>(json, r'withArchived'),
+ withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
+ withExif: mapValueOfType<bool>(json, r'withExif'),
+ );
+ }
+ return null;
+ }
+
+ static List<SmartSearchDto> listFromJson(dynamic json, {bool growable = false,}) {
+ final result = <SmartSearchDto>[];
+ if (json is List && json.isNotEmpty) {
+ for (final row in json) {
+ final value = SmartSearchDto.fromJson(row);
+ if (value != null) {
+ result.add(value);
+ }
+ }
+ }
+ return result.toList(growable: growable);
+ }
+
+ static Map<String, SmartSearchDto> mapFromJson(dynamic json) {
+ final map = <String, SmartSearchDto>{};
+ if (json is Map && json.isNotEmpty) {
+ json = json.cast<String, dynamic>(); // ignore: parameter_assignments
+ for (final entry in json.entries) {
+ final value = SmartSearchDto.fromJson(entry.value);
+ if (value != null) {
+ map[entry.key] = value;
+ }
+ }
+ }
+ return map;
+ }
+
+ // maps a json object with a list of SmartSearchDto-objects as value to a dart map
+ static Map<String, List<SmartSearchDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
+ final map = <String, List<SmartSearchDto>>{};
+ if (json is Map && json.isNotEmpty) {
+ // ignore: parameter_assignments
+ json = json.cast<String, dynamic>();
+ for (final entry in json.entries) {
+ map[entry.key] = SmartSearchDto.listFromJson(entry.value, growable: growable,);
+ }
+ }
+ return map;
+ }
+
+ /// The list of required keys that must be present in a JSON.
+ static const requiredKeys = <String>{
+ 'query',
+ };
+}
+
diff --git a/mobile/openapi/test/asset_api_test.dart b/mobile/openapi/test/asset_api_test.dart
index a6d6af813e..06375c6b49 100644
--- a/mobile/openapi/test/asset_api_test.dart
+++ b/mobile/openapi/test/asset_api_test.dart
@@ -110,7 +110,7 @@ void main() {
// TODO
});
- //Future<List<AssetResponseDto>> searchAssets({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
+ //Future<List<AssetResponseDto>> searchAssets({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isNotInAlbum, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, List<String> personIds, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
test('test searchAssets', () async {
// TODO
});
diff --git a/mobile/openapi/test/metadata_search_dto_test.dart b/mobile/openapi/test/metadata_search_dto_test.dart
new file mode 100644
index 0000000000..f1635de4e0
--- /dev/null
+++ b/mobile/openapi/test/metadata_search_dto_test.dart
@@ -0,0 +1,237 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.12
+
+// ignore_for_file: unused_element, unused_import
+// ignore_for_file: always_put_required_named_parameters_first
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: lines_longer_than_80_chars
+
+import 'package:openapi/api.dart';
+import 'package:test/test.dart';
+
+// tests for MetadataSearchDto
+void main() {
+ // final instance = MetadataSearchDto();
+
+ group('test MetadataSearchDto', () {
+ // String checksum
+ test('to test the property `checksum`', () async {
+ // TODO
+ });
+
+ // String city
+ test('to test the property `city`', () async {
+ // TODO
+ });
+
+ // String country
+ test('to test the property `country`', () async {
+ // TODO
+ });
+
+ // DateTime createdAfter
+ test('to test the property `createdAfter`', () async {
+ // TODO
+ });
+
+ // DateTime createdBefore
+ test('to test the property `createdBefore`', () async {
+ // TODO
+ });
+
+ // String deviceAssetId
+ test('to test the property `deviceAssetId`', () async {
+ // TODO
+ });
+
+ // String deviceId
+ test('to test the property `deviceId`', () async {
+ // TODO
+ });
+
+ // String encodedVideoPath
+ test('to test the property `encodedVideoPath`', () async {
+ // TODO
+ });
+
+ // String id
+ test('to test the property `id`', () async {
+ // TODO
+ });
+
+ // bool isArchived
+ test('to test the property `isArchived`', () async {
+ // TODO
+ });
+
+ // bool isEncoded
+ test('to test the property `isEncoded`', () async {
+ // TODO
+ });
+
+ // bool isExternal
+ test('to test the property `isExternal`', () async {
+ // TODO
+ });
+
+ // bool isFavorite
+ test('to test the property `isFavorite`', () async {
+ // TODO
+ });
+
+ // bool isMotion
+ test('to test the property `isMotion`', () async {
+ // TODO
+ });
+
+ // bool isNotInAlbum
+ test('to test the property `isNotInAlbum`', () async {
+ // TODO
+ });
+
+ // bool isOffline
+ test('to test the property `isOffline`', () async {
+ // TODO
+ });
+
+ // bool isReadOnly
+ test('to test the property `isReadOnly`', () async {
+ // TODO
+ });
+
+ // bool isVisible
+ test('to test the property `isVisible`', () async {
+ // TODO
+ });
+
+ // String lensModel
+ test('to test the property `lensModel`', () async {
+ // TODO
+ });
+
+ // String libraryId
+ test('to test the property `libraryId`', () async {
+ // TODO
+ });
+
+ // String make
+ test('to test the property `make`', () async {
+ // TODO
+ });
+
+ // String model
+ test('to test the property `model`', () async {
+ // TODO
+ });
+
+ // AssetOrder order
+ test('to test the property `order`', () async {
+ // TODO
+ });
+
+ // String originalFileName
+ test('to test the property `originalFileName`', () async {
+ // TODO
+ });
+
+ // String originalPath
+ test('to test the property `originalPath`', () async {
+ // TODO
+ });
+
+ // num page
+ test('to test the property `page`', () async {
+ // TODO
+ });
+
+ // List<String> personIds (default value: const [])
+ test('to test the property `personIds`', () async {
+ // TODO
+ });
+
+ // String resizePath
+ test('to test the property `resizePath`', () async {
+ // TODO
+ });
+
+ // num size
+ test('to test the property `size`', () async {
+ // TODO
+ });
+
+ // String state
+ test('to test the property `state`', () async {
+ // TODO
+ });
+
+ // DateTime takenAfter
+ test('to test the property `takenAfter`', () async {
+ // TODO
+ });
+
+ // DateTime takenBefore
+ test('to test the property `takenBefore`', () async {
+ // TODO
+ });
+
+ // DateTime trashedAfter
+ test('to test the property `trashedAfter`', () async {
+ // TODO
+ });
+
+ // DateTime trashedBefore
+ test('to test the property `trashedBefore`', () async {
+ // TODO
+ });
+
+ // AssetTypeEnum type
+ test('to test the property `type`', () async {
+ // TODO
+ });
+
+ // DateTime updatedAfter
+ test('to test the property `updatedAfter`', () async {
+ // TODO
+ });
+
+ // DateTime updatedBefore
+ test('to test the property `updatedBefore`', () async {
+ // TODO
+ });
+
+ // String webpPath
+ test('to test the property `webpPath`', () async {
+ // TODO
+ });
+
+ // bool withArchived
+ test('to test the property `withArchived`', () async {
+ // TODO
+ });
+
+ // bool withDeleted
+ test('to test the property `withDeleted`', () async {
+ // TODO
+ });
+
+ // bool withExif
+ test('to test the property `withExif`', () async {
+ // TODO
+ });
+
+ // bool withPeople
+ test('to test the property `withPeople`', () async {
+ // TODO
+ });
+
+ // bool withStacked
+ test('to test the property `withStacked`', () async {
+ // TODO
+ });
+
+
+ });
+
+}
diff --git a/mobile/openapi/test/search_api_test.dart b/mobile/openapi/test/search_api_test.dart
index d89c47e748..14169e461d 100644
--- a/mobile/openapi/test/search_api_test.dart
+++ b/mobile/openapi/test/search_api_test.dart
@@ -32,7 +32,7 @@ void main() {
// TODO
});
- //Future<SearchResponseDto> searchMetadata({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
+ //Future<SearchResponseDto> searchMetadata(MetadataSearchDto metadataSearchDto) async
test('test searchMetadata', () async {
// TODO
});
@@ -42,7 +42,7 @@ void main() {
// TODO
});
- //Future<SearchResponseDto> searchSmart(String query, { String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceId, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, num page, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, bool withArchived, bool withDeleted, bool withExif }) async
+ //Future<SearchResponseDto> searchSmart(SmartSearchDto smartSearchDto) async
test('test searchSmart', () async {
// TODO
});
diff --git a/mobile/openapi/test/smart_search_dto_test.dart b/mobile/openapi/test/smart_search_dto_test.dart
new file mode 100644
index 0000000000..858c7769c8
--- /dev/null
+++ b/mobile/openapi/test/smart_search_dto_test.dart
@@ -0,0 +1,177 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.12
+
+// ignore_for_file: unused_element, unused_import
+// ignore_for_file: always_put_required_named_parameters_first
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: lines_longer_than_80_chars
+
+import 'package:openapi/api.dart';
+import 'package:test/test.dart';
+
+// tests for SmartSearchDto
+void main() {
+ // final instance = SmartSearchDto();
+
+ group('test SmartSearchDto', () {
+ // String city
+ test('to test the property `city`', () async {
+ // TODO
+ });
+
+ // String country
+ test('to test the property `country`', () async {
+ // TODO
+ });
+
+ // DateTime createdAfter
+ test('to test the property `createdAfter`', () async {
+ // TODO
+ });
+
+ // DateTime createdBefore
+ test('to test the property `createdBefore`', () async {
+ // TODO
+ });
+
+ // String deviceId
+ test('to test the property `deviceId`', () async {
+ // TODO
+ });
+
+ // bool isArchived
+ test('to test the property `isArchived`', () async {
+ // TODO
+ });
+
+ // bool isEncoded
+ test('to test the property `isEncoded`', () async {
+ // TODO
+ });
+
+ // bool isExternal
+ test('to test the property `isExternal`', () async {
+ // TODO
+ });
+
+ // bool isFavorite
+ test('to test the property `isFavorite`', () async {
+ // TODO
+ });
+
+ // bool isMotion
+ test('to test the property `isMotion`', () async {
+ // TODO
+ });
+
+ // bool isOffline
+ test('to test the property `isOffline`', () async {
+ // TODO
+ });
+
+ // bool isReadOnly
+ test('to test the property `isReadOnly`', () async {
+ // TODO
+ });
+
+ // bool isVisible
+ test('to test the property `isVisible`', () async {
+ // TODO
+ });
+
+ // String lensModel
+ test('to test the property `lensModel`', () async {
+ // TODO
+ });
+
+ // String libraryId
+ test('to test the property `libraryId`', () async {
+ // TODO
+ });
+
+ // String make
+ test('to test the property `make`', () async {
+ // TODO
+ });
+
+ // String model
+ test('to test the property `model`', () async {
+ // TODO
+ });
+
+ // num page
+ test('to test the property `page`', () async {
+ // TODO
+ });
+
+ // String query
+ test('to test the property `query`', () async {
+ // TODO
+ });
+
+ // num size
+ test('to test the property `size`', () async {
+ // TODO
+ });
+
+ // String state
+ test('to test the property `state`', () async {
+ // TODO
+ });
+
+ // DateTime takenAfter
+ test('to test the property `takenAfter`', () async {
+ // TODO
+ });
+
+ // DateTime takenBefore
+ test('to test the property `takenBefore`', () async {
+ // TODO
+ });
+
+ // DateTime trashedAfter
+ test('to test the property `trashedAfter`', () async {
+ // TODO
+ });
+
+ // DateTime trashedBefore
+ test('to test the property `trashedBefore`', () async {
+ // TODO
+ });
+
+ // AssetTypeEnum type
+ test('to test the property `type`', () async {
+ // TODO
+ });
+
+ // DateTime updatedAfter
+ test('to test the property `updatedAfter`', () async {
+ // TODO
+ });
+
+ // DateTime updatedBefore
+ test('to test the property `updatedBefore`', () async {
+ // TODO
+ });
+
+ // bool withArchived
+ test('to test the property `withArchived`', () async {
+ // TODO
+ });
+
+ // bool withDeleted
+ test('to test the property `withDeleted`', () async {
+ // TODO
+ });
+
+ // bool withExif
+ test('to test the property `withExif`', () async {
+ // TODO
+ });
+
+
+ });
+
+}
diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json
index 66a65fcb3d..5dd394108e 100644
--- a/open-api/immich-openapi-specs.json
+++ b/open-api/immich-openapi-specs.json
@@ -2256,6 +2256,14 @@
"type": "boolean"
}
},
+ {
+ "name": "isNotInAlbum",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ },
{
"name": "isOffline",
"required": false,
@@ -2345,6 +2353,17 @@
"type": "number"
}
},
+ {
+ "name": "personIds",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
{
"name": "resizePath",
"required": false,
@@ -4526,390 +4545,61 @@
}
},
"/search/metadata": {
- "get": {
+ "post": {
"operationId": "searchMetadata",
- "parameters": [
- {
- "name": "checksum",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "city",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "country",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "createdAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "createdBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MetadataSearchDto"
+ }
}
},
+ "required": true
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SearchResponseDto"
+ }
+ }
+ },
+ "description": ""
+ }
+ },
+ "security": [
{
- "name": "deviceAssetId",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
+ "bearer": []
},
{
- "name": "deviceId",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
+ "cookie": []
},
{
- "name": "encodedVideoPath",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
+ "api_key": []
+ }
+ ],
+ "tags": [
+ "Search"
+ ]
+ }
+ },
+ "/search/person": {
+ "get": {
+ "operationId": "searchPerson",
+ "parameters": [
{
- "name": "id",
- "required": false,
+ "name": "name",
+ "required": true,
"in": "query",
"schema": {
- "format": "uuid",
"type": "string"
}
},
{
- "name": "isArchived",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isEncoded",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isExternal",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isFavorite",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isMotion",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isOffline",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isReadOnly",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isVisible",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "lensModel",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "libraryId",
- "required": false,
- "in": "query",
- "schema": {
- "format": "uuid",
- "type": "string"
- }
- },
- {
- "name": "make",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "model",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "order",
- "required": false,
- "in": "query",
- "schema": {
- "$ref": "#/components/schemas/AssetOrder"
- }
- },
- {
- "name": "originalFileName",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "originalPath",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "resizePath",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "required": false,
- "in": "query",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "state",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "takenAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "takenBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "trashedAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "trashedBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "type",
- "required": false,
- "in": "query",
- "schema": {
- "$ref": "#/components/schemas/AssetTypeEnum"
- }
- },
- {
- "name": "updatedAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "updatedBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "webpPath",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "withArchived",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "withDeleted",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "withExif",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "withPeople",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "withStacked",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SearchResponseDto"
- }
- }
- },
- "description": ""
- }
- },
- "security": [
- {
- "bearer": []
- },
- {
- "cookie": []
- },
- {
- "api_key": []
- }
- ],
- "tags": [
- "Search"
- ]
- }
- },
- "/search/person": {
- "get": {
- "operationId": "searchPerson",
- "parameters": [
- {
- "name": "name",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "withHidden",
+ "name": "withHidden",
"required": false,
"in": "query",
"schema": {
@@ -4930,288 +4620,40 @@
}
},
"description": ""
- }
- },
- "security": [
- {
- "bearer": []
- },
- {
- "cookie": []
- },
- {
- "api_key": []
- }
- ],
- "tags": [
- "Search"
- ]
- }
- },
- "/search/smart": {
- "get": {
- "operationId": "searchSmart",
- "parameters": [
- {
- "name": "city",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "country",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "createdAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "createdBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "deviceId",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "isArchived",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isEncoded",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isExternal",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isFavorite",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isMotion",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isOffline",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isReadOnly",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "isVisible",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "lensModel",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "libraryId",
- "required": false,
- "in": "query",
- "schema": {
- "format": "uuid",
- "type": "string"
- }
- },
- {
- "name": "make",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "model",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "query",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "required": false,
- "in": "query",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "state",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "takenAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "takenBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "trashedAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "trashedBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "type",
- "required": false,
- "in": "query",
- "schema": {
- "$ref": "#/components/schemas/AssetTypeEnum"
- }
- },
- {
- "name": "updatedAfter",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "updatedBefore",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "withArchived",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
+ }
+ },
+ "security": [
+ {
+ "bearer": []
},
{
- "name": "withDeleted",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
+ "cookie": []
},
{
- "name": "withExif",
- "required": false,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
+ "api_key": []
}
],
+ "tags": [
+ "Search"
+ ]
+ }
+ },
+ "/search/smart": {
+ "post": {
+ "operationId": "searchSmart",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SmartSearchDto"
+ }
+ }
+ },
+ "required": true
+ },
"responses": {
- "200": {
+ "201": {
"content": {
"application/json": {
"schema": {
@@ -8805,6 +8247,153 @@
],
"type": "object"
},
+ "MetadataSearchDto": {
+ "properties": {
+ "checksum": {
+ "type": "string"
+ },
+ "city": {
+ "type": "string"
+ },
+ "country": {
+ "type": "string"
+ },
+ "createdAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "createdBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "deviceAssetId": {
+ "type": "string"
+ },
+ "deviceId": {
+ "type": "string"
+ },
+ "encodedVideoPath": {
+ "type": "string"
+ },
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "isArchived": {
+ "type": "boolean"
+ },
+ "isEncoded": {
+ "type": "boolean"
+ },
+ "isExternal": {
+ "type": "boolean"
+ },
+ "isFavorite": {
+ "type": "boolean"
+ },
+ "isMotion": {
+ "type": "boolean"
+ },
+ "isNotInAlbum": {
+ "type": "boolean"
+ },
+ "isOffline": {
+ "type": "boolean"
+ },
+ "isReadOnly": {
+ "type": "boolean"
+ },
+ "isVisible": {
+ "type": "boolean"
+ },
+ "lensModel": {
+ "type": "string"
+ },
+ "libraryId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "make": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "order": {
+ "$ref": "#/components/schemas/AssetOrder"
+ },
+ "originalFileName": {
+ "type": "string"
+ },
+ "originalPath": {
+ "type": "string"
+ },
+ "page": {
+ "type": "number"
+ },
+ "personIds": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "resizePath": {
+ "type": "string"
+ },
+ "size": {
+ "type": "number"
+ },
+ "state": {
+ "type": "string"
+ },
+ "takenAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "takenBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "trashedAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "trashedBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/components/schemas/AssetTypeEnum"
+ },
+ "updatedAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "updatedBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webpPath": {
+ "type": "string"
+ },
+ "withArchived": {
+ "type": "boolean"
+ },
+ "withDeleted": {
+ "type": "boolean"
+ },
+ "withExif": {
+ "type": "boolean"
+ },
+ "withPeople": {
+ "type": "boolean"
+ },
+ "withStacked": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"ModelType": {
"enum": [
"facial-recognition",
@@ -9760,6 +9349,116 @@
},
"type": "object"
},
+ "SmartSearchDto": {
+ "properties": {
+ "city": {
+ "type": "string"
+ },
+ "country": {
+ "type": "string"
+ },
+ "createdAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "createdBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "deviceId": {
+ "type": "string"
+ },
+ "isArchived": {
+ "type": "boolean"
+ },
+ "isEncoded": {
+ "type": "boolean"
+ },
+ "isExternal": {
+ "type": "boolean"
+ },
+ "isFavorite": {
+ "type": "boolean"
+ },
+ "isMotion": {
+ "type": "boolean"
+ },
+ "isOffline": {
+ "type": "boolean"
+ },
+ "isReadOnly": {
+ "type": "boolean"
+ },
+ "isVisible": {
+ "type": "boolean"
+ },
+ "lensModel": {
+ "type": "string"
+ },
+ "libraryId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "make": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "page": {
+ "type": "number"
+ },
+ "query": {
+ "type": "string"
+ },
+ "size": {
+ "type": "number"
+ },
+ "state": {
+ "type": "string"
+ },
+ "takenAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "takenBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "trashedAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "trashedBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/components/schemas/AssetTypeEnum"
+ },
+ "updatedAfter": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "updatedBefore": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "withArchived": {
+ "type": "boolean"
+ },
+ "withDeleted": {
+ "type": "boolean"
+ },
+ "withExif": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "query"
+ ],
+ "type": "object"
+ },
"SystemConfigDto": {
"properties": {
"ffmpeg": {
diff --git a/open-api/typescript-sdk/axios-client/api.ts b/open-api/typescript-sdk/axios-client/api.ts
index 16fcd79cd7..5d37706904 100644
--- a/open-api/typescript-sdk/axios-client/api.ts
+++ b/open-api/typescript-sdk/axios-client/api.ts
@@ -2330,6 +2330,273 @@ export interface MergePersonDto {
*/
'ids': Array<string>;
}
+/**
+ *
+ * @export
+ * @interface MetadataSearchDto
+ */
+export interface MetadataSearchDto {
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'checksum'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'city'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'country'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'createdAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'createdBefore'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'deviceAssetId'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'deviceId'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'encodedVideoPath'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'id'?: string;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isArchived'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isEncoded'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isExternal'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isFavorite'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isMotion'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isNotInAlbum'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isOffline'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isReadOnly'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'isVisible'?: boolean;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'lensModel'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'libraryId'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'make'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'model'?: string;
+ /**
+ *
+ * @type {AssetOrder}
+ * @memberof MetadataSearchDto
+ */
+ 'order'?: AssetOrder;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'originalFileName'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'originalPath'?: string;
+ /**
+ *
+ * @type {number}
+ * @memberof MetadataSearchDto
+ */
+ 'page'?: number;
+ /**
+ *
+ * @type {Array<string>}
+ * @memberof MetadataSearchDto
+ */
+ 'personIds'?: Array<string>;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'resizePath'?: string;
+ /**
+ *
+ * @type {number}
+ * @memberof MetadataSearchDto
+ */
+ 'size'?: number;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'state'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'takenAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'takenBefore'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'trashedAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'trashedBefore'?: string;
+ /**
+ *
+ * @type {AssetTypeEnum}
+ * @memberof MetadataSearchDto
+ */
+ 'type'?: AssetTypeEnum;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'updatedAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'updatedBefore'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof MetadataSearchDto
+ */
+ 'webpPath'?: string;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'withArchived'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'withDeleted'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'withExif'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'withPeople'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof MetadataSearchDto
+ */
+ 'withStacked'?: boolean;
+}
+
+
/**
*
* @export
@@ -3550,109 +3817,304 @@ export interface SmartInfoResponseDto {
/**
*
* @export
- * @interface SystemConfigDto
+ * @interface SmartSearchDto
*/
-export interface SystemConfigDto {
+export interface SmartSearchDto {
/**
*
- * @type {SystemConfigFFmpegDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'ffmpeg': SystemConfigFFmpegDto;
+ 'city'?: string;
/**
*
- * @type {SystemConfigJobDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'job': SystemConfigJobDto;
+ 'country'?: string;
/**
*
- * @type {SystemConfigLibraryDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'library': SystemConfigLibraryDto;
+ 'createdAfter'?: string;
/**
*
- * @type {SystemConfigLoggingDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'logging': SystemConfigLoggingDto;
+ 'createdBefore'?: string;
/**
*
- * @type {SystemConfigMachineLearningDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'machineLearning': SystemConfigMachineLearningDto;
+ 'deviceId'?: string;
/**
*
- * @type {SystemConfigMapDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'map': SystemConfigMapDto;
+ 'isArchived'?: boolean;
/**
*
- * @type {SystemConfigNewVersionCheckDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'newVersionCheck': SystemConfigNewVersionCheckDto;
+ 'isEncoded'?: boolean;
/**
*
- * @type {SystemConfigOAuthDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'oauth': SystemConfigOAuthDto;
+ 'isExternal'?: boolean;
/**
*
- * @type {SystemConfigPasswordLoginDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'passwordLogin': SystemConfigPasswordLoginDto;
+ 'isFavorite'?: boolean;
/**
*
- * @type {SystemConfigReverseGeocodingDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'reverseGeocoding': SystemConfigReverseGeocodingDto;
+ 'isMotion'?: boolean;
/**
*
- * @type {SystemConfigServerDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'server': SystemConfigServerDto;
+ 'isOffline'?: boolean;
/**
*
- * @type {SystemConfigStorageTemplateDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'storageTemplate': SystemConfigStorageTemplateDto;
+ 'isReadOnly'?: boolean;
/**
*
- * @type {SystemConfigThemeDto}
- * @memberof SystemConfigDto
+ * @type {boolean}
+ * @memberof SmartSearchDto
*/
- 'theme': SystemConfigThemeDto;
+ 'isVisible'?: boolean;
/**
*
- * @type {SystemConfigThumbnailDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'thumbnail': SystemConfigThumbnailDto;
+ 'lensModel'?: string;
/**
*
- * @type {SystemConfigTrashDto}
- * @memberof SystemConfigDto
+ * @type {string}
+ * @memberof SmartSearchDto
*/
- 'trash': SystemConfigTrashDto;
-}
-/**
- *
- * @export
- * @interface SystemConfigFFmpegDto
- */
-export interface SystemConfigFFmpegDto {
+ 'libraryId'?: string;
/**
*
- * @type {TranscodeHWAccel}
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'make'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'model'?: string;
+ /**
+ *
+ * @type {number}
+ * @memberof SmartSearchDto
+ */
+ 'page'?: number;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'query': string;
+ /**
+ *
+ * @type {number}
+ * @memberof SmartSearchDto
+ */
+ 'size'?: number;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'state'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'takenAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'takenBefore'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'trashedAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'trashedBefore'?: string;
+ /**
+ *
+ * @type {AssetTypeEnum}
+ * @memberof SmartSearchDto
+ */
+ 'type'?: AssetTypeEnum;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'updatedAfter'?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof SmartSearchDto
+ */
+ 'updatedBefore'?: string;
+ /**
+ *
+ * @type {boolean}
+ * @memberof SmartSearchDto
+ */
+ 'withArchived'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof SmartSearchDto
+ */
+ 'withDeleted'?: boolean;
+ /**
+ *
+ * @type {boolean}
+ * @memberof SmartSearchDto
+ */
+ 'withExif'?: boolean;
+}
+
+
+/**
+ *
+ * @export
+ * @interface SystemConfigDto
+ */
+export interface SystemConfigDto {
+ /**
+ *
+ * @type {SystemConfigFFmpegDto}
+ * @memberof SystemConfigDto
+ */
+ 'ffmpeg': SystemConfigFFmpegDto;
+ /**
+ *
+ * @type {SystemConfigJobDto}
+ * @memberof SystemConfigDto
+ */
+ 'job': SystemConfigJobDto;
+ /**
+ *
+ * @type {SystemConfigLibraryDto}
+ * @memberof SystemConfigDto
+ */
+ 'library': SystemConfigLibraryDto;
+ /**
+ *
+ * @type {SystemConfigLoggingDto}
+ * @memberof SystemConfigDto
+ */
+ 'logging': SystemConfigLoggingDto;
+ /**
+ *
+ * @type {SystemConfigMachineLearningDto}
+ * @memberof SystemConfigDto
+ */
+ 'machineLearning': SystemConfigMachineLearningDto;
+ /**
+ *
+ * @type {SystemConfigMapDto}
+ * @memberof SystemConfigDto
+ */
+ 'map': SystemConfigMapDto;
+ /**
+ *
+ * @type {SystemConfigNewVersionCheckDto}
+ * @memberof SystemConfigDto
+ */
+ 'newVersionCheck': SystemConfigNewVersionCheckDto;
+ /**
+ *
+ * @type {SystemConfigOAuthDto}
+ * @memberof SystemConfigDto
+ */
+ 'oauth': SystemConfigOAuthDto;
+ /**
+ *
+ * @type {SystemConfigPasswordLoginDto}
+ * @memberof SystemConfigDto
+ */
+ 'passwordLogin': SystemConfigPasswordLoginDto;
+ /**
+ *
+ * @type {SystemConfigReverseGeocodingDto}
+ * @memberof SystemConfigDto
+ */
+ 'reverseGeocoding': SystemConfigReverseGeocodingDto;
+ /**
+ *
+ * @type {SystemConfigServerDto}
+ * @memberof SystemConfigDto
+ */
+ 'server': SystemConfigServerDto;
+ /**
+ *
+ * @type {SystemConfigStorageTemplateDto}
+ * @memberof SystemConfigDto
+ */
+ 'storageTemplate': SystemConfigStorageTemplateDto;
+ /**
+ *
+ * @type {SystemConfigThemeDto}
+ * @memberof SystemConfigDto
+ */
+ 'theme': SystemConfigThemeDto;
+ /**
+ *
+ * @type {SystemConfigThumbnailDto}
+ * @memberof SystemConfigDto
+ */
+ 'thumbnail': SystemConfigThumbnailDto;
+ /**
+ *
+ * @type {SystemConfigTrashDto}
+ * @memberof SystemConfigDto
+ */
+ 'trash': SystemConfigTrashDto;
+}
+/**
+ *
+ * @export
+ * @interface SystemConfigFFmpegDto
+ */
+export interface SystemConfigFFmpegDto {
+ /**
+ *
+ * @type {TranscodeHWAccel}
* @memberof SystemConfigFFmpegDto
*/
'accel': TranscodeHWAccel;
@@ -7766,6 +8228,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
* @param {boolean} [isExternal]
* @param {boolean} [isFavorite]
* @param {boolean} [isMotion]
+ * @param {boolean} [isNotInAlbum]
* @param {boolean} [isOffline]
* @param {boolean} [isReadOnly]
* @param {boolean} [isVisible]
@@ -7777,6 +8240,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
* @param {string} [originalFileName]
* @param {string} [originalPath]
* @param {number} [page]
+ * @param {Array<string>} [personIds]
* @param {string} [resizePath]
* @param {number} [size]
* @param {string} [state]
@@ -7797,7 +8261,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
* @deprecated
* @throws {RequiredError}
*/
- searchAssets: async (checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
+ searchAssets: async (checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isNotInAlbum?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, personIds?: Array<string>, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/assets`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -7879,6 +8343,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
localVarQueryParameter['isMotion'] = isMotion;
}
+ if (isNotInAlbum !== undefined) {
+ localVarQueryParameter['isNotInAlbum'] = isNotInAlbum;
+ }
+
if (isOffline !== undefined) {
localVarQueryParameter['isOffline'] = isOffline;
}
@@ -7923,6 +8391,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
localVarQueryParameter['page'] = page;
}
+ if (personIds) {
+ localVarQueryParameter['personIds'] = personIds;
+ }
+
if (resizePath !== undefined) {
localVarQueryParameter['resizePath'] = resizePath;
}
@@ -8598,6 +9070,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
* @param {boolean} [isExternal]
* @param {boolean} [isFavorite]
* @param {boolean} [isMotion]
+ * @param {boolean} [isNotInAlbum]
* @param {boolean} [isOffline]
* @param {boolean} [isReadOnly]
* @param {boolean} [isVisible]
@@ -8609,6 +9082,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
* @param {string} [originalFileName]
* @param {string} [originalPath]
* @param {number} [page]
+ * @param {Array<string>} [personIds]
* @param {string} [resizePath]
* @param {number} [size]
* @param {string} [state]
@@ -8629,8 +9103,8 @@ export const AssetApiFp = function(configuration?: Configuration) {
* @deprecated
* @throws {RequiredError}
*/
- async searchAssets(checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AssetResponseDto>>> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked, options);
+ async searchAssets(checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isNotInAlbum?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, personIds?: Array<string>, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AssetResponseDto>>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchAssets(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isNotInAlbum, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, personIds, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['AssetApi.searchAssets']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
@@ -8882,7 +9356,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
* @throws {RequiredError}
*/
searchAssets(requestParameters: AssetApiSearchAssetsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<AssetResponseDto>> {
- return localVarFp.searchAssets(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(axios, basePath));
+ return localVarFp.searchAssets(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isNotInAlbum, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.personIds, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(axios, basePath));
},
/**
*
@@ -9484,6 +9958,13 @@ export interface AssetApiSearchAssetsRequest {
*/
readonly isMotion?: boolean
+ /**
+ *
+ * @type {boolean}
+ * @memberof AssetApiSearchAssets
+ */
+ readonly isNotInAlbum?: boolean
+
/**
*
* @type {boolean}
@@ -9561,6 +10042,13 @@ export interface AssetApiSearchAssetsRequest {
*/
readonly page?: number
+ /**
+ *
+ * @type {Array<string>}
+ * @memberof AssetApiSearchAssets
+ */
+ readonly personIds?: Array<string>
+
/**
*
* @type {string}
@@ -10077,7 +10565,7 @@ export class AssetApi extends BaseAPI {
* @memberof AssetApi
*/
public searchAssets(requestParameters: AssetApiSearchAssetsRequest = {}, options?: RawAxiosRequestConfig) {
- return AssetApiFp(this.configuration).searchAssets(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(this.axios, this.basePath));
+ return AssetApiFp(this.configuration).searchAssets(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isNotInAlbum, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.personIds, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(this.axios, this.basePath));
}
/**
@@ -14705,51 +15193,13 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
},
/**
*
- * @param {string} [checksum]
- * @param {string} [city]
- * @param {string} [country]
- * @param {string} [createdAfter]
- * @param {string} [createdBefore]
- * @param {string} [deviceAssetId]
- * @param {string} [deviceId]
- * @param {string} [encodedVideoPath]
- * @param {string} [id]
- * @param {boolean} [isArchived]
- * @param {boolean} [isEncoded]
- * @param {boolean} [isExternal]
- * @param {boolean} [isFavorite]
- * @param {boolean} [isMotion]
- * @param {boolean} [isOffline]
- * @param {boolean} [isReadOnly]
- * @param {boolean} [isVisible]
- * @param {string} [lensModel]
- * @param {string} [libraryId]
- * @param {string} [make]
- * @param {string} [model]
- * @param {AssetOrder} [order]
- * @param {string} [originalFileName]
- * @param {string} [originalPath]
- * @param {number} [page]
- * @param {string} [resizePath]
- * @param {number} [size]
- * @param {string} [state]
- * @param {string} [takenAfter]
- * @param {string} [takenBefore]
- * @param {string} [trashedAfter]
- * @param {string} [trashedBefore]
- * @param {AssetTypeEnum} [type]
- * @param {string} [updatedAfter]
- * @param {string} [updatedBefore]
- * @param {string} [webpPath]
- * @param {boolean} [withArchived]
- * @param {boolean} [withDeleted]
- * @param {boolean} [withExif]
- * @param {boolean} [withPeople]
- * @param {boolean} [withStacked]
+ * @param {MetadataSearchDto} metadataSearchDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
- searchMetadata: async (checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
+ searchMetadata: async (metadataSearchDto: MetadataSearchDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
+ // verify required parameter 'metadataSearchDto' is not null or undefined
+ assertParamExists('searchMetadata', 'metadataSearchDto', metadataSearchDto)
const localVarPath = `/search/metadata`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -14758,7 +15208,7 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -14771,191 +15221,14 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
- if (checksum !== undefined) {
- localVarQueryParameter['checksum'] = checksum;
- }
-
- if (city !== undefined) {
- localVarQueryParameter['city'] = city;
- }
-
- if (country !== undefined) {
- localVarQueryParameter['country'] = country;
- }
- if (createdAfter !== undefined) {
- localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ?
- (createdAfter as any).toISOString() :
- createdAfter;
- }
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
- if (createdBefore !== undefined) {
- localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ?
- (createdBefore as any).toISOString() :
- createdBefore;
- }
-
- if (deviceAssetId !== undefined) {
- localVarQueryParameter['deviceAssetId'] = deviceAssetId;
- }
-
- if (deviceId !== undefined) {
- localVarQueryParameter['deviceId'] = deviceId;
- }
-
- if (encodedVideoPath !== undefined) {
- localVarQueryParameter['encodedVideoPath'] = encodedVideoPath;
- }
-
- if (id !== undefined) {
- localVarQueryParameter['id'] = id;
- }
-
- if (isArchived !== undefined) {
- localVarQueryParameter['isArchived'] = isArchived;
- }
-
- if (isEncoded !== undefined) {
- localVarQueryParameter['isEncoded'] = isEncoded;
- }
-
- if (isExternal !== undefined) {
- localVarQueryParameter['isExternal'] = isExternal;
- }
-
- if (isFavorite !== undefined) {
- localVarQueryParameter['isFavorite'] = isFavorite;
- }
-
- if (isMotion !== undefined) {
- localVarQueryParameter['isMotion'] = isMotion;
- }
-
- if (isOffline !== undefined) {
- localVarQueryParameter['isOffline'] = isOffline;
- }
-
- if (isReadOnly !== undefined) {
- localVarQueryParameter['isReadOnly'] = isReadOnly;
- }
-
- if (isVisible !== undefined) {
- localVarQueryParameter['isVisible'] = isVisible;
- }
-
- if (lensModel !== undefined) {
- localVarQueryParameter['lensModel'] = lensModel;
- }
-
- if (libraryId !== undefined) {
- localVarQueryParameter['libraryId'] = libraryId;
- }
-
- if (make !== undefined) {
- localVarQueryParameter['make'] = make;
- }
-
- if (model !== undefined) {
- localVarQueryParameter['model'] = model;
- }
-
- if (order !== undefined) {
- localVarQueryParameter['order'] = order;
- }
-
- if (originalFileName !== undefined) {
- localVarQueryParameter['originalFileName'] = originalFileName;
- }
-
- if (originalPath !== undefined) {
- localVarQueryParameter['originalPath'] = originalPath;
- }
-
- if (page !== undefined) {
- localVarQueryParameter['page'] = page;
- }
-
- if (resizePath !== undefined) {
- localVarQueryParameter['resizePath'] = resizePath;
- }
-
- if (size !== undefined) {
- localVarQueryParameter['size'] = size;
- }
-
- if (state !== undefined) {
- localVarQueryParameter['state'] = state;
- }
-
- if (takenAfter !== undefined) {
- localVarQueryParameter['takenAfter'] = (takenAfter as any instanceof Date) ?
- (takenAfter as any).toISOString() :
- takenAfter;
- }
-
- if (takenBefore !== undefined) {
- localVarQueryParameter['takenBefore'] = (takenBefore as any instanceof Date) ?
- (takenBefore as any).toISOString() :
- takenBefore;
- }
-
- if (trashedAfter !== undefined) {
- localVarQueryParameter['trashedAfter'] = (trashedAfter as any instanceof Date) ?
- (trashedAfter as any).toISOString() :
- trashedAfter;
- }
-
- if (trashedBefore !== undefined) {
- localVarQueryParameter['trashedBefore'] = (trashedBefore as any instanceof Date) ?
- (trashedBefore as any).toISOString() :
- trashedBefore;
- }
-
- if (type !== undefined) {
- localVarQueryParameter['type'] = type;
- }
-
- if (updatedAfter !== undefined) {
- localVarQueryParameter['updatedAfter'] = (updatedAfter as any instanceof Date) ?
- (updatedAfter as any).toISOString() :
- updatedAfter;
- }
-
- if (updatedBefore !== undefined) {
- localVarQueryParameter['updatedBefore'] = (updatedBefore as any instanceof Date) ?
- (updatedBefore as any).toISOString() :
- updatedBefore;
- }
-
- if (webpPath !== undefined) {
- localVarQueryParameter['webpPath'] = webpPath;
- }
-
- if (withArchived !== undefined) {
- localVarQueryParameter['withArchived'] = withArchived;
- }
-
- if (withDeleted !== undefined) {
- localVarQueryParameter['withDeleted'] = withDeleted;
- }
-
- if (withExif !== undefined) {
- localVarQueryParameter['withExif'] = withExif;
- }
-
- if (withPeople !== undefined) {
- localVarQueryParameter['withPeople'] = withPeople;
- }
-
- if (withStacked !== undefined) {
- localVarQueryParameter['withStacked'] = withStacked;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(metadataSearchDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -15014,43 +15287,13 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
},
/**
*
- * @param {string} query
- * @param {string} [city]
- * @param {string} [country]
- * @param {string} [createdAfter]
- * @param {string} [createdBefore]
- * @param {string} [deviceId]
- * @param {boolean} [isArchived]
- * @param {boolean} [isEncoded]
- * @param {boolean} [isExternal]
- * @param {boolean} [isFavorite]
- * @param {boolean} [isMotion]
- * @param {boolean} [isOffline]
- * @param {boolean} [isReadOnly]
- * @param {boolean} [isVisible]
- * @param {string} [lensModel]
- * @param {string} [libraryId]
- * @param {string} [make]
- * @param {string} [model]
- * @param {number} [page]
- * @param {number} [size]
- * @param {string} [state]
- * @param {string} [takenAfter]
- * @param {string} [takenBefore]
- * @param {string} [trashedAfter]
- * @param {string} [trashedBefore]
- * @param {AssetTypeEnum} [type]
- * @param {string} [updatedAfter]
- * @param {string} [updatedBefore]
- * @param {boolean} [withArchived]
- * @param {boolean} [withDeleted]
- * @param {boolean} [withExif]
+ * @param {SmartSearchDto} smartSearchDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
- searchSmart: async (query: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceId?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, page?: number, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
- // verify required parameter 'query' is not null or undefined
- assertParamExists('searchSmart', 'query', query)
+ searchSmart: async (smartSearchDto: SmartSearchDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
+ // verify required parameter 'smartSearchDto' is not null or undefined
+ assertParamExists('searchSmart', 'smartSearchDto', smartSearchDto)
const localVarPath = `/search/smart`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -15059,7 +15302,7 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -15072,159 +15315,22 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
- if (city !== undefined) {
- localVarQueryParameter['city'] = city;
- }
-
- if (country !== undefined) {
- localVarQueryParameter['country'] = country;
- }
-
- if (createdAfter !== undefined) {
- localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ?
- (createdAfter as any).toISOString() :
- createdAfter;
- }
-
- if (createdBefore !== undefined) {
- localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ?
- (createdBefore as any).toISOString() :
- createdBefore;
- }
-
- if (deviceId !== undefined) {
- localVarQueryParameter['deviceId'] = deviceId;
- }
-
- if (isArchived !== undefined) {
- localVarQueryParameter['isArchived'] = isArchived;
- }
-
- if (isEncoded !== undefined) {
- localVarQueryParameter['isEncoded'] = isEncoded;
- }
-
- if (isExternal !== undefined) {
- localVarQueryParameter['isExternal'] = isExternal;
- }
-
- if (isFavorite !== undefined) {
- localVarQueryParameter['isFavorite'] = isFavorite;
- }
- if (isMotion !== undefined) {
- localVarQueryParameter['isMotion'] = isMotion;
- }
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
- if (isOffline !== undefined) {
- localVarQueryParameter['isOffline'] = isOffline;
- }
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(smartSearchDto, localVarRequestOptions, configuration)
- if (isReadOnly !== undefined) {
- localVarQueryParameter['isReadOnly'] = isReadOnly;
- }
-
- if (isVisible !== undefined) {
- localVarQueryParameter['isVisible'] = isVisible;
- }
-
- if (lensModel !== undefined) {
- localVarQueryParameter['lensModel'] = lensModel;
- }
-
- if (libraryId !== undefined) {
- localVarQueryParameter['libraryId'] = libraryId;
- }
-
- if (make !== undefined) {
- localVarQueryParameter['make'] = make;
- }
-
- if (model !== undefined) {
- localVarQueryParameter['model'] = model;
- }
-
- if (page !== undefined) {
- localVarQueryParameter['page'] = page;
- }
-
- if (query !== undefined) {
- localVarQueryParameter['query'] = query;
- }
-
- if (size !== undefined) {
- localVarQueryParameter['size'] = size;
- }
-
- if (state !== undefined) {
- localVarQueryParameter['state'] = state;
- }
-
- if (takenAfter !== undefined) {
- localVarQueryParameter['takenAfter'] = (takenAfter as any instanceof Date) ?
- (takenAfter as any).toISOString() :
- takenAfter;
- }
-
- if (takenBefore !== undefined) {
- localVarQueryParameter['takenBefore'] = (takenBefore as any instanceof Date) ?
- (takenBefore as any).toISOString() :
- takenBefore;
- }
-
- if (trashedAfter !== undefined) {
- localVarQueryParameter['trashedAfter'] = (trashedAfter as any instanceof Date) ?
- (trashedAfter as any).toISOString() :
- trashedAfter;
- }
-
- if (trashedBefore !== undefined) {
- localVarQueryParameter['trashedBefore'] = (trashedBefore as any instanceof Date) ?
- (trashedBefore as any).toISOString() :
- trashedBefore;
- }
-
- if (type !== undefined) {
- localVarQueryParameter['type'] = type;
- }
-
- if (updatedAfter !== undefined) {
- localVarQueryParameter['updatedAfter'] = (updatedAfter as any instanceof Date) ?
- (updatedAfter as any).toISOString() :
- updatedAfter;
- }
-
- if (updatedBefore !== undefined) {
- localVarQueryParameter['updatedBefore'] = (updatedBefore as any instanceof Date) ?
- (updatedBefore as any).toISOString() :
- updatedBefore;
- }
-
- if (withArchived !== undefined) {
- localVarQueryParameter['withArchived'] = withArchived;
- }
-
- if (withDeleted !== undefined) {
- localVarQueryParameter['withDeleted'] = withDeleted;
- }
-
- if (withExif !== undefined) {
- localVarQueryParameter['withExif'] = withExif;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- }
-};
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
/**
* SearchApi - functional programming interface
@@ -15284,52 +15390,12 @@ export const SearchApiFp = function(configuration?: Configuration) {
},
/**
*
- * @param {string} [checksum]
- * @param {string} [city]
- * @param {string} [country]
- * @param {string} [createdAfter]
- * @param {string} [createdBefore]
- * @param {string} [deviceAssetId]
- * @param {string} [deviceId]
- * @param {string} [encodedVideoPath]
- * @param {string} [id]
- * @param {boolean} [isArchived]
- * @param {boolean} [isEncoded]
- * @param {boolean} [isExternal]
- * @param {boolean} [isFavorite]
- * @param {boolean} [isMotion]
- * @param {boolean} [isOffline]
- * @param {boolean} [isReadOnly]
- * @param {boolean} [isVisible]
- * @param {string} [lensModel]
- * @param {string} [libraryId]
- * @param {string} [make]
- * @param {string} [model]
- * @param {AssetOrder} [order]
- * @param {string} [originalFileName]
- * @param {string} [originalPath]
- * @param {number} [page]
- * @param {string} [resizePath]
- * @param {number} [size]
- * @param {string} [state]
- * @param {string} [takenAfter]
- * @param {string} [takenBefore]
- * @param {string} [trashedAfter]
- * @param {string} [trashedBefore]
- * @param {AssetTypeEnum} [type]
- * @param {string} [updatedAfter]
- * @param {string} [updatedBefore]
- * @param {string} [webpPath]
- * @param {boolean} [withArchived]
- * @param {boolean} [withDeleted]
- * @param {boolean} [withExif]
- * @param {boolean} [withPeople]
- * @param {boolean} [withStacked]
+ * @param {MetadataSearchDto} metadataSearchDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
- async searchMetadata(checksum?: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceAssetId?: string, deviceId?: string, encodedVideoPath?: string, id?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, order?: AssetOrder, originalFileName?: string, originalPath?: string, page?: number, resizePath?: string, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, webpPath?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, withPeople?: boolean, withStacked?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResponseDto>> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchMetadata(checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked, options);
+ async searchMetadata(metadataSearchDto: MetadataSearchDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResponseDto>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchMetadata(metadataSearchDto, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SearchApi.searchMetadata']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
@@ -15349,42 +15415,12 @@ export const SearchApiFp = function(configuration?: Configuration) {
},
/**
*
- * @param {string} query
- * @param {string} [city]
- * @param {string} [country]
- * @param {string} [createdAfter]
- * @param {string} [createdBefore]
- * @param {string} [deviceId]
- * @param {boolean} [isArchived]
- * @param {boolean} [isEncoded]
- * @param {boolean} [isExternal]
- * @param {boolean} [isFavorite]
- * @param {boolean} [isMotion]
- * @param {boolean} [isOffline]
- * @param {boolean} [isReadOnly]
- * @param {boolean} [isVisible]
- * @param {string} [lensModel]
- * @param {string} [libraryId]
- * @param {string} [make]
- * @param {string} [model]
- * @param {number} [page]
- * @param {number} [size]
- * @param {string} [state]
- * @param {string} [takenAfter]
- * @param {string} [takenBefore]
- * @param {string} [trashedAfter]
- * @param {string} [trashedBefore]
- * @param {AssetTypeEnum} [type]
- * @param {string} [updatedAfter]
- * @param {string} [updatedBefore]
- * @param {boolean} [withArchived]
- * @param {boolean} [withDeleted]
- * @param {boolean} [withExif]
+ * @param {SmartSearchDto} smartSearchDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
- async searchSmart(query: string, city?: string, country?: string, createdAfter?: string, createdBefore?: string, deviceId?: string, isArchived?: boolean, isEncoded?: boolean, isExternal?: boolean, isFavorite?: boolean, isMotion?: boolean, isOffline?: boolean, isReadOnly?: boolean, isVisible?: boolean, lensModel?: string, libraryId?: string, make?: string, model?: string, page?: number, size?: number, state?: string, takenAfter?: string, takenBefore?: string, trashedAfter?: string, trashedBefore?: string, type?: AssetTypeEnum, updatedAfter?: string, updatedBefore?: string, withArchived?: boolean, withDeleted?: boolean, withExif?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResponseDto>> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchSmart(query, city, country, createdAfter, createdBefore, deviceId, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, page, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, withArchived, withDeleted, withExif, options);
+ async searchSmart(smartSearchDto: SmartSearchDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResponseDto>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchSmart(smartSearchDto, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SearchApi.searchSmart']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
@@ -15395,723 +15431,233 @@ export const SearchApiFp = function(configuration?: Configuration) {
/**
* SearchApi - factory interface
* @export
- */
-export const SearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
- const localVarFp = SearchApiFp(configuration)
- return {
- /**
- *
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- getExploreData(options?: RawAxiosRequestConfig): AxiosPromise<Array<SearchExploreResponseDto>> {
- return localVarFp.getExploreData(options).then((request) => request(axios, basePath));
- },
- /**
- *
- * @param {SearchApiGetSearchSuggestionsRequest} requestParameters Request parameters.
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- getSearchSuggestions(requestParameters: SearchApiGetSearchSuggestionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
- return localVarFp.getSearchSuggestions(requestParameters.type, requestParameters.country, requestParameters.make, requestParameters.model, requestParameters.state, options).then((request) => request(axios, basePath));
- },
- /**
- *
- * @param {SearchApiSearchRequest} requestParameters Request parameters.
- * @param {*} [options] Override http request option.
- * @deprecated
- * @throws {RequiredError}
- */
- search(requestParameters: SearchApiSearchRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
- return localVarFp.search(requestParameters.clip, requestParameters.motion, requestParameters.page, requestParameters.q, requestParameters.query, requestParameters.recent, requestParameters.size, requestParameters.smart, requestParameters.type, requestParameters.withArchived, options).then((request) => request(axios, basePath));
- },
- /**
- *
- * @param {SearchApiSearchMetadataRequest} requestParameters Request parameters.
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- searchMetadata(requestParameters: SearchApiSearchMetadataRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
- return localVarFp.searchMetadata(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(axios, basePath));
- },
- /**
- *
- * @param {SearchApiSearchPersonRequest} requestParameters Request parameters.
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- searchPerson(requestParameters: SearchApiSearchPersonRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<PersonResponseDto>> {
- return localVarFp.searchPerson(requestParameters.name, requestParameters.withHidden, options).then((request) => request(axios, basePath));
- },
- /**
- *
- * @param {SearchApiSearchSmartRequest} requestParameters Request parameters.
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- searchSmart(requestParameters: SearchApiSearchSmartRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
- return localVarFp.searchSmart(requestParameters.query, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceId, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.page, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, options).then((request) => request(axios, basePath));
- },
- };
-};
-
-/**
- * Request parameters for getSearchSuggestions operation in SearchApi.
- * @export
- * @interface SearchApiGetSearchSuggestionsRequest
- */
-export interface SearchApiGetSearchSuggestionsRequest {
- /**
- *
- * @type {SearchSuggestionType}
- * @memberof SearchApiGetSearchSuggestions
- */
- readonly type: SearchSuggestionType
-
- /**
- *
- * @type {string}
- * @memberof SearchApiGetSearchSuggestions
- */
- readonly country?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiGetSearchSuggestions
- */
- readonly make?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiGetSearchSuggestions
- */
- readonly model?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiGetSearchSuggestions
- */
- readonly state?: string
-}
-
-/**
- * Request parameters for search operation in SearchApi.
- * @export
- * @interface SearchApiSearchRequest
- */
-export interface SearchApiSearchRequest {
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearch
- */
- readonly clip?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearch
- */
- readonly motion?: boolean
-
- /**
- *
- * @type {number}
- * @memberof SearchApiSearch
- */
- readonly page?: number
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearch
- */
- readonly q?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearch
- */
- readonly query?: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearch
- */
- readonly recent?: boolean
-
- /**
- *
- * @type {number}
- * @memberof SearchApiSearch
- */
- readonly size?: number
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearch
- */
- readonly smart?: boolean
-
- /**
- *
- * @type {'IMAGE' | 'VIDEO' | 'AUDIO' | 'OTHER'}
- * @memberof SearchApiSearch
- */
- readonly type?: SearchTypeEnum
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearch
- */
- readonly withArchived?: boolean
-}
-
-/**
- * Request parameters for searchMetadata operation in SearchApi.
- * @export
- * @interface SearchApiSearchMetadataRequest
- */
-export interface SearchApiSearchMetadataRequest {
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly checksum?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly city?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly country?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly createdAfter?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly createdBefore?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly deviceAssetId?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly deviceId?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly encodedVideoPath?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly id?: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isArchived?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isEncoded?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isExternal?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isFavorite?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isMotion?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isOffline?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isReadOnly?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly isVisible?: boolean
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly lensModel?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly libraryId?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly make?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly model?: string
-
- /**
- *
- * @type {AssetOrder}
- * @memberof SearchApiSearchMetadata
- */
- readonly order?: AssetOrder
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly originalFileName?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly originalPath?: string
-
- /**
- *
- * @type {number}
- * @memberof SearchApiSearchMetadata
- */
- readonly page?: number
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly resizePath?: string
-
- /**
- *
- * @type {number}
- * @memberof SearchApiSearchMetadata
- */
- readonly size?: number
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly state?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly takenAfter?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly takenBefore?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly trashedAfter?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly trashedBefore?: string
-
- /**
- *
- * @type {AssetTypeEnum}
- * @memberof SearchApiSearchMetadata
- */
- readonly type?: AssetTypeEnum
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly updatedAfter?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly updatedBefore?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchMetadata
- */
- readonly webpPath?: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly withArchived?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly withDeleted?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly withExif?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly withPeople?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchMetadata
- */
- readonly withStacked?: boolean
-}
-
-/**
- * Request parameters for searchPerson operation in SearchApi.
- * @export
- * @interface SearchApiSearchPersonRequest
- */
-export interface SearchApiSearchPersonRequest {
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchPerson
- */
- readonly name: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchPerson
- */
- readonly withHidden?: boolean
-}
+ */
+export const SearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = SearchApiFp(configuration)
+ return {
+ /**
+ *
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ getExploreData(options?: RawAxiosRequestConfig): AxiosPromise<Array<SearchExploreResponseDto>> {
+ return localVarFp.getExploreData(options).then((request) => request(axios, basePath));
+ },
+ /**
+ *
+ * @param {SearchApiGetSearchSuggestionsRequest} requestParameters Request parameters.
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ getSearchSuggestions(requestParameters: SearchApiGetSearchSuggestionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
+ return localVarFp.getSearchSuggestions(requestParameters.type, requestParameters.country, requestParameters.make, requestParameters.model, requestParameters.state, options).then((request) => request(axios, basePath));
+ },
+ /**
+ *
+ * @param {SearchApiSearchRequest} requestParameters Request parameters.
+ * @param {*} [options] Override http request option.
+ * @deprecated
+ * @throws {RequiredError}
+ */
+ search(requestParameters: SearchApiSearchRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
+ return localVarFp.search(requestParameters.clip, requestParameters.motion, requestParameters.page, requestParameters.q, requestParameters.query, requestParameters.recent, requestParameters.size, requestParameters.smart, requestParameters.type, requestParameters.withArchived, options).then((request) => request(axios, basePath));
+ },
+ /**
+ *
+ * @param {SearchApiSearchMetadataRequest} requestParameters Request parameters.
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ searchMetadata(requestParameters: SearchApiSearchMetadataRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
+ return localVarFp.searchMetadata(requestParameters.metadataSearchDto, options).then((request) => request(axios, basePath));
+ },
+ /**
+ *
+ * @param {SearchApiSearchPersonRequest} requestParameters Request parameters.
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ searchPerson(requestParameters: SearchApiSearchPersonRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<PersonResponseDto>> {
+ return localVarFp.searchPerson(requestParameters.name, requestParameters.withHidden, options).then((request) => request(axios, basePath));
+ },
+ /**
+ *
+ * @param {SearchApiSearchSmartRequest} requestParameters Request parameters.
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ searchSmart(requestParameters: SearchApiSearchSmartRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchResponseDto> {
+ return localVarFp.searchSmart(requestParameters.smartSearchDto, options).then((request) => request(axios, basePath));
+ },
+ };
+};
/**
- * Request parameters for searchSmart operation in SearchApi.
+ * Request parameters for getSearchSuggestions operation in SearchApi.
* @export
- * @interface SearchApiSearchSmartRequest
+ * @interface SearchApiGetSearchSuggestionsRequest
*/
-export interface SearchApiSearchSmartRequest {
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly query: string
-
+export interface SearchApiGetSearchSuggestionsRequest {
/**
*
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @type {SearchSuggestionType}
+ * @memberof SearchApiGetSearchSuggestions
*/
- readonly city?: string
+ readonly type: SearchSuggestionType
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiGetSearchSuggestions
*/
readonly country?: string
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiGetSearchSuggestions
*/
- readonly createdAfter?: string
+ readonly make?: string
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiGetSearchSuggestions
*/
- readonly createdBefore?: string
+ readonly model?: string
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly deviceId?: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isArchived?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isEncoded?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isExternal?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isFavorite?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isMotion?: boolean
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiGetSearchSuggestions
*/
- readonly isOffline?: boolean
+ readonly state?: string
+}
+/**
+ * Request parameters for search operation in SearchApi.
+ * @export
+ * @interface SearchApiSearchRequest
+ */
+export interface SearchApiSearchRequest {
/**
*
* @type {boolean}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearch
*/
- readonly isReadOnly?: boolean
+ readonly clip?: boolean
/**
*
* @type {boolean}
- * @memberof SearchApiSearchSmart
- */
- readonly isVisible?: boolean
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearch
*/
- readonly lensModel?: string
+ readonly motion?: boolean
/**
*
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @type {number}
+ * @memberof SearchApiSearch
*/
- readonly libraryId?: string
+ readonly page?: number
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearch
*/
- readonly make?: string
+ readonly q?: string
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearch
*/
- readonly model?: string
+ readonly query?: string
/**
*
- * @type {number}
- * @memberof SearchApiSearchSmart
+ * @type {boolean}
+ * @memberof SearchApiSearch
*/
- readonly page?: number
+ readonly recent?: boolean
/**
*
* @type {number}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearch
*/
readonly size?: number
/**
*
- * @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly state?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly takenAfter?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly takenBefore?: string
-
- /**
- *
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @type {boolean}
+ * @memberof SearchApiSearch
*/
- readonly trashedAfter?: string
+ readonly smart?: boolean
/**
*
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @type {'IMAGE' | 'VIDEO' | 'AUDIO' | 'OTHER'}
+ * @memberof SearchApiSearch
*/
- readonly trashedBefore?: string
+ readonly type?: SearchTypeEnum
/**
*
- * @type {AssetTypeEnum}
- * @memberof SearchApiSearchSmart
+ * @type {boolean}
+ * @memberof SearchApiSearch
*/
- readonly type?: AssetTypeEnum
+ readonly withArchived?: boolean
+}
+/**
+ * Request parameters for searchMetadata operation in SearchApi.
+ * @export
+ * @interface SearchApiSearchMetadataRequest
+ */
+export interface SearchApiSearchMetadataRequest {
/**
*
- * @type {string}
- * @memberof SearchApiSearchSmart
+ * @type {MetadataSearchDto}
+ * @memberof SearchApiSearchMetadata
*/
- readonly updatedAfter?: string
+ readonly metadataSearchDto: MetadataSearchDto
+}
+/**
+ * Request parameters for searchPerson operation in SearchApi.
+ * @export
+ * @interface SearchApiSearchPersonRequest
+ */
+export interface SearchApiSearchPersonRequest {
/**
*
* @type {string}
- * @memberof SearchApiSearchSmart
- */
- readonly updatedBefore?: string
-
- /**
- *
- * @type {boolean}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearchPerson
*/
- readonly withArchived?: boolean
+ readonly name: string
/**
*
* @type {boolean}
- * @memberof SearchApiSearchSmart
+ * @memberof SearchApiSearchPerson
*/
- readonly withDeleted?: boolean
+ readonly withHidden?: boolean
+}
+/**
+ * Request parameters for searchSmart operation in SearchApi.
+ * @export
+ * @interface SearchApiSearchSmartRequest
+ */
+export interface SearchApiSearchSmartRequest {
/**
*
- * @type {boolean}
+ * @type {SmartSearchDto}
* @memberof SearchApiSearchSmart
*/
- readonly withExif?: boolean
+ readonly smartSearchDto: SmartSearchDto
}
/**
@@ -16161,8 +15707,8 @@ export class SearchApi extends BaseAPI {
* @throws {RequiredError}
* @memberof SearchApi
*/
- public searchMetadata(requestParameters: SearchApiSearchMetadataRequest = {}, options?: RawAxiosRequestConfig) {
- return SearchApiFp(this.configuration).searchMetadata(requestParameters.checksum, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.encodedVideoPath, requestParameters.id, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.order, requestParameters.originalFileName, requestParameters.originalPath, requestParameters.page, requestParameters.resizePath, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.webpPath, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, requestParameters.withPeople, requestParameters.withStacked, options).then((request) => request(this.axios, this.basePath));
+ public searchMetadata(requestParameters: SearchApiSearchMetadataRequest, options?: RawAxiosRequestConfig) {
+ return SearchApiFp(this.configuration).searchMetadata(requestParameters.metadataSearchDto, options).then((request) => request(this.axios, this.basePath));
}
/**
@@ -16184,7 +15730,7 @@ export class SearchApi extends BaseAPI {
* @memberof SearchApi
*/
public searchSmart(requestParameters: SearchApiSearchSmartRequest, options?: RawAxiosRequestConfig) {
- return SearchApiFp(this.configuration).searchSmart(requestParameters.query, requestParameters.city, requestParameters.country, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.deviceId, requestParameters.isArchived, requestParameters.isEncoded, requestParameters.isExternal, requestParameters.isFavorite, requestParameters.isMotion, requestParameters.isOffline, requestParameters.isReadOnly, requestParameters.isVisible, requestParameters.lensModel, requestParameters.libraryId, requestParameters.make, requestParameters.model, requestParameters.page, requestParameters.size, requestParameters.state, requestParameters.takenAfter, requestParameters.takenBefore, requestParameters.trashedAfter, requestParameters.trashedBefore, requestParameters.type, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.withArchived, requestParameters.withDeleted, requestParameters.withExif, options).then((request) => request(this.axios, this.basePath));
+ return SearchApiFp(this.configuration).searchSmart(requestParameters.smartSearchDto, options).then((request) => request(this.axios, this.basePath));
}
}
diff --git a/open-api/typescript-sdk/fetch-client.ts b/open-api/typescript-sdk/fetch-client.ts
index 8eef9b3a5c..0f42ff9178 100644
--- a/open-api/typescript-sdk/fetch-client.ts
+++ b/open-api/typescript-sdk/fetch-client.ts
@@ -588,6 +588,84 @@ export type SearchExploreResponseDto = {
fieldName: string;
items: SearchExploreItem[];
};
+export type MetadataSearchDto = {
+ checksum?: string;
+ city?: string;
+ country?: string;
+ createdAfter?: string;
+ createdBefore?: string;
+ deviceAssetId?: string;
+ deviceId?: string;
+ encodedVideoPath?: string;
+ id?: string;
+ isArchived?: boolean;
+ isEncoded?: boolean;
+ isExternal?: boolean;
+ isFavorite?: boolean;
+ isMotion?: boolean;
+ isNotInAlbum?: boolean;
+ isOffline?: boolean;
+ isReadOnly?: boolean;
+ isVisible?: boolean;
+ lensModel?: string;
+ libraryId?: string;
+ make?: string;
+ model?: string;
+ order?: AssetOrder;
+ originalFileName?: string;
+ originalPath?: string;
+ page?: number;
+ personIds?: string[];
+ resizePath?: string;
+ size?: number;
+ state?: string;
+ takenAfter?: string;
+ takenBefore?: string;
+ trashedAfter?: string;
+ trashedBefore?: string;
+ "type"?: AssetTypeEnum;
+ updatedAfter?: string;
+ updatedBefore?: string;
+ webpPath?: string;
+ withArchived?: boolean;
+ withDeleted?: boolean;
+ withExif?: boolean;
+ withPeople?: boolean;
+ withStacked?: boolean;
+};
+export type SmartSearchDto = {
+ city?: string;
+ country?: string;
+ createdAfter?: string;
+ createdBefore?: string;
+ deviceId?: string;
+ isArchived?: boolean;
+ isEncoded?: boolean;
+ isExternal?: boolean;
+ isFavorite?: boolean;
+ isMotion?: boolean;
+ isOffline?: boolean;
+ isReadOnly?: boolean;
+ isVisible?: boolean;
+ lensModel?: string;
+ libraryId?: string;
+ make?: string;
+ model?: string;
+ page?: number;
+ query: string;
+ size?: number;
+ state?: string;
+ takenAfter?: string;
+ takenBefore?: string;
+ trashedAfter?: string;
+ trashedBefore?: string;
+ "type"?: AssetTypeEnum;
+ updatedAfter?: string;
+ updatedBefore?: string;
+ withArchived?: boolean;
+ withDeleted?: boolean;
+ withExif?: boolean;
+};
export type ServerInfoResponseDto = {
diskAvailable: string;
diskAvailableRaw: number;
@@ -1437,7 +1515,7 @@ export function updateAsset({ id, updateAssetDto }: {
body: updateAssetDto
})));
}
-export function searchAssets({ checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked }: {
+export function searchAssets({ checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isNotInAlbum, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, personIds, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked }: {
checksum?: string;
city?: string;
country?: string;
@@ -1452,6 +1530,7 @@ export function searchAssets({ checksum, city, country, createdAfter, createdBef
isExternal?: boolean;
isFavorite?: boolean;
isMotion?: boolean;
+ isNotInAlbum?: boolean;
isOffline?: boolean;
isReadOnly?: boolean;
isVisible?: boolean;
@@ -1463,6 +1542,7 @@ export function searchAssets({ checksum, city, country, createdAfter, createdBef
originalFileName?: string;
originalPath?: string;
page?: number;
+ personIds?: string[];
resizePath?: string;
size?: number;
state?: string;
@@ -1498,6 +1578,7 @@ export function searchAssets({ checksum, city, country, createdAfter, createdBef
isExternal,
isFavorite,
isMotion,
+ isNotInAlbum,
isOffline,
isReadOnly,
isVisible,
@@ -1509,6 +1590,7 @@ export function searchAssets({ checksum, city, country, createdAfter, createdBef
originalFileName,
originalPath,
page,
+ personIds,
resizePath,
size,
state,
@@ -2063,97 +2145,17 @@ export function getExploreData(opts?: Oazapfts.RequestOpts) {
...opts
}));
}
-export function searchMetadata({ checksum, city, country, createdAfter, createdBefore, deviceAssetId, deviceId, encodedVideoPath, id, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, order, originalFileName, originalPath, page, resizePath, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, webpPath, withArchived, withDeleted, withExif, withPeople, withStacked }: {
- checksum?: string;
- city?: string;
- country?: string;
- createdAfter?: string;
- createdBefore?: string;
- deviceAssetId?: string;
- deviceId?: string;
- encodedVideoPath?: string;
- id?: string;
- isArchived?: boolean;
- isEncoded?: boolean;
- isExternal?: boolean;
- isFavorite?: boolean;
- isMotion?: boolean;
- isOffline?: boolean;
- isReadOnly?: boolean;
- isVisible?: boolean;
- lensModel?: string;
- libraryId?: string;
- make?: string;
- model?: string;
- order?: AssetOrder;
- originalFileName?: string;
- originalPath?: string;
- page?: number;
- resizePath?: string;
- size?: number;
- state?: string;
- takenAfter?: string;
- takenBefore?: string;
- trashedAfter?: string;
- trashedBefore?: string;
- $type?: AssetTypeEnum;
- updatedAfter?: string;
- updatedBefore?: string;
- webpPath?: string;
- withArchived?: boolean;
- withDeleted?: boolean;
- withExif?: boolean;
- withPeople?: boolean;
- withStacked?: boolean;
+export function searchMetadata({ metadataSearchDto }: {
+ metadataSearchDto: MetadataSearchDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
- status: 200;
+ status: 201;
data: SearchResponseDto;
- }>(`/search/metadata${QS.query(QS.explode({
- checksum,
- city,
- country,
- createdAfter,
- createdBefore,
- deviceAssetId,
- deviceId,
- encodedVideoPath,
- id,
- isArchived,
- isEncoded,
- isExternal,
- isFavorite,
- isMotion,
- isOffline,
- isReadOnly,
- isVisible,
- lensModel,
- libraryId,
- make,
- model,
- order,
- originalFileName,
- originalPath,
- page,
- resizePath,
- size,
- state,
- takenAfter,
- takenBefore,
- trashedAfter,
- trashedBefore,
- "type": $type,
- updatedAfter,
- updatedBefore,
- webpPath,
- withArchived,
- withDeleted,
- withExif,
- withPeople,
- withStacked
- }))}`, {
- ...opts
- }));
+ }>("/search/metadata", oazapfts.json({
+ ...opts,
+ method: "POST",
+ body: metadataSearchDto
+ })));
}
export function searchPerson({ name, withHidden }: {
name: string;
@@ -2169,77 +2171,17 @@ export function searchPerson({ name, withHidden }: {
...opts
}));
}
-export function searchSmart({ city, country, createdAfter, createdBefore, deviceId, isArchived, isEncoded, isExternal, isFavorite, isMotion, isOffline, isReadOnly, isVisible, lensModel, libraryId, make, model, page, query, size, state, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, withArchived, withDeleted, withExif }: {
- city?: string;
- country?: string;
- createdAfter?: string;
- createdBefore?: string;
- deviceId?: string;
- isArchived?: boolean;
- isEncoded?: boolean;
- isExternal?: boolean;
- isFavorite?: boolean;
- isMotion?: boolean;
- isOffline?: boolean;
- isReadOnly?: boolean;
- isVisible?: boolean;
- lensModel?: string;
- libraryId?: string;
- make?: string;
- model?: string;
- page?: number;
- query: string;
- size?: number;
- state?: string;
- takenAfter?: string;
- takenBefore?: string;
- trashedAfter?: string;
- trashedBefore?: string;
- $type?: AssetTypeEnum;
- updatedAfter?: string;
- updatedBefore?: string;
- withArchived?: boolean;
- withDeleted?: boolean;
- withExif?: boolean;
+export function searchSmart({ smartSearchDto }: {
+ smartSearchDto: SmartSearchDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
- status: 200;
+ status: 201;
data: SearchResponseDto;
- }>(`/search/smart${QS.query(QS.explode({
- city,
- country,
- createdAfter,
- createdBefore,
- deviceId,
- isArchived,
- isEncoded,
- isExternal,
- isFavorite,
- isMotion,
- isOffline,
- isReadOnly,
- isVisible,
- lensModel,
- libraryId,
- make,
- model,
- page,
- query,
- size,
- state,
- takenAfter,
- takenBefore,
- trashedAfter,
- trashedBefore,
- "type": $type,
- updatedAfter,
- updatedBefore,
- withArchived,
- withDeleted,
- withExif
- }))}`, {
- ...opts
- }));
+ }>("/search/smart", oazapfts.json({
+ ...opts,
+ method: "POST",
+ body: smartSearchDto
+ })));
}
export function getSearchSuggestions({ country, make, model, state, $type }: {
country?: string;
diff --git a/server/src/domain/repositories/search.repository.ts b/server/src/domain/repositories/search.repository.ts
index 4d720f98ad..35ead53dbc 100644
--- a/server/src/domain/repositories/search.repository.ts
+++ b/server/src/domain/repositories/search.repository.ts
@@ -66,13 +66,14 @@ export interface SearchAssetIDOptions {
id?: string;
}
-export interface SearchUserIDOptions {
+export interface SearchUserIdOptions {
deviceId?: string;
libraryId?: string;
ownerId?: string;
+ userIds?: string[];
}
-export type SearchIDOptions = SearchAssetIDOptions & SearchUserIDOptions;
+export type SearchIdOptions = SearchAssetIDOptions & SearchUserIdOptions;
export interface SearchStatusOptions {
isArchived?: boolean;
@@ -83,6 +84,7 @@ export interface SearchStatusOptions {
isOffline?: boolean;
isReadOnly?: boolean;
isVisible?: boolean;
+ isNotInAlbum?: boolean;
type?: AssetType;
withArchived?: boolean;
withDeleted?: boolean;
@@ -132,6 +134,10 @@ export interface SearchEmbeddingOptions {
userIds: string[];
}
+export interface SearchPeopleOptions {
+ personIds?: string[];
+}
+
export interface SearchOrderOptions {
orderDirection?: 'ASC' | 'DESC';
}
@@ -142,12 +148,14 @@ export interface SearchPaginationOptions {
}
export type AssetSearchOptions = SearchDateOptions &
- SearchIDOptions &
+ SearchIdOptions &
SearchExifOptions &
SearchOrderOptions &
SearchPathOptions &
SearchRelationOptions &
- SearchStatusOptions;
+ SearchStatusOptions &
+ SearchUserIdOptions &
+ SearchPeopleOptions;
export type AssetSearchBuilderOptions = Omit<AssetSearchOptions, 'orderDirection'>;
@@ -156,7 +164,8 @@ export type SmartSearchOptions = SearchDateOptions &
SearchExifOptions &
SearchOneToOneRelationOptions &
SearchStatusOptions &
- SearchUserIDOptions;
+ SearchUserIdOptions &
+ SearchPeopleOptions;
export interface FaceEmbeddingSearch extends SearchEmbeddingOptions {
hasPerson?: boolean;
diff --git a/server/src/domain/search/dto/search.dto.ts b/server/src/domain/search/dto/search.dto.ts
index a4e0396688..5aa73433d9 100644
--- a/server/src/domain/search/dto/search.dto.ts
+++ b/server/src/domain/search/dto/search.dto.ts
@@ -169,6 +169,12 @@ export class MetadataSearchDto extends BaseSearchDto {
@Optional()
@ApiProperty({ enumName: 'AssetOrder', enum: AssetOrder })
order?: AssetOrder;
+
+ @QueryBoolean({ optional: true })
+ isNotInAlbum?: boolean;
+
+ @Optional()
+ personIds?: string[];
}
export class SmartSearchDto extends BaseSearchDto {
diff --git a/server/src/domain/search/search.service.ts b/server/src/domain/search/search.service.ts
index 49cca2ab48..452c556f41 100644
--- a/server/src/domain/search/search.service.ts
+++ b/server/src/domain/search/search.service.ts
@@ -60,6 +60,7 @@ export class SearchService {
async searchMetadata(auth: AuthDto, dto: MetadataSearchDto): Promise<SearchResponseDto> {
let checksum: Buffer | undefined;
+ const userIds = await this.getUserIdsToSearch(auth);
if (dto.checksum) {
const encoding = dto.checksum.length === 28 ? 'base64' : 'hex';
@@ -74,7 +75,7 @@ export class SearchService {
{
...dto,
checksum,
- ownerId: auth.user.id,
+ userIds,
orderDirection: dto.order ? enumToOrder[dto.order] : 'DESC',
},
);
diff --git a/server/src/immich/controllers/search.controller.ts b/server/src/immich/controllers/search.controller.ts
index f8438b2e35..4e57cfaa62 100644
--- a/server/src/immich/controllers/search.controller.ts
+++ b/server/src/immich/controllers/search.controller.ts
@@ -10,7 +10,7 @@ import {
SmartSearchDto,
} from '@app/domain';
import { SearchSuggestionRequestDto } from '@app/domain/search/dto/search-suggestion.dto';
-import { Controller, Get, Query } from '@nestjs/common';
+import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { Auth, Authenticated } from '../app.guard';
import { UseValidation } from '../app.utils';
@@ -22,13 +22,13 @@ import { UseValidation } from '../app.utils';
export class SearchController {
constructor(private service: SearchService) {}
- @Get('metadata')
- searchMetadata(@Auth() auth: AuthDto, @Query() dto: MetadataSearchDto): Promise<SearchResponseDto> {
+ @Post('metadata')
+ searchMetadata(@Auth() auth: AuthDto, @Body() dto: MetadataSearchDto): Promise<SearchResponseDto> {
return this.service.searchMetadata(auth, dto);
}
- @Get('smart')
- searchSmart(@Auth() auth: AuthDto, @Query() dto: SmartSearchDto): Promise<SearchResponseDto> {
+ @Post('smart')
+ searchSmart(@Auth() auth: AuthDto, @Body() dto: SmartSearchDto): Promise<SearchResponseDto> {
return this.service.searchSmart(auth, dto);
}
diff --git a/server/src/infra/infra.utils.ts b/server/src/infra/infra.utils.ts
index 89bd319662..2b274cb12a 100644
--- a/server/src/infra/infra.utils.ts
+++ b/server/src/infra/infra.utils.ts
@@ -139,14 +139,27 @@ export function searchAssetBuilder(
);
const exifInfo = _.omitBy(_.pick(options, ['city', 'country', 'lensModel', 'make', 'model', 'state']), _.isUndefined);
- if (Object.keys(exifInfo).length > 0) {
- builder.leftJoin(`${builder.alias}.exifInfo`, 'exifInfo');
+ const hasExifQuery = Object.keys(exifInfo).length > 0;
+
+ if (options.withExif && !hasExifQuery) {
+ builder.leftJoinAndSelect(`${builder.alias}.exifInfo`, 'exifInfo');
+ }
+
+ if (hasExifQuery) {
+ options.withExif
+ ? builder.leftJoinAndSelect(`${builder.alias}.exifInfo`, 'exifInfo')
+ : builder.leftJoin(`${builder.alias}.exifInfo`, 'exifInfo');
+
builder.andWhere({ exifInfo });
}
- const id = _.pick(options, ['checksum', 'deviceAssetId', 'deviceId', 'id', 'libraryId', 'ownerId']);
+ const id = _.pick(options, ['checksum', 'deviceAssetId', 'deviceId', 'id', 'libraryId']);
builder.andWhere(_.omitBy(id, _.isUndefined));
+ if (options.userIds) {
+ builder.andWhere(`${builder.alias}.ownerId IN (:...userIds)`, { userIds: options.userIds });
+ }
+
const path = _.pick(options, ['encodedVideoPath', 'originalFileName', 'originalPath', 'resizePath', 'webpPath']);
builder.andWhere(_.omitBy(path, _.isUndefined));
@@ -164,8 +177,8 @@ export function searchAssetBuilder(
),
);
- if (options.withExif) {
- builder.leftJoinAndSelect(`${builder.alias}.exifInfo`, 'exifInfo');
+ if (options.isNotInAlbum) {
+ builder.leftJoin(`${builder.alias}.albums`, 'albums').andWhere('albums.id IS NULL');
}
if (options.withFaces || options.withPeople) {
@@ -180,6 +193,18 @@ export function searchAssetBuilder(
builder.leftJoinAndSelect(`${builder.alias}.smartInfo`, 'smartInfo');
}
+ if (options.personIds && options.personIds.length > 0) {
+ builder
+ .leftJoin(`${builder.alias}.faces`, 'faces')
+ .andWhere('faces.personId IN (:...personIds)', { personIds: options.personIds })
+ .addGroupBy(`${builder.alias}.id`)
+ .having('COUNT(faces.id) = :personCount', { personCount: options.personIds.length });
+
+ if (options.withExif) {
+ builder.addGroupBy('exifInfo.assetId');
+ }
+ }
+
if (options.withStacked) {
builder
.leftJoinAndSelect(`${builder.alias}.stack`, 'stack')
diff --git a/server/src/infra/repositories/search.repository.ts b/server/src/infra/repositories/search.repository.ts
index 7d0421b05d..a30c96b10d 100644
--- a/server/src/infra/repositories/search.repository.ts
+++ b/server/src/infra/repositories/search.repository.ts
@@ -58,6 +58,7 @@ export class SearchRepository implements ISearchRepository {
ownerId: DummyValue.UUID,
withStacked: true,
isFavorite: true,
+ ownerIds: [DummyValue.UUID],
},
],
})
@@ -66,7 +67,6 @@ export class SearchRepository implements ISearchRepository {
builder = searchAssetBuilder(builder, options);
builder.orderBy('asset.fileCreatedAt', options.orderDirection ?? 'DESC');
-
return paginatedBuilder<AssetEntity>(builder, {
mode: PaginationMode.SKIP_TAKE,
skip: (pagination.page - 1) * pagination.size,
diff --git a/server/src/infra/sql/search.repository.sql b/server/src/infra/sql/search.repository.sql
index 538a854094..ebae46f65b 100644
--- a/server/src/infra/sql/search.repository.sql
+++ b/server/src/infra/sql/search.repository.sql
@@ -77,9 +77,9 @@ FROM
(
"asset"."fileCreatedAt" >= $1
AND "exifInfo"."lensModel" = $2
- AND "asset"."ownerId" = $3
AND 1 = 1
- AND "asset"."isFavorite" = $4
+ AND 1 = 1
+ AND "asset"."isFavorite" = $3
AND (
"stack"."primaryAssetId" = "asset"."id"
OR "asset"."stackId" IS NULL
diff --git a/web/.eslintrc.cjs b/web/.eslintrc.cjs
index de62060e0f..ef17242c8e 100644
--- a/web/.eslintrc.cjs
+++ b/web/.eslintrc.cjs
@@ -38,6 +38,7 @@ module.exports = {
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/consistent-function-scoping': 'off',
+ 'unicorn/prefer-top-level-await': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
diff --git a/web/src/lib/components/memory-page/memory-viewer.svelte b/web/src/lib/components/memory-page/memory-viewer.svelte
index af26a7bffa..397c167d16 100644
--- a/web/src/lib/components/memory-page/memory-viewer.svelte
+++ b/web/src/lib/components/memory-page/memory-viewer.svelte
@@ -7,6 +7,7 @@
import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte';
import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.svelte';
import { AppRoute, QueryParameter } from '$lib/constants';
+ import type { Viewport } from '$lib/stores/assets.store';
import { memoryStore } from '$lib/stores/memory.store';
import { getAssetThumbnailUrl } from '$lib/utils';
import { fromLocalDateTime } from '$lib/utils/timeline-util';
@@ -34,6 +35,7 @@
$: canGoForward = !!(nextMemory || nextAsset);
$: canGoBack = !!(previousMemory || previousAsset);
+ const viewport: Viewport = { width: 0, height: 0 };
const toNextMemory = () => goto(`?${QueryParameter.MEMORY_INDEX}=${memoryIndex + 1}`);
const toPreviousMemory = () => goto(`?${QueryParameter.MEMORY_INDEX}=${memoryIndex - 1}`);
@@ -251,7 +253,7 @@
<!-- GALERY VIEWER -->
- <section class="bg-immich-dark-gray pl-4">
+ <section class="bg-immich-dark-gray m-4">
<div
class="sticky mb-10 mt-4 flex place-content-center place-items-center transition-all"
class:opacity-0={galleryInView}
@@ -268,8 +270,13 @@
on:hidden={() => (galleryInView = false)}
bottom={-200}
>
- <div id="gallery-memory" bind:this={memoryGallery}>
- <GalleryViewer assets={currentMemory.assets} />
+ <div
+ id="gallery-memory"
+ bind:this={memoryGallery}
+ bind:clientHeight={viewport.height}
+ bind:clientWidth={viewport.width}
+ >
+ <GalleryViewer assets={currentMemory.assets} {viewport} />
</div>
</IntersectionObserver>
</section>
diff --git a/web/src/lib/components/photos-page/asset-date-group.svelte b/web/src/lib/components/photos-page/asset-date-group.svelte
index a38708e881..04fb872116 100644
--- a/web/src/lib/components/photos-page/asset-date-group.svelte
+++ b/web/src/lib/components/photos-page/asset-date-group.svelte
@@ -5,7 +5,12 @@
import type { AssetStore, Viewport } from '$lib/stores/assets.store';
import { locale } from '$lib/stores/preferences.store';
import { getAssetRatio } from '$lib/utils/asset-utils';
- import { formatGroupTitle, fromLocalDateTime, splitBucketIntoDateGroups } from '$lib/utils/timeline-util';
+ import {
+ calculateWidth,
+ formatGroupTitle,
+ fromLocalDateTime,
+ splitBucketIntoDateGroups,
+ } from '$lib/utils/timeline-util';
import type { AssetResponseDto } from '@immich/sdk';
import { mdiCheckCircle, mdiCircleOutline } from '@mdi/js';
import justifiedLayout from 'justified-layout';
@@ -36,12 +41,6 @@
let actualBucketHeight: number;
let hoveredDateGroup = '';
- interface LayoutBox {
- top: number;
- left: number;
- width: number;
- }
-
$: assetsGroupByDate = splitBucketIntoDateGroups(assets, $locale);
$: geometry = (() => {
@@ -80,17 +79,6 @@
});
}
- const calculateWidth = (boxes: LayoutBox[]): number => {
- let width = 0;
- for (const box of boxes) {
- if (box.top < 100) {
- width = box.left + box.width;
- }
- }
-
- return width;
- };
-
const assetClickHandler = (asset: AssetResponseDto, assetsInDateGroup: AssetResponseDto[], groupTitle: string) => {
if (isSelectionMode || $isMultiSelectState) {
assetSelectHandler(asset, assetsInDateGroup, groupTitle);
diff --git a/web/src/lib/components/share-page/individual-shared-viewer.svelte b/web/src/lib/components/share-page/individual-shared-viewer.svelte
index 37b2983ae1..0036331378 100644
--- a/web/src/lib/components/share-page/individual-shared-viewer.svelte
+++ b/web/src/lib/components/share-page/individual-shared-viewer.svelte
@@ -16,10 +16,12 @@
import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte';
import ImmichLogo from '../shared-components/immich-logo.svelte';
import { NotificationType, notificationController } from '../shared-components/notification/notification';
+ import type { Viewport } from '$lib/stores/assets.store';
export let sharedLink: SharedLinkResponseDto;
export let isOwned: boolean;
+ const viewport: Viewport = { width: 0, height: 0 };
let selectedAssets: Set<AssetResponseDto> = new Set();
$: assets = sharedLink.assets;
@@ -97,7 +99,7 @@
</svelte:fragment>
</ControlAppBar>
{/if}
- <section class="my-[160px] flex flex-col px-6 sm:px-12 md:px-24 lg:px-40">
- <GalleryViewer {assets} bind:selectedAssets />
+ <section class="my-[160px] mx-4" bind:clientHeight={viewport.height} bind:clientWidth={viewport.width}>
+ <GalleryViewer {assets} bind:selectedAssets {viewport} />
</section>
</section>
diff --git a/web/src/lib/components/shared-components/control-app-bar.svelte b/web/src/lib/components/shared-components/control-app-bar.svelte
index e8d56b742c..bdb2aed709 100644
--- a/web/src/lib/components/shared-components/control-app-bar.svelte
+++ b/web/src/lib/components/shared-components/control-app-bar.svelte
@@ -51,7 +51,7 @@
<div in:fly={{ y: 10, duration: 200 }} class="absolute top-0 w-full z-[100] bg-transparent">
<div
id="asset-selection-app-bar"
- class={`grid grid-cols-[10%_80%_10%] justify-between md:grid-cols-[20%_60%_20%] lg:grid-cols-3 ${appBarBorder} mx-2 mt-2 place-items-center rounded-lg p-2 transition-all ${tailwindClasses} dark:bg-immich-dark-gray ${
+ class={`grid grid-cols-[10%_80%_10%] justify-between md:grid-cols-[15%_70%_15%] lg:grid-cols-[25%_50%_25%] ${appBarBorder} mx-2 mt-2 place-items-center rounded-lg p-2 transition-all ${tailwindClasses} dark:bg-immich-dark-gray ${
forceDark && 'bg-immich-dark-gray text-white'
}`}
>
diff --git a/web/src/lib/components/shared-components/gallery-viewer/gallery-viewer.svelte b/web/src/lib/components/shared-components/gallery-viewer/gallery-viewer.svelte
index fa1d7d6732..2fb4feb67a 100644
--- a/web/src/lib/components/shared-components/gallery-viewer/gallery-viewer.svelte
+++ b/web/src/lib/components/shared-components/gallery-viewer/gallery-viewer.svelte
@@ -2,13 +2,14 @@
import { page } from '$app/stores';
import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte';
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
- import type { BucketPosition } from '$lib/stores/assets.store';
+ import type { BucketPosition, Viewport } from '$lib/stores/assets.store';
import { handleError } from '$lib/utils/handle-error';
- import { getThumbnailSize } from '$lib/utils/thumbnail-util';
- import { ThumbnailFormat, type AssetResponseDto } from '@immich/sdk';
+ import { type AssetResponseDto } from '@immich/sdk';
import { createEventDispatcher, onDestroy } from 'svelte';
- import { flip } from 'svelte/animate';
import AssetViewer from '../../asset-viewer/asset-viewer.svelte';
+ import justifiedLayout from 'justified-layout';
+ import { getAssetRatio } from '$lib/utils/asset-utils';
+ import { calculateWidth } from '$lib/utils/timeline-util';
const dispatch = createEventDispatcher<{ intersected: { container: HTMLDivElement; position: BucketPosition } }>();
@@ -16,14 +17,12 @@
export let selectedAssets: Set<AssetResponseDto> = new Set();
export let disableAssetSelect = false;
export let showArchiveIcon = false;
+ export let viewport: Viewport;
let { isViewing: showAssetViewer } = assetViewingStore;
let selectedAsset: AssetResponseDto;
let currentViewAssetIndex = 0;
- let viewWidth: number;
- $: thumbnailSize = getThumbnailSize(assets.length, viewWidth);
-
$: isMultiSelectionMode = selectedAssets.size > 0;
const viewAssetHandler = (event: CustomEvent) => {
@@ -86,23 +85,45 @@
onDestroy(() => {
$showAssetViewer = false;
});
+
+ $: geometry = (() => {
+ const justifiedLayoutResult = justifiedLayout(
+ assets.map((asset) => getAssetRatio(asset)),
+ {
+ boxSpacing: 2,
+ containerWidth: Math.floor(viewport.width),
+ containerPadding: 0,
+ targetRowHeightTolerance: 0.15,
+ targetRowHeight: 235,
+ },
+ );
+
+ return {
+ ...justifiedLayoutResult,
+ containerWidth: calculateWidth(justifiedLayoutResult.boxes),
+ };
+ })();
</script>
{#if assets.length > 0}
- <div class="flex w-full flex-wrap gap-1 pb-20" bind:clientWidth={viewWidth}>
- {#each assets as asset, i (asset.id)}
- <div animate:flip={{ duration: 500 }}>
+ <div class="relative" style="height: {geometry.containerHeight}px;width: {geometry.containerWidth}px ">
+ {#each assets as asset, i (i)}
+ <div
+ class="absolute"
+ style="width: {geometry.boxes[i].width}px; height: {geometry.boxes[i].height}px; top: {geometry.boxes[i]
+ .top}px; left: {geometry.boxes[i].left}px"
+ >
<Thumbnail
{asset}
- {thumbnailSize}
readonly={disableAssetSelect}
- format={assets.length < 7 ? ThumbnailFormat.Jpeg : ThumbnailFormat.Webp}
on:click={(e) => (isMultiSelectionMode ? selectAssetHandler(e) : viewAssetHandler(e))}
on:select={selectAssetHandler}
on:intersected={(event) =>
i === Math.max(1, assets.length - 7) ? dispatch('intersected', event.detail) : undefined}
selected={selectedAssets.has(asset)}
{showArchiveIcon}
+ thumbnailWidth={geometry.boxes[i].width}
+ thumbnailHeight={geometry.boxes[i].height}
/>
</div>
{/each}
diff --git a/web/src/lib/components/shared-components/search-bar/search-bar.svelte b/web/src/lib/components/shared-components/search-bar/search-bar.svelte
index 8dfba184ad..62e950566d 100644
--- a/web/src/lib/components/shared-components/search-bar/search-bar.svelte
+++ b/web/src/lib/components/shared-components/search-bar/search-bar.svelte
@@ -2,12 +2,18 @@
import { AppRoute } from '$lib/constants';
import Icon from '$lib/components/elements/icon.svelte';
import { goto } from '$app/navigation';
- import { isSearchEnabled, preventRaceConditionSearchBar, savedSearchTerms } from '$lib/stores/search.store';
+ import {
+ isSearchEnabled,
+ preventRaceConditionSearchBar,
+ savedSearchTerms,
+ searchQuery,
+ } from '$lib/stores/search.store';
import { clickOutside } from '$lib/utils/click-outside';
import { mdiClose, mdiMagnify, mdiTune } from '@mdi/js';
import IconButton from '$lib/components/elements/buttons/icon-button.svelte';
import SearchHistoryBox from './search-history-box.svelte';
import SearchFilterBox from './search-filter-box.svelte';
+ import type { MetadataSearchDto, SmartSearchDto } from '@immich/sdk';
export let value = '';
export let grayTheme: boolean;
@@ -17,28 +23,17 @@
let showFilter = false;
$: showClearIcon = value.length > 0;
- function onSearch() {
- let smartSearch = 'true';
- let searchValue = value;
-
- if (value.slice(0, 2) == 'm:') {
- smartSearch = 'false';
- searchValue = value.slice(2);
- }
-
- $savedSearchTerms = $savedSearchTerms.filter((item) => item !== value);
- saveSearchTerm(value);
-
+ const onSearch = (payload: SmartSearchDto | MetadataSearchDto) => {
const parameters = new URLSearchParams({
- q: searchValue,
- smart: smartSearch,
- take: '100',
+ query: JSON.stringify(payload),
});
showHistory = false;
+ showFilter = false;
$isSearchEnabled = false;
+ $searchQuery = payload;
goto(`${AppRoute.SEARCH}?${parameters}`, { invalidateAll: true });
- }
+ };
const clearSearchTerm = (searchTerm: string) => {
input.focus();
@@ -70,6 +65,26 @@
showHistory = false;
$isSearchEnabled = false;
+ showFilter = false;
+ };
+
+ const onHistoryTermClick = (searchTerm: string) => {
+ const searchPayload = { query: searchTerm };
+ onSearch(searchPayload);
+ };
+
+ const onFilterClick = () => {
+ showFilter = !showFilter;
+ value = '';
+
+ if (showFilter) {
+ showHistory = false;
+ }
+ };
+
+ const onSubmit = () => {
+ onSearch({ query: value });
+ saveSearchTerm(value);
};
</script>
@@ -80,7 +95,7 @@
class="relative select-text text-sm"
action={AppRoute.SEARCH}
on:reset={() => (value = '')}
- on:submit|preventDefault={() => onSearch()}
+ on:submit|preventDefault={onSubmit}
>
<label>
<div class="absolute inset-y-0 left-0 flex items-center pl-6">
@@ -107,9 +122,9 @@
disabled={showFilter}
/>
- <div class="absolute inset-y-0 right-5 flex items-center pl-6">
+ <div class="absolute inset-y-0 {showClearIcon ? 'right-14' : 'right-5'} flex items-center pl-6 transition-all">
<div class="dark:text-immich-dark-fg/75">
- <IconButton on:click={() => (showFilter = !showFilter)} title="Show search options">
+ <IconButton on:click={onFilterClick} title="Show search options">
<Icon path={mdiTune} size="1.5em" />
</IconButton>
</div>
@@ -131,15 +146,12 @@
<SearchHistoryBox
on:clearAllSearchTerms={clearAllSearchTerms}
on:clearSearchTerm={({ detail: searchTerm }) => clearSearchTerm(searchTerm)}
- on:selectSearchTerm={({ detail: searchTerm }) => {
- value = searchTerm;
- onSearch();
- }}
+ on:selectSearchTerm={({ detail: searchTerm }) => onHistoryTermClick(searchTerm)}
/>
{/if}
{#if showFilter}
- <SearchFilterBox />
+ <SearchFilterBox on:search={({ detail }) => onSearch(detail)} />
{/if}
</form>
</div>
diff --git a/web/src/lib/components/shared-components/search-bar/search-filter-box.svelte b/web/src/lib/components/shared-components/search-bar/search-filter-box.svelte
index ffc78e59fb..0df5d53795 100644
--- a/web/src/lib/components/shared-components/search-bar/search-filter-box.svelte
+++ b/web/src/lib/components/shared-components/search-bar/search-filter-box.svelte
@@ -4,12 +4,20 @@
import Icon from '$lib/components/elements/icon.svelte';
import { getPeopleThumbnailUrl } from '$lib/utils';
import { handleError } from '$lib/utils/handle-error';
- import { SearchSuggestionType, type PersonResponseDto } from '@immich/sdk';
+ import {
+ AssetTypeEnum,
+ SearchSuggestionType,
+ type PersonResponseDto,
+ type SmartSearchDto,
+ type MetadataSearchDto,
+ } from '@immich/sdk';
import { getAllPeople, getSearchSuggestions } from '@immich/sdk';
import { mdiArrowRight, mdiClose } from '@mdi/js';
- import { onMount } from 'svelte';
+ import { createEventDispatcher, onMount } from 'svelte';
import { fly } from 'svelte/transition';
import Combobox, { type ComboBoxOption } from '../combobox.svelte';
+ import { DateTime } from 'luxon';
+ import { searchQuery } from '$lib/stores/search.store';
enum MediaType {
All = 'all',
@@ -22,8 +30,8 @@
country: ComboBoxOption[];
state: ComboBoxOption[];
city: ComboBoxOption[];
- cameraMake: ComboBoxOption[];
- cameraModel: ComboBoxOption[];
+ make: ComboBoxOption[];
+ model: ComboBoxOption[];
};
type SearchParams = {
@@ -49,14 +57,14 @@
model?: ComboBoxOption;
};
- dateRange: {
- startDate?: Date;
- endDate?: Date;
+ date: {
+ takenAfter?: string;
+ takenBefore?: string;
};
- inArchive?: boolean;
- inFavorite?: boolean;
- notInAlbum?: boolean;
+ isArchive?: boolean;
+ isFavorite?: boolean;
+ isNotInAlbum?: boolean;
mediaType: MediaType;
};
@@ -66,8 +74,8 @@
country: [],
state: [],
city: [],
- cameraMake: [],
- cameraModel: [],
+ make: [],
+ model: [],
};
let filter: SearchFilter = {
@@ -82,21 +90,23 @@
make: undefined,
model: undefined,
},
- dateRange: {
- startDate: undefined,
- endDate: undefined,
+ date: {
+ takenAfter: undefined,
+ takenBefore: undefined,
},
- inArchive: undefined,
- inFavorite: undefined,
- notInAlbum: undefined,
+ isArchive: undefined,
+ isFavorite: undefined,
+ isNotInAlbum: undefined,
mediaType: MediaType.All,
};
+ const dispatch = createEventDispatcher<{ search: SmartSearchDto | MetadataSearchDto }>();
let showAllPeople = false;
$: peopleList = showAllPeople ? suggestions.people : suggestions.people.slice(0, 11);
onMount(() => {
getPeople();
+ populateExistingFilters();
});
const showSelectedPeopleFirst = () => {
@@ -141,7 +151,7 @@
}
if (type === SearchSuggestionType.CameraMake || type === SearchSuggestionType.CameraModel) {
- suggestions = { ...suggestions, cameraMake: [], cameraModel: [] };
+ suggestions = { ...suggestions, make: [], model: [] };
}
try {
@@ -178,14 +188,14 @@
case SearchSuggestionType.CameraMake: {
for (const make of data) {
- suggestions.cameraMake = [...suggestions.cameraMake, { label: make, value: make }];
+ suggestions.make = [...suggestions.make, { label: make, value: make }];
}
break;
}
case SearchSuggestionType.CameraModel: {
for (const model of data) {
- suggestions.cameraModel = [...suggestions.cameraModel, { label: model, value: model }];
+ suggestions.model = [...suggestions.model, { label: model, value: model }];
}
break;
}
@@ -208,18 +218,99 @@
make: undefined,
model: undefined,
},
- dateRange: {
- startDate: undefined,
- endDate: undefined,
+ date: {
+ takenAfter: undefined,
+ takenBefore: undefined,
},
- inArchive: undefined,
- inFavorite: undefined,
- notInAlbum: undefined,
+ isArchive: undefined,
+ isFavorite: undefined,
+ isNotInAlbum: undefined,
mediaType: MediaType.All,
};
};
- const search = () => {};
+ const search = async () => {
+ let type: AssetTypeEnum | undefined = undefined;
+
+ if (filter.mediaType === MediaType.Image) {
+ type = AssetTypeEnum.Image;
+ } else if (filter.mediaType === MediaType.Video) {
+ type = AssetTypeEnum.Video;
+ }
+
+ let payload: SmartSearchDto | MetadataSearchDto = {
+ country: filter.location.country?.value,
+ state: filter.location.state?.value,
+ city: filter.location.city?.value,
+ make: filter.camera.make?.value,
+ model: filter.camera.model?.value,
+ takenAfter: filter.date.takenAfter
+ ? DateTime.fromFormat(filter.date.takenAfter, 'yyyy-MM-dd').toUTC().startOf('day').toString()
+ : undefined,
+ takenBefore: filter.date.takenBefore
+ ? DateTime.fromFormat(filter.date.takenBefore, 'yyyy-MM-dd').toUTC().endOf('day').toString()
+ : undefined,
+ /* eslint-disable unicorn/prefer-logical-operator-over-ternary */
+ isArchived: filter.isArchive ? filter.isArchive : undefined,
+ isFavorite: filter.isFavorite ? filter.isFavorite : undefined,
+ isNotInAlbum: filter.isNotInAlbum ? filter.isNotInAlbum : undefined,
+ personIds: filter.people && filter.people.length > 0 ? filter.people.map((p) => p.id) : undefined,
+ type,
+ };
+
+ if (filter.context) {
+ if (payload.personIds && payload.personIds.length > 0) {
+ handleError(
+ new Error('Context search does not support people filter'),
+ 'Context search does not support people filter',
+ );
+ return;
+ }
+
+ payload = {
+ ...payload,
+ query: filter.context,
+ };
+ }
+
+ dispatch('search', payload);
+ };
+
+ function populateExistingFilters() {
+ if ($searchQuery) {
+ filter = {
+ context: 'query' in $searchQuery ? $searchQuery.query : '',
+ people:
+ 'personIds' in $searchQuery ? ($searchQuery.personIds?.map((id) => ({ id })) as PersonResponseDto[]) : [],
+ location: {
+ country: $searchQuery.country ? { label: $searchQuery.country, value: $searchQuery.country } : undefined,
+ state: $searchQuery.state ? { label: $searchQuery.state, value: $searchQuery.state } : undefined,
+ city: $searchQuery.city ? { label: $searchQuery.city, value: $searchQuery.city } : undefined,
+ },
+ camera: {
+ make: $searchQuery.make ? { label: $searchQuery.make, value: $searchQuery.make } : undefined,
+ model: $searchQuery.model ? { label: $searchQuery.model, value: $searchQuery.model } : undefined,
+ },
+ date: {
+ takenAfter: $searchQuery.takenAfter
+ ? DateTime.fromISO($searchQuery.takenAfter).toUTC().toFormat('yyyy-MM-dd')
+ : undefined,
+ takenBefore: $searchQuery.takenBefore
+ ? DateTime.fromISO($searchQuery.takenBefore).toUTC().toFormat('yyyy-MM-dd')
+ : undefined,
+ },
+ isArchive: $searchQuery.isArchived,
+ isFavorite: $searchQuery.isFavorite,
+ isNotInAlbum: 'isNotInAlbum' in $searchQuery ? $searchQuery.isNotInAlbum : undefined,
+ mediaType:
+ $searchQuery.type === AssetTypeEnum.Image
+ ? MediaType.Image
+ : $searchQuery.type === AssetTypeEnum.Video
+ ? MediaType.Video
+ : MediaType.All,
+ };
+ }
+ }
</script>
<div
@@ -347,7 +438,7 @@
<div class="w-full">
<p class="text-sm text-black dark:text-white">Make</p>
<Combobox
- options={suggestions.cameraMake}
+ options={suggestions.make}
bind:selectedOption={filter.camera.make}
placeholder="Search camera make..."
on:click={() =>
@@ -358,7 +449,7 @@
<div class="w-full">
<p class="text-sm text-black dark:text-white">Model</p>
<Combobox
- options={suggestions.cameraModel}
+ options={suggestions.model}
bind:selectedOption={filter.camera.model}
placeholder="Search camera model..."
on:click={() =>
@@ -379,7 +470,7 @@
type="date"
id="start-date"
name="start-date"
- bind:value={filter.dateRange.startDate}
+ bind:value={filter.date.takenAfter}
/>
</div>
@@ -391,7 +482,7 @@
id="end-date"
name="end-date"
placeholder=""
- bind:value={filter.dateRange.endDate}
+ bind:value={filter.date.takenBefore}
/>
</div>
</div>
@@ -450,17 +541,17 @@
<div class="flex gap-5 mt-3">
<label class="flex items-center mb-2">
- <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.notInAlbum} />
+ <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.isNotInAlbum} />
<span class="ml-2 text-sm text-black dark:text-white pt-1">Not in any album</span>
</label>
<label class="flex items-center mb-2">
- <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.inArchive} />
+ <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.isArchive} />
<span class="ml-2 text-sm text-black dark:text-white pt-1">Archive</span>
</label>
<label class="flex items-center mb-2">
- <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.inFavorite} />
+ <input type="checkbox" class="form-checkbox h-5 w-5 color" bind:checked={filter.isFavorite} />
<span class="ml-2 text-sm text-black dark:text-white pt-1">Favorite</span>
</label>
</div>
diff --git a/web/src/lib/components/shared-components/search-bar/search-history-box.svelte b/web/src/lib/components/shared-components/search-bar/search-history-box.svelte
index cb22513019..53573e56c8 100644
--- a/web/src/lib/components/shared-components/search-bar/search-history-box.svelte
+++ b/web/src/lib/components/shared-components/search-bar/search-history-box.svelte
@@ -16,15 +16,6 @@
transition:fly={{ y: 25, duration: 250 }}
class="absolute w-full rounded-b-3xl border border-gray-200 bg-white pb-5 shadow-2xl transition-all dark:border-gray-800 dark:bg-immich-dark-gray dark:text-gray-300"
>
- <div class="flex px-5 pt-5 text-left text-sm">
- <p>
- Smart search is enabled by default, to search for metadata use the syntax <span
- class="rounded-lg bg-gray-100 p-2 font-mono font-semibold leading-7 text-immich-primary dark:bg-gray-900 dark:text-immich-dark-primary"
- >m:your-search-term</span
- >
- </p>
- </div>
-
{#if $savedSearchTerms.length > 0}
<div class="flex items-center justify-between px-5 pt-5 text-xs">
<p>RECENT SEARCHES</p>
diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.ts
index 83f6476ba7..baf6628276 100644
--- a/web/src/lib/constants.ts
+++ b/web/src/lib/constants.ts
@@ -71,6 +71,7 @@ export enum QueryParameter {
SEARCHED_PEOPLE = 'searchedPeople',
SEARCH_TERM = 'q',
SMART_SEARCH = 'smartSearch',
+ PAGE = 'page',
}
export enum OpenSettingQueryParameterValue {
diff --git a/web/src/lib/stores/search.store.ts b/web/src/lib/stores/search.store.ts
index 41fd287f4c..ded7dc17ae 100644
--- a/web/src/lib/stores/search.store.ts
+++ b/web/src/lib/stores/search.store.ts
@@ -1,6 +1,8 @@
+import type { MetadataSearchDto, SmartSearchDto } from '@immich/sdk';
import { persisted } from 'svelte-local-storage-store';
import { writable } from 'svelte/store';
export const savedSearchTerms = persisted<string[]>('search-terms', [], {});
export const isSearchEnabled = writable<boolean>(false);
export const preventRaceConditionSearchBar = writable<boolean>(false);
+export const searchQuery = writable<SmartSearchDto | MetadataSearchDto | undefined>(undefined);
diff --git a/web/src/lib/utils/timeline-util.ts b/web/src/lib/utils/timeline-util.ts
index ce9f945e5a..fa1ceb88cb 100644
--- a/web/src/lib/utils/timeline-util.ts
+++ b/web/src/lib/utils/timeline-util.ts
@@ -50,3 +50,20 @@ export function splitBucketIntoDateGroups(
);
return sortBy(grouped, (group) => assets.indexOf(group[0]));
}
+
+export type LayoutBox = {
+ top: number;
+ left: number;
+ width: number;
+};
+
+export function calculateWidth(boxes: LayoutBox[]): number {
+ let width = 0;
+ for (const box of boxes) {
+ if (box.top < 100) {
+ width = box.left + box.width;
+ }
+ }
+
+ return width;
+}
diff --git a/web/src/routes/(user)/search/+page.svelte b/web/src/routes/(user)/search/+page.svelte
index e720a39333..f914011dc2 100644
--- a/web/src/routes/(user)/search/+page.svelte
+++ b/web/src/routes/(user)/search/+page.svelte
@@ -20,25 +20,30 @@
import SearchBar from '$lib/components/shared-components/search-bar/search-bar.svelte';
import { AppRoute, QueryParameter } from '$lib/constants';
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
- import { preventRaceConditionSearchBar } from '$lib/stores/search.store';
+ import { preventRaceConditionSearchBar, searchQuery } from '$lib/stores/search.store';
import { authenticate } from '$lib/utils/auth';
import { shouldIgnoreShortcut } from '$lib/utils/shortcut';
- import { search, type AssetResponseDto, type SearchResponseDto } from '@immich/sdk';
+ import { type AssetResponseDto, type SearchResponseDto, searchSmart, searchMetadata, getPerson } from '@immich/sdk';
import { mdiArrowLeft, mdiDotsVertical, mdiImageOffOutline, mdiPlus, mdiSelectAll } from '@mdi/js';
import { onDestroy, onMount } from 'svelte';
import { flip } from 'svelte/animate';
import type { PageData } from './$types';
+ import type { Viewport } from '$lib/stores/assets.store';
+ import { locale } from '$lib/stores/preferences.store';
export let data: PageData;
const MAX_ASSET_COUNT = 5000;
let { isViewing: showAssetViewer } = assetViewingStore;
+ const viewport: Viewport = { width: 0, height: 0 };
// The GalleryViewer pushes it's own history state, which causes weird
// behavior for history.back(). To prevent that we store the previous page
// manually and navigate back to that.
let previousRoute = AppRoute.EXPLORE as string;
- $: curPage = data.results?.assets.nextPage;
+ /* eslint-disable @typescript-eslint/no-explicit-any */
+ let terms: any;
+ $: currentPage = data.results?.assets.nextPage;
$: albums = data.results?.albums.items;
const onKeyboardPress = (event: KeyboardEvent) => handleKeyboardPress(event);
@@ -87,16 +92,9 @@
if (from?.route.id === '/(user)/albums/[albumId]') {
previousRoute = AppRoute.EXPLORE;
}
- });
- $: term = (() => {
- let term = $page.url.searchParams.get(QueryParameter.SEARCH_TERM) || data.term || '';
- const isMetadataSearch = $page.url.searchParams.get(QueryParameter.SMART_SEARCH) === 'false';
- if (isMetadataSearch && term !== '') {
- term = `m:${term}`;
- }
- return term;
- })();
+ updateInformationChip();
+ });
let selectedAssets: Set<AssetResponseDto> = new Set();
$: isMultiSelectionMode = selectedAssets.size > 0;
@@ -111,32 +109,120 @@
selectedAssets = new Set(searchResultAssets);
};
+ function updateInformationChip() {
+ let query = $page.url.searchParams.get(QueryParameter.SEARCH_TERM) || data.term || '';
+ terms = JSON.parse(query);
+ }
+
export const loadNextPage = async () => {
- if (curPage == null || !term || (searchResultAssets && searchResultAssets.length >= MAX_ASSET_COUNT)) {
+ if (currentPage == null || !terms || (searchResultAssets && searchResultAssets.length >= MAX_ASSET_COUNT)) {
return;
}
await authenticate();
let results: SearchResponseDto | null = null;
- $page.url.searchParams.set('page', curPage.toString());
- const res = await search({ ...$page.url.searchParams });
+ $page.url.searchParams.set(QueryParameter.PAGE, currentPage.toString());
+ const payload = $searchQuery;
+ let responses: SearchResponseDto;
+
+ responses =
+ payload && 'query' in payload
+ ? await searchSmart({
+ smartSearchDto: { ...payload, page: Number.parseInt(currentPage), withExif: true },
+ })
+ : await searchMetadata({
+ metadataSearchDto: { ...payload, page: Number.parseInt(currentPage), withExif: true },
+ });
+
if (searchResultAssets) {
- searchResultAssets.push(...res.assets.items);
+ searchResultAssets.push(...responses.assets.items);
} else {
- searchResultAssets = res.assets.items;
+ searchResultAssets = responses.assets.items;
}
const assets = {
- ...res.assets,
+ ...responses.assets,
items: searchResultAssets,
};
results = {
assets,
- albums: res.albums,
+ albums: responses.albums,
};
data.results = results;
};
+
+ function getHumanReadableDate(date: string) {
+ const d = new Date(date);
+ return d.toLocaleDateString($locale, {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ });
+ }
+
+ function getHumanReadableSearchKey(key: string): string {
+ switch (key) {
+ case 'takenAfter': {
+ return 'Start date';
+ }
+ case 'takenBefore': {
+ return 'End date';
+ }
+ case 'isArchived': {
+ return 'In archive';
+ }
+ case 'isFavorite': {
+ return 'Favorite';
+ }
+ case 'isNotInAlbum': {
+ return 'Not in any album';
+ }
+ case 'type': {
+ return 'Media type';
+ }
+ case 'query': {
+ return 'Context';
+ }
+ case 'city': {
+ return 'City';
+ }
+ case 'country': {
+ return 'Country';
+ }
+ case 'state': {
+ return 'State';
+ }
+ case 'make': {
+ return 'Camera brand';
+ }
+ case 'model': {
+ return 'Camera model';
+ }
+ case 'personIds': {
+ return 'People';
+ }
+ default: {
+ return key;
+ }
+ }
+ }
+
+ async function getPersonName(personIds: string[]) {
+ const personNames = await Promise.all(
+ personIds.map(async (personId) => {
+ const person = await getPerson({ id: personId });
+
+ if (person.name == '') {
+ return 'No Name';
+ }
+
+ return person.name;
+ }),
+ );
+
+ return personNames.join(', ');
+ }
</script>
<section>
@@ -161,15 +247,53 @@
</AssetSelectControlBar>
</div>
{:else}
- <ControlAppBar on:close={() => goto(previousRoute)} backIcon={mdiArrowLeft}>
- <div class="w-full flex-1 pl-4">
- <SearchBar grayTheme={false} value={term} />
- </div>
- </ControlAppBar>
+ <div class="fixed z-[100] top-0 left-0 w-full">
+ <ControlAppBar on:close={() => goto(previousRoute)} backIcon={mdiArrowLeft}>
+ <div class="w-full flex-1 pl-4">
+ <SearchBar grayTheme={false} />
+ </div>
+ </ControlAppBar>
+ </div>
{/if}
</section>
-<section class="relative mb-12 bg-immich-bg pt-32 dark:bg-immich-dark-bg">
+{#if terms}
+ <section
+ id="search-chips"
+ class="mt-24 text-center w-full flex gap-5 place-content-center place-items-center flex-wrap px-24"
+ >
+ {#each Object.keys(terms) as key, index (index)}
+ <div class="flex place-content-center place-items-center text-xs">
+ <div
+ class="bg-immich-primary py-2 px-4 text-white dark:text-black dark:bg-immich-dark-primary
+ {terms[key] === true ? 'rounded-full' : 'rounded-tl-full rounded-bl-full'}"
+ >
+ {getHumanReadableSearchKey(key)}
+ </div>
+
+ {#if terms[key] !== true}
+ <div class="bg-gray-300 py-2 px-4 dark:bg-gray-800 dark:text-white rounded-tr-full rounded-br-full">
+ {#if key === 'takenAfter' || key === 'takenBefore'}
+ {getHumanReadableDate(terms[key])}
+ {:else if key === 'personIds'}
+ {#await getPersonName(terms[key]) then personName}
+ {personName}
+ {/await}
+ {:else}
+ {terms[key]}
+ {/if}
+ </div>
+ {/if}
+ </div>
+ {/each}
+ </section>
+{/if}
+
+<section
+ class="relative mb-12 bg-immich-bg dark:bg-immich-dark-bg m-4"
+ bind:clientHeight={viewport.height}
+ bind:clientWidth={viewport.width}
+>
<section class="immich-scrollbar relative overflow-y-auto">
{#if albums && albums.length > 0}
<section>
@@ -193,14 +317,13 @@
{/if}
<section id="search-content" class="relative bg-immich-bg dark:bg-immich-dark-bg">
{#if searchResultAssets && searchResultAssets.length > 0}
- <div class="pl-4">
- <GalleryViewer
- assets={searchResultAssets}
- bind:selectedAssets
- on:intersected={loadNextPage}
- showArchiveIcon={true}
- />
- </div>
+ <GalleryViewer
+ assets={searchResultAssets}
+ bind:selectedAssets
+ on:intersected={loadNextPage}
+ showArchiveIcon={true}
+ {viewport}
+ />
{:else}
<div class="flex min-h-[calc(66vh_-_11rem)] w-full place-content-center items-center dark:text-white">
<div class="flex flex-col content-center items-center text-center">
diff --git a/web/src/routes/(user)/search/+page.ts b/web/src/routes/(user)/search/+page.ts
index e3c99b007b..b2997e70b0 100644
--- a/web/src/routes/(user)/search/+page.ts
+++ b/web/src/routes/(user)/search/+page.ts
@@ -1,6 +1,13 @@
import { QueryParameter } from '$lib/constants';
+import { searchQuery } from '$lib/stores/search.store';
import { authenticate } from '$lib/utils/auth';
-import { search, type AssetResponseDto, type SearchResponseDto } from '@immich/sdk';
+import {
+ searchMetadata,
+ searchSmart,
+ type MetadataSearchDto,
+ type SearchResponseDto,
+ type SmartSearchDto,
+} from '@immich/sdk';
import type { PageLoad } from './$types';
export const load = (async (data) => {
@@ -10,22 +17,13 @@ export const load = (async (data) => {
url.searchParams.get(QueryParameter.SEARCH_TERM) || url.searchParams.get(QueryParameter.QUERY) || undefined;
let results: SearchResponseDto | null = null;
if (term) {
- let params = {};
- for (const [key, value] of data.url.searchParams) {
- params = { ...params, [key]: value };
- }
- const response = await search({ ...params });
- let items: AssetResponseDto[] = (data as unknown as { results: SearchResponseDto }).results?.assets.items;
- if (items) {
- items.push(...response.assets.items);
- } else {
- items = response.assets.items;
- }
- const assets = { ...response.assets, items };
- results = {
- assets,
- albums: response.albums,
- };
+ const payload = JSON.parse(term) as SmartSearchDto | MetadataSearchDto;
+ searchQuery.set(payload);
+
+ results =
+ payload && 'query' in payload
+ ? await searchSmart({ smartSearchDto: { ...payload, withExif: true } })
+ : await searchMetadata({ metadataSearchDto: { ...payload, withExif: true } });
}
return {