diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 2f5b51e071..9928ed66f0 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -148,6 +148,7 @@ Class | Method | HTTP request | Description *DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner *DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status *DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs +*DeprecatedApi* | [**searchLargeAssets**](doc//DeprecatedApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets *DeprecatedApi* | [**updateApiKey**](doc//DeprecatedApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key *DeprecatedApi* | [**updateAsset**](doc//DeprecatedApi.md#updateasset) | **PUT** /assets/{id} | Update an asset *DeprecatedApi* | [**updateAssets**](doc//DeprecatedApi.md#updateassets) | **PUT** /assets | Update assets @@ -414,6 +415,7 @@ Class | Method | HTTP request | Description - [AudioCodec](doc//AudioCodec.md) - [AuthStatusResponseDto](doc//AuthStatusResponseDto.md) - [AvatarUpdate](doc//AvatarUpdate.md) + - [BoolFilter](doc//BoolFilter.md) - [BulkIdErrorReason](doc//BulkIdErrorReason.md) - [BulkIdResponseDto](doc//BulkIdResponseDto.md) - [BulkIdsDto](doc//BulkIdsDto.md) @@ -435,6 +437,8 @@ Class | Method | HTTP request | Description - [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md) - [DatabaseBackupDto](doc//DatabaseBackupDto.md) - [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md) + - [DateFilter](doc//DateFilter.md) + - [DateFilterNullable](doc//DateFilterNullable.md) - [DownloadArchiveDto](doc//DownloadArchiveDto.md) - [DownloadArchiveInfo](doc//DownloadArchiveInfo.md) - [DownloadInfoDto](doc//DownloadInfoDto.md) @@ -447,12 +451,17 @@ Class | Method | HTTP request | Description - [DuplicateResponseDto](doc//DuplicateResponseDto.md) - [EmailNotificationsResponse](doc//EmailNotificationsResponse.md) - [EmailNotificationsUpdate](doc//EmailNotificationsUpdate.md) + - [EnumFilterAssetType](doc//EnumFilterAssetType.md) + - [EnumFilterAssetVisibility](doc//EnumFilterAssetVisibility.md) - [ExifResponseDto](doc//ExifResponseDto.md) - [FaceDto](doc//FaceDto.md) - [FacialRecognitionConfig](doc//FacialRecognitionConfig.md) - [FoldersResponse](doc//FoldersResponse.md) - [FoldersUpdate](doc//FoldersUpdate.md) - [HlsVideoResolution](doc//HlsVideoResolution.md) + - [IdFilter](doc//IdFilter.md) + - [IdFilterNullable](doc//IdFilterNullable.md) + - [IdsFilter](doc//IdsFilter.md) - [ImageFormat](doc//ImageFormat.md) - [IntegrityReport](doc//IntegrityReport.md) - [IntegrityReportResponseDto](doc//IntegrityReportResponseDto.md) @@ -497,6 +506,8 @@ Class | Method | HTTP request | Description - [NotificationType](doc//NotificationType.md) - [NotificationUpdateAllDto](doc//NotificationUpdateAllDto.md) - [NotificationUpdateDto](doc//NotificationUpdateDto.md) + - [NumberFilter](doc//NumberFilter.md) + - [NumberFilterNullable](doc//NumberFilterNullable.md) - [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md) - [OAuthCallbackDto](doc//OAuthCallbackDto.md) - [OAuthConfigDto](doc//OAuthConfigDto.md) @@ -559,6 +570,10 @@ Class | Method | HTTP request | Description - [SearchExploreResponseDto](doc//SearchExploreResponseDto.md) - [SearchFacetCountResponseDto](doc//SearchFacetCountResponseDto.md) - [SearchFacetResponseDto](doc//SearchFacetResponseDto.md) + - [SearchFilter](doc//SearchFilter.md) + - [SearchFilterBranch](doc//SearchFilterBranch.md) + - [SearchOrder](doc//SearchOrder.md) + - [SearchOrderField](doc//SearchOrderField.md) - [SearchResponseDto](doc//SearchResponseDto.md) - [SearchStatisticsResponseDto](doc//SearchStatisticsResponseDto.md) - [SearchSuggestionType](doc//SearchSuggestionType.md) @@ -593,6 +608,10 @@ Class | Method | HTTP request | Description - [StackUpdateDto](doc//StackUpdateDto.md) - [StatisticsSearchDto](doc//StatisticsSearchDto.md) - [StorageFolder](doc//StorageFolder.md) + - [StringFilter](doc//StringFilter.md) + - [StringFilterNullable](doc//StringFilterNullable.md) + - [StringPatternFilter](doc//StringPatternFilter.md) + - [StringSimilarityFilter](doc//StringSimilarityFilter.md) - [SyncAckDeleteDto](doc//SyncAckDeleteDto.md) - [SyncAckDto](doc//SyncAckDto.md) - [SyncAckSetDto](doc//SyncAckSetDto.md) diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index 47425b56fe..0c9cb51572 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -135,6 +135,7 @@ part 'model/asset_visibility.dart'; part 'model/audio_codec.dart'; part 'model/auth_status_response_dto.dart'; part 'model/avatar_update.dart'; +part 'model/bool_filter.dart'; part 'model/bulk_id_error_reason.dart'; part 'model/bulk_id_response_dto.dart'; part 'model/bulk_ids_dto.dart'; @@ -156,6 +157,8 @@ part 'model/database_backup_config.dart'; part 'model/database_backup_delete_dto.dart'; part 'model/database_backup_dto.dart'; part 'model/database_backup_list_response_dto.dart'; +part 'model/date_filter.dart'; +part 'model/date_filter_nullable.dart'; part 'model/download_archive_dto.dart'; part 'model/download_archive_info.dart'; part 'model/download_info_dto.dart'; @@ -168,12 +171,17 @@ part 'model/duplicate_resolve_group_dto.dart'; part 'model/duplicate_response_dto.dart'; part 'model/email_notifications_response.dart'; part 'model/email_notifications_update.dart'; +part 'model/enum_filter_asset_type.dart'; +part 'model/enum_filter_asset_visibility.dart'; part 'model/exif_response_dto.dart'; part 'model/face_dto.dart'; part 'model/facial_recognition_config.dart'; part 'model/folders_response.dart'; part 'model/folders_update.dart'; part 'model/hls_video_resolution.dart'; +part 'model/id_filter.dart'; +part 'model/id_filter_nullable.dart'; +part 'model/ids_filter.dart'; part 'model/image_format.dart'; part 'model/integrity_report.dart'; part 'model/integrity_report_response_dto.dart'; @@ -218,6 +226,8 @@ part 'model/notification_level.dart'; part 'model/notification_type.dart'; part 'model/notification_update_all_dto.dart'; part 'model/notification_update_dto.dart'; +part 'model/number_filter.dart'; +part 'model/number_filter_nullable.dart'; part 'model/o_auth_authorize_response_dto.dart'; part 'model/o_auth_callback_dto.dart'; part 'model/o_auth_config_dto.dart'; @@ -280,6 +290,10 @@ part 'model/search_explore_item.dart'; part 'model/search_explore_response_dto.dart'; part 'model/search_facet_count_response_dto.dart'; part 'model/search_facet_response_dto.dart'; +part 'model/search_filter.dart'; +part 'model/search_filter_branch.dart'; +part 'model/search_order.dart'; +part 'model/search_order_field.dart'; part 'model/search_response_dto.dart'; part 'model/search_statistics_response_dto.dart'; part 'model/search_suggestion_type.dart'; @@ -314,6 +328,10 @@ part 'model/stack_response_dto.dart'; part 'model/stack_update_dto.dart'; part 'model/statistics_search_dto.dart'; part 'model/storage_folder.dart'; +part 'model/string_filter.dart'; +part 'model/string_filter_nullable.dart'; +part 'model/string_pattern_filter.dart'; +part 'model/string_similarity_filter.dart'; part 'model/sync_ack_delete_dto.dart'; part 'model/sync_ack_dto.dart'; part 'model/sync_ack_set_dto.dart'; diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart index 9b4472676c..c0f62cd62b 100644 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ b/mobile/openapi/lib/api/deprecated_api.dart @@ -185,6 +185,338 @@ class DeprecatedApi { return null; } + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] albumIds: + /// Filter by album IDs + /// + /// * [String] city: + /// Filter by city name + /// + /// * [String] country: + /// Filter by country name + /// + /// * [DateTime] createdAfter: + /// Filter by creation date (after) + /// + /// * [DateTime] createdBefore: + /// Filter by creation date (before) + /// + /// * [bool] isEncoded: + /// Filter by encoded status + /// + /// * [bool] isFavorite: + /// Filter by favorite status + /// + /// * [bool] isMotion: + /// Filter by motion photo status + /// + /// * [bool] isNotInAlbum: + /// Filter assets not in any album + /// + /// * [bool] isOffline: + /// Filter by offline status + /// + /// * [String] lensModel: + /// Filter by lens model + /// + /// * [String] libraryId: + /// Library ID to filter by + /// + /// * [String] make: + /// Filter by camera make + /// + /// * [int] minFileSize: + /// Minimum file size in bytes + /// + /// * [String] model: + /// Filter by camera model + /// + /// * [String] ocr: + /// Filter by OCR text content + /// + /// * [List] personIds: + /// Filter by person IDs + /// + /// * [int] rating: + /// Filter by rating [1-5], or null for unrated + /// + /// * [int] size: + /// Number of results to return + /// + /// * [String] state: + /// Filter by state/province name + /// + /// * [List] tagIds: + /// Filter by tag IDs + /// + /// * [DateTime] takenAfter: + /// Filter by taken date (after) + /// + /// * [DateTime] takenBefore: + /// Filter by taken date (before) + /// + /// * [DateTime] trashedAfter: + /// Filter by trash date (after) + /// + /// * [DateTime] trashedBefore: + /// Filter by trash date (before) + /// + /// * [AssetTypeEnum] type: + /// + /// * [DateTime] updatedAfter: + /// Filter by update date (after) + /// + /// * [DateTime] updatedBefore: + /// Filter by update date (before) + /// + /// * [AssetVisibility] visibility: + /// + /// * [bool] withDeleted: + /// Include deleted assets + /// + /// * [bool] withExif: + /// Include EXIF data in response + Future searchLargeAssetsWithHttpInfo({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { + // ignore: prefer_const_declarations + final apiPath = r'/search/large-assets'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (albumIds != null) { + queryParams.addAll(_queryParams('multi', 'albumIds', albumIds)); + } + 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 (isEncoded != null) { + queryParams.addAll(_queryParams('', 'isEncoded', isEncoded)); + } + if (isFavorite != null) { + queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); + } + if (isMotion != null) { + queryParams.addAll(_queryParams('', 'isMotion', isMotion)); + } + if (isNotInAlbum != null) { + queryParams.addAll(_queryParams('', 'isNotInAlbum', isNotInAlbum)); + } + if (isOffline != null) { + queryParams.addAll(_queryParams('', 'isOffline', isOffline)); + } + 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 (minFileSize != null) { + queryParams.addAll(_queryParams('', 'minFileSize', minFileSize)); + } + if (model != null) { + queryParams.addAll(_queryParams('', 'model', model)); + } + if (ocr != null) { + queryParams.addAll(_queryParams('', 'ocr', ocr)); + } + if (personIds != null) { + queryParams.addAll(_queryParams('multi', 'personIds', personIds)); + } + if (rating != null) { + queryParams.addAll(_queryParams('', 'rating', rating)); + } + if (size != null) { + queryParams.addAll(_queryParams('', 'size', size)); + } + if (state != null) { + queryParams.addAll(_queryParams('', 'state', state)); + } + if (tagIds != null) { + queryParams.addAll(_queryParams('multi', 'tagIds', tagIds)); + } + 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 (visibility != null) { + queryParams.addAll(_queryParams('', 'visibility', visibility)); + } + if (withDeleted != null) { + queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); + } + if (withExif != null) { + queryParams.addAll(_queryParams('', 'withExif', withExif)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + abortTrigger: abortTrigger, + ); + } + + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. + /// + /// Parameters: + /// + /// * [List] albumIds: + /// Filter by album IDs + /// + /// * [String] city: + /// Filter by city name + /// + /// * [String] country: + /// Filter by country name + /// + /// * [DateTime] createdAfter: + /// Filter by creation date (after) + /// + /// * [DateTime] createdBefore: + /// Filter by creation date (before) + /// + /// * [bool] isEncoded: + /// Filter by encoded status + /// + /// * [bool] isFavorite: + /// Filter by favorite status + /// + /// * [bool] isMotion: + /// Filter by motion photo status + /// + /// * [bool] isNotInAlbum: + /// Filter assets not in any album + /// + /// * [bool] isOffline: + /// Filter by offline status + /// + /// * [String] lensModel: + /// Filter by lens model + /// + /// * [String] libraryId: + /// Library ID to filter by + /// + /// * [String] make: + /// Filter by camera make + /// + /// * [int] minFileSize: + /// Minimum file size in bytes + /// + /// * [String] model: + /// Filter by camera model + /// + /// * [String] ocr: + /// Filter by OCR text content + /// + /// * [List] personIds: + /// Filter by person IDs + /// + /// * [int] rating: + /// Filter by rating [1-5], or null for unrated + /// + /// * [int] size: + /// Number of results to return + /// + /// * [String] state: + /// Filter by state/province name + /// + /// * [List] tagIds: + /// Filter by tag IDs + /// + /// * [DateTime] takenAfter: + /// Filter by taken date (after) + /// + /// * [DateTime] takenBefore: + /// Filter by taken date (before) + /// + /// * [DateTime] trashedAfter: + /// Filter by trash date (after) + /// + /// * [DateTime] trashedBefore: + /// Filter by trash date (before) + /// + /// * [AssetTypeEnum] type: + /// + /// * [DateTime] updatedAfter: + /// Filter by update date (after) + /// + /// * [DateTime] updatedBefore: + /// Filter by update date (before) + /// + /// * [AssetVisibility] visibility: + /// + /// * [bool] withDeleted: + /// Include deleted assets + /// + /// * [bool] withExif: + /// Include EXIF data in response + Future?> searchLargeAssets({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { + final response = await searchLargeAssetsWithHttpInfo(albumIds: albumIds, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, isEncoded: isEncoded, isFavorite: isFavorite, isMotion: isMotion, isNotInAlbum: isNotInAlbum, isOffline: isOffline, lensModel: lensModel, libraryId: libraryId, make: make, minFileSize: minFileSize, model: model, ocr: ocr, personIds: personIds, rating: rating, size: size, state: state, tagIds: tagIds, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, visibility: visibility, withDeleted: withDeleted, withExif: withExif, abortTrigger: abortTrigger,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + /// Update an API key /// /// Updates the name and permissions of an API key by its ID. The current user must own this API key. diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index 4c6c1b5c72..9e11bf94fc 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -315,6 +315,8 @@ class ApiClient { return AuthStatusResponseDto.fromJson(value); case 'AvatarUpdate': return AvatarUpdate.fromJson(value); + case 'BoolFilter': + return BoolFilter.fromJson(value); case 'BulkIdErrorReason': return BulkIdErrorReasonTypeTransformer().decode(value); case 'BulkIdResponseDto': @@ -357,6 +359,10 @@ class ApiClient { return DatabaseBackupDto.fromJson(value); case 'DatabaseBackupListResponseDto': return DatabaseBackupListResponseDto.fromJson(value); + case 'DateFilter': + return DateFilter.fromJson(value); + case 'DateFilterNullable': + return DateFilterNullable.fromJson(value); case 'DownloadArchiveDto': return DownloadArchiveDto.fromJson(value); case 'DownloadArchiveInfo': @@ -381,6 +387,10 @@ class ApiClient { return EmailNotificationsResponse.fromJson(value); case 'EmailNotificationsUpdate': return EmailNotificationsUpdate.fromJson(value); + case 'EnumFilterAssetType': + return EnumFilterAssetType.fromJson(value); + case 'EnumFilterAssetVisibility': + return EnumFilterAssetVisibility.fromJson(value); case 'ExifResponseDto': return ExifResponseDto.fromJson(value); case 'FaceDto': @@ -393,6 +403,12 @@ class ApiClient { return FoldersUpdate.fromJson(value); case 'HlsVideoResolution': return HlsVideoResolutionTypeTransformer().decode(value); + case 'IdFilter': + return IdFilter.fromJson(value); + case 'IdFilterNullable': + return IdFilterNullable.fromJson(value); + case 'IdsFilter': + return IdsFilter.fromJson(value); case 'ImageFormat': return ImageFormatTypeTransformer().decode(value); case 'IntegrityReport': @@ -481,6 +497,10 @@ class ApiClient { return NotificationUpdateAllDto.fromJson(value); case 'NotificationUpdateDto': return NotificationUpdateDto.fromJson(value); + case 'NumberFilter': + return NumberFilter.fromJson(value); + case 'NumberFilterNullable': + return NumberFilterNullable.fromJson(value); case 'OAuthAuthorizeResponseDto': return OAuthAuthorizeResponseDto.fromJson(value); case 'OAuthCallbackDto': @@ -605,6 +625,14 @@ class ApiClient { return SearchFacetCountResponseDto.fromJson(value); case 'SearchFacetResponseDto': return SearchFacetResponseDto.fromJson(value); + case 'SearchFilter': + return SearchFilter.fromJson(value); + case 'SearchFilterBranch': + return SearchFilterBranch.fromJson(value); + case 'SearchOrder': + return SearchOrder.fromJson(value); + case 'SearchOrderField': + return SearchOrderFieldTypeTransformer().decode(value); case 'SearchResponseDto': return SearchResponseDto.fromJson(value); case 'SearchStatisticsResponseDto': @@ -673,6 +701,14 @@ class ApiClient { return StatisticsSearchDto.fromJson(value); case 'StorageFolder': return StorageFolderTypeTransformer().decode(value); + case 'StringFilter': + return StringFilter.fromJson(value); + case 'StringFilterNullable': + return StringFilterNullable.fromJson(value); + case 'StringPatternFilter': + return StringPatternFilter.fromJson(value); + case 'StringSimilarityFilter': + return StringSimilarityFilter.fromJson(value); case 'SyncAckDeleteDto': return SyncAckDeleteDto.fromJson(value); case 'SyncAckDto': diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart index c8efcb5466..42a09b7848 100644 --- a/mobile/openapi/lib/api_helper.dart +++ b/mobile/openapi/lib/api_helper.dart @@ -172,6 +172,9 @@ String parameterToString(dynamic value) { if (value is ReleaseType) { return ReleaseTypeTypeTransformer().encode(value).toString(); } + if (value is SearchOrderField) { + return SearchOrderFieldTypeTransformer().encode(value).toString(); + } if (value is SearchSuggestionType) { return SearchSuggestionTypeTypeTransformer().encode(value).toString(); } diff --git a/mobile/openapi/lib/model/bool_filter.dart b/mobile/openapi/lib/model/bool_filter.dart new file mode 100644 index 0000000000..b89ebdc6f2 --- /dev/null +++ b/mobile/openapi/lib/model/bool_filter.dart @@ -0,0 +1,99 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 BoolFilter { + /// Returns a new [BoolFilter] instance. + BoolFilter({ + required this.eq, + }); + + bool eq; + + @override + bool operator ==(Object other) => identical(this, other) || other is BoolFilter && + other.eq == eq; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq.hashCode); + + @override + String toString() => 'BoolFilter[eq=$eq]'; + + Map toJson() { + final json = {}; + json[r'eq'] = this.eq; + return json; + } + + /// Returns a new [BoolFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static BoolFilter? fromJson(dynamic value) { + upgradeDto(value, "BoolFilter"); + if (value is Map) { + final json = value.cast(); + + return BoolFilter( + eq: mapValueOfType(json, r'eq')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = BoolFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = BoolFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of BoolFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = BoolFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'eq', + }; +} + diff --git a/mobile/openapi/lib/model/date_filter.dart b/mobile/openapi/lib/model/date_filter.dart new file mode 100644 index 0000000000..bbcb6fc6ca --- /dev/null +++ b/mobile/openapi/lib/model/date_filter.dart @@ -0,0 +1,199 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 DateFilter { + /// Returns a new [DateFilter] instance. + DateFilter({ + this.eq = const Optional.absent(), + this.gt = const Optional.absent(), + this.gte = const Optional.absent(), + this.lt = const Optional.absent(), + this.lte = const Optional.absent(), + this.ne = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional eq; + + /// + /// 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. + /// + Optional gt; + + /// + /// 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. + /// + Optional gte; + + /// + /// 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. + /// + Optional lt; + + /// + /// 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. + /// + Optional lte; + + /// + /// 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. + /// + Optional ne; + + @override + bool operator ==(Object other) => identical(this, other) || other is DateFilter && + other.eq == eq && + other.gt == gt && + other.gte == gte && + other.lt == lt && + other.lte == lte && + other.ne == ne; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (gt == null ? 0 : gt!.hashCode) + + (gte == null ? 0 : gte!.hashCode) + + (lt == null ? 0 : lt!.hashCode) + + (lte == null ? 0 : lte!.hashCode) + + (ne == null ? 0 : ne!.hashCode); + + @override + String toString() => 'DateFilter[eq=$eq, gt=$gt, gte=$gte, lt=$lt, lte=$lte, ne=$ne]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.gt.isPresent) { + final value = this.gt.value; + json[r'gt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.gte.isPresent) { + final value = this.gte.value; + json[r'gte'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.lt.isPresent) { + final value = this.lt.value; + json[r'lt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.lte.isPresent) { + final value = this.lte.value; + json[r'lte'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + return json; + } + + /// Returns a new [DateFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DateFilter? fromJson(dynamic value) { + upgradeDto(value, "DateFilter"); + if (value is Map) { + final json = value.cast(); + + return DateFilter( + eq: json.containsKey(r'eq') ? Optional.present(mapDateTime(json, r'eq', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + gt: json.containsKey(r'gt') ? Optional.present(mapDateTime(json, r'gt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + gte: json.containsKey(r'gte') ? Optional.present(mapDateTime(json, r'gte', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + lt: json.containsKey(r'lt') ? Optional.present(mapDateTime(json, r'lt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + lte: json.containsKey(r'lte') ? Optional.present(mapDateTime(json, r'lte', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapDateTime(json, r'ne', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DateFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DateFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DateFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DateFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/date_filter_nullable.dart b/mobile/openapi/lib/model/date_filter_nullable.dart new file mode 100644 index 0000000000..38861c448e --- /dev/null +++ b/mobile/openapi/lib/model/date_filter_nullable.dart @@ -0,0 +1,187 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 DateFilterNullable { + /// Returns a new [DateFilterNullable] instance. + DateFilterNullable({ + this.eq = const Optional.absent(), + this.gt = const Optional.absent(), + this.gte = const Optional.absent(), + this.lt = const Optional.absent(), + this.lte = const Optional.absent(), + this.ne = const Optional.absent(), + }); + + Optional eq; + + /// + /// 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. + /// + Optional gt; + + /// + /// 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. + /// + Optional gte; + + /// + /// 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. + /// + Optional lt; + + /// + /// 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. + /// + Optional lte; + + Optional ne; + + @override + bool operator ==(Object other) => identical(this, other) || other is DateFilterNullable && + other.eq == eq && + other.gt == gt && + other.gte == gte && + other.lt == lt && + other.lte == lte && + other.ne == ne; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (gt == null ? 0 : gt!.hashCode) + + (gte == null ? 0 : gte!.hashCode) + + (lt == null ? 0 : lt!.hashCode) + + (lte == null ? 0 : lte!.hashCode) + + (ne == null ? 0 : ne!.hashCode); + + @override + String toString() => 'DateFilterNullable[eq=$eq, gt=$gt, gte=$gte, lt=$lt, lte=$lte, ne=$ne]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.gt.isPresent) { + final value = this.gt.value; + json[r'gt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.gte.isPresent) { + final value = this.gte.value; + json[r'gte'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.lt.isPresent) { + final value = this.lt.value; + json[r'lt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.lte.isPresent) { + final value = this.lte.value; + json[r'lte'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') + ? value.millisecondsSinceEpoch + : value.toUtc().toIso8601String()); + } + return json; + } + + /// Returns a new [DateFilterNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DateFilterNullable? fromJson(dynamic value) { + upgradeDto(value, "DateFilterNullable"); + if (value is Map) { + final json = value.cast(); + + return DateFilterNullable( + eq: json.containsKey(r'eq') ? Optional.present(mapDateTime(json, r'eq', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + gt: json.containsKey(r'gt') ? Optional.present(mapDateTime(json, r'gt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + gte: json.containsKey(r'gte') ? Optional.present(mapDateTime(json, r'gte', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + lt: json.containsKey(r'lt') ? Optional.present(mapDateTime(json, r'lt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + lte: json.containsKey(r'lte') ? Optional.present(mapDateTime(json, r'lte', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapDateTime(json, r'ne', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DateFilterNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DateFilterNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DateFilterNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DateFilterNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/enum_filter_asset_type.dart b/mobile/openapi/lib/model/enum_filter_asset_type.dart new file mode 100644 index 0000000000..7c22b37f30 --- /dev/null +++ b/mobile/openapi/lib/model/enum_filter_asset_type.dart @@ -0,0 +1,143 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 EnumFilterAssetType { + /// Returns a new [EnumFilterAssetType] instance. + EnumFilterAssetType({ + this.eq = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + /// + /// 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. + /// + Optional eq; + + Optional?> in_; + + /// + /// 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. + /// + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumFilterAssetType && + other.eq == eq && + _deepEquality.equals(other.in_, in_) && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (in_.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'EnumFilterAssetType[eq=$eq, in_=$in_, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [EnumFilterAssetType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static EnumFilterAssetType? fromJson(dynamic value) { + upgradeDto(value, "EnumFilterAssetType"); + if (value is Map) { + final json = value.cast(); + + return EnumFilterAssetType( + eq: json.containsKey(r'eq') ? Optional.present(AssetTypeEnum.fromJson(json[r'eq'])) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(AssetTypeEnum.listFromJson(json[r'in'])) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(AssetTypeEnum.fromJson(json[r'ne'])) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(AssetTypeEnum.listFromJson(json[r'notIn'])) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumFilterAssetType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumFilterAssetType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of EnumFilterAssetType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = EnumFilterAssetType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/enum_filter_asset_visibility.dart b/mobile/openapi/lib/model/enum_filter_asset_visibility.dart new file mode 100644 index 0000000000..9f50c3a3f5 --- /dev/null +++ b/mobile/openapi/lib/model/enum_filter_asset_visibility.dart @@ -0,0 +1,143 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 EnumFilterAssetVisibility { + /// Returns a new [EnumFilterAssetVisibility] instance. + EnumFilterAssetVisibility({ + this.eq = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + /// + /// 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. + /// + Optional eq; + + Optional?> in_; + + /// + /// 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. + /// + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumFilterAssetVisibility && + other.eq == eq && + _deepEquality.equals(other.in_, in_) && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (in_.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'EnumFilterAssetVisibility[eq=$eq, in_=$in_, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [EnumFilterAssetVisibility] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static EnumFilterAssetVisibility? fromJson(dynamic value) { + upgradeDto(value, "EnumFilterAssetVisibility"); + if (value is Map) { + final json = value.cast(); + + return EnumFilterAssetVisibility( + eq: json.containsKey(r'eq') ? Optional.present(AssetVisibility.fromJson(json[r'eq'])) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(AssetVisibility.listFromJson(json[r'in'])) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(AssetVisibility.fromJson(json[r'ne'])) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(AssetVisibility.listFromJson(json[r'notIn'])) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumFilterAssetVisibility.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumFilterAssetVisibility.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of EnumFilterAssetVisibility-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = EnumFilterAssetVisibility.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/id_filter.dart b/mobile/openapi/lib/model/id_filter.dart new file mode 100644 index 0000000000..2de3d982d9 --- /dev/null +++ b/mobile/openapi/lib/model/id_filter.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 IdFilter { + /// Returns a new [IdFilter] instance. + IdFilter({ + this.eq = const Optional.absent(), + this.ne = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional eq; + + /// + /// 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. + /// + Optional ne; + + @override + bool operator ==(Object other) => identical(this, other) || other is IdFilter && + other.eq == eq && + other.ne == ne; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (ne == null ? 0 : ne!.hashCode); + + @override + String toString() => 'IdFilter[eq=$eq, ne=$ne]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + return json; + } + + /// Returns a new [IdFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static IdFilter? fromJson(dynamic value) { + upgradeDto(value, "IdFilter"); + if (value is Map) { + final json = value.cast(); + + return IdFilter( + eq: json.containsKey(r'eq') ? Optional.present(mapValueOfType(json, r'eq')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapValueOfType(json, r'ne')) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = IdFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = IdFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of IdFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = IdFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/id_filter_nullable.dart b/mobile/openapi/lib/model/id_filter_nullable.dart new file mode 100644 index 0000000000..d708d21585 --- /dev/null +++ b/mobile/openapi/lib/model/id_filter_nullable.dart @@ -0,0 +1,111 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 IdFilterNullable { + /// Returns a new [IdFilterNullable] instance. + IdFilterNullable({ + this.eq = const Optional.absent(), + this.ne = const Optional.absent(), + }); + + Optional eq; + + Optional ne; + + @override + bool operator ==(Object other) => identical(this, other) || other is IdFilterNullable && + other.eq == eq && + other.ne == ne; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (ne == null ? 0 : ne!.hashCode); + + @override + String toString() => 'IdFilterNullable[eq=$eq, ne=$ne]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + return json; + } + + /// Returns a new [IdFilterNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static IdFilterNullable? fromJson(dynamic value) { + upgradeDto(value, "IdFilterNullable"); + if (value is Map) { + final json = value.cast(); + + return IdFilterNullable( + eq: json.containsKey(r'eq') ? Optional.present(mapValueOfType(json, r'eq')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapValueOfType(json, r'ne')) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = IdFilterNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = IdFilterNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of IdFilterNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = IdFilterNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/ids_filter.dart b/mobile/openapi/lib/model/ids_filter.dart new file mode 100644 index 0000000000..2f63a8f2c6 --- /dev/null +++ b/mobile/openapi/lib/model/ids_filter.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 IdsFilter { + /// Returns a new [IdsFilter] instance. + IdsFilter({ + this.all = const Optional.present(const []), + this.any = const Optional.present(const []), + this.none = const Optional.present(const []), + }); + + Optional?> all; + + Optional?> any; + + Optional?> none; + + @override + bool operator ==(Object other) => identical(this, other) || other is IdsFilter && + _deepEquality.equals(other.all, all) && + _deepEquality.equals(other.any, any) && + _deepEquality.equals(other.none, none); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (all.hashCode) + + (any.hashCode) + + (none.hashCode); + + @override + String toString() => 'IdsFilter[all=$all, any=$any, none=$none]'; + + Map toJson() { + final json = {}; + if (this.all.isPresent) { + final value = this.all.value; + json[r'all'] = value; + } + if (this.any.isPresent) { + final value = this.any.value; + json[r'any'] = value; + } + if (this.none.isPresent) { + final value = this.none.value; + json[r'none'] = value; + } + return json; + } + + /// Returns a new [IdsFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static IdsFilter? fromJson(dynamic value) { + upgradeDto(value, "IdsFilter"); + if (value is Map) { + final json = value.cast(); + + return IdsFilter( + all: json.containsKey(r'all') ? Optional.present(json[r'all'] is Iterable + ? (json[r'all'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + any: json.containsKey(r'any') ? Optional.present(json[r'any'] is Iterable + ? (json[r'any'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + none: json.containsKey(r'none') ? Optional.present(json[r'none'] is Iterable + ? (json[r'none'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = IdsFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = IdsFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of IdsFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = IdsFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart index b0afd292ee..f6dbacccb5 100644 --- a/mobile/openapi/lib/model/metadata_search_dto.dart +++ b/mobile/openapi/lib/model/metadata_search_dto.dart @@ -19,8 +19,10 @@ class MetadataSearchDto { this.country = const Optional.absent(), this.createdAfter = const Optional.absent(), this.createdBefore = const Optional.absent(), + this.cursor = const Optional.absent(), this.description = const Optional.absent(), this.encodedVideoPath = const Optional.absent(), + this.filter = const Optional.absent(), this.id = const Optional.absent(), this.isEncoded = const Optional.absent(), this.isFavorite = const Optional.absent(), @@ -33,6 +35,7 @@ class MetadataSearchDto { this.model = const Optional.absent(), this.ocr = const Optional.absent(), this.order = const Optional.absent(), + this.orderBy = const Optional.absent(), this.originalFileName = const Optional.absent(), this.originalPath = const Optional.absent(), this.page = const Optional.absent(), @@ -93,6 +96,15 @@ class MetadataSearchDto { /// Optional createdBefore; + /// Cursor for the next page of results + /// + /// 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. + /// + Optional cursor; + /// Filter by description text /// /// Please note: This property should have been non-nullable! Since the specification file @@ -111,6 +123,14 @@ class MetadataSearchDto { /// Optional 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. + /// + Optional filter; + /// Filter by asset ID /// /// Please note: This property should have been non-nullable! Since the specification file @@ -194,6 +214,14 @@ class MetadataSearchDto { /// Optional 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. + /// + Optional orderBy; + /// Filter by original file name /// /// Please note: This property should have been non-nullable! Since the specification file @@ -383,8 +411,10 @@ class MetadataSearchDto { other.country == country && other.createdAfter == createdAfter && other.createdBefore == createdBefore && + other.cursor == cursor && other.description == description && other.encodedVideoPath == encodedVideoPath && + other.filter == filter && other.id == id && other.isEncoded == isEncoded && other.isFavorite == isFavorite && @@ -397,6 +427,7 @@ class MetadataSearchDto { other.model == model && other.ocr == ocr && other.order == order && + other.orderBy == orderBy && other.originalFileName == originalFileName && other.originalPath == originalPath && other.page == page && @@ -429,8 +460,10 @@ class MetadataSearchDto { (country == null ? 0 : country!.hashCode) + (createdAfter == null ? 0 : createdAfter!.hashCode) + (createdBefore == null ? 0 : createdBefore!.hashCode) + + (cursor == null ? 0 : cursor!.hashCode) + (description == null ? 0 : description!.hashCode) + (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + + (filter == null ? 0 : filter!.hashCode) + (id == null ? 0 : id!.hashCode) + (isEncoded == null ? 0 : isEncoded!.hashCode) + (isFavorite == null ? 0 : isFavorite!.hashCode) + @@ -443,6 +476,7 @@ class MetadataSearchDto { (model == null ? 0 : model!.hashCode) + (ocr == null ? 0 : ocr!.hashCode) + (order == null ? 0 : order!.hashCode) + + (orderBy == null ? 0 : orderBy!.hashCode) + (originalFileName == null ? 0 : originalFileName!.hashCode) + (originalPath == null ? 0 : originalPath!.hashCode) + (page == null ? 0 : page!.hashCode) + @@ -467,7 +501,7 @@ class MetadataSearchDto { (withStacked == null ? 0 : withStacked!.hashCode); @override - String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; + String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, cursor=$cursor, description=$description, encodedVideoPath=$encodedVideoPath, filter=$filter, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, order=$order, orderBy=$orderBy, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; Map toJson() { final json = {}; @@ -499,6 +533,10 @@ class MetadataSearchDto { ? value.millisecondsSinceEpoch : value.toUtc().toIso8601String()); } + if (this.cursor.isPresent) { + final value = this.cursor.value; + json[r'cursor'] = value; + } if (this.description.isPresent) { final value = this.description.value; json[r'description'] = value; @@ -507,6 +545,10 @@ class MetadataSearchDto { final value = this.encodedVideoPath.value; json[r'encodedVideoPath'] = value; } + if (this.filter.isPresent) { + final value = this.filter.value; + json[r'filter'] = value; + } if (this.id.isPresent) { final value = this.id.value; json[r'id'] = value; @@ -555,6 +597,10 @@ class MetadataSearchDto { final value = this.order.value; json[r'order'] = value; } + if (this.orderBy.isPresent) { + final value = this.orderBy.value; + json[r'orderBy'] = value; + } if (this.originalFileName.isPresent) { final value = this.originalFileName.value; json[r'originalFileName'] = value; @@ -675,8 +721,10 @@ class MetadataSearchDto { country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + cursor: json.containsKey(r'cursor') ? Optional.present(mapValueOfType(json, r'cursor')) : const Optional.absent(), description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(mapValueOfType(json, r'encodedVideoPath')) : const Optional.absent(), + filter: json.containsKey(r'filter') ? Optional.present(SearchFilter.fromJson(json[r'filter'])) : const Optional.absent(), id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), @@ -689,6 +737,7 @@ class MetadataSearchDto { model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), + orderBy: json.containsKey(r'orderBy') ? Optional.present(SearchOrder.fromJson(json[r'orderBy'])) : const Optional.absent(), originalFileName: json.containsKey(r'originalFileName') ? Optional.present(mapValueOfType(json, r'originalFileName')) : const Optional.absent(), originalPath: json.containsKey(r'originalPath') ? Optional.present(mapValueOfType(json, r'originalPath')) : const Optional.absent(), page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), diff --git a/mobile/openapi/lib/model/number_filter.dart b/mobile/openapi/lib/model/number_filter.dart new file mode 100644 index 0000000000..f01b09a82e --- /dev/null +++ b/mobile/openapi/lib/model/number_filter.dart @@ -0,0 +1,211 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 NumberFilter { + /// Returns a new [NumberFilter] instance. + NumberFilter({ + this.eq = const Optional.absent(), + this.gt = const Optional.absent(), + this.gte = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.lt = const Optional.absent(), + this.lte = const Optional.absent(), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + /// + /// 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. + /// + Optional eq; + + /// + /// 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. + /// + Optional gt; + + /// + /// 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. + /// + Optional gte; + + Optional?> in_; + + /// + /// 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. + /// + Optional lt; + + /// + /// 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. + /// + Optional lte; + + /// + /// 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. + /// + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is NumberFilter && + other.eq == eq && + other.gt == gt && + other.gte == gte && + _deepEquality.equals(other.in_, in_) && + other.lt == lt && + other.lte == lte && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (gt == null ? 0 : gt!.hashCode) + + (gte == null ? 0 : gte!.hashCode) + + (in_.hashCode) + + (lt == null ? 0 : lt!.hashCode) + + (lte == null ? 0 : lte!.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'NumberFilter[eq=$eq, gt=$gt, gte=$gte, in_=$in_, lt=$lt, lte=$lte, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.gt.isPresent) { + final value = this.gt.value; + json[r'gt'] = value; + } + if (this.gte.isPresent) { + final value = this.gte.value; + json[r'gte'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.lt.isPresent) { + final value = this.lt.value; + json[r'lt'] = value; + } + if (this.lte.isPresent) { + final value = this.lte.value; + json[r'lte'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [NumberFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NumberFilter? fromJson(dynamic value) { + upgradeDto(value, "NumberFilter"); + if (value is Map) { + final json = value.cast(); + + return NumberFilter( + eq: json.containsKey(r'eq') ? Optional.present(json[r'eq'] == null ? null : num.parse('${json[r'eq']}')) : const Optional.absent(), + gt: json.containsKey(r'gt') ? Optional.present(json[r'gt'] == null ? null : num.parse('${json[r'gt']}')) : const Optional.absent(), + gte: json.containsKey(r'gte') ? Optional.present(json[r'gte'] == null ? null : num.parse('${json[r'gte']}')) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(json[r'in'] is Iterable + ? (json[r'in'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + lt: json.containsKey(r'lt') ? Optional.present(json[r'lt'] == null ? null : num.parse('${json[r'lt']}')) : const Optional.absent(), + lte: json.containsKey(r'lte') ? Optional.present(json[r'lte'] == null ? null : num.parse('${json[r'lte']}')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(json[r'ne'] == null ? null : num.parse('${json[r'ne']}')) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(json[r'notIn'] is Iterable + ? (json[r'notIn'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NumberFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NumberFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NumberFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NumberFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/number_filter_nullable.dart b/mobile/openapi/lib/model/number_filter_nullable.dart new file mode 100644 index 0000000000..84f88fc966 --- /dev/null +++ b/mobile/openapi/lib/model/number_filter_nullable.dart @@ -0,0 +1,199 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 NumberFilterNullable { + /// Returns a new [NumberFilterNullable] instance. + NumberFilterNullable({ + this.eq = const Optional.absent(), + this.gt = const Optional.absent(), + this.gte = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.lt = const Optional.absent(), + this.lte = const Optional.absent(), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + Optional eq; + + /// + /// 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. + /// + Optional gt; + + /// + /// 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. + /// + Optional gte; + + Optional?> in_; + + /// + /// 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. + /// + Optional lt; + + /// + /// 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. + /// + Optional lte; + + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is NumberFilterNullable && + other.eq == eq && + other.gt == gt && + other.gte == gte && + _deepEquality.equals(other.in_, in_) && + other.lt == lt && + other.lte == lte && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (gt == null ? 0 : gt!.hashCode) + + (gte == null ? 0 : gte!.hashCode) + + (in_.hashCode) + + (lt == null ? 0 : lt!.hashCode) + + (lte == null ? 0 : lte!.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'NumberFilterNullable[eq=$eq, gt=$gt, gte=$gte, in_=$in_, lt=$lt, lte=$lte, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.gt.isPresent) { + final value = this.gt.value; + json[r'gt'] = value; + } + if (this.gte.isPresent) { + final value = this.gte.value; + json[r'gte'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.lt.isPresent) { + final value = this.lt.value; + json[r'lt'] = value; + } + if (this.lte.isPresent) { + final value = this.lte.value; + json[r'lte'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [NumberFilterNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NumberFilterNullable? fromJson(dynamic value) { + upgradeDto(value, "NumberFilterNullable"); + if (value is Map) { + final json = value.cast(); + + return NumberFilterNullable( + eq: json.containsKey(r'eq') ? Optional.present(json[r'eq'] == null ? null : num.parse('${json[r'eq']}')) : const Optional.absent(), + gt: json.containsKey(r'gt') ? Optional.present(json[r'gt'] == null ? null : num.parse('${json[r'gt']}')) : const Optional.absent(), + gte: json.containsKey(r'gte') ? Optional.present(json[r'gte'] == null ? null : num.parse('${json[r'gte']}')) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(json[r'in'] is Iterable + ? (json[r'in'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + lt: json.containsKey(r'lt') ? Optional.present(json[r'lt'] == null ? null : num.parse('${json[r'lt']}')) : const Optional.absent(), + lte: json.containsKey(r'lte') ? Optional.present(json[r'lte'] == null ? null : num.parse('${json[r'lte']}')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(json[r'ne'] == null ? null : num.parse('${json[r'ne']}')) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(json[r'notIn'] is Iterable + ? (json[r'notIn'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NumberFilterNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NumberFilterNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NumberFilterNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NumberFilterNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/random_search_dto.dart b/mobile/openapi/lib/model/random_search_dto.dart index 7937069578..5fe4022b65 100644 --- a/mobile/openapi/lib/model/random_search_dto.dart +++ b/mobile/openapi/lib/model/random_search_dto.dart @@ -18,6 +18,7 @@ class RandomSearchDto { this.country = const Optional.absent(), this.createdAfter = const Optional.absent(), this.createdBefore = const Optional.absent(), + this.filter = const Optional.absent(), this.isEncoded = const Optional.absent(), this.isFavorite = const Optional.absent(), this.isMotion = const Optional.absent(), @@ -74,6 +75,14 @@ class RandomSearchDto { /// Optional 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. + /// + Optional filter; + /// Filter by encoded status /// /// Please note: This property should have been non-nullable! Since the specification file @@ -280,6 +289,7 @@ class RandomSearchDto { other.country == country && other.createdAfter == createdAfter && other.createdBefore == createdBefore && + other.filter == filter && other.isEncoded == isEncoded && other.isFavorite == isFavorite && other.isMotion == isMotion && @@ -316,6 +326,7 @@ class RandomSearchDto { (country == null ? 0 : country!.hashCode) + (createdAfter == null ? 0 : createdAfter!.hashCode) + (createdBefore == null ? 0 : createdBefore!.hashCode) + + (filter == null ? 0 : filter!.hashCode) + (isEncoded == null ? 0 : isEncoded!.hashCode) + (isFavorite == null ? 0 : isFavorite!.hashCode) + (isMotion == null ? 0 : isMotion!.hashCode) + @@ -345,7 +356,7 @@ class RandomSearchDto { (withStacked == null ? 0 : withStacked!.hashCode); @override - String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; + String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, filter=$filter, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; Map toJson() { final json = {}; @@ -373,6 +384,10 @@ class RandomSearchDto { ? value.millisecondsSinceEpoch : value.toUtc().toIso8601String()); } + if (this.filter.isPresent) { + final value = this.filter.value; + json[r'filter'] = value; + } if (this.isEncoded.isPresent) { final value = this.isEncoded.value; json[r'isEncoded'] = value; @@ -512,6 +527,7 @@ class RandomSearchDto { country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + filter: json.containsKey(r'filter') ? Optional.present(SearchFilter.fromJson(json[r'filter'])) : const Optional.absent(), isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart index 82971c3c49..54ede9d270 100644 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ b/mobile/openapi/lib/model/search_asset_response_dto.dart @@ -16,6 +16,7 @@ class SearchAssetResponseDto { required this.count, this.facets = const [], this.items = const [], + required this.nextCursor, required this.nextPage, required this.total, }); @@ -30,6 +31,9 @@ class SearchAssetResponseDto { List items; + /// Cursor for the next page of results + String? nextCursor; + /// Next page token String? nextPage; @@ -44,6 +48,7 @@ class SearchAssetResponseDto { other.count == count && _deepEquality.equals(other.facets, facets) && _deepEquality.equals(other.items, items) && + other.nextCursor == nextCursor && other.nextPage == nextPage && other.total == total; @@ -53,17 +58,23 @@ class SearchAssetResponseDto { (count.hashCode) + (facets.hashCode) + (items.hashCode) + + (nextCursor == null ? 0 : nextCursor!.hashCode) + (nextPage == null ? 0 : nextPage!.hashCode) + (total.hashCode); @override - String toString() => 'SearchAssetResponseDto[count=$count, facets=$facets, items=$items, nextPage=$nextPage, total=$total]'; + String toString() => 'SearchAssetResponseDto[count=$count, facets=$facets, items=$items, nextCursor=$nextCursor, nextPage=$nextPage, total=$total]'; Map toJson() { final json = {}; json[r'count'] = this.count; json[r'facets'] = this.facets; json[r'items'] = this.items; + if (this.nextCursor != null) { + json[r'nextCursor'] = this.nextCursor; + } else { + json[r'nextCursor'] = null; + } if (this.nextPage != null) { json[r'nextPage'] = this.nextPage; } else { @@ -85,6 +96,7 @@ class SearchAssetResponseDto { count: mapValueOfType(json, r'count')!, facets: SearchFacetResponseDto.listFromJson(json[r'facets']), items: AssetResponseDto.listFromJson(json[r'items']), + nextCursor: mapValueOfType(json, r'nextCursor'), nextPage: mapValueOfType(json, r'nextPage'), total: mapValueOfType(json, r'total')!, ); @@ -137,6 +149,7 @@ class SearchAssetResponseDto { 'count', 'facets', 'items', + 'nextCursor', 'nextPage', 'total', }; diff --git a/mobile/openapi/lib/model/search_filter.dart b/mobile/openapi/lib/model/search_filter.dart new file mode 100644 index 0000000000..316a19b398 --- /dev/null +++ b/mobile/openapi/lib/model/search_filter.dart @@ -0,0 +1,613 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 SearchFilter { + /// Returns a new [SearchFilter] instance. + SearchFilter({ + this.albumIds = const Optional.absent(), + this.checksum = const Optional.absent(), + this.city = const Optional.absent(), + this.country = const Optional.absent(), + this.createdAt = const Optional.absent(), + this.description = const Optional.absent(), + this.encodedVideoPath = const Optional.absent(), + this.fileSizeInBytes = const Optional.absent(), + this.hasAlbums = const Optional.absent(), + this.hasPeople = const Optional.absent(), + this.hasTags = const Optional.absent(), + this.id = const Optional.absent(), + this.isEncoded = const Optional.absent(), + this.isFavorite = const Optional.absent(), + this.isMotion = const Optional.absent(), + this.isOffline = const Optional.absent(), + this.lensModel = const Optional.absent(), + this.libraryId = const Optional.absent(), + this.make = const Optional.absent(), + this.model = const Optional.absent(), + this.ocr = const Optional.absent(), + this.or = const Optional.present(const []), + this.originalFileName = const Optional.absent(), + this.originalPath = const Optional.absent(), + this.personIds = const Optional.absent(), + this.rating = const Optional.absent(), + this.state = const Optional.absent(), + this.tagIds = const Optional.absent(), + this.takenAt = const Optional.absent(), + this.trashedAt = const Optional.absent(), + this.type = const Optional.absent(), + this.updatedAt = const Optional.absent(), + this.visibility = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional albumIds; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional createdAt; + + /// + /// 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. + /// + Optional description; + + /// + /// 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. + /// + Optional 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. + /// + Optional fileSizeInBytes; + + /// + /// 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. + /// + Optional hasAlbums; + + /// + /// 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. + /// + Optional hasPeople; + + /// + /// 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. + /// + Optional hasTags; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional ocr; + + Optional?> or; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional rating; + + /// + /// 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. + /// + Optional 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. + /// + Optional tagIds; + + /// + /// 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. + /// + Optional takenAt; + + /// + /// 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. + /// + Optional trashedAt; + + /// + /// 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. + /// + Optional 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. + /// + Optional updatedAt; + + /// + /// 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. + /// + Optional visibility; + + @override + bool operator ==(Object other) => identical(this, other) || other is SearchFilter && + other.albumIds == albumIds && + other.checksum == checksum && + other.city == city && + other.country == country && + other.createdAt == createdAt && + other.description == description && + other.encodedVideoPath == encodedVideoPath && + other.fileSizeInBytes == fileSizeInBytes && + other.hasAlbums == hasAlbums && + other.hasPeople == hasPeople && + other.hasTags == hasTags && + other.id == id && + other.isEncoded == isEncoded && + other.isFavorite == isFavorite && + other.isMotion == isMotion && + other.isOffline == isOffline && + other.lensModel == lensModel && + other.libraryId == libraryId && + other.make == make && + other.model == model && + other.ocr == ocr && + _deepEquality.equals(other.or, or) && + other.originalFileName == originalFileName && + other.originalPath == originalPath && + other.personIds == personIds && + other.rating == rating && + other.state == state && + other.tagIds == tagIds && + other.takenAt == takenAt && + other.trashedAt == trashedAt && + other.type == type && + other.updatedAt == updatedAt && + other.visibility == visibility; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (albumIds == null ? 0 : albumIds!.hashCode) + + (checksum == null ? 0 : checksum!.hashCode) + + (city == null ? 0 : city!.hashCode) + + (country == null ? 0 : country!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + + (fileSizeInBytes == null ? 0 : fileSizeInBytes!.hashCode) + + (hasAlbums == null ? 0 : hasAlbums!.hashCode) + + (hasPeople == null ? 0 : hasPeople!.hashCode) + + (hasTags == null ? 0 : hasTags!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (isEncoded == null ? 0 : isEncoded!.hashCode) + + (isFavorite == null ? 0 : isFavorite!.hashCode) + + (isMotion == null ? 0 : isMotion!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (lensModel == null ? 0 : lensModel!.hashCode) + + (libraryId == null ? 0 : libraryId!.hashCode) + + (make == null ? 0 : make!.hashCode) + + (model == null ? 0 : model!.hashCode) + + (ocr == null ? 0 : ocr!.hashCode) + + (or.hashCode) + + (originalFileName == null ? 0 : originalFileName!.hashCode) + + (originalPath == null ? 0 : originalPath!.hashCode) + + (personIds == null ? 0 : personIds!.hashCode) + + (rating == null ? 0 : rating!.hashCode) + + (state == null ? 0 : state!.hashCode) + + (tagIds == null ? 0 : tagIds!.hashCode) + + (takenAt == null ? 0 : takenAt!.hashCode) + + (trashedAt == null ? 0 : trashedAt!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (visibility == null ? 0 : visibility!.hashCode); + + @override + String toString() => 'SearchFilter[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAt=$createdAt, description=$description, encodedVideoPath=$encodedVideoPath, fileSizeInBytes=$fileSizeInBytes, hasAlbums=$hasAlbums, hasPeople=$hasPeople, hasTags=$hasTags, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, or=$or, originalFileName=$originalFileName, originalPath=$originalPath, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAt=$takenAt, trashedAt=$trashedAt, type=$type, updatedAt=$updatedAt, visibility=$visibility]'; + + Map toJson() { + final json = {}; + if (this.albumIds.isPresent) { + final value = this.albumIds.value; + json[r'albumIds'] = value; + } + if (this.checksum.isPresent) { + final value = this.checksum.value; + json[r'checksum'] = value; + } + if (this.city.isPresent) { + final value = this.city.value; + json[r'city'] = value; + } + if (this.country.isPresent) { + final value = this.country.value; + json[r'country'] = value; + } + if (this.createdAt.isPresent) { + final value = this.createdAt.value; + json[r'createdAt'] = value; + } + if (this.description.isPresent) { + final value = this.description.value; + json[r'description'] = value; + } + if (this.encodedVideoPath.isPresent) { + final value = this.encodedVideoPath.value; + json[r'encodedVideoPath'] = value; + } + if (this.fileSizeInBytes.isPresent) { + final value = this.fileSizeInBytes.value; + json[r'fileSizeInBytes'] = value; + } + if (this.hasAlbums.isPresent) { + final value = this.hasAlbums.value; + json[r'hasAlbums'] = value; + } + if (this.hasPeople.isPresent) { + final value = this.hasPeople.value; + json[r'hasPeople'] = value; + } + if (this.hasTags.isPresent) { + final value = this.hasTags.value; + json[r'hasTags'] = value; + } + if (this.id.isPresent) { + final value = this.id.value; + json[r'id'] = value; + } + if (this.isEncoded.isPresent) { + final value = this.isEncoded.value; + json[r'isEncoded'] = value; + } + if (this.isFavorite.isPresent) { + final value = this.isFavorite.value; + json[r'isFavorite'] = value; + } + if (this.isMotion.isPresent) { + final value = this.isMotion.value; + json[r'isMotion'] = value; + } + if (this.isOffline.isPresent) { + final value = this.isOffline.value; + json[r'isOffline'] = value; + } + if (this.lensModel.isPresent) { + final value = this.lensModel.value; + json[r'lensModel'] = value; + } + if (this.libraryId.isPresent) { + final value = this.libraryId.value; + json[r'libraryId'] = value; + } + if (this.make.isPresent) { + final value = this.make.value; + json[r'make'] = value; + } + if (this.model.isPresent) { + final value = this.model.value; + json[r'model'] = value; + } + if (this.ocr.isPresent) { + final value = this.ocr.value; + json[r'ocr'] = value; + } + if (this.or.isPresent) { + final value = this.or.value; + json[r'or'] = value; + } + if (this.originalFileName.isPresent) { + final value = this.originalFileName.value; + json[r'originalFileName'] = value; + } + if (this.originalPath.isPresent) { + final value = this.originalPath.value; + json[r'originalPath'] = value; + } + if (this.personIds.isPresent) { + final value = this.personIds.value; + json[r'personIds'] = value; + } + if (this.rating.isPresent) { + final value = this.rating.value; + json[r'rating'] = value; + } + if (this.state.isPresent) { + final value = this.state.value; + json[r'state'] = value; + } + if (this.tagIds.isPresent) { + final value = this.tagIds.value; + json[r'tagIds'] = value; + } + if (this.takenAt.isPresent) { + final value = this.takenAt.value; + json[r'takenAt'] = value; + } + if (this.trashedAt.isPresent) { + final value = this.trashedAt.value; + json[r'trashedAt'] = value; + } + if (this.type.isPresent) { + final value = this.type.value; + json[r'type'] = value; + } + if (this.updatedAt.isPresent) { + final value = this.updatedAt.value; + json[r'updatedAt'] = value; + } + if (this.visibility.isPresent) { + final value = this.visibility.value; + json[r'visibility'] = value; + } + return json; + } + + /// Returns a new [SearchFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SearchFilter? fromJson(dynamic value) { + upgradeDto(value, "SearchFilter"); + if (value is Map) { + final json = value.cast(); + + return SearchFilter( + albumIds: json.containsKey(r'albumIds') ? Optional.present(IdsFilter.fromJson(json[r'albumIds'])) : const Optional.absent(), + checksum: json.containsKey(r'checksum') ? Optional.present(StringFilter.fromJson(json[r'checksum'])) : const Optional.absent(), + city: json.containsKey(r'city') ? Optional.present(StringFilterNullable.fromJson(json[r'city'])) : const Optional.absent(), + country: json.containsKey(r'country') ? Optional.present(StringFilterNullable.fromJson(json[r'country'])) : const Optional.absent(), + createdAt: json.containsKey(r'createdAt') ? Optional.present(DateFilter.fromJson(json[r'createdAt'])) : const Optional.absent(), + description: json.containsKey(r'description') ? Optional.present(StringPatternFilter.fromJson(json[r'description'])) : const Optional.absent(), + encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(StringFilter.fromJson(json[r'encodedVideoPath'])) : const Optional.absent(), + fileSizeInBytes: json.containsKey(r'fileSizeInBytes') ? Optional.present(NumberFilter.fromJson(json[r'fileSizeInBytes'])) : const Optional.absent(), + hasAlbums: json.containsKey(r'hasAlbums') ? Optional.present(BoolFilter.fromJson(json[r'hasAlbums'])) : const Optional.absent(), + hasPeople: json.containsKey(r'hasPeople') ? Optional.present(BoolFilter.fromJson(json[r'hasPeople'])) : const Optional.absent(), + hasTags: json.containsKey(r'hasTags') ? Optional.present(BoolFilter.fromJson(json[r'hasTags'])) : const Optional.absent(), + id: json.containsKey(r'id') ? Optional.present(IdFilter.fromJson(json[r'id'])) : const Optional.absent(), + isEncoded: json.containsKey(r'isEncoded') ? Optional.present(BoolFilter.fromJson(json[r'isEncoded'])) : const Optional.absent(), + isFavorite: json.containsKey(r'isFavorite') ? Optional.present(BoolFilter.fromJson(json[r'isFavorite'])) : const Optional.absent(), + isMotion: json.containsKey(r'isMotion') ? Optional.present(BoolFilter.fromJson(json[r'isMotion'])) : const Optional.absent(), + isOffline: json.containsKey(r'isOffline') ? Optional.present(BoolFilter.fromJson(json[r'isOffline'])) : const Optional.absent(), + lensModel: json.containsKey(r'lensModel') ? Optional.present(StringFilterNullable.fromJson(json[r'lensModel'])) : const Optional.absent(), + libraryId: json.containsKey(r'libraryId') ? Optional.present(IdFilterNullable.fromJson(json[r'libraryId'])) : const Optional.absent(), + make: json.containsKey(r'make') ? Optional.present(StringFilterNullable.fromJson(json[r'make'])) : const Optional.absent(), + model: json.containsKey(r'model') ? Optional.present(StringFilterNullable.fromJson(json[r'model'])) : const Optional.absent(), + ocr: json.containsKey(r'ocr') ? Optional.present(StringSimilarityFilter.fromJson(json[r'ocr'])) : const Optional.absent(), + or: json.containsKey(r'or') ? Optional.present(SearchFilterBranch.listFromJson(json[r'or'])) : const Optional.absent(), + originalFileName: json.containsKey(r'originalFileName') ? Optional.present(StringPatternFilter.fromJson(json[r'originalFileName'])) : const Optional.absent(), + originalPath: json.containsKey(r'originalPath') ? Optional.present(StringPatternFilter.fromJson(json[r'originalPath'])) : const Optional.absent(), + personIds: json.containsKey(r'personIds') ? Optional.present(IdsFilter.fromJson(json[r'personIds'])) : const Optional.absent(), + rating: json.containsKey(r'rating') ? Optional.present(NumberFilterNullable.fromJson(json[r'rating'])) : const Optional.absent(), + state: json.containsKey(r'state') ? Optional.present(StringFilterNullable.fromJson(json[r'state'])) : const Optional.absent(), + tagIds: json.containsKey(r'tagIds') ? Optional.present(IdsFilter.fromJson(json[r'tagIds'])) : const Optional.absent(), + takenAt: json.containsKey(r'takenAt') ? Optional.present(DateFilter.fromJson(json[r'takenAt'])) : const Optional.absent(), + trashedAt: json.containsKey(r'trashedAt') ? Optional.present(DateFilterNullable.fromJson(json[r'trashedAt'])) : const Optional.absent(), + type: json.containsKey(r'type') ? Optional.present(EnumFilterAssetType.fromJson(json[r'type'])) : const Optional.absent(), + updatedAt: json.containsKey(r'updatedAt') ? Optional.present(DateFilter.fromJson(json[r'updatedAt'])) : const Optional.absent(), + visibility: json.containsKey(r'visibility') ? Optional.present(EnumFilterAssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SearchFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SearchFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SearchFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SearchFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/search_filter_branch.dart b/mobile/openapi/lib/model/search_filter_branch.dart new file mode 100644 index 0000000000..f273c8b029 --- /dev/null +++ b/mobile/openapi/lib/model/search_filter_branch.dart @@ -0,0 +1,603 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 SearchFilterBranch { + /// Returns a new [SearchFilterBranch] instance. + SearchFilterBranch({ + this.albumIds = const Optional.absent(), + this.checksum = const Optional.absent(), + this.city = const Optional.absent(), + this.country = const Optional.absent(), + this.createdAt = const Optional.absent(), + this.description = const Optional.absent(), + this.encodedVideoPath = const Optional.absent(), + this.fileSizeInBytes = const Optional.absent(), + this.hasAlbums = const Optional.absent(), + this.hasPeople = const Optional.absent(), + this.hasTags = const Optional.absent(), + this.id = const Optional.absent(), + this.isEncoded = const Optional.absent(), + this.isFavorite = const Optional.absent(), + this.isMotion = const Optional.absent(), + this.isOffline = const Optional.absent(), + this.lensModel = const Optional.absent(), + this.libraryId = const Optional.absent(), + this.make = const Optional.absent(), + this.model = const Optional.absent(), + this.ocr = const Optional.absent(), + this.originalFileName = const Optional.absent(), + this.originalPath = const Optional.absent(), + this.personIds = const Optional.absent(), + this.rating = const Optional.absent(), + this.state = const Optional.absent(), + this.tagIds = const Optional.absent(), + this.takenAt = const Optional.absent(), + this.trashedAt = const Optional.absent(), + this.type = const Optional.absent(), + this.updatedAt = const Optional.absent(), + this.visibility = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional albumIds; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional createdAt; + + /// + /// 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. + /// + Optional description; + + /// + /// 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. + /// + Optional 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. + /// + Optional fileSizeInBytes; + + /// + /// 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. + /// + Optional hasAlbums; + + /// + /// 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. + /// + Optional hasPeople; + + /// + /// 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. + /// + Optional hasTags; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional ocr; + + /// + /// 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional 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. + /// + Optional rating; + + /// + /// 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. + /// + Optional 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. + /// + Optional tagIds; + + /// + /// 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. + /// + Optional takenAt; + + /// + /// 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. + /// + Optional trashedAt; + + /// + /// 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. + /// + Optional 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. + /// + Optional updatedAt; + + /// + /// 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. + /// + Optional visibility; + + @override + bool operator ==(Object other) => identical(this, other) || other is SearchFilterBranch && + other.albumIds == albumIds && + other.checksum == checksum && + other.city == city && + other.country == country && + other.createdAt == createdAt && + other.description == description && + other.encodedVideoPath == encodedVideoPath && + other.fileSizeInBytes == fileSizeInBytes && + other.hasAlbums == hasAlbums && + other.hasPeople == hasPeople && + other.hasTags == hasTags && + other.id == id && + other.isEncoded == isEncoded && + other.isFavorite == isFavorite && + other.isMotion == isMotion && + other.isOffline == isOffline && + other.lensModel == lensModel && + other.libraryId == libraryId && + other.make == make && + other.model == model && + other.ocr == ocr && + other.originalFileName == originalFileName && + other.originalPath == originalPath && + other.personIds == personIds && + other.rating == rating && + other.state == state && + other.tagIds == tagIds && + other.takenAt == takenAt && + other.trashedAt == trashedAt && + other.type == type && + other.updatedAt == updatedAt && + other.visibility == visibility; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (albumIds == null ? 0 : albumIds!.hashCode) + + (checksum == null ? 0 : checksum!.hashCode) + + (city == null ? 0 : city!.hashCode) + + (country == null ? 0 : country!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + + (fileSizeInBytes == null ? 0 : fileSizeInBytes!.hashCode) + + (hasAlbums == null ? 0 : hasAlbums!.hashCode) + + (hasPeople == null ? 0 : hasPeople!.hashCode) + + (hasTags == null ? 0 : hasTags!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (isEncoded == null ? 0 : isEncoded!.hashCode) + + (isFavorite == null ? 0 : isFavorite!.hashCode) + + (isMotion == null ? 0 : isMotion!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (lensModel == null ? 0 : lensModel!.hashCode) + + (libraryId == null ? 0 : libraryId!.hashCode) + + (make == null ? 0 : make!.hashCode) + + (model == null ? 0 : model!.hashCode) + + (ocr == null ? 0 : ocr!.hashCode) + + (originalFileName == null ? 0 : originalFileName!.hashCode) + + (originalPath == null ? 0 : originalPath!.hashCode) + + (personIds == null ? 0 : personIds!.hashCode) + + (rating == null ? 0 : rating!.hashCode) + + (state == null ? 0 : state!.hashCode) + + (tagIds == null ? 0 : tagIds!.hashCode) + + (takenAt == null ? 0 : takenAt!.hashCode) + + (trashedAt == null ? 0 : trashedAt!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (visibility == null ? 0 : visibility!.hashCode); + + @override + String toString() => 'SearchFilterBranch[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAt=$createdAt, description=$description, encodedVideoPath=$encodedVideoPath, fileSizeInBytes=$fileSizeInBytes, hasAlbums=$hasAlbums, hasPeople=$hasPeople, hasTags=$hasTags, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, originalFileName=$originalFileName, originalPath=$originalPath, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAt=$takenAt, trashedAt=$trashedAt, type=$type, updatedAt=$updatedAt, visibility=$visibility]'; + + Map toJson() { + final json = {}; + if (this.albumIds.isPresent) { + final value = this.albumIds.value; + json[r'albumIds'] = value; + } + if (this.checksum.isPresent) { + final value = this.checksum.value; + json[r'checksum'] = value; + } + if (this.city.isPresent) { + final value = this.city.value; + json[r'city'] = value; + } + if (this.country.isPresent) { + final value = this.country.value; + json[r'country'] = value; + } + if (this.createdAt.isPresent) { + final value = this.createdAt.value; + json[r'createdAt'] = value; + } + if (this.description.isPresent) { + final value = this.description.value; + json[r'description'] = value; + } + if (this.encodedVideoPath.isPresent) { + final value = this.encodedVideoPath.value; + json[r'encodedVideoPath'] = value; + } + if (this.fileSizeInBytes.isPresent) { + final value = this.fileSizeInBytes.value; + json[r'fileSizeInBytes'] = value; + } + if (this.hasAlbums.isPresent) { + final value = this.hasAlbums.value; + json[r'hasAlbums'] = value; + } + if (this.hasPeople.isPresent) { + final value = this.hasPeople.value; + json[r'hasPeople'] = value; + } + if (this.hasTags.isPresent) { + final value = this.hasTags.value; + json[r'hasTags'] = value; + } + if (this.id.isPresent) { + final value = this.id.value; + json[r'id'] = value; + } + if (this.isEncoded.isPresent) { + final value = this.isEncoded.value; + json[r'isEncoded'] = value; + } + if (this.isFavorite.isPresent) { + final value = this.isFavorite.value; + json[r'isFavorite'] = value; + } + if (this.isMotion.isPresent) { + final value = this.isMotion.value; + json[r'isMotion'] = value; + } + if (this.isOffline.isPresent) { + final value = this.isOffline.value; + json[r'isOffline'] = value; + } + if (this.lensModel.isPresent) { + final value = this.lensModel.value; + json[r'lensModel'] = value; + } + if (this.libraryId.isPresent) { + final value = this.libraryId.value; + json[r'libraryId'] = value; + } + if (this.make.isPresent) { + final value = this.make.value; + json[r'make'] = value; + } + if (this.model.isPresent) { + final value = this.model.value; + json[r'model'] = value; + } + if (this.ocr.isPresent) { + final value = this.ocr.value; + json[r'ocr'] = value; + } + if (this.originalFileName.isPresent) { + final value = this.originalFileName.value; + json[r'originalFileName'] = value; + } + if (this.originalPath.isPresent) { + final value = this.originalPath.value; + json[r'originalPath'] = value; + } + if (this.personIds.isPresent) { + final value = this.personIds.value; + json[r'personIds'] = value; + } + if (this.rating.isPresent) { + final value = this.rating.value; + json[r'rating'] = value; + } + if (this.state.isPresent) { + final value = this.state.value; + json[r'state'] = value; + } + if (this.tagIds.isPresent) { + final value = this.tagIds.value; + json[r'tagIds'] = value; + } + if (this.takenAt.isPresent) { + final value = this.takenAt.value; + json[r'takenAt'] = value; + } + if (this.trashedAt.isPresent) { + final value = this.trashedAt.value; + json[r'trashedAt'] = value; + } + if (this.type.isPresent) { + final value = this.type.value; + json[r'type'] = value; + } + if (this.updatedAt.isPresent) { + final value = this.updatedAt.value; + json[r'updatedAt'] = value; + } + if (this.visibility.isPresent) { + final value = this.visibility.value; + json[r'visibility'] = value; + } + return json; + } + + /// Returns a new [SearchFilterBranch] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SearchFilterBranch? fromJson(dynamic value) { + upgradeDto(value, "SearchFilterBranch"); + if (value is Map) { + final json = value.cast(); + + return SearchFilterBranch( + albumIds: json.containsKey(r'albumIds') ? Optional.present(IdsFilter.fromJson(json[r'albumIds'])) : const Optional.absent(), + checksum: json.containsKey(r'checksum') ? Optional.present(StringFilter.fromJson(json[r'checksum'])) : const Optional.absent(), + city: json.containsKey(r'city') ? Optional.present(StringFilterNullable.fromJson(json[r'city'])) : const Optional.absent(), + country: json.containsKey(r'country') ? Optional.present(StringFilterNullable.fromJson(json[r'country'])) : const Optional.absent(), + createdAt: json.containsKey(r'createdAt') ? Optional.present(DateFilter.fromJson(json[r'createdAt'])) : const Optional.absent(), + description: json.containsKey(r'description') ? Optional.present(StringPatternFilter.fromJson(json[r'description'])) : const Optional.absent(), + encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(StringFilter.fromJson(json[r'encodedVideoPath'])) : const Optional.absent(), + fileSizeInBytes: json.containsKey(r'fileSizeInBytes') ? Optional.present(NumberFilter.fromJson(json[r'fileSizeInBytes'])) : const Optional.absent(), + hasAlbums: json.containsKey(r'hasAlbums') ? Optional.present(BoolFilter.fromJson(json[r'hasAlbums'])) : const Optional.absent(), + hasPeople: json.containsKey(r'hasPeople') ? Optional.present(BoolFilter.fromJson(json[r'hasPeople'])) : const Optional.absent(), + hasTags: json.containsKey(r'hasTags') ? Optional.present(BoolFilter.fromJson(json[r'hasTags'])) : const Optional.absent(), + id: json.containsKey(r'id') ? Optional.present(IdFilter.fromJson(json[r'id'])) : const Optional.absent(), + isEncoded: json.containsKey(r'isEncoded') ? Optional.present(BoolFilter.fromJson(json[r'isEncoded'])) : const Optional.absent(), + isFavorite: json.containsKey(r'isFavorite') ? Optional.present(BoolFilter.fromJson(json[r'isFavorite'])) : const Optional.absent(), + isMotion: json.containsKey(r'isMotion') ? Optional.present(BoolFilter.fromJson(json[r'isMotion'])) : const Optional.absent(), + isOffline: json.containsKey(r'isOffline') ? Optional.present(BoolFilter.fromJson(json[r'isOffline'])) : const Optional.absent(), + lensModel: json.containsKey(r'lensModel') ? Optional.present(StringFilterNullable.fromJson(json[r'lensModel'])) : const Optional.absent(), + libraryId: json.containsKey(r'libraryId') ? Optional.present(IdFilterNullable.fromJson(json[r'libraryId'])) : const Optional.absent(), + make: json.containsKey(r'make') ? Optional.present(StringFilterNullable.fromJson(json[r'make'])) : const Optional.absent(), + model: json.containsKey(r'model') ? Optional.present(StringFilterNullable.fromJson(json[r'model'])) : const Optional.absent(), + ocr: json.containsKey(r'ocr') ? Optional.present(StringSimilarityFilter.fromJson(json[r'ocr'])) : const Optional.absent(), + originalFileName: json.containsKey(r'originalFileName') ? Optional.present(StringPatternFilter.fromJson(json[r'originalFileName'])) : const Optional.absent(), + originalPath: json.containsKey(r'originalPath') ? Optional.present(StringPatternFilter.fromJson(json[r'originalPath'])) : const Optional.absent(), + personIds: json.containsKey(r'personIds') ? Optional.present(IdsFilter.fromJson(json[r'personIds'])) : const Optional.absent(), + rating: json.containsKey(r'rating') ? Optional.present(NumberFilterNullable.fromJson(json[r'rating'])) : const Optional.absent(), + state: json.containsKey(r'state') ? Optional.present(StringFilterNullable.fromJson(json[r'state'])) : const Optional.absent(), + tagIds: json.containsKey(r'tagIds') ? Optional.present(IdsFilter.fromJson(json[r'tagIds'])) : const Optional.absent(), + takenAt: json.containsKey(r'takenAt') ? Optional.present(DateFilter.fromJson(json[r'takenAt'])) : const Optional.absent(), + trashedAt: json.containsKey(r'trashedAt') ? Optional.present(DateFilterNullable.fromJson(json[r'trashedAt'])) : const Optional.absent(), + type: json.containsKey(r'type') ? Optional.present(EnumFilterAssetType.fromJson(json[r'type'])) : const Optional.absent(), + updatedAt: json.containsKey(r'updatedAt') ? Optional.present(DateFilter.fromJson(json[r'updatedAt'])) : const Optional.absent(), + visibility: json.containsKey(r'visibility') ? Optional.present(EnumFilterAssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SearchFilterBranch.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SearchFilterBranch.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SearchFilterBranch-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SearchFilterBranch.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/search_order.dart b/mobile/openapi/lib/model/search_order.dart new file mode 100644 index 0000000000..7f0ea4ee55 --- /dev/null +++ b/mobile/openapi/lib/model/search_order.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 SearchOrder { + /// Returns a new [SearchOrder] instance. + SearchOrder({ + this.direction = const Optional.absent(), + this.field = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional direction; + + /// + /// 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. + /// + Optional field; + + @override + bool operator ==(Object other) => identical(this, other) || other is SearchOrder && + other.direction == direction && + other.field == field; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (direction == null ? 0 : direction!.hashCode) + + (field == null ? 0 : field!.hashCode); + + @override + String toString() => 'SearchOrder[direction=$direction, field=$field]'; + + Map toJson() { + final json = {}; + if (this.direction.isPresent) { + final value = this.direction.value; + json[r'direction'] = value; + } + if (this.field.isPresent) { + final value = this.field.value; + json[r'field'] = value; + } + return json; + } + + /// Returns a new [SearchOrder] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SearchOrder? fromJson(dynamic value) { + upgradeDto(value, "SearchOrder"); + if (value is Map) { + final json = value.cast(); + + return SearchOrder( + direction: json.containsKey(r'direction') ? Optional.present(AssetOrder.fromJson(json[r'direction'])) : const Optional.absent(), + field: json.containsKey(r'field') ? Optional.present(SearchOrderField.fromJson(json[r'field'])) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SearchOrder.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SearchOrder.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SearchOrder-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SearchOrder.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/search_order_field.dart b/mobile/openapi/lib/model/search_order_field.dart new file mode 100644 index 0000000000..bf80329d3e --- /dev/null +++ b/mobile/openapi/lib/model/search_order_field.dart @@ -0,0 +1,94 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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; + + +enum SearchOrderField { + fileCreatedAt._(r'fileCreatedAt'), + localDateTime._(r'localDateTime'), + fileSizeInBytes._(r'fileSizeInBytes'), + rating._(r'rating'), + ; + + /// Instantiate a new enum with the provided value. + const SearchOrderField._(this._value); + + /// The underlying value of this enum member. + final String _value; + + @override + String toString() => _value; + + /// Encodes this enum as a value suitable for JSON. + String toJson() => _value; + + /// Returns the instance of [SearchOrderField] that was successfully decoded + /// from the passed [value] on success, null otherwise. + static SearchOrderField? fromJson(dynamic value) => SearchOrderFieldTypeTransformer().decode(value); + + /// Returns a [List] containing instances of [SearchOrderField] + /// that were successfully decoded from the passed [JSON][json]. + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SearchOrderField.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SearchOrderField] to String, +/// and [decode] dynamic data back to [SearchOrderField]. +class SearchOrderFieldTypeTransformer { + factory SearchOrderFieldTypeTransformer() => _instance ??= const SearchOrderFieldTypeTransformer._(); + + const SearchOrderFieldTypeTransformer._(); + + /// Encodes this enum as a value suitable for JSON. + String encode(SearchOrderField data) => data._value; + + /// Returns the instance of [SearchOrderField] that was successfully decoded + /// from the passed [data] value on success, null otherwise. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + SearchOrderField? decode(dynamic data, {bool allowNull = true}) { + if (data is SearchOrderField) { + return data; + } + if (data != null) { + switch (data) { + case r'fileCreatedAt': return SearchOrderField.fileCreatedAt; + case r'localDateTime': return SearchOrderField.localDateTime; + case r'fileSizeInBytes': return SearchOrderField.fileSizeInBytes; + case r'rating': return SearchOrderField.rating; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// The singleton instance of this transformer. + static SearchOrderFieldTypeTransformer? _instance; +} + diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart index 70c9a9354e..d1dff77c6e 100644 --- a/mobile/openapi/lib/model/smart_search_dto.dart +++ b/mobile/openapi/lib/model/smart_search_dto.dart @@ -18,6 +18,8 @@ class SmartSearchDto { this.country = const Optional.absent(), this.createdAfter = const Optional.absent(), this.createdBefore = const Optional.absent(), + this.cursor = const Optional.absent(), + this.filter = const Optional.absent(), this.isEncoded = const Optional.absent(), this.isFavorite = const Optional.absent(), this.isMotion = const Optional.absent(), @@ -76,6 +78,23 @@ class SmartSearchDto { /// Optional createdBefore; + /// Cursor for the next page of results + /// + /// 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. + /// + Optional cursor; + + /// + /// 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. + /// + Optional filter; + /// Filter by encoded status /// /// Please note: This property should have been non-nullable! Since the specification file @@ -303,6 +322,8 @@ class SmartSearchDto { other.country == country && other.createdAfter == createdAfter && other.createdBefore == createdBefore && + other.cursor == cursor && + other.filter == filter && other.isEncoded == isEncoded && other.isFavorite == isFavorite && other.isMotion == isMotion && @@ -341,6 +362,8 @@ class SmartSearchDto { (country == null ? 0 : country!.hashCode) + (createdAfter == null ? 0 : createdAfter!.hashCode) + (createdBefore == null ? 0 : createdBefore!.hashCode) + + (cursor == null ? 0 : cursor!.hashCode) + + (filter == null ? 0 : filter!.hashCode) + (isEncoded == null ? 0 : isEncoded!.hashCode) + (isFavorite == null ? 0 : isFavorite!.hashCode) + (isMotion == null ? 0 : isMotion!.hashCode) + @@ -372,7 +395,7 @@ class SmartSearchDto { (withExif == null ? 0 : withExif!.hashCode); @override - String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, page=$page, personIds=$personIds, query=$query, queryAssetId=$queryAssetId, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; + String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, cursor=$cursor, filter=$filter, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, page=$page, personIds=$personIds, query=$query, queryAssetId=$queryAssetId, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; Map toJson() { final json = {}; @@ -400,6 +423,14 @@ class SmartSearchDto { ? value.millisecondsSinceEpoch : value.toUtc().toIso8601String()); } + if (this.cursor.isPresent) { + final value = this.cursor.value; + json[r'cursor'] = value; + } + if (this.filter.isPresent) { + final value = this.filter.value; + json[r'filter'] = value; + } if (this.isEncoded.isPresent) { final value = this.isEncoded.value; json[r'isEncoded'] = value; @@ -547,6 +578,8 @@ class SmartSearchDto { country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), + cursor: json.containsKey(r'cursor') ? Optional.present(mapValueOfType(json, r'cursor')) : const Optional.absent(), + filter: json.containsKey(r'filter') ? Optional.present(SearchFilter.fromJson(json[r'filter'])) : const Optional.absent(), isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), diff --git a/mobile/openapi/lib/model/statistics_search_dto.dart b/mobile/openapi/lib/model/statistics_search_dto.dart index 37328cd7f4..81fd819ae6 100644 --- a/mobile/openapi/lib/model/statistics_search_dto.dart +++ b/mobile/openapi/lib/model/statistics_search_dto.dart @@ -19,6 +19,7 @@ class StatisticsSearchDto { this.createdAfter = const Optional.absent(), this.createdBefore = const Optional.absent(), this.description = const Optional.absent(), + this.filter = const Optional.absent(), this.isEncoded = const Optional.absent(), this.isFavorite = const Optional.absent(), this.isMotion = const Optional.absent(), @@ -79,6 +80,14 @@ class StatisticsSearchDto { /// Optional description; + /// + /// 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. + /// + Optional filter; + /// Filter by encoded status /// /// Please note: This property should have been non-nullable! Since the specification file @@ -238,6 +247,7 @@ class StatisticsSearchDto { other.createdAfter == createdAfter && other.createdBefore == createdBefore && other.description == description && + other.filter == filter && other.isEncoded == isEncoded && other.isFavorite == isFavorite && other.isMotion == isMotion && @@ -270,6 +280,7 @@ class StatisticsSearchDto { (createdAfter == null ? 0 : createdAfter!.hashCode) + (createdBefore == null ? 0 : createdBefore!.hashCode) + (description == null ? 0 : description!.hashCode) + + (filter == null ? 0 : filter!.hashCode) + (isEncoded == null ? 0 : isEncoded!.hashCode) + (isFavorite == null ? 0 : isFavorite!.hashCode) + (isMotion == null ? 0 : isMotion!.hashCode) + @@ -294,7 +305,7 @@ class StatisticsSearchDto { (visibility == null ? 0 : visibility!.hashCode); @override - String toString() => 'StatisticsSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility]'; + String toString() => 'StatisticsSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, filter=$filter, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility]'; Map toJson() { final json = {}; @@ -326,6 +337,10 @@ class StatisticsSearchDto { final value = this.description.value; json[r'description'] = value; } + if (this.filter.isPresent) { + final value = this.filter.value; + json[r'filter'] = value; + } if (this.isEncoded.isPresent) { final value = this.isEncoded.value; json[r'isEncoded'] = value; @@ -446,6 +461,7 @@ class StatisticsSearchDto { createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), + filter: json.containsKey(r'filter') ? Optional.present(SearchFilter.fromJson(json[r'filter'])) : const Optional.absent(), isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), diff --git a/mobile/openapi/lib/model/string_filter.dart b/mobile/openapi/lib/model/string_filter.dart new file mode 100644 index 0000000000..2de6ffdbce --- /dev/null +++ b/mobile/openapi/lib/model/string_filter.dart @@ -0,0 +1,147 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 StringFilter { + /// Returns a new [StringFilter] instance. + StringFilter({ + this.eq = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + /// + /// 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. + /// + Optional eq; + + Optional?> in_; + + /// + /// 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. + /// + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is StringFilter && + other.eq == eq && + _deepEquality.equals(other.in_, in_) && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (in_.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'StringFilter[eq=$eq, in_=$in_, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [StringFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StringFilter? fromJson(dynamic value) { + upgradeDto(value, "StringFilter"); + if (value is Map) { + final json = value.cast(); + + return StringFilter( + eq: json.containsKey(r'eq') ? Optional.present(mapValueOfType(json, r'eq')) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(json[r'in'] is Iterable + ? (json[r'in'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapValueOfType(json, r'ne')) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(json[r'notIn'] is Iterable + ? (json[r'notIn'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StringFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StringFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StringFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StringFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/string_filter_nullable.dart b/mobile/openapi/lib/model/string_filter_nullable.dart new file mode 100644 index 0000000000..e9e5df3c80 --- /dev/null +++ b/mobile/openapi/lib/model/string_filter_nullable.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 StringFilterNullable { + /// Returns a new [StringFilterNullable] instance. + StringFilterNullable({ + this.eq = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + }); + + Optional eq; + + Optional?> in_; + + Optional ne; + + Optional?> notIn; + + @override + bool operator ==(Object other) => identical(this, other) || other is StringFilterNullable && + other.eq == eq && + _deepEquality.equals(other.in_, in_) && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (eq == null ? 0 : eq!.hashCode) + + (in_.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode); + + @override + String toString() => 'StringFilterNullable[eq=$eq, in_=$in_, ne=$ne, notIn=$notIn]'; + + Map toJson() { + final json = {}; + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + return json; + } + + /// Returns a new [StringFilterNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StringFilterNullable? fromJson(dynamic value) { + upgradeDto(value, "StringFilterNullable"); + if (value is Map) { + final json = value.cast(); + + return StringFilterNullable( + eq: json.containsKey(r'eq') ? Optional.present(mapValueOfType(json, r'eq')) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(json[r'in'] is Iterable + ? (json[r'in'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapValueOfType(json, r'ne')) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(json[r'notIn'] is Iterable + ? (json[r'notIn'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StringFilterNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StringFilterNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StringFilterNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StringFilterNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/string_pattern_filter.dart b/mobile/openapi/lib/model/string_pattern_filter.dart new file mode 100644 index 0000000000..2410c0d9ff --- /dev/null +++ b/mobile/openapi/lib/model/string_pattern_filter.dart @@ -0,0 +1,199 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 StringPatternFilter { + /// Returns a new [StringPatternFilter] instance. + StringPatternFilter({ + this.endsWith = const Optional.absent(), + this.eq = const Optional.absent(), + this.in_ = const Optional.present(const []), + this.like = const Optional.absent(), + this.ne = const Optional.absent(), + this.notIn = const Optional.present(const []), + this.notLike = const Optional.absent(), + this.startsWith = const Optional.absent(), + }); + + /// + /// 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. + /// + Optional endsWith; + + Optional eq; + + Optional?> in_; + + /// + /// 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. + /// + Optional like; + + Optional ne; + + Optional?> notIn; + + /// + /// 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. + /// + Optional notLike; + + /// + /// 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. + /// + Optional startsWith; + + @override + bool operator ==(Object other) => identical(this, other) || other is StringPatternFilter && + other.endsWith == endsWith && + other.eq == eq && + _deepEquality.equals(other.in_, in_) && + other.like == like && + other.ne == ne && + _deepEquality.equals(other.notIn, notIn) && + other.notLike == notLike && + other.startsWith == startsWith; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (endsWith == null ? 0 : endsWith!.hashCode) + + (eq == null ? 0 : eq!.hashCode) + + (in_.hashCode) + + (like == null ? 0 : like!.hashCode) + + (ne == null ? 0 : ne!.hashCode) + + (notIn.hashCode) + + (notLike == null ? 0 : notLike!.hashCode) + + (startsWith == null ? 0 : startsWith!.hashCode); + + @override + String toString() => 'StringPatternFilter[endsWith=$endsWith, eq=$eq, in_=$in_, like=$like, ne=$ne, notIn=$notIn, notLike=$notLike, startsWith=$startsWith]'; + + Map toJson() { + final json = {}; + if (this.endsWith.isPresent) { + final value = this.endsWith.value; + json[r'endsWith'] = value; + } + if (this.eq.isPresent) { + final value = this.eq.value; + json[r'eq'] = value; + } + if (this.in_.isPresent) { + final value = this.in_.value; + json[r'in'] = value; + } + if (this.like.isPresent) { + final value = this.like.value; + json[r'like'] = value; + } + if (this.ne.isPresent) { + final value = this.ne.value; + json[r'ne'] = value; + } + if (this.notIn.isPresent) { + final value = this.notIn.value; + json[r'notIn'] = value; + } + if (this.notLike.isPresent) { + final value = this.notLike.value; + json[r'notLike'] = value; + } + if (this.startsWith.isPresent) { + final value = this.startsWith.value; + json[r'startsWith'] = value; + } + return json; + } + + /// Returns a new [StringPatternFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StringPatternFilter? fromJson(dynamic value) { + upgradeDto(value, "StringPatternFilter"); + if (value is Map) { + final json = value.cast(); + + return StringPatternFilter( + endsWith: json.containsKey(r'endsWith') ? Optional.present(mapValueOfType(json, r'endsWith')) : const Optional.absent(), + eq: json.containsKey(r'eq') ? Optional.present(mapValueOfType(json, r'eq')) : const Optional.absent(), + in_: json.containsKey(r'in') ? Optional.present(json[r'in'] is Iterable + ? (json[r'in'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + like: json.containsKey(r'like') ? Optional.present(mapValueOfType(json, r'like')) : const Optional.absent(), + ne: json.containsKey(r'ne') ? Optional.present(mapValueOfType(json, r'ne')) : const Optional.absent(), + notIn: json.containsKey(r'notIn') ? Optional.present(json[r'notIn'] is Iterable + ? (json[r'notIn'] as Iterable).cast().toList(growable: false) + : const []) : const Optional.absent(), + notLike: json.containsKey(r'notLike') ? Optional.present(mapValueOfType(json, r'notLike')) : const Optional.absent(), + startsWith: json.containsKey(r'startsWith') ? Optional.present(mapValueOfType(json, r'startsWith')) : const Optional.absent(), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StringPatternFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StringPatternFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StringPatternFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StringPatternFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/mobile/openapi/lib/model/string_similarity_filter.dart b/mobile/openapi/lib/model/string_similarity_filter.dart new file mode 100644 index 0000000000..958c44fc26 --- /dev/null +++ b/mobile/openapi/lib/model/string_similarity_filter.dart @@ -0,0 +1,99 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// 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 StringSimilarityFilter { + /// Returns a new [StringSimilarityFilter] instance. + StringSimilarityFilter({ + required this.matches, + }); + + String matches; + + @override + bool operator ==(Object other) => identical(this, other) || other is StringSimilarityFilter && + other.matches == matches; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (matches.hashCode); + + @override + String toString() => 'StringSimilarityFilter[matches=$matches]'; + + Map toJson() { + final json = {}; + json[r'matches'] = this.matches; + return json; + } + + /// Returns a new [StringSimilarityFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StringSimilarityFilter? fromJson(dynamic value) { + upgradeDto(value, "StringSimilarityFilter"); + if (value is Map) { + final json = value.cast(); + + return StringSimilarityFilter( + matches: mapValueOfType(json, r'matches')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StringSimilarityFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StringSimilarityFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StringSimilarityFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StringSimilarityFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'matches', + }; +} + diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index e73760a3de..c9eda8c967 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -10160,6 +10160,7 @@ }, "/search/large-assets": { "post": { + "deprecated": true, "description": "Search for assets that are considered large based on specified criteria.", "operationId": "searchLargeAssets", "parameters": [ @@ -10168,6 +10169,22 @@ "required": false, "in": "query", "description": "Filter by album IDs", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "array", "items": { @@ -10182,6 +10199,22 @@ "required": false, "in": "query", "description": "Filter by city name", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10192,6 +10225,22 @@ "required": false, "in": "query", "description": "Filter by country name", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10202,6 +10251,22 @@ "required": false, "in": "query", "description": "Filter by creation date (after)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10214,6 +10279,22 @@ "required": false, "in": "query", "description": "Filter by creation date (before)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10226,6 +10307,22 @@ "required": false, "in": "query", "description": "Filter by encoded status", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10235,6 +10332,22 @@ "required": false, "in": "query", "description": "Filter by favorite status", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10244,6 +10357,22 @@ "required": false, "in": "query", "description": "Filter by motion photo status", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10253,6 +10382,22 @@ "required": false, "in": "query", "description": "Filter assets not in any album", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10262,6 +10407,22 @@ "required": false, "in": "query", "description": "Filter by offline status", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10271,6 +10432,22 @@ "required": false, "in": "query", "description": "Filter by lens model", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10281,6 +10458,22 @@ "required": false, "in": "query", "description": "Library ID to filter by", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "format": "uuid", @@ -10293,6 +10486,22 @@ "required": false, "in": "query", "description": "Filter by camera make", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10314,6 +10523,22 @@ "required": false, "in": "query", "description": "Filter by camera model", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10324,6 +10549,22 @@ "required": false, "in": "query", "description": "Filter by OCR text content", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string" } @@ -10333,6 +10574,22 @@ "required": false, "in": "query", "description": "Filter by person IDs", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "array", "items": { @@ -10365,9 +10622,14 @@ "version": "v3", "state": "Updated", "description": "Using -1 as a rating is no longer valid." + }, + { + "version": "v3.1.0", + "state": "Deprecated" } ], - "x-immich-state": "Stable", + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "integer", "minimum": 1, @@ -10391,6 +10653,22 @@ "required": false, "in": "query", "description": "Filter by state/province name", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "string", "nullable": true @@ -10401,6 +10679,22 @@ "required": false, "in": "query", "description": "Filter by tag IDs", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "array", "items": { @@ -10416,6 +10710,22 @@ "required": false, "in": "query", "description": "Filter by taken date (after)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10428,6 +10738,22 @@ "required": false, "in": "query", "description": "Filter by taken date (before)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10440,6 +10766,22 @@ "required": false, "in": "query", "description": "Filter by trash date (after)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10452,6 +10794,22 @@ "required": false, "in": "query", "description": "Filter by trash date (before)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10463,6 +10821,22 @@ "name": "type", "required": false, "in": "query", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "$ref": "#/components/schemas/AssetTypeEnum" } @@ -10472,6 +10846,22 @@ "required": false, "in": "query", "description": "Filter by update date (after)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10484,6 +10874,22 @@ "required": false, "in": "query", "description": "Filter by update date (before)", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", @@ -10495,6 +10901,22 @@ "name": "visibility", "required": false, "in": "query", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "$ref": "#/components/schemas/AssetVisibility" } @@ -10504,6 +10926,22 @@ "required": false, "in": "query", "description": "Include deleted assets", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated", + "deprecated": true, "schema": { "type": "boolean" } @@ -10546,7 +10984,8 @@ ], "summary": "Search large assets", "tags": [ - "Search" + "Search", + "Deprecated" ], "x-immich-history": [ { @@ -10560,10 +10999,15 @@ { "version": "v2", "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated", + "replacementId": "searchAssets" } ], "x-immich-permission": "asset.read", - "x-immich-state": "Stable" + "x-immich-state": "Deprecated" } }, "/search/metadata": { @@ -18206,6 +18650,17 @@ }, "type": "object" }, + "BoolFilter": { + "properties": { + "eq": { + "type": "boolean" + } + }, + "required": [ + "eq" + ], + "type": "object" + }, "BulkIdErrorReason": { "description": "Error reason", "enum": [ @@ -18648,6 +19103,90 @@ }, "type": "object" }, + "DateFilter": { + "properties": { + "eq": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "gt": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "gte": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "lt": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "lte": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "ne": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + } + }, + "type": "object" + }, + "DateFilterNullable": { + "properties": { + "eq": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "nullable": true, + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "gt": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "gte": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "lt": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "lte": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + }, + "ne": { + "example": "2024-01-01T00:00:00.000Z", + "format": "date-time", + "nullable": true, + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "type": "string" + } + }, + "type": "object" + }, "DownloadArchiveDto": { "properties": { "assetIds": { @@ -18921,6 +19460,56 @@ }, "type": "object" }, + "EnumFilterAssetType": { + "properties": { + "eq": { + "$ref": "#/components/schemas/AssetTypeEnum" + }, + "in": { + "items": { + "$ref": "#/components/schemas/AssetTypeEnum" + }, + "minItems": 1, + "type": "array" + }, + "ne": { + "$ref": "#/components/schemas/AssetTypeEnum" + }, + "notIn": { + "items": { + "$ref": "#/components/schemas/AssetTypeEnum" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + "EnumFilterAssetVisibility": { + "properties": { + "eq": { + "$ref": "#/components/schemas/AssetVisibility" + }, + "in": { + "items": { + "$ref": "#/components/schemas/AssetVisibility" + }, + "minItems": 1, + "type": "array" + }, + "ne": { + "$ref": "#/components/schemas/AssetVisibility" + }, + "notIn": { + "items": { + "$ref": "#/components/schemas/AssetVisibility" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, "ExifResponseDto": { "description": "EXIF response", "properties": { @@ -19166,6 +19755,70 @@ ], "type": "integer" }, + "IdFilter": { + "properties": { + "eq": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + }, + "ne": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + } + }, + "type": "object" + }, + "IdFilterNullable": { + "properties": { + "eq": { + "format": "uuid", + "nullable": true, + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + }, + "ne": { + "format": "uuid", + "nullable": true, + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + } + }, + "type": "object" + }, + "IdsFilter": { + "properties": { + "all": { + "items": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "any": { + "items": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "none": { + "items": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, "ImageFormat": { "description": "Image format", "enum": [ @@ -20065,135 +20718,564 @@ "MetadataSearchDto": { "properties": { "albumIds": { + "deprecated": true, "description": "Filter by album IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "checksum": { + "deprecated": true, "description": "Filter by file checksum", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "city": { + "deprecated": true, "description": "Filter by city name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "country": { + "deprecated": true, "description": "Filter by country name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdAfter": { + "deprecated": true, "description": "Filter by creation date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdBefore": { + "deprecated": true, "description": "Filter by creation date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "cursor": { + "description": "Cursor for the next page of results", + "minLength": 1, + "type": "string", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "description": { + "deprecated": true, "description": "Filter by description text", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "encodedVideoPath": { + "deprecated": true, "description": "Filter by encoded video file path", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "filter": { + "$ref": "#/components/schemas/SearchFilter", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "id": { + "deprecated": true, "description": "Filter by asset ID", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isEncoded": { + "deprecated": true, "description": "Filter by encoded status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isFavorite": { + "deprecated": true, "description": "Filter by favorite status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isMotion": { + "deprecated": true, "description": "Filter by motion photo status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isNotInAlbum": { + "deprecated": true, "description": "Filter assets not in any album", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isOffline": { + "deprecated": true, "description": "Filter by offline status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "lensModel": { + "deprecated": true, "description": "Filter by lens model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "libraryId": { + "deprecated": true, "description": "Library ID to filter by", "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "make": { + "deprecated": true, "description": "Filter by camera make", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "model": { + "deprecated": true, "description": "Filter by camera model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "ocr": { + "deprecated": true, "description": "Filter by OCR text content", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "order": { "$ref": "#/components/schemas/AssetOrder", - "default": "desc", - "description": "Sort order" + "deprecated": true, + "description": "Sort order", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "orderBy": { + "$ref": "#/components/schemas/SearchOrder", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "originalFileName": { + "deprecated": true, "description": "Filter by original file name", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "originalPath": { + "deprecated": true, "description": "Filter by original file path", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "page": { + "deprecated": true, "description": "Page number", "maximum": 9007199254740991, "minimum": 1, - "type": "integer" + "type": "integer", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "personIds": { + "deprecated": true, "description": "Filter by person IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "previewPath": { + "deprecated": true, "description": "Filter by preview file path", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "rating": { + "deprecated": true, "description": "Filter by rating [1-5], or null for unrated", "maximum": 5, "minimum": 1, @@ -20217,9 +21299,13 @@ "version": "v3", "state": "Updated", "description": "Using -1 as a rating is no longer valid." + }, + { + "version": "v3.1.0", + "state": "Deprecated" } ], - "x-immich-state": "Stable" + "x-immich-state": "Deprecated" }, "size": { "description": "Number of results to return", @@ -20228,11 +21314,28 @@ "type": "integer" }, "state": { + "deprecated": true, "description": "Filter by state/province name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "tagIds": { + "deprecated": true, "description": "Filter by tag IDs", "items": { "format": "uuid", @@ -20240,63 +21343,238 @@ "type": "string" }, "nullable": true, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenAfter": { + "deprecated": true, "description": "Filter by taken date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenBefore": { + "deprecated": true, "description": "Filter by taken date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "thumbnailPath": { + "deprecated": true, "description": "Filter by thumbnail file path", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedAfter": { + "deprecated": true, "description": "Filter by trash date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedBefore": { + "deprecated": true, "description": "Filter by trash date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "type": { - "$ref": "#/components/schemas/AssetTypeEnum" + "$ref": "#/components/schemas/AssetTypeEnum", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedAfter": { + "deprecated": true, "description": "Filter by update date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedBefore": { + "deprecated": true, "description": "Filter by update date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "visibility": { - "$ref": "#/components/schemas/AssetVisibility" + "$ref": "#/components/schemas/AssetVisibility", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withDeleted": { + "deprecated": true, "description": "Include deleted assets", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withExif": { "description": "Include EXIF data in response", @@ -20505,6 +21783,82 @@ }, "type": "object" }, + "NumberFilter": { + "properties": { + "eq": { + "type": "number" + }, + "gt": { + "type": "number" + }, + "gte": { + "type": "number" + }, + "in": { + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array" + }, + "lt": { + "type": "number" + }, + "lte": { + "type": "number" + }, + "ne": { + "type": "number" + }, + "notIn": { + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + "NumberFilterNullable": { + "properties": { + "eq": { + "nullable": true, + "type": "number" + }, + "gt": { + "type": "number" + }, + "gte": { + "type": "number" + }, + "in": { + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array" + }, + "lt": { + "type": "number" + }, + "lte": { + "type": "number" + }, + "ne": { + "nullable": true, + "type": "number" + }, + "notIn": { + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, "OAuthAuthorizeResponseDto": { "properties": { "url": { @@ -21797,94 +23151,360 @@ "RandomSearchDto": { "properties": { "albumIds": { + "deprecated": true, "description": "Filter by album IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "city": { + "deprecated": true, "description": "Filter by city name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "country": { + "deprecated": true, "description": "Filter by country name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdAfter": { + "deprecated": true, "description": "Filter by creation date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdBefore": { + "deprecated": true, "description": "Filter by creation date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "filter": { + "$ref": "#/components/schemas/SearchFilter", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "isEncoded": { + "deprecated": true, "description": "Filter by encoded status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isFavorite": { + "deprecated": true, "description": "Filter by favorite status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isMotion": { + "deprecated": true, "description": "Filter by motion photo status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isNotInAlbum": { + "deprecated": true, "description": "Filter assets not in any album", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isOffline": { + "deprecated": true, "description": "Filter by offline status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "lensModel": { + "deprecated": true, "description": "Filter by lens model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "libraryId": { + "deprecated": true, "description": "Library ID to filter by", "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "make": { + "deprecated": true, "description": "Filter by camera make", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "model": { + "deprecated": true, "description": "Filter by camera model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "ocr": { + "deprecated": true, "description": "Filter by OCR text content", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "personIds": { + "deprecated": true, "description": "Filter by person IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "rating": { + "deprecated": true, "description": "Filter by rating [1-5], or null for unrated", "maximum": 5, "minimum": 1, @@ -21908,9 +23528,13 @@ "version": "v3", "state": "Updated", "description": "Using -1 as a rating is no longer valid." + }, + { + "version": "v3.1.0", + "state": "Deprecated" } ], - "x-immich-state": "Stable" + "x-immich-state": "Deprecated" }, "size": { "description": "Number of results to return", @@ -21919,11 +23543,28 @@ "type": "integer" }, "state": { + "deprecated": true, "description": "Filter by state/province name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "tagIds": { + "deprecated": true, "description": "Filter by tag IDs", "items": { "format": "uuid", @@ -21931,59 +23572,218 @@ "type": "string" }, "nullable": true, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenAfter": { + "deprecated": true, "description": "Filter by taken date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenBefore": { + "deprecated": true, "description": "Filter by taken date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedAfter": { + "deprecated": true, "description": "Filter by trash date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedBefore": { + "deprecated": true, "description": "Filter by trash date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "type": { - "$ref": "#/components/schemas/AssetTypeEnum" + "$ref": "#/components/schemas/AssetTypeEnum", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedAfter": { + "deprecated": true, "description": "Filter by update date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedBefore": { + "deprecated": true, "description": "Filter by update date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "visibility": { - "$ref": "#/components/schemas/AssetVisibility" + "$ref": "#/components/schemas/AssetVisibility", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withDeleted": { + "deprecated": true, "description": "Include deleted assets", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withExif": { "description": "Include EXIF data in response", @@ -22195,10 +23995,37 @@ }, "type": "array" }, + "nextCursor": { + "description": "Cursor for the next page of results", + "nullable": true, + "type": "string", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] + }, "nextPage": { + "deprecated": true, "description": "Next page token", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "total": { "description": "Total number of matching assets", @@ -22218,6 +24045,7 @@ "count", "facets", "items", + "nextCursor", "nextPage", "total" ], @@ -22296,6 +24124,237 @@ ], "type": "object" }, + "SearchFilter": { + "properties": { + "albumIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "checksum": { + "$ref": "#/components/schemas/StringFilter" + }, + "city": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "country": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "createdAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "description": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "encodedVideoPath": { + "$ref": "#/components/schemas/StringFilter" + }, + "fileSizeInBytes": { + "$ref": "#/components/schemas/NumberFilter" + }, + "hasAlbums": { + "$ref": "#/components/schemas/BoolFilter" + }, + "hasPeople": { + "$ref": "#/components/schemas/BoolFilter" + }, + "hasTags": { + "$ref": "#/components/schemas/BoolFilter" + }, + "id": { + "$ref": "#/components/schemas/IdFilter" + }, + "isEncoded": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isFavorite": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isMotion": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isOffline": { + "$ref": "#/components/schemas/BoolFilter" + }, + "lensModel": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "libraryId": { + "$ref": "#/components/schemas/IdFilterNullable" + }, + "make": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "model": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "ocr": { + "$ref": "#/components/schemas/StringSimilarityFilter" + }, + "or": { + "items": { + "$ref": "#/components/schemas/SearchFilterBranch" + }, + "minItems": 1, + "type": "array" + }, + "originalFileName": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "originalPath": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "personIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "rating": { + "$ref": "#/components/schemas/NumberFilterNullable" + }, + "state": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "tagIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "takenAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "trashedAt": { + "$ref": "#/components/schemas/DateFilterNullable" + }, + "type": { + "$ref": "#/components/schemas/EnumFilterAssetType" + }, + "updatedAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "visibility": { + "$ref": "#/components/schemas/EnumFilterAssetVisibility" + } + }, + "type": "object" + }, + "SearchFilterBranch": { + "properties": { + "albumIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "checksum": { + "$ref": "#/components/schemas/StringFilter" + }, + "city": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "country": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "createdAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "description": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "encodedVideoPath": { + "$ref": "#/components/schemas/StringFilter" + }, + "fileSizeInBytes": { + "$ref": "#/components/schemas/NumberFilter" + }, + "hasAlbums": { + "$ref": "#/components/schemas/BoolFilter" + }, + "hasPeople": { + "$ref": "#/components/schemas/BoolFilter" + }, + "hasTags": { + "$ref": "#/components/schemas/BoolFilter" + }, + "id": { + "$ref": "#/components/schemas/IdFilter" + }, + "isEncoded": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isFavorite": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isMotion": { + "$ref": "#/components/schemas/BoolFilter" + }, + "isOffline": { + "$ref": "#/components/schemas/BoolFilter" + }, + "lensModel": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "libraryId": { + "$ref": "#/components/schemas/IdFilterNullable" + }, + "make": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "model": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "ocr": { + "$ref": "#/components/schemas/StringSimilarityFilter" + }, + "originalFileName": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "originalPath": { + "$ref": "#/components/schemas/StringPatternFilter" + }, + "personIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "rating": { + "$ref": "#/components/schemas/NumberFilterNullable" + }, + "state": { + "$ref": "#/components/schemas/StringFilterNullable" + }, + "tagIds": { + "$ref": "#/components/schemas/IdsFilter" + }, + "takenAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "trashedAt": { + "$ref": "#/components/schemas/DateFilterNullable" + }, + "type": { + "$ref": "#/components/schemas/EnumFilterAssetType" + }, + "updatedAt": { + "$ref": "#/components/schemas/DateFilter" + }, + "visibility": { + "$ref": "#/components/schemas/EnumFilterAssetVisibility" + } + }, + "type": "object" + }, + "SearchOrder": { + "properties": { + "direction": { + "$ref": "#/components/schemas/AssetOrder", + "default": "desc" + }, + "field": { + "$ref": "#/components/schemas/SearchOrderField", + "default": "fileCreatedAt" + } + }, + "type": "object" + }, + "SearchOrderField": { + "enum": [ + "fileCreatedAt", + "localDateTime", + "fileSizeInBytes", + "rating" + ], + "type": "string" + }, "SearchResponseDto": { "properties": { "albums": { @@ -23277,102 +25336,394 @@ "SmartSearchDto": { "properties": { "albumIds": { + "deprecated": true, "description": "Filter by album IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "city": { + "deprecated": true, "description": "Filter by city name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "country": { + "deprecated": true, "description": "Filter by country name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdAfter": { + "deprecated": true, "description": "Filter by creation date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdBefore": { + "deprecated": true, "description": "Filter by creation date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "cursor": { + "description": "Cursor for the next page of results", + "minLength": 1, + "type": "string", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] + }, + "filter": { + "$ref": "#/components/schemas/SearchFilter", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "isEncoded": { + "deprecated": true, "description": "Filter by encoded status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isFavorite": { + "deprecated": true, "description": "Filter by favorite status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isMotion": { + "deprecated": true, "description": "Filter by motion photo status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isNotInAlbum": { + "deprecated": true, "description": "Filter assets not in any album", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isOffline": { + "deprecated": true, "description": "Filter by offline status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "language": { "description": "Search language code", "type": "string" }, "lensModel": { + "deprecated": true, "description": "Filter by lens model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "libraryId": { + "deprecated": true, "description": "Library ID to filter by", "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "make": { + "deprecated": true, "description": "Filter by camera make", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "model": { + "deprecated": true, "description": "Filter by camera model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "ocr": { + "deprecated": true, "description": "Filter by OCR text content", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "page": { + "deprecated": true, "description": "Page number", "maximum": 9007199254740991, "minimum": 1, - "type": "integer" + "type": "integer", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "personIds": { + "deprecated": true, "description": "Filter by person IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "query": { "description": "Natural language search query", @@ -23385,6 +25736,7 @@ "type": "string" }, "rating": { + "deprecated": true, "description": "Filter by rating [1-5], or null for unrated", "maximum": 5, "minimum": 1, @@ -23408,9 +25760,13 @@ "version": "v3", "state": "Updated", "description": "Using -1 as a rating is no longer valid." + }, + { + "version": "v3.1.0", + "state": "Deprecated" } ], - "x-immich-state": "Stable" + "x-immich-state": "Deprecated" }, "size": { "description": "Number of results to return", @@ -23419,11 +25775,28 @@ "type": "integer" }, "state": { + "deprecated": true, "description": "Filter by state/province name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "tagIds": { + "deprecated": true, "description": "Filter by tag IDs", "items": { "format": "uuid", @@ -23431,59 +25804,218 @@ "type": "string" }, "nullable": true, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenAfter": { + "deprecated": true, "description": "Filter by taken date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenBefore": { + "deprecated": true, "description": "Filter by taken date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedAfter": { + "deprecated": true, "description": "Filter by trash date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedBefore": { + "deprecated": true, "description": "Filter by trash date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "type": { - "$ref": "#/components/schemas/AssetTypeEnum" + "$ref": "#/components/schemas/AssetTypeEnum", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedAfter": { + "deprecated": true, "description": "Filter by update date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedBefore": { + "deprecated": true, "description": "Filter by update date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "visibility": { - "$ref": "#/components/schemas/AssetVisibility" + "$ref": "#/components/schemas/AssetVisibility", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withDeleted": { + "deprecated": true, "description": "Include deleted assets", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "withExif": { "description": "Include EXIF data in response", @@ -23562,98 +26094,380 @@ "StatisticsSearchDto": { "properties": { "albumIds": { + "deprecated": true, "description": "Filter by album IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "city": { + "deprecated": true, "description": "Filter by city name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "country": { + "deprecated": true, "description": "Filter by country name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdAfter": { + "deprecated": true, "description": "Filter by creation date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "createdBefore": { + "deprecated": true, "description": "Filter by creation date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "description": { + "deprecated": true, "description": "Filter by description text", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" + }, + "filter": { + "$ref": "#/components/schemas/SearchFilter", + "x-immich-history": [ + { + "version": "v3.1.0", + "state": "Added" + } + ] }, "isEncoded": { + "deprecated": true, "description": "Filter by encoded status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isFavorite": { + "deprecated": true, "description": "Filter by favorite status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isMotion": { + "deprecated": true, "description": "Filter by motion photo status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isNotInAlbum": { + "deprecated": true, "description": "Filter assets not in any album", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "isOffline": { + "deprecated": true, "description": "Filter by offline status", - "type": "boolean" + "type": "boolean", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "lensModel": { + "deprecated": true, "description": "Filter by lens model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "libraryId": { + "deprecated": true, "description": "Library ID to filter by", "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "make": { + "deprecated": true, "description": "Filter by camera make", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "model": { + "deprecated": true, "description": "Filter by camera model", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "ocr": { + "deprecated": true, "description": "Filter by OCR text content", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "personIds": { + "deprecated": true, "description": "Filter by person IDs", "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$", "type": "string" }, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "rating": { + "deprecated": true, "description": "Filter by rating [1-5], or null for unrated", "maximum": 5, "minimum": 1, @@ -23677,16 +26491,37 @@ "version": "v3", "state": "Updated", "description": "Using -1 as a rating is no longer valid." + }, + { + "version": "v3.1.0", + "state": "Deprecated" } ], - "x-immich-state": "Stable" + "x-immich-state": "Deprecated" }, "state": { + "deprecated": true, "description": "Filter by state/province name", "nullable": true, - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "tagIds": { + "deprecated": true, "description": "Filter by tag IDs", "items": { "format": "uuid", @@ -23694,55 +26529,198 @@ "type": "string" }, "nullable": true, - "type": "array" + "type": "array", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenAfter": { + "deprecated": true, "description": "Filter by taken date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "takenBefore": { + "deprecated": true, "description": "Filter by taken date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedAfter": { + "deprecated": true, "description": "Filter by trash date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "trashedBefore": { + "deprecated": true, "description": "Filter by trash date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "type": { - "$ref": "#/components/schemas/AssetTypeEnum" + "$ref": "#/components/schemas/AssetTypeEnum", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedAfter": { + "deprecated": true, "description": "Filter by update date (after)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "updatedBefore": { + "deprecated": true, "description": "Filter by update date (before)", "example": "2024-01-01T00:00:00.000Z", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" }, "visibility": { - "$ref": "#/components/schemas/AssetVisibility" + "$ref": "#/components/schemas/AssetVisibility", + "deprecated": true, + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v2", + "state": "Stable" + }, + { + "version": "v3.1.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" } }, "type": "object" @@ -23759,6 +26737,113 @@ ], "type": "string" }, + "StringFilter": { + "properties": { + "eq": { + "type": "string" + }, + "in": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "ne": { + "type": "string" + }, + "notIn": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + "StringFilterNullable": { + "properties": { + "eq": { + "nullable": true, + "type": "string" + }, + "in": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "ne": { + "nullable": true, + "type": "string" + }, + "notIn": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + "StringPatternFilter": { + "properties": { + "endsWith": { + "minLength": 1, + "type": "string" + }, + "eq": { + "nullable": true, + "type": "string" + }, + "in": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "like": { + "minLength": 1, + "type": "string" + }, + "ne": { + "nullable": true, + "type": "string" + }, + "notIn": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "notLike": { + "minLength": 1, + "type": "string" + }, + "startsWith": { + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "StringSimilarityFilter": { + "properties": { + "matches": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "matches" + ], + "type": "object" + }, "SyncAckDeleteDto": { "properties": { "types": { diff --git a/packages/sdk/src/fetch-client.ts b/packages/sdk/src/fetch-client.ts index 8983de8ef7..ff1a7104ce 100644 --- a/packages/sdk/src/fetch-client.ts +++ b/packages/sdk/src/fetch-client.ts @@ -1617,6 +1617,168 @@ export type SearchExploreResponseDto = { fieldName: string; items: SearchExploreItem[]; }; +export type IdsFilter = { + all?: string[]; + "any"?: string[]; + none?: string[]; +}; +export type StringFilter = { + eq?: string; + "in"?: string[]; + ne?: string; + notIn?: string[]; +}; +export type StringFilterNullable = { + eq?: string | null; + "in"?: string[]; + ne?: string | null; + notIn?: string[]; +}; +export type DateFilter = { + eq?: string; + gt?: string; + gte?: string; + lt?: string; + lte?: string; + ne?: string; +}; +export type StringPatternFilter = { + endsWith?: string; + eq?: string | null; + "in"?: string[]; + like?: string; + ne?: string | null; + notIn?: string[]; + notLike?: string; + startsWith?: string; +}; +export type NumberFilter = { + eq?: number; + gt?: number; + gte?: number; + "in"?: number[]; + lt?: number; + lte?: number; + ne?: number; + notIn?: number[]; +}; +export type BoolFilter = { + eq: boolean; +}; +export type IdFilter = { + eq?: string; + ne?: string; +}; +export type IdFilterNullable = { + eq?: string | null; + ne?: string | null; +}; +export type StringSimilarityFilter = { + matches: string; +}; +export type NumberFilterNullable = { + eq?: number | null; + gt?: number; + gte?: number; + "in"?: number[]; + lt?: number; + lte?: number; + ne?: number | null; + notIn?: number[]; +}; +export type DateFilterNullable = { + eq?: string | null; + gt?: string; + gte?: string; + lt?: string; + lte?: string; + ne?: string | null; +}; +export type EnumFilterAssetType = { + eq?: AssetTypeEnum; + "in"?: AssetTypeEnum[]; + ne?: AssetTypeEnum; + notIn?: AssetTypeEnum[]; +}; +export type EnumFilterAssetVisibility = { + eq?: AssetVisibility; + "in"?: AssetVisibility[]; + ne?: AssetVisibility; + notIn?: AssetVisibility[]; +}; +export type SearchFilterBranch = { + albumIds?: IdsFilter; + checksum?: StringFilter; + city?: StringFilterNullable; + country?: StringFilterNullable; + createdAt?: DateFilter; + description?: StringPatternFilter; + encodedVideoPath?: StringFilter; + fileSizeInBytes?: NumberFilter; + hasAlbums?: BoolFilter; + hasPeople?: BoolFilter; + hasTags?: BoolFilter; + id?: IdFilter; + isEncoded?: BoolFilter; + isFavorite?: BoolFilter; + isMotion?: BoolFilter; + isOffline?: BoolFilter; + lensModel?: StringFilterNullable; + libraryId?: IdFilterNullable; + make?: StringFilterNullable; + model?: StringFilterNullable; + ocr?: StringSimilarityFilter; + originalFileName?: StringPatternFilter; + originalPath?: StringPatternFilter; + personIds?: IdsFilter; + rating?: NumberFilterNullable; + state?: StringFilterNullable; + tagIds?: IdsFilter; + takenAt?: DateFilter; + trashedAt?: DateFilterNullable; + "type"?: EnumFilterAssetType; + updatedAt?: DateFilter; + visibility?: EnumFilterAssetVisibility; +}; +export type SearchFilter = { + albumIds?: IdsFilter; + checksum?: StringFilter; + city?: StringFilterNullable; + country?: StringFilterNullable; + createdAt?: DateFilter; + description?: StringPatternFilter; + encodedVideoPath?: StringFilter; + fileSizeInBytes?: NumberFilter; + hasAlbums?: BoolFilter; + hasPeople?: BoolFilter; + hasTags?: BoolFilter; + id?: IdFilter; + isEncoded?: BoolFilter; + isFavorite?: BoolFilter; + isMotion?: BoolFilter; + isOffline?: BoolFilter; + lensModel?: StringFilterNullable; + libraryId?: IdFilterNullable; + make?: StringFilterNullable; + model?: StringFilterNullable; + ocr?: StringSimilarityFilter; + or?: SearchFilterBranch[]; + originalFileName?: StringPatternFilter; + originalPath?: StringPatternFilter; + personIds?: IdsFilter; + rating?: NumberFilterNullable; + state?: StringFilterNullable; + tagIds?: IdsFilter; + takenAt?: DateFilter; + trashedAt?: DateFilterNullable; + "type"?: EnumFilterAssetType; + updatedAt?: DateFilter; + visibility?: EnumFilterAssetVisibility; +}; +export type SearchOrder = { + direction?: AssetOrder; + field?: SearchOrderField; +}; export type MetadataSearchDto = { /** Filter by album IDs */ albumIds?: string[]; @@ -1630,10 +1792,13 @@ export type MetadataSearchDto = { createdAfter?: string; /** Filter by creation date (before) */ createdBefore?: string; + /** Cursor for the next page of results */ + cursor?: string; /** Filter by description text */ description?: string; /** Filter by encoded video file path */ encodedVideoPath?: string; + filter?: SearchFilter; /** Filter by asset ID */ id?: string; /** Filter by encoded status */ @@ -1658,6 +1823,7 @@ export type MetadataSearchDto = { ocr?: string; /** Sort order */ order?: AssetOrder; + orderBy?: SearchOrder; /** Filter by original file name */ originalFileName?: string; /** Filter by original file path */ @@ -1725,6 +1891,8 @@ export type SearchAssetResponseDto = { count: number; facets: SearchFacetResponseDto[]; items: AssetResponseDto[]; + /** Cursor for the next page of results */ + nextCursor: string | null; /** Next page token */ nextPage: string | null; /** Total number of matching assets */ @@ -1757,6 +1925,7 @@ export type RandomSearchDto = { createdAfter?: string; /** Filter by creation date (before) */ createdBefore?: string; + filter?: SearchFilter; /** Filter by encoded status */ isEncoded?: boolean; /** Filter by favorite status */ @@ -1821,6 +1990,9 @@ export type SmartSearchDto = { createdAfter?: string; /** Filter by creation date (before) */ createdBefore?: string; + /** Cursor for the next page of results */ + cursor?: string; + filter?: SearchFilter; /** Filter by encoded status */ isEncoded?: boolean; /** Filter by favorite status */ @@ -1891,6 +2063,7 @@ export type StatisticsSearchDto = { createdBefore?: string; /** Filter by description text */ description?: string; + filter?: SearchFilter; /** Filter by encoded status */ isEncoded?: boolean; /** Filter by favorite status */ @@ -7501,6 +7674,12 @@ export enum JobName { IntegrityDeleteReportType = "IntegrityDeleteReportType", IntegrityDeleteReports = "IntegrityDeleteReports" } +export enum SearchOrderField { + FileCreatedAt = "fileCreatedAt", + LocalDateTime = "localDateTime", + FileSizeInBytes = "fileSizeInBytes", + Rating = "rating" +} export enum SearchSuggestionType { Country = "country", State = "state",